Something went wrong. Try again later

soralapio

This user has not updated recently.

293 19 46 52
Forum Posts Wiki Points Following Followers

So you want to be a programmer? Well I can help with that.

I was listening to the Tested Oktoberkast again, and ran across Will and the others discussing programming, and how they'd tried it in college but ended up getting frustrated and quitting. They lamented the fact that you had to know so much math and other difficult stuff, and it bummed me out. Then it made me a bit angry. Not because they were wrong (they were), but because I remember thinking the same way three years ago, as I was applying to a university to study computer science. I thought to myself I could never really do it, because I've always sucked at math and you had to know a lot of math and other difficult shit, right? WRONG!

Three years later my indie games development team and I have released six games, five of which were coded in part or fully by me. I've coded up several tools to help me in my daily tasks, both on my desktop computer and mobile devices. I'm fluent in Javascript, Python, Java, C# and a bunch of other languages. Sounds impressive and difficult, right? Well it's not difficult! First off, let's bust some programming myths.

MYTH 1: You have to be REALLY good at math.

Bullshit. True, if you want to be the next John Carmack and code up 3D engines, you have to be fucking awesome at math. If not, it's really not that important. You have to understand the concepts, especially if you want to get into games development, but here's the fun thing: you don't have to do the actual math. That's what we have computers for! True, you have to understand what vectors and quaternions are, but you don't have to know those things NOW. You'll look them up when you need them, and surprisingly you'll be able to learn the concepts really quickly, because you have an immediate and fun application for those skills.

MYTH 2: Learning to program is really hard

Bullshit. Learning to program is easy as piss. The difficult part is learning to THINK like a programmer. This is called algorithmic thinking, and it's a fancy way of saying "you need to know how to break down abstract concepts into simple logical steps a computer can follow". And to be perfectly honest, this is not something everyone can do. I've seen people who just can't bend their brains to this kind of thinking, and it will always trip them up. But if you can do it -- and chances are you can -- the next step is surprisingly simple.

I know programming seems really hard on the surface. Code isn't always easily readable, there's lots of strange terms and words everywhere and the syntax seems crazy. But it's not as bad as all that. Most modern programming languages follow the same general rules, so once you learn one object-oriented language, you can learn the syntax for others pretty quickly. And remembering the thousands of different commands? Don't worry about it: you're not meant to know it all by heart. That's why we have big libraries full of API references. The idea is that you look up precisely how what you need works, and then after a couple of uses, you'll remember it. It's like learning any other language: nobody knows all the words at first without using a dictionary!

MYTH 3: Even if I learn to program, I can't make games

Bullshit. Making games has NEVER been as easy as it is now. Freely distributed tools like Unity and XNA take the tough part -- the engine -- out of your hands and leave you with the fun stuff: coding up your actual game. XNA only supports my favourite language, C#, but you can code games in Unity with a variety of languages, including Javascript, which is the coding equivalent of a kiddie bike with training wheels on, riding a rail.

Of course someone will have to make the 3D models or paint the sprites your game will use, but that's not your problem: you're the coder. And trust me, because many people believe that coding is something only geniuses or madmen can do, people will be tearing your underwear off trying to get you to join their teams.

Here's how to do it:

So now that we know coding is actually something you could realistically probably do, how do you actually go about it? Well, here's how I did it: I went to university. Imagine sad trombones here going "womp womp", right? Don't be too hasty. About 90% of what I've learned is stuff you don't have to worry about unless you actually want to code shit for a living, and possibly not even then. You can learn the important stuff yourself, and really easily.

The Internet is full of guides, manuals, courses, exercises and other tools which will help you learn the actual art of programming. The big tip is not getting discouraged too easily. It will seem daunting at first, but if you pace yourself, you'll get it in no time. If I had to do it all over again, here's how I'd do it:

1. Learn a simple language, like Javascript or Python. They are both extremely easy as far as syntax goes but still allow you to do all kinds of fun stuff. The idea is to use these languages to get used to thinking like a programmer. Taking a task, breaking it down to logical steps and then executing these steps. The net is full of fun guides you can use to learn what methods, arguments, return values and other such things are.

The additional benefit is that both languages are VERY useful. Python is a widely used scripting language, Javascript is used in literally hundreds of thousands of websites AND is one of the languages Unity uses! So you can take what you learn here and start making games!

2. Once you feel comfortable, stretch your wings a bit. Look into a more structured, strongly typed language like Java or C#. The fun thing here is that both are EXTREMELY similar as far as syntax so once you know one, you can learn the other in literally a day. These languages are hugely powerful and extremely useful: Android phones use Java natively, Windows Phone 7 (and anything Windows related, and Unity) uses C#, so you'll have a whole new world ahead of you. C# also gives you a good launching off point to learning Objective-C, which is what Apple devices use, and C++, which is what the gaming world uses.

I wouldn't recommend starting off with either of these languages, as they are a lot more formal than Python or Javascript. Mastering them is essential later on, but if you try to jump into them immediately, chances are you'll get frustrated and walk away.

3. Always do something fun. Programming is a skill like any other. You won't learn it unless you use it, so always be coding. You'll learn the basics really quickly, and after that only your imagination is the limit. Try to think of fun applications you could use yourself. Not only will you constantly learn new things, but you'll keep yourself interested, because what you're doing is fun.

I coded up my first game, a simple text-based hockey manager game, in Java after a couple of months of learning, and I could've done it earlier if I'd believed in myself more. The secret to programming is that you're not supposed to know everything ahead of time. When you come across something you don't know, look it up and learn. Don't get bummed about what you don't know, get excited because you're about to learn something new!

This blog post is long as shit, and I applaud you if you made it all the way to the bottom. I could've condensed this all down to this: if someone tells you that programming is too hard for you, call them a lying piece of shit, because that's what they are. It's a skill you can learn if you apply yourself, and it's a skill you absolutely SHOULD learn. Even if you don't make a profession out of it, you'll find no end of uses for your new skills. If you think playing games is fun, you should try making them. And I really mean that: you really, really should.

On the off chance that someone actually read all the way to the bottom, if you have any questions at all, I'll be happy to answer them. I'm not John Carmack, but I am a guy who learned to program after thinking for most of his life that he couldn't.

64 Comments