Monday 30 June 2014

Flagging Demand


England car flags being sold for a discount at a supermarket in London, after England's first-round exit from the Football World Cup.

If I had any sense I would buy the lot, and sell them before Euro 2016 at a 700% profit.

Saturday 21 June 2014

Seasons 2: Island Gardens, London

Move your cursor over the image below, and it should change to another image of the same scene in a different season. (If it doesn't work, check that your browser has JavaScript enabled.)


Base photo:31 May 2014
Mouseover photo:13 November 2011
Approx. coordinates:51.487°N, 0.008°W

One day in the autumn of 2011, I mentioned to my cousin that lots of people walk their dogs in my neighbourhood park. She likes dogs, so she asked for photos. The mouseover photo in this post is one of the few photos I took that day which does not have a dog in it. Summer is my favourite season in London, but there's no denying that the sugar maple trees in the park are at their best in autumn.

The base photo was taken last month, but I thought summer solstice is as good a day as any for a Seasons post.

Happy solstice, everyone!

Friday 20 June 2014

The Roti Algorithm

Rotis (by which I mean the thin, circular rotis cooked without oil, called ruti in Bangla) are made by rolling atta (unleavened wholegrain wheat) dough into thin circular disks, which are then cooked over a dry tawa.

Cooking one roti at a time is inefficient because firstly, you waste time placing each roti on the tawa and then taking it off, and secondly, by the time the last roti is cooked, the first one is no longer warm. It is possible to cook several rotis on the tawa simultaneously, but to be properly cooked, each side of each roti must be in contact with the tawa for roughly the same period of time. Like most experienced roti-makers, my mother achieves this by flipping the rotis in a complex sequence. But when I asked her, she could not tell me what exact sequence she follows, because the technique, born of long experience, comes naturally to her.

So I gave some thought to the problem, and came up with an algorithm for cooking any number of rotis on the tawa at the same time, thus bringing advanced techniques within the grasp of even the most hapless roti-noob.

The algorithm is best illustrated by a flowchart:


A couple of definitions which are used in the flowchart or later in this post:
"Lowest Side" means the lower side of the bottom roti in the stack (i.e. the side in contact with the tawa).
"T" means the time taken to cook the Lowest Side, and is counted from the instant of completion of the most recent flip of all the rotis in the stack.

Some notes on the algorithm:
As it is inconvenient to flip or remove rotis which are in the middle or bottom of the stack, I designed the algorithm so that (a) the flip operation only involves flipping either the top roti or the whole stack, and (b) once a roti cooked on both sides, the next action always brings it to the top of the stack whence it can easily be removed.
On high heat, the Lowest Side gets cooked before it can conduct much heat to the roti above it. So while the Lowest Side is being cooked, the states of any rotis above the bottom roti are not significantly affected.
To make multiple rotis at once, the dough has to be fairly dry so that the rotis in the stack do not stick to each other. If they're still sticky, it helps to spread a thin film of dry atta on each roti.
It is rarely necessary and never practical to cook more than 5-6 rotis at a time, because the time thereby saved is offset by the difficulty of flipping several rotis at once. But the algorithm works for any number of rotis.

The algorithm is actually easier to master than the flowchart might suggest. Once you get the hang of it, the next step is obvious even without referring to the flowchart.

To give you an idea of how the algorithm works, I made a short animated video (0:36) for 6 rotis. Each side of each roti is represented by a black rectangle, which turns red when it is cooked. T in the video is 1.5 seconds, which is shorter than the actual time it takes to cook one side of a roti in real life.

Friday 13 June 2014

Atheism and the En Dash

There was an odd article in the Guardian today which argued that "there are no atheist babies". Specifically, the author took issue with a Richard Dawkins quote: "When you say X is the fastest growing religion, all you mean is that X people have babies at the fastest rate. But babies have no religion."

'Atheism' can mean either a rejection of the existence of deities (explicit atheism) or, more inclusively, an absence of belief in the existence of deities (implicit atheism). The article is odd because it argues that babies are not explicitly atheist, while Dawkins was only saying that babies are implicitly atheist.

But my main quibble with the article is the paragraph below:


Not one but two consecutive lines begin with an en dash. I really think that a self-respecting newspaper should precede a parenthetical en dash with a non-breaking space so that a line can end – but never begin – with an en dash. In HTML, it is coded as  – followed by an ordinary space.

In some of my old posts you might come across a spaced en dash not preceded by a non-breaking space, but there is an explanation for that. Anyway, I must not get complacent; I learn new things all the time. In a recent post I wanted to use double quotes followed by a left parenthesis, and I realised that some browsers might insert a soft return between the two punctuation marks. In case the information is of use to anyone, I got around it by coding the text thus: <nobr>"(S)he</nobr> did it!"



Edit: I have just learnt from Tommy that <nobr> has been deemed a non-standard element, but the same effect can be achieved with CSS:
<span style="white-space:nowrap;">"(S)he</span> did it!"
Like I said, I learn new things all the time.

Wednesday 11 June 2014

Bellingham, 12:53 pm


On the drive down from Mount Baker, I saw a good example of a 22º halo, an optical phenomenon caused by the refraction of sunlight by hexagonal ice crystals in a layer of cirrostratus nebulosus cloud. The inner edge of the halo is red and the outer edge bluish, though this could be seen more clearly with the naked eye than in the photo.

The 22º halo is actually a fairly common phenomenon, occurring up to 100 days a year in temperate latitudes. If you haven't seen it, it's probably because you are wise enough not to stare at the sun.