Toothpaste Null-Terminator
11–20 of 81 posts
Re: Toothpaste Null-Terminator
#12I 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? 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…
Re: Toothpaste Null-Terminator
#13It must also be implememted in toilet paper packs. Last roll should be of different color.
Re: Toothpaste Null-Terminator
#141. 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
Works all the time, except during the CoVID toilet paper crisis, which made me increase my prepper level to 3 of everything.
Re: Toothpaste Null-Terminator
#15Am I the only one that has no trouble buying toothpaste when I have to squeeze the tube extra hard?
Re: Toothpaste Null-Terminator
#16I 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? 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…
Similarly with the emoji list. If can reliably remember which emoji is last, then each is equally as good as a sentinel. But if you can't, having one which is "special" will help remind you.
Re: Toothpaste Null-Terminator
#17Am I the only one that has no trouble buying toothpaste when I have to squeeze the tube extra hard?
Post covid I like to keep at least a month stash of anything cheap and durable as toothpaste.
Re: Toothpaste Null-Terminator
#18Looking 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.
(obviously it doesn't work if multiple threads search the same table for different values)
Re: Toothpaste Null-Terminator
#19Re: Toothpaste Null-Terminator
#20Am I the only one that has no trouble buying toothpaste when I have to squeeze the tube extra hard?
Not at all. A tube of toothpaste lasts me a long time, and pre-covid I would usually only own one tube a a time. Post covid I like to keep at least a month stash of anything cheap and durable as toothpaste.
We are a family of 3, and teeth are brushed at least twice a day. 5 tubes of toothpaste would last 6 month. That’s a lot of toothpaste.