I use an even simpler and more reliable system to avoid running out of toothpaste: brushing with plain water. Evidence suggests that brushing with toothpaste (called "dentifrice" in scientific papers) does not remove any more plaque than brushing without it. Here's a systematic review from 2016:<p>>Does dentifrice use help to remove plaque? A systematic review<p><a href="https://pubmed.ncbi.nlm.nih.gov/27513809/" rel="nofollow">https://pubmed.ncbi.nlm.nih.gov/27513809/</a><p>"The cumulative evidence for this systematic review demonstrates that there is moderate certainty that toothbrushing with a dentifrice does not provide an added effect for the mechanical removal of dental plaque."<p>However, plaque removal is not the only purported function of toothpaste. It can also serve as a fluoride delivery system, and fluoride has strong evidence for strengthening teeth. I personally drink a lot of tea, which is a fluoride hyper-accumulator, so I'm more concerned with avoiding fluoride, but if you don't drink tea this might influence your decision to use toothpaste.<p>There are also some toothpastes with antimicrobial ingredients. Those also have strong evidence for actually doing something, although I'm personally skeptical that messing with your mouth's microbiome like that is a good idea.<p>Additionally, I believe that toothbrush wear is an underestimated factor in cleaning efficacy. Toothbrush bristles are manufactured with microscopic texturing that helps remove plaque. I can feel the difference when changing from a worn to a new toothbrush. Ben Krasnow of Applied Science has a video on Youtube with electron micrographs showing the difference:<p><a href="https://www.youtube.com/watch?v=cwN983PnJoA" rel="nofollow">https://www.youtube.com/watch?v=cwN983PnJoA</a>
I don’t understand how this works with systems like toothpaste? I get if you somehow stored your toothpaste in some queue-like structure where you only see 1 at a time, then yes, reaching the last would be helpful. But surely they are in a cupboard or drawer or something?<p>To know to start the sentinel toothpaste he must search around and prove it’s the only one left - by doing this he doesn’t need the sentinel anyway, as the searching process with yield only one, sentinel or not?<p>If it doesn’t need a search, e.g. they are in a line/all on easy view - then it’s obvious it’s the last even without a sentinel?
Buy two tubes, while true, when you finish a tube, add one toothpaste tube to the shopping list, done.<p>Works great for an average person who usually visits the store. Adjust the initial putchase if you visit the store twice a year.<p>Also works great for many suplies like coffee, pasta, legumes...
> When I find that the only tube of toothpaste left is that special, sentinel toothpaste, then I know it is time to buy more toothpaste. And then I have ample time to do so.<p>I might suggest phrasing this a little differently. Obviously, when you find that <i>any</i> tube is the only tube left, you know it’s time to buy more toothpaste. The problem is that you realize this early in the morning or right before bed, and so you’re likely to forget. The advantage of the “sentinel toothpaste” is that it continues to remind you after that moment, so that you’ll actually remember when you have time to do something about it.<p>And I think that captures the key thing about a sentinel value: it captures state in a place where you’re already storing state, without requiring you to wrap the state in some external structure, e.g. putting a sticky note on your mirror or storing a string’s length in a separate field.
Neat, but I prefer my own method:<p>1. Have two toothpastes (actually two of everything)
2. When one gets used up, remove the checkmark from my shopping list (just a simple checkmark list on my phone in Google notes)
3. When in the store, buy everything that's not checked on the shopping list<p>Works all the time, except during the CoVID toilet paper crisis, which made me increase my prepper level to 3 of everything.
> When I find that the only tube of toothpaste left is that special, sentinel toothpaste, then I know it is time to buy more toothpaste.<p>I buy more $CONSUMABLE whenever I take the last unit of $CONSUMABLE out of storage. If I don’t order online or add it to the grocery list right away, I put the old empty (second-to last) container in a place where it is likely to prompt me to resupply in a timely manner, which is often different from the place where $CONSUMABLE is consumed. Otherwise there’s the risk that the “special sentinel” is always encountered at a place or time where resupplying is inconvenient, and so it might run empty before you get around to it, despite its “special” nature. This approach also has the benefit that you don’t have to switch from your favorite variety of $CONSUMABLE.
The original application of the sentinel technique makes linear search faster.<p>Looking for 42 in a table of integers? Put 42 after the last element (obviously you need n+1 elements allocated) and your loop does not need to check array bounds, only checking for a[i]==42 is now guaranteed to stop and not read past the array bounds.<p>(obviously it doesn't work if multiple threads search the same table for different values)
> In programming, a sentinel value is a simple way to keep track of the end of a list of items.<p>A type of sentinels that are cute are "poison pills": when you have a queue and know at some points that no more items are coming, and several consumers, you can simplify the logic by putting as many poison pills at the end of queue as there are consuming threads.<p>When a consumer finds a poison pill, he stops removing/processing items for the queue.<p>As there are the same number of poison pills as there are consumers, all consuming threads shall eventually stop.<p>I probably learned about poison pills back in the days either in <i>Effective Java</i> or in <i>Java Concurrency in practice</i>.
I think the point kind of swooshed me (I notice taking out the last tube as suggested by another comment).<p>Adam is obviously massively competent and known etc, but as an avid SO poster I have to point out the potential accidental footgun discharge:<p>In C abs() returns int, you must use fabs(). Not sure about other C-like languages and the article doesn't specify language but still.
Just use kanban. Put one backup toothpaste in a drawer and when you get it out add it to the shopping list right away. Works for anything non perishable which you can stock up on, like toilet paper or cleaning supplies.
Buying a different toothpaste seems very odd, you need to ensure ordering to make this work so all the extra toothpastes are going to be in one spot. When you grab the last one then you order more or add it to your shopping list. Personally I don't let myself pick up or use the last item until I've ordered more to prevent "I'll remember to do that later", at worst I'll set a recurring hour reminder to buy more so I don't forget.<p>I just have rows of everything I use that's consumable in my pantry or bathroom closet (depending on the item) in rows. If the row is getting too deep then I need to skip/limit my subscribe and save (or skip buying more when it's on sale if it's not automatic), if it's down to the last item or two then I might order more.
I do this but for something I think is even more critical: Toilet paper! (Running fully out is much worse.)<p>The "last" roll of last resort is cheap 1-ply, and it serves as an unavoidable reminder to restock and replace it.
In the old* days, "control break" programming assumed sorted inputs, and used any difference between the group of this record and the group of the next as an implicit terminator.<p>* cards through mainframes, so roughly 1910s-1960s?
Brushing teeth is a good example of activity where you use almost zero cognitive effort, because the daily routine is so automated. That's why it's so easy to forget to buy more toothpaste - you just don't think about it at all. I completely get the sentinel idea as a trigger that turns your brain back on. It's probably not just the different packaging, but also the different taste, that keeps reminding about it until you buy more of the usual stuff.
If, as I do, you buy Who Gives a Crap?[0] toilet paper, they send you some of them in a gold paper wrap to let you know you're almost out.<p>[0] <a href="https://whogivesacrap.org" rel="nofollow">https://whogivesacrap.org</a>
I use consumables like toothpaste as top-up items to get past the minimum threshold to qualify for free shipping at Amazon and Walmart. This implicitly triggers a mental check to see if I'm running low on anything.
> When I find that the only tube of toothpaste left is that special, sentinel toothpaste, then I know it is time to buy more toothpaste.<p>I don’t get it. If there’s one tube left, what does it matter what kind it is
I want to say something smart and clever but it’s just some person talking about a fun little comparison they make between mundane life tasks and programming concepts… it’s dumb and fun, yay
Sounds a lot like the anecdotes from the early 2000s of soldiers being given tracer rounds to put near the end of their magazines to indicate they’re nearly out.
This wouldn't work in a situation where not everyone agrees to abide by the arbitrary rule of using toothpaste (or whatever) in as specific order. In a computer's memory, or storage media, the ordering is intrinsic, but in your bathroom cupboard it is not, and would have to be enforced by convention or some other contrivance. If someone decided they wanted to open the "special" one because they prefer it, or don't care about your weird toothpaste order kink, it all breaks down.<p>Not all things we do on computers translate well to meatspace.