More JavaScript haiku

I first published a JavaScript haiku called ‘Fear of tomorrow’ here. Well, I’ve written some more. Apparently these are more likely to be classed as Senryuu, but what do I know. Anyway, here are some others that I’ve written, with the code first and the way it’s supposed to be read following it, and then an explanation of the ‘meaning’:

A baker’s dozen?

var i=1;
while(i<13){
 alert(i++);
}

var i equals one
while i is less than 13
alert i plus plus

Although on the face of it just a script which displays numbers from 1 to 12, there is some ambiguity of meaning in the use of i++ which causes the reader to think and question whether the value of i will be alerted before being incremented or the other way round. It is, of course, alerted before being incremented but this moment of doubt reflects the author’s questioning of the logic behind the term “baker’s dozen” (being 13) and the discord it has with a ‘true’ dozen of 12 and the indecision as to which one to count up to.

The value of being together

i=.5;
u=Math.random();
alert(u+i);

i equals point 5
u equal math dot random
alert u plus i

This short piece raises questions of the value of two people joining together and whether the sum is greater or smaller than average. The first person (i) is an ‘average’ person and if the second person (u) is of above average value then the total will be greater than one. If not, then the value will be below one. This poem can be applied to anyone’s life and if you give yourself a score of 0.5 and then rate your partner accordingly the same equation can be used to determine whether you should dump them or not.

Eight days of sailing

var course="straight";
navigator==true;
alert(course.length);

var course equals straight
navigator equals true
alert course dot length

A straightforward nautical tale where the navigator confirms that the voyage will consist of eight days of straight sailing.

More dubious works will doubtless follow…

Leave a Reply

Your email address will not be published. Required fields are marked *