Hacker News new | ask | show | jobs
by ethereal 5184 days ago
How quickly time flies . . . I started programming on paper, writing programs for PIC12 microcontrollers. I would have been seven at the time. Never actually programmed one of the devices, but the experience taught me to logically think through a task, break it down into discrete steps, etc.

I quickly progressed to writing QBasic programs on paper, reading through some textbooks my parents borrowed from the local University library. From there I purchased a copy of `Computer Programming for Dummies' and started programming simple programs in the shareware version of Liberty BASIC [0] -- do you know how _frustrating_ it is to be limited to (IIRC) 100 lines of code?

From there, I taught myself C and C++ (via the a Dietel & Dietel textbook on the subject) and Python via another textbook that I don't recall the title for. I started programming games in DJGPP/RHIDE, and grabbed a copy of Michael Abrash's Graphics Programming Black Book that I never understood for the next five years or so . . .

I learned some basic concepts of data structures when I was twelve or so . . . around then I implemented my first binary tree. I'd been writing hash tables/linked lists before then, but never realized that it was a pattern. Just me reinventing the wheel as usual . . .

When I was fourteen I finally got my act together and wrote a simple card game for the OLPC XO, my first open source program. I doubt it's still around, but it worked! Crazy Eights goodness . . . my first Python program that reached more than 150 lines -- as I recall it topped out at about 750 or so. Not terrific, but it was an accomplishment.

I moved on to more theoretical topics after that; I spent the next year or so teaching myself how to write a recursive descent parser and write an interpreter. I learned quite a bit about trees and CS theory from that, to be honest! I can recommend the process to anyone who's interested -- writing an interpreter, including the parser, from scratch is _definitely_ one of the better things that's happened to me. That project, topping off at about 2,250 lines of C++, also taught me something incredibly important: the importance of designing something properly. My first introduction to software engineering, I guess.

I spent the next while tinkering with random things, until I started my next major project, Aesalon, a month or two before my sixteenth birthday. I worked on it for the next eight months or so, and it topped off at about 17,000 lines of C++ before I started rewriting it.

Aesalon is actually, IMO, a pretty impressive project -- it's definitely one that I'd hesitate about starting nowadays. It was originally a dynamic memory watcher, using binary injection to insert some profiling code before and after each call to `malloc`, `free`, `realloc`, and `calloc`. It definitely taught me a lot about how Linux loads and executes programs; I ended up essentially writing the backend for a debugger (including break/watchpoints, reading the symbol table, parsing ELF headers, the whole shebang) and even wrote my own Qt graphics canvas (the stock Qt graphics canvas doesn't work very well past 100,000 objects, and I needed to display 1,000,000 . . .)

It was also an education in software engineering. Designing a system of that scale taught me a lot; I reinvented the observer design pattern, the visitor pattern, and about five others. I had to deal with pool memory allocators, ugly codebases (all my own fault), refactoring, and APIs. It's definitely the biggest project I've ever written, and I'm still working on a rewrite of it; the project page is up at [1] if you're interested.

I'm eighteen now, just finishing up my second year of University (studying computer science and mathematics), and . . . it's scary to realize that I've been programming for more than half my life. Longer than some people around me have been doing long division for.

Anyhow, thanks for the trip down memory lane. I haven't revisited a lot of that in a while.

Happy hacking!

[0] http://www.libertybasic.com/

[1] http://www.ethv.net/projects/aesalon

1 comments

Good sir, are you human?

This is incredibly awesome! At age 12, I probably didn't even know what programming entailed.

I really wish I did though.

I haven't had my DNA sequenced (yet!) so I can't answer if I'm human or not. I suspect I am, though, and simply had the good fortune to be given parents willing to foster an interest in scientific and mathematical subjects.