Tales of the Rampant Coyote

Adventures in Indie Gaming!

Learning to Program: How Hard Is It?

Posted by Rampant Coyote on July 6, 2016

When people ask me about learning computer programming, I truthfully answer that I don’t feel it’s hard to learn. It’s not. It’s about one semester’s worth of a high school algebra class and a high school language class.  There’s a “coding bootcamp” in nearby Provo that trains students how to do web development in JavaScript in 12 weeks. It’s limited, but it’s a marketable skill, and their selling point is job placement on graduation. You can start programming “Hello World” tonight, and within a couple of weeks of practice and learning, know enough to do casual programming.

Now, whether or not you’ll have the aptitude for it or enjoy it (I feel those two are tightly related, possibly synonymous) is another question. For me… I was one of those guys who never understood it when people told me they HATED the “word problems” in math class. You know, the ones where it describes a situation in life, like trains leaving stations at different times heading towards each other at different speeds, and what time will it be when they pass each other? For me, I’ve loved them for as long as I remember. But I don’t remember if that predated my learning to program. Did learning program make them easy and enjoyable for me, or did my natural predisposition towards them make me gravitate towards computer programming? I think it was the latter, but I am not certain.

For me, programming is all about those word problems.

I was never super-hot at math. I did well, but I struggled a bit with Calculus, and never went beyond that.  Programming has a lot to do with math, but in my mind it’s also a bit like “math for people who want to cheat.” Those word problems I mentioned? Programming is like developing software to solve those problems for you, so you never need to do them again.

So instead of solving one train problem, we actually automate the process that we’d go through to solve all similar classes of train problems. Two trains depart along the same line at different times, going different speeds in different directions. Create a process to calculate when or if they’ll ever converge.

That’s software development. That’s programming.

There’s more to it than that. But at it’s heart, programming is about problem-solving through an automated processes, and converting that into a form that can be executed by a machine. Well, that’s half of it. The other half is trouble-shooting when something goes wrong. Because something inevitably goes wrong, and the processes in any non-trivial software can get extremely complex and interconnected with a staggering number of ways things COULD go wrong.

And that’s the flip side of learning to program. Programming is easy, but in the same way that learning to play a musical instrument is easy if you think of it as learning how to plunk out an identifiable rendition of “Mary Had a Little Lamb” on the piano.  Mastery takes a lot of practice.

The difference between beginners and veterans is pretty profound, but not in an obvious way to the outsider. Both spend a lot of time staring at the screen, stepping through the debugger, looking stuff up, and cursing whoever wrote the code they are looking at (even if it was themselves, two months earlier). The difference is that the veterans have a much deeper toolbox, and a far better intuitive understanding of what’s going on under the hood… even with unfamiliar code. The good ones also generally have a better understanding of what makes good, maintainable code over the long term for a particular environment, and tend to code in a way that fosters ease-of-understanding (by humans) and easy change. At least insofar as possible given the fact that they are probably constantly under the gun with deadlines.

I could probably write a whole blog post on veterans vs. beginners. Suffice to say, everyone programming today had to be a beginner at some point. I remember spending hours trying to wrap my head around the concept of arrays, or how to write and read files to disk. Stuff that seems trivial to me today. I got there. And I am not really all that smart.

The important thing… in the context of making games as a casual pursuit at first… is that it can be fun while you are learning. I like programming. Solving problems is fun. I like making games. Even simple, stupid games that look like crap that I wouldn’t want to show to anyone. Now, if it doesn’t seem the least bit fun to you, then maybe that’s not really your thing, and that’s okay. But if you are so inclined, there’s no reason not to start. You’ll wake up tomorrow knowing a little bit about programming  and a bit more about how computers work than you did yesterday.

Filed Under: Programming - Comments: 2 Comments to Read

  • Matthew P. Barnson said,

    What’s funny to me, Jay, is that for years I said, “I don’t like programming. I never want to be a programmer.” The older I get the more I realize that the reason I “hated” it was that I associated it with the long hours and late nights you spent as a teenager solving vexing problems that seemed ridiculous to me as a kid: making sprites move a certain way on a CRT, or trying to figure out how to make some kind of noises come out of the envelope & ring modulators on the SID chip of your C64.

    And now I’ve discovered a love of programming, because the problems I am solving — while also vexing, involving long hours and late nights — are more applicable to my interests: Cloud-scale microservices automation, cluster state synchronization, prefetching algorithm tuning, and more. I thought I had a distaste for the process, when in fact it was apparently just a different result that I craved.

    Ain’t life grand?

  • Cuthalion said,

    I hated story problems. Hate, hate, hate. Hate. I think it was something about not having any examples to go on of how the math would solve a real world problem. We might have just just gotten some numbers and some text saying we could rearrange them like so, and then it would throw story problems at us. It was always confusing trying to figure out which formula or technique we were supposed to plug the words into to make math. Maybe it means they were teaching us backwards? They should have started with a word problem and then showed how math can solve that? My memory is fuzzy now; whether that’s true or not, they were always extremely frustrating.

    On the other hand, I like programming just fine. So, if you hate story problems and want to try programming, there is hope! I suppose the difference might be that you start with the problem (the thing you need to do) and break it down into steps for the computer to follow to accomplish the task rather than starting with a bunch of arrangements of numbers and trying to figure out how to fit the thing you need to do into one of those to spit out the right number. It’s more writing directions rather than fitting words into number slots.

    It did take me a few tries over the course of my youth before programming actually took, though.

    On a different subject, I also think that aptitude and enjoyment are often synonymous. I tend to think that skills are a result of opportunity, interest, and experience. (And I would even include intelligence as a skill, as I’ve become very skeptical of the idea that it’s genetic for most people.)

    Arrays I think were always pretty obvious to me. It’s a box or some shelves or whatever labeled with numbers. Similarly, 2d arrays are just a grid like a map. Reading and writing to files, however, still makes me nervous every time I have to do something new!