You are viewing a single thread.
View all comments View context
3 points

First method does not store the number itself anywhere. Let’s assume that you store apples. I come and ask you “How many apples do you have?”. To answer, you go and count every single apple one by one and return me the number. It’s very easy if you have a small number of apples, but if you have, let’s say, 5000 apples - you can see how long it may take.

Second option is you keeping a track of how many apples you have in stock by having it written down somewhere. If I ask you “How many apples do you have?” you just pull out your notepad and tell me the number. If you give me an apple, you just adjust the number you have written down already.

permalink
report
parent
reply
1 point
*

Okay, I swear I almost have it. Where does the stock number come from? Does it regularly pull a number instead of counting, is that the difference? I think what you’re saying is, instead of it checking live, it has a total number taken every so often. Yes?

Edit: Okay I get it, except for where my initial count comes from. I guess it starts at 0?

  • First way, constantly checking the number of comments and just goes off of that.
  • Second way, stores the number 0 at first and then only updates when a comment is added or removed.

Am I ready for my certificate yet? Yikes. Thanks for going slow, lol.

permalink
report
parent
reply
3 points

No, you just update the number whenever you make any changes to how many apples you have.

permalink
report
parent
reply

Fediverse

!fediverse@lemmy.world

Create post

A community to talk about the Fediverse and all it’s related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!

Rules

  • Posts must be on topic.
  • Be respectful of others.
  • Cite the sources used for graphs and other statistics.
  • Follow the general Lemmy.world rules.

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

Community stats

  • 5.2K

    Monthly active users

  • 1.9K

    Posts

  • 65K

    Comments