Tim Ward
2022-04-14 18:40:51 UTC
If there are n telegraph poles, how many gaps are there between them?
Well, we all know that one, don't we, the answer is n-1, or n, or n+1,
depending on what we're trying to achieve. And in any case, since the
invention of collection classes, iterators, ect ect, who cares?
Right?
Wrong. Today I discovered a use case for n-2.
Making aloo parathas. I make them all first, and then cook them all,
because that's less stressful, because less real-time, than trying to
roll out the next one whilst cooking the previous one.
Which means storing them somewhere in the meantime. I don't have that
much real estate in the kitchen, and if I pile them up they stick
together. So I pile them up separated by layers of cling film (pretty
well the only remaining use case for cling film in this household, nasty
environmentally unfriendly stuff).
So, if I'm making four aloo parathas, how many pieces of cling film do I
need? Three, right, 'cos the pile goes: paratha, cling film, paratha,
cling film, paratha, cling film, paratha, right?
Wrong. Because the last one never goes on the pile! It goes straight
from rolling out to the frying pan, so only two layers of cling film are
needed. Which I worked out, of course, *after* taking the third layer of
cling film off the roll.
Well, we all know that one, don't we, the answer is n-1, or n, or n+1,
depending on what we're trying to achieve. And in any case, since the
invention of collection classes, iterators, ect ect, who cares?
Right?
Wrong. Today I discovered a use case for n-2.
Making aloo parathas. I make them all first, and then cook them all,
because that's less stressful, because less real-time, than trying to
roll out the next one whilst cooking the previous one.
Which means storing them somewhere in the meantime. I don't have that
much real estate in the kitchen, and if I pile them up they stick
together. So I pile them up separated by layers of cling film (pretty
well the only remaining use case for cling film in this household, nasty
environmentally unfriendly stuff).
So, if I'm making four aloo parathas, how many pieces of cling film do I
need? Three, right, 'cos the pile goes: paratha, cling film, paratha,
cling film, paratha, cling film, paratha, right?
Wrong. Because the last one never goes on the pile! It goes straight
from rolling out to the frying pan, so only two layers of cling film are
needed. Which I worked out, of course, *after* taking the third layer of
cling film off the roll.
--
Tim Ward - 07801 703 600
www.brettward.co.uk
Tim Ward - 07801 703 600
www.brettward.co.uk