Nov. 23rd, 2007

j4: (dodecahedron)
This is what I was doing last night that kept my hands too busy to blog:



It's a birthday card for my office-mate, who was giving a talk today celebrating 40 years of programming. I'd been thinking of making a cake along these lines, but I ended up not really having time (and somebody else was planning to buy cake anyway, and I rationalised the running-out-of-time with the realisation that it would be setting a dangerous precedent if I started doing cakes for colleagues' birthdays).

Originally I wanted the punched card to represent the code for (e.g.) "print 'Happy birthday'", but I couldn't work out how to convert code to card-punches, and couldn't source the knowledge from within my social circle. One person I asked did offer the following code:

BEGIN
FILE F (KIND=REMOTE);
EBCDIC ARRAY E [0:11];
REPLACE E BY "HAPPY BIRTHDAY!";
WHILE TRUE DO
  BEGIN
  WRITE (F, *, E);
  END;
END.


Which looked familiar from wikipedia (where I got the punched card design, too). It also looked wrong (the length of the array was still set for "HELLO WORLD", not "HAPPY BIRTHDAY"). So I corrected that and included it inside the card, and made the hole 'punches' (cut by hand with a craft-knife) purely decorative, spelling out "HAPPY BIRTHDAY". Hence not being able to do a 'B' (I got into what I thought was an irrecoverable mess with the shape/size of the letters, but sorted it out in the end).

Do you know how many numbers you have to write to produce an 80-column punched card? And how many holes you have to cut out to make it say 'happy birthday'?

But he was absolutely delighted, and that made it all worthwhile.

June 2025

S M T W T F S
1234567
891011121314
15 161718192021
22232425262728
2930     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 14th, 2026 10:26 pm
Powered by Dreamwidth Studios