TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Toothpaste Null-Terminator

92 点作者 userm0d9 个月前

27 条评论

mrob9 个月前
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 &quot;dentifrice&quot; in scientific papers) does not remove any more plaque than brushing without it. Here&#x27;s a systematic review from 2016:<p>&gt;Does dentifrice use help to remove plaque? A systematic review<p><a href="https:&#x2F;&#x2F;pubmed.ncbi.nlm.nih.gov&#x2F;27513809&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pubmed.ncbi.nlm.nih.gov&#x2F;27513809&#x2F;</a><p>&quot;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.&quot;<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&#x27;m more concerned with avoiding fluoride, but if you don&#x27;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&#x27;m personally skeptical that messing with your mouth&#x27;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:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=cwN983PnJoA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=cwN983PnJoA</a>
评论 #41277231 未加载
评论 #41277486 未加载
评论 #41278892 未加载
评论 #41281194 未加载
评论 #41278896 未加载
评论 #41277208 未加载
评论 #41278244 未加载
jphoward9 个月前
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&#x2F;all on easy view - then it’s obvious it’s the last even without a sentinel?
评论 #41276491 未加载
评论 #41276393 未加载
评论 #41276891 未加载
jmorenoamor9 个月前
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...
评论 #41276833 未加载
评论 #41276902 未加载
评论 #41277414 未加载
评论 #41280692 未加载
mistercow9 个月前
&gt; 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.
评论 #41282006 未加载
RedNifre9 个月前
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&#x27;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.
评论 #41277562 未加载
评论 #41276996 未加载
layer89 个月前
&gt; 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.
评论 #41277337 未加载
adontz9 个月前
I believe neurotypical and neurodivergent people have very different understanding of this article.
评论 #41280450 未加载
praptak9 个月前
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&#x27;t work if multiple threads search the same table for different values)
TacticalCoder9 个月前
&gt; 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 &quot;poison pills&quot;: 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&#x2F;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>.
unwind9 个月前
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&#x27;t specify language but still.
teaearlgraycold9 个月前
Am I the only one that has no trouble buying toothpaste when I have to squeeze the tube extra hard?
评论 #41276457 未加载
评论 #41276270 未加载
评论 #41276514 未加载
评论 #41276318 未加载
评论 #41276209 未加载
jxnsjxjjdn9 个月前
Inline signaling is often flawed. Nevertheless the real life analog would be more akin to kanban not sentinal value
bediger40009 个月前
I had a roommate that kept a can of &quot;King Oskar&quot; brand fish balls. When that was visible on the shelf, he went to the grocery store.
ok_dad9 个月前
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.
gliderShip9 个月前
It must also be implememted in toilet paper packs. Last roll should be of different color.
评论 #41276744 未加载
评论 #41277588 未加载
评论 #41276419 未加载
joshstrange9 个月前
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&#x27;t let myself pick up or use the last item until I&#x27;ve ordered more to prevent &quot;I&#x27;ll remember to do that later&quot;, at worst I&#x27;ll set a recurring hour reminder to buy more so I don&#x27;t forget.<p>I just have rows of everything I use that&#x27;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&#x2F;limit my subscribe and save (or skip buying more when it&#x27;s on sale if it&#x27;s not automatic), if it&#x27;s down to the last item or two then I might order more.
Terr_9 个月前
I do this but for something I think is even more critical: Toilet paper! (Running fully out is much worse.)<p>The &quot;last&quot; roll of last resort is cheap 1-ply, and it serves as an unavoidable reminder to restock and replace it.
评论 #41282562 未加载
0823498723498729 个月前
In the old* days, &quot;control break&quot; 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?
kennu9 个月前
Brushing teeth is a good example of activity where you use almost zero cognitive effort, because the daily routine is so automated. That&#x27;s why it&#x27;s so easy to forget to buy more toothpaste - you just don&#x27;t think about it at all. I completely get the sentinel idea as a trigger that turns your brain back on. It&#x27;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.
robertlagrant9 个月前
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&#x27;re almost out.<p>[0] <a href="https:&#x2F;&#x2F;whogivesacrap.org" rel="nofollow">https:&#x2F;&#x2F;whogivesacrap.org</a>
bkyan9 个月前
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&#x27;m running low on anything.
评论 #41280903 未加载
schwartzworld9 个月前
&gt; 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
corytheboyd9 个月前
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
transcriptase9 个月前
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.
cybervegan9 个月前
This wouldn&#x27;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&#x27;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 &quot;special&quot; one because they prefer it, or don&#x27;t care about your weird toothpaste order kink, it all breaks down.<p>Not all things we do on computers translate well to meatspace.
评论 #41278190 未加载
mplewis9 个月前
Don’t you get, like, two weeks out of the end of a tube of toothpaste? That’s plenty of time to put it on your shopping list.
TeeWEE9 个月前
Hahaha, why not just check if the toothpaste you&#x27;re grabbing is the last one?
评论 #41277269 未加载