Bika Bika’s RPG Guide to Programming : Part 1
All Posts:
I like to write prefaces so I hope you’ll be a little patient with me. I think programming gets to be really relaxing at a certain level of experience, and I don’t think learning it is necessarily painful in comparison either. I think computer science degrees do an injustice to how pleasant and relaxing it can be. In this guide I want to make sure we lean on the relaxing side, and I’m hoping that once you get the hang of programming, it continues to be a relaxing thing for you. One of my girlfriend’s favorite hobbies is crocheting. At some point I hypothesized that I enjoy programming in a way that’s very similar to the way she enjoys crocheting. Essentially, when I start working on something, I probably have a very good idea of what I want it to look like in the end. It’s usually not the case that programming is so hard that I’m constantly racking my brain for solutions to new, complex problems. Usually, it’s more like:
- I know what needs to be done
- I have a vague idea of how to do it but might need some reference material here and there
- I might make a mistake while working on it, but this usually just means I have to carefully rewind my work and thought process until I find the point where I made the mistake. I then fix it and continue on as I had been.
- Over time, as my work progresses, I begin to see small parts of the image of the final product I had in mind, and this makes me happy and keeps me motivated
- At the very end, the thing I intended to create is fully there in front of me, and I feel a strong sense of satisfaction and pride in my work
It’s very rare for this process to include highly critical thinking or problem solving skills. Whether or not you encounter a ton of situations that require those skills while programming depends largely on the type of thing you’re making. The truth is that user-facing applications don’t often require those skills. If you intend to make applications that people will use, you are probably in for a relaxing and relatively straight-forward ride. Don’t be intimidated by the notion that programming is a complex task.
Programming is an interesting and funny task compared to others because you’re in the unique position where you have a job that you’re supposed to do on a computer, but as a computer programmer you have intimate knowledge about whether or not you could write a program to do your job for you. Programmer’s exploit this fact all the time. At the essence of being a good programmer is truly tapping into and embracing your lazy side. A good programmer will try to get away with getting the computer to do as much of their job as possible. Be suspicious if you find yourself clicking the same set of buttons in the same order over, and over, and over, and over again. Programmers have developed their own little culture and some of its best artifacts are the short and memorable phrases and mnemonics that help them remember how to do their job well, such as
- DRY (Don’t Repeat Yourself): It’s hard to emphasize how catastrophic not being lazy enough can be. There is a kind of programmer who may as well be known as an anti-programmer. The kind who says “But I only have to do it by hand 3 or 4 times…” and foolishly succumbs to doing so, only to find that their decision to repeat a manual action has, further down the road, locked them into a position where they may be forced to do something by hand 300 or 400 times. A good programmer is terrified of this situation and does what they can to avoid it from ever manifesting.
- KISS (Keep It Simple, Stupid): It’s arguably the case that the last S is in there just for the sake of the abbreviation being a real word. But, in my opinion, it’s there to emphasize that to some extent, complexity and stupidity go hand in hand. The rule is that overcomplicating your task or trying to portray it as more difficult and complex than it is has terrible consequences, and is never the intelligent thing to do. Programmers should always prefer simplicity in their craft to complexity. This will almost always have positive consequences for everyone involved.
It’s good to internalize the idea that at the core of programming is a desire to do less boring manual work and keep life somewhat interesting as often as possible without introducing painful amounts of complexity at the same time. If you can convince yourself to really want these things (or even better, if you’ve wanted these things your whole life), programming becomes substantially easier to learn and to do.
I want to say, one more time, you should really really be suspicious of situations that entail unstomachable amounts of repeated manual work while learning to program or while being a programmer. Any such situation should indicate to you that there’s probably a way to make your life easier since, after all, you rule the computer.