commodore 64

    commodore 64

Sometime around 1994, my father bought me a Commodore 64. I quickly got bored of the few games I had, and God! It took ages to load a game from a tape. And if I miss-typed the game address, I had to rewind the tape and start over again. There was a small local computer club in my neighborhood. There were kids playing games like I did, and some older people just typing text into a blue screen. Quite boring, but they seemed to enjoy it. Sometimes they even got serious and argued about it. Driven by a toddler’s instinct to imitate older people, I decided to do what the old men were doing. Those guys had a book, “Basic programming for Commodore 64”. I am not very sure about the title, it was plain white with the title in blue. I somehow managed to make a hard copy of the book.

The book contained 50 or so small programs in Basic, and I think an explanation of the code. I am not sure again, because back then I didn’t knew English. My whole vocabulary consisted on (on, off, start, pause, level, game over), the English words you could encounter while dealing with consoles and video games. It was actually 4 years later when I started learning elementary English at school. All I could do was to type the programs and see how it runs. Those kind of programs that draw vertical bars on the screen, a moving disc, a blinking rectangle.. I remember the most “advanced” program had to play from and record to a tape.

As simple the programs were, I was impatiently rushing to type all the code to see the results after execution. I was following the instructions perfectly, and it was amusing. After couple of programs, I started to notice some things. Some of those lines were identical among some programs. Some were different but very similar. I started wondering if I could change the programs a little bit. The first program was obviously a 2 lines Hello world in Basic. I introduced my name instead of Hello, and cautiously run the program. Holy shit! The computer actually displayed my name! That was awesome! I tried to change couple of other places just to get an error in my face. But I noticed something very important, if I change the text between quotes I don’t get an error most of the time. That drew my first separation line between changeable and non changeable code. I ventured more with my programs (changing every quoted text unless I get an error) and some other patterns started to pop up. There were quite few possibilities for the first word in a line (INPUT, PRINT, FOR..), however the rest of the line was often different. Some words showed up only if the line started with a particular word. I kept writing those programs.

I started changing numbers to draw 10 lines instead of 5. Changed some other numbers and noticed sizes and positions of shapes changing on the screen. I think I quickly managed to see every error the Basic interpreter could output, they are not so many anyway. The errors become less and less frequent, and some of them were expected. I started to understand what I was meddling. I was somehow telling the machine what to do. But I was still copying text from the book. So I decided to put the computer solve a personal problem that I had. And I put down the book.

Well, how complicated a 9 years old boy’s problem could be? The problem was: A farmer has a farm of sqm, he buys seeds for bp a kg, and kg of seeds are necessary to plant 1 sqm of land. His crop yields kg/sqm and he sells his harvest for sp a kg. How much mony will the farmer make after selling his crops?

I got to work, I think I spent about 1 week to get a first running version. At the moment I didn’t knew about recording to the tape. My persistent storage was a piece of paper where I type my last advancements. At the end, the program runned and gave correct results! It even could print “The farmer will loose 120″ if revenue-expenses was -120. That was amazing. I think that was the moment I became a programmer. But I didn’t realize it back then.