Tuesday 18 March 2008

Basic eating

Here's a quick summary of my eating habits at the moment....

10 DIM meals = ( "Spaghetti bolognese", "Stir-fry", ↷
   "Sossidges & Beans"
, "Steak & Chips", ↷
   "Mixed Bean & Rice thing" )

15 length = LEN(meals)
17 spagCnt = 0
19 sfCnt = 0
20 DO

30 IF spagCnt = 1
40 GOSUB cook("Spaghetti bolognese")
50 spagCnt = 0
55 GOTO 20
60 END IF
70 IF sfCnt = 1
80 GOSUB cook("Stir-fry")
90 sfCnt = 0
100 GOTO 20
110 END IF

120 meal$ = meals(INT(length * RND) + 1)
125 GOSUB cook(meal$)
130 IF meal$ = "
Spaghetti bolognese"
140 spagCnt = 1
150 END IF

160 IF meal$ = "Stir-fry"
170 sfCnt = 1
180 END IF

190 UNTIL (Sanity < 0)
200 GOTO TAKEOUT!

Points awarded for explaining the reason for the two special cases :)

Yes, I have way too much time on my hands and am quite possibly losing my mind.

Two things I have discovered from doing this are:
  • Blogger's editor is 4TS and fudges things up if you try to do clever things in the "Edit Html" section first.

  • The one thing I really missed when writing this was the Indentation. Please find your nearest programmer, inspect his/her code and if you find it wanting in indentation, head-slap them.
    Repeatedly.
    Until.
    They.
    Learn.
    GOTO head-slap.

2 comments:

da Architect said...

Make them code in Python... that will fix part of their indentation ways.

Otherwise refer to #45 in "100 interesting and effective ways to use a punchdown tool".

Also... dude. Are there no kebabs ?

Greg said...

No kebabs :( And the Indian Restaurants are of the school canteen variety :/