I'll teach you anything you want to know, just don't ask me any questions.

The self-learner’s guide to programming.

I think it’s probably important to establish up-front, that the question of whether to teach everybody to code has been donetodeath. This guide assumes that you have considered these arguments, and are comfortable with your decision to give programming a try. Personally, I tend to fall into the ‘teach-everyone’ camp.

UPDATE: Okay kids, go to college. Don’t follow my example. You don’t have to study computer science to be a programmer, but you do need some kind of bachelor’s degree to be taken seriously. Things are starting to change, but for right now, college is essentially a requirement. This does not mean that you must study computer science to be a programmer. It certainly helps, but I know plenty of programmers with degrees in subjects other than Mathematics and Engineering.

Picking your first language

There is something special about your first language. Like a first love, it stays with you long after the infatuation period is over, past the breakup, and will continue to influence your decision-making for years to come.

I would suggest something in the dynamically typed space, because imposing a bunch of arbitrary rules seems pointless when you’re just starting out. C/C++ is too low-level, Java is too clunky, and lisps are too (con(fus(ing()))).

Python, Ruby, or Javascript, those are your choices friend. Choose wisely. I won’t try to bias you in any way. (cough: Javascript)

Joking aside, don’t agonize too hard over the decision, they’re mostly all the same once you get into them. There are some differences in syntax and the particular ideology behind the language, but for the most part they are all the same.

Whatever you do though, as a first language, please don’t pick PHP, VB, or SQL. These are so alien to all the others that they will forever warp your ability to grasp concepts which do not conform to the particularly strange way they are embodied in these languages. SQL is a great second language, but because it is superabstract, (so much so that it is considered declarative), and designed to deal with relational databases, that it’s really not a great language to start with. PHP is shit. Seriously don’t learn it.

Now go out learn it!

The task of learning to code is actually quite difficult, not because of a lack of available information as has traditionally been the case, but actually because there is now a metric fuck-ton of it, so your task is to sort through the crappy resources to find the pearls.

First things first, figure out your preferred learning style. If you find that you are more experimental, this is going to drastically change how you should approach the problem of learning to code.

For instance:

My first experience with programming was out of a book: “Teach yourself BASIC” or some other similarly awful step-by-step learn something complicated through repetition with very little explanation style books that permeate the genre. I hated it, but for many people this was the way they learned. I suppose it was magical to be able to print things to the screen, but at 12 I didn’t really have the wisdom to appreciate that. Had I not revisited programming later in life, I would probably be doing something detestable like practicing law. Had I actually enjoyed BASIC, as Dijkstra would say, I would have been forever scarred, and my ability to program irreparably damaged. So, I guess it all worked out.

If you enjoy a guided tour of a programming language from start to finish, I would suggest the Learn ____ The Hard Way series by Zed Shaw. I have not personally read any of them, but I think he’s a great writer, and seems to genuinely care about his students’ ability to read and understand the lessons. Plus he’s sassy, and I like that.

College is Dead?

So, I have a funny story:

A few years ago, I volunteered at a career day for my little brother and sister. Elementary age kids. You’ve maybe done this yourself. It’s a casual way to introduce young impressionable minds to the careers that they may one day pursue. This is not really something that you’re expected to prepare for, or really take too seriously. I took it way too seriously. Some parents showed up in their uniforms, talked about what they do day to day. I prepared a PyGame demo and had the kids talk out the algorithm for binary search. I didn’t see those other parents’ presentations, but I’m pretty sure I crushed it. A kid asked for my autograph.

At some point during the first presentation, the teacher asks, “So, what should they study in college if they want to be programmers?”

Now, what I mean to say is: “It’s never been easier to get into coding, and if you want to try programming, why wait until college? Start when you get home if you want!”, what comes out is: “You don’t need to go to college!” The teacher is, of course, mortified by my statement and immediately goes on damage control. The message was more polished for the next class. I think college is really great if you want to broaden yourself as a human being, get some independence from your parents, and be surrounded by smart people who are into the same things you are. If college is your thing, go for it. Go to college.

There was a lot of enthusiasm a few years ago around the concept of MOOC style offerings from major universities actually replacing the traditional college experience, but in general I think that for most people an in-classroom lecture style works pretty well. It’s certainly not the case that the ever-popular formula “anything + internet = instant_success” is always going to hold true. If you’re interested, try the free offerings from things like MIT Open Courseware before paid credential factories like Coursera.

Choose your own adventure Style

