This post is inspired by a tweet that I came across today from DigitalOcean:

I was really impressed with a lot of the responses in the video. I certainly remember my first program, and it was nowhere near as awesome as building a FTP client in C++. Sure, there’s a lot of websites described in the video and I certainly had a few of those around the same time, but in keeping with the idea that HTML isn’t a programming language, my first real program was written in Python.

I believe I was in 8th grade at the time (the final year of elementary school in a system which eschews the idea of middle school altogether). I had written some HTML and tweaked some copy and pasted JavaScript from a tutorial, which kicked off that realization that I could make a computer do anything that I wanted. It was at this point that I started to realize I wanted to write code. So I started with a book: Head First C# which seemed like a promising way for me to learn from scratch. While this worked for a little bit, I often struggled to find where the book’s text could be reapplied to write my own programs. Not that I don’t think building a business card organization tool isn’t important, but those simply weren’t the types of things that someone in 8th grade would be interested in. More importantly, I was seeing the code in the book as a type of “recipe” much like you would find in a cookbook. I thought that if I ever wanted to build a game, for example, I would need a different cookbook that had the code needed to bake my game. Clearly I was missing something. About a year later, I realize what I was missing.

After essentially giving up on programming for a while, I decided to try again with a new approach. I was fascinated by Linux at the time, so working in C# wasn’t a great plan (I was nowhere near advanced enough to get Mono working at the time). Instead I started to learn a different language that seemed to be popular on the platform (and one that I still use often): Python. This time, I learned a bit differently. Instead of relying on a book that’s laid out for easy reading, I threw myself straight into the (fantastic) documentation using what little bits of C# I had retained as a guide. This time around, instead of learning recipes, I learned how ingredients can work together to create masterpieces. I started with control flow, glossed over loops (no, I didn’t realize how important they were at the time) and started hacking away at a little program that printed various bits of data to the screen. This would eventually evolve into a text-based “Choose Your Own Adventure” game that really started to tie things together. Sure, there were no classes or objects as far as I knew them, but I sure could write if statements. Ultimately, my simple little program was, as you might imagine, a bunch of if conditions with some user input wrapped up inside of a while loop, which I vaguely remember writing something like:

x = 1
while x == 1:
	Do things
if Game Over:
	x = 0

Yeah, I guess I never really considered while true loops.* Sure, it was very predictable and I don’t recall my story being nominated for any awards, but it was mine. That experience would stick with me and I reapplied those basic concepts in a few other Python programs before getting to college.

If we go forward a few years to today, I’m proficient in Python and (ironically) C# among other languages. My programs are a bit more sophisticated these days (I created more classes today alone than I had between the ages of 1 and 15), but those basic concepts that I learned all those years ago have definitely not left me. While I may not have a cool FTP client or fake login screen to look back on, I think that my experiences in the dawn of my programming career were really important in teaching me how to start thinking like a programmer and, more importantly, taught me how to learn. This is one of the reasons that I tell fellow undergrads (those who aren’t staring graduation in the face, as I am) that the most important skill they can take away with their degree is knowing how to learn. Know how to learn so that they aren’t required to take a job in Java simply because they learned it in school. Know how to learn so that they can stay current and marketable, even 20+ years removed from the classroom. Know how to learn so that changes in development strategies at a company don’t necessitate changing jobs.

I digress, thinking back on my early programming memories are an interesting way to see how far I’ve come in a relatively short time. While there are times that I wish I had started earlier, I’m of the belief that if one is set on learning something, there’s no age too old to start.

*One of the earliest lessons I can remember from a Freshman CS course is that any loop that relies on a break should be refactored to avoid doing so. I suppose in some way, my loop was doing something right.

comments powered by Disqus

See also