[creativity]
[identity][home][verbosity]
[transitivity]
creativity

Where the spirit does not
work with the hand,
there is no art.

- Leonardo da Vinci

0 1 1 1 0 7

[old_pascal]

I got a 5 on the College Board AP Computer Science AB Exam in 1996, the last year it was offered in Pascal. I think I was hooked on programming the second I got my hands on my dad's Trash-80 and the BASIC programs printed in 3-2-1 Contact magazine. I couldn't have been much older than ten. I don't know how many times I typed that little three-line program that set the thing counting on its own, but every time it was immensely satisfying to have told it to tackle a problem and watched it obey.

10 i=i+1
20 print i
30 goto 10

When I first learned Pascal, of course the first thing I did was translate this same stupidity into the new language (plus a few modifications).

. stoopid.pas . stoopid.exe

The next time I got excited about programming was when I was first exposed to the idea of recursion. That felt like real power - defining a complex problem in terms of a few simple base cases and having a procedure call itself to solve the others.

function factorial(base) {
  if (base < 2) return 1;
  else return base * factorial(base-1);
}

Then I started learning data structures. Linked lists, trees, hash tables, objects - all started making me see problems in different ways. This is my first implementation of a tree to store and operate on a set of numbers.

. treenums.pas . treenums.exe

The curriculum for the AP AB prep course consisted largely of skeleton code frameworks to which we had to apply key pieces of code. This culminated in a fairly large application that simulated fish and shark populations in a toric ocean, much like John Conway's game of Life.

. display.i . random.i . reclist.i . screen.i . wator.pas
. wator.exe

[ Next]



[creativity]
[identity] [home] [verbosity]
[transitivity]

[comments/blog]

[ ]

[401valid]