This is my favorite. Unlike advanced Mathematics, you can actually learn quite a few programming concepts without constantly being forced to understand the foundational underpinnings of the thing you’re actually trying to learn. This might seem trivial, but it’s extremely powerful. Not being forced to know about Boolean Algebra in order to understand that that “if (x > 10) do_stuff(x)” that you’re only going to do stuff when the value of x is greater than 10. Is x stored in a register, or allocated on the heap? Is do_stuff virtual? What’s the calling convention for that function? What are literally all ofthose things I just said? Don’t panic! You don’t have to know right now. This is due to a property that we programmers absolutely adore: abstraction. Suspend disbelief for a moment, learn the concept you are currently working on, and make a mental note to understand the wizardry that makes it possible.

This runs counter to the traditional educational paradigm where complex concepts build on top of simpler ones. Instead, most programming concepts tend toward elegance and simplicity. It’s true that to be a very good programmer you should strive to understand everything you possibly can, but the notion that you have to start from first-principles is incorrect, and potentially hazardous to your educational goals. As long as you’re curious, you can approach the task in any way you want.

Breadth-first: learn a little about a lot.

Here is a summary of a Bachelors degree in Computer Science.

Learn a language.

Learn some complicated mathematics of questionable value.

Now learn another language, similar to the first.

Now learn a third language.

I’ve probably glossed over some stuff about algorithms and data-structures, but that’s pretty much it. You get some solid exposure to a lot of things, but you probably won’t come away from the experience feeling necessarily ready to tackle any programming challenge life throws at you.

Depth-First: learn a lot about a few things.
This is definitely my preferred choice, because it’s incredibly easy to look like an absolute wizard compared to the first camp.

Oh, that’s cool, you know the first few chapters-worth of C/C++/Java like everyone else? Well I’m a D-lang black belt mothafucka, get on my level!

^^ This could be you. You’ll be writing 200 line code-haikus that outshine the competition because you actually know how to take advantage of the language. You’ll look like a rock star compared to someone who just knows the bare minimum required to pass. Learn the internals of the language, get into the culture that produced it, and dive as deep as you can into the most advanced topics you feel capable, and you won’t regret it. There isn’t really a degree plan to follow, but it has other benefits if you’re willing to invest the time.

No matter how you choose to approach programming, the most important thing is to never stop learning. Technology is in a constant state of change, and when you decide to pursue this as a career, the requirement of life-long learning comes with it.

Good luck, and please shoot me a comment if you found this rambling mess helpful in any way!

6 thoughts on “The self-learner’s guide to programming.”

It’s imperative that you mention the downsides of not going to college when discussing this topic. Many young people are short sighted and don’t think of their future any further than a couple years – if that. For example, it can limit your job opportunities as some corporations consider them mandatory and many countries require a minimum of a Bachelor’s degree to obtain a work permit/visa. I don’t agree with the way it is but we all have to be aware of the implications of today’s decisions on tomorrow’s opportunities.

I learned more during the six month time period spent completing the CS capstone than I did throughout my entire college experience once transferring and declaring my CS major (3 1/2 years of not listening to advisers and ONLY taking CS classes, no gen. eds needed at that point. ) I also didn’t listen to my Capstone advisers who advised against me tackling the project I wanted to because they just knew it would be way over my head. By that time all CS professors knew me and were well aware of my underwhelming/lazy performances in most of their classes… basically did the bare minimum to get by. So I was actually told not to do it despite my arguments that the Capstone should be the most challenging part of college and, therefore, I should challenge myself accordingly. I only got them to sign off on my project because I continued forward without their permission until they had to grudgingly give permission with the “Fine, if you want to come all this way just to fail, so be it… permission granted” attitude. I learned more during that six months than the previous 3+ years because I was forced (was a necessity) to go way outside of my comfort zone, into areas that even stumped the professors themselves at times, in order to successfully develop the program I had decided upon. I ended up acing my Capstone project and sat in disbelief watching the garbage that other way better programmers/higher performing students ended up presenting as their Capstones. Had I taken on a project similar to other students (in regards to difficulty level) or had I listened to my CS/Capstone advisers’ suggestions on alternative projects they preferred to me to try, I would have successfully knocked out all CS graduation requirements (includes CS electives) without actually having obtained a true grasp on any of the programming languages/concepts that were taught. I can’t say I learned nothing through all of those classes because I learned a lot. However, the deeper understanding I gained is owed to my own stubbornness. I was honestly pissed off by the projects that were suggesting to me… felt it was an insult to my intelligence. So I went forward with something that was, indeed, WAAAAYYYYY over my head, hardly slept or ate that whole semester, had my whole family worried about my physical and mental health (lol), but was able to achieve the “impossible” and all of that stress was super worth it while presenting my project. Mainly because, in my head at least, my presentation was a big middle finger and “Fuck You” to every CS teacher & student tutor that believed there was no chance of me actually pulling it off. Point being: It is my opinion that even with a college education, there is a much higher level of programming that is only achievable through self exploration and determination and curiosity. Which I didn’t have until that point came and I had to start learning about things and figuring stuff out that hadn’t even remotely been touched upon in any of the course material taught while I was in school.