Remember the good old days when you’d spend an hour after school typing in a game on your Sharp MZ-80A or Commodore 64, because you didn’t have any blank tapes left? I do.
If you long for those days, or if you never experienced them, then Cymon’s Games is for you. Filled with tiny games for you to grok, it teaches the hacker approach to programming:
The best way to do it is to read some stuff written by masters of the form, write some things yourself, read a lot more, write a little more, read a lot more, write some more … and repeat until your writing begins to develop the kind of strength and economy you see in your models.
Just watch out for the goto statements. Nya!
5 Comments
Warms my heart. I was just about to link to your site and I see this there.
Thanks for the great birthday gift.
It’s a fun site. It’s how I learned to program, so I’m just spreading the love.
Also, true bloggers never pass up an opportunity to add grist to the blogging mill!
I wrote that goto statement and it’s bloody perfect I’m telling you.
So far nobody has come up with an implementation that is either as easy to read or that gives the compiler the right cues to optimise the code.
You’ve admitted that you usually code in Z80 machine code. In C, an appropriate use of goto would be to exit multiple nested loops. Using it as a looping construct is bad form where there are more structured alternatives available.
GOTOs are much more flexible that structured program. Its just denigrated because its not good for program that needs to be maintained by others in a production environment. By GOTO is fun and can you let you do things that structured programmers can only fantasize about.
Post a Comment