8 Tried & True Tips For Learning How To Code

Ads by Google

learning how to codeSkilled programmers have been in high demand for years now, and it doesn’t look like that demand is about to go down anytime soon. But even if you don’t intend to make a living as a professional programmer, learn how to code proficiently is going to come in handy in any computer-related job – even as a manager. But if you’re reading this, I probably shouldn’t have to tell you why becoming a coder is a good idea. You already know, and I guess you know something else, too – it isn’t easy.

Mastering the art of programming takes thousands (yes, thousands) of hours. Still, if you spend those hours well, you’ll get there sooner (and have more fun along the way). Here are a few ideas for you to consider and maybe try out on your path to becoming a coder.

Solve a Real Problem

Theory is boring. So are theoretical problems, usually. If you’re only learn how to code to make some money, well, I’m not sure how well that’s going to work out. But if you have an actual passion for building things, go build them. So the first question you should probably ask yourself is “why do I want to learn this?” If that answer is “to make something“, well, go make that thing. The good news are that the first step doesn’t require you to know how to code anything: You just have to write down (and preferably, sketch in) what would that thing look like. What’s the application that you’re missing? What tool doesn’t exist, but you really need?

Ads by Google

What’s nice about this approach (also known as “scratching your own itch”) is that your project doesn’t have to be grandiose. You can start out with something really small, just create a simple utility. But no matter what it is, you should care about it. The first thing I ever wrote in Ruby was a personal project I’ve kept on using for years, and have never released to the world. Still, I’m very proud of how it came out, and much of what I know about Ruby (not Rails) came from that project.

Start With High-Level Information

learning how to code

Yes, I’ve singled out a specific book here. No, O’Reilly didn’t pay me (or MakeUseOf) anything. It’s just that good. I almost never make it through a book about programming, but Code Simplicity kept me fascinated all the way through. It’s a book about the art of programming, with almost no code in it. You don’t have to know a programming language to understand it. It covers things like the basic reason to even program anything (to help people!),  when should you introduce new features into your application, when to optimize your code (and what’s premature optimization), and a lot of other good stuff.

Once you finish this book (or another book like it, if you find one), you’ll be at a much better spot to judge your future studies.

Carefully Pick Your Technology

Should you go code your first project in straight-up ANSI C? Unless you have a very specific reason, the answer to that is “probably not”.  Good coders know how to code, rather than a specific language – they can learn any language they need for a given project in a short amount of time. But doing this for the first time isn’t so easy, because it’s not the language you have to master, but the general programming concepts (program logic and flow control, variable types and scoping, objects, and all of that good stuff). So, you should definitely spend some time thinking about what language or technology you want to code in.

This comes after picking your project, because once you know what you’re trying to make, you will be limited to a narrower subset of possible technologies. You’re not going to code a native iPhone app in Ruby on Rails, for example. But if you’re coding for the Web, there are about a zillion different languages you could use, each with many different frameworks. PHP, Python, Ruby, Go, and the list goes on.

Spend time researching each of the alternatives – what sort of community does it have? How easy is it to get support? Are there good free development tools for it? James covered this topic in another article, called Which Programming Language Should You Learn For Software Development?.

Don’t Spend Lots of Time Learning Big  Chunks of Data

learn how to code

I once spent a few weeks watching a video course about PHP. I think it was 30 hours of video or something crazy like that. Do I know PHP now? Heck, no. I mean, I can read some of the code, but I’d say those hours were a sheer waste of time. Trying to cram so much knowledge sequentially without coding just doesn’t work. For me, carefully coding a pre-made example project is nearly as bad, because it misses a huge part of learning. I do my best learning when I’m trying to make something I care about (see above) and randomly run into problems. Solve a problem you feel something about, and you’ve learned something new. Stare at the screen for 30 hours and….well.

Do Spend Time Setting Up Your Environment

learn how to code

Just like there are many programming languages, there’s a lot of development environments out there for every language. Some people use a text editor like Vim (which I recommended in The Top 7 Reasons To Give The Vim Text Editor A Chance) or Notepad++ (which we’ve shown you how to “soup up” here). Picking an editor that’s right for you is a very personal process, and it’s just the start. You’re next going to have to customize it with keyboard shortcuts, color schemes, plugins, and more.

And that’s just a small part of the work – setting up a development environment requires installing the language you want to work with, many code libraries, a versioning system (like Git, which James explained here), and more. In other words, you’ve got hours of work ahead of you setting up the environment. And you know what? That’s okay.

Just make yourself a cup of coffee or ten, and go through it. Have fun. Learn to know your tool, just like any craftsman knows his tools. Learn the keyboard shortcuts. Get that highlighting just right. The more comfortable you feel with your tools, the better you’d be able to pay attention to your code. So, this is one area I wouldn’t skimp on.

Don’t Rush Yourself – Deadlines Are Your Enemy

Whatever you do, remember – you’re here to learn. You’re not under a deadline. When the temptation arises to use a dirty hack in your code just to get it to work, don’t! Take the time and invest the care to find out how to do it the right way. A sloppy first project is better than no project, but you’ll learn much more from a project you’ve designed and built with great care every step of the way.

Have patience, and sweat the details (when it comes to coding techniques and ways to get stuff done in code).

Ask Questions

learn how to code

We have MakeUseOf Answers for your questions, and there’s also the fantastic Stack Overflow which you can see in the screenshot above. There are many other language-specific forums online, but no matter the venue you pick, don’t be afraid to ask questions.  If people aren’t nice, figure out what you did wrong and learn to ask better questions (a subject for an article in itself, really).

Failing that, go find another community. But no matter what, ask your questions, and listen to the answers. Thanking people for the time they took to help you is also a good idea.

Use Spaced Repetition To Retain Information

learning how to code

This final tip is a short one – go read all about the Janki Method. It’s an absolutely brilliant way to built an arsenal of always-current programming knowledge and retain it indefinitely, not in your computer, but in your brain where you need it. Seriously, go read that post.

Final Thoughts

Learning is a very personal thing, so maybe not all of these tips are going to work out for you. Then again, maybe you have a few other tried and true ones you’d like to share.

Most important (for me), I’d like to know if you’re going to be using any of these tips in your quest to become a programmer. Will you? Let me know below.

Image credit: Old big books via ShutterStock

Ads by Google

36 Comments - Write a Comment

Reply

Rohit vijay

Thanks Erez Zukerman for your valuable advise. Concept of “don’t waste time learning big chunks data” and starting with high level information is very coo ! ;)

Reply

Max

Great article! Make sure not to ask too many questions and turn into a help vampire, though (I’ve been there).

Erez Zukerman

Oops! Sorry about that, fixed now. Thanks!

Reply

Yash Desai

Whats your opinion on sites like codeacademy.com?

Erez Zukerman

Codecademy is nice, and can definitely help you get comfortable with a language’s syntax.

Reply

Tech Nech

Its pretty helpful for those who are trying to learn or studying programming at their college’s. Nice one!

Reply

Sas

There is a slight problem with the Janki Method link. The URL of the link is “http://www.makeuseof.com/tag/8-tried-and-true-tips-for-learning-how-to-code/www.jackkinsella.ie/2011/12/05/janki-method.html” instead of “www.jackkinsella.ie/2011/12/05/janki-method.html”

Reply

Paul Pruitt

Holy cow, most of this is how I do things now after leaving school. I thought it was just because I was lazy…I didn’t know about Anki. I downloaded it and will try it out.

Reply

Mike Dobson

… I dunno how exactly the “moderation” (or not) works here, when comments include URL’s, but I’m going to try, because neither of the previous “correction” comments regarding the “Janki Method” worked for me (nor the link embedded in the article).

So, I’m trying to post the one which DID work for me:

http://www.jackkinsella.ie/2011/12/05/janki-method.html

Reply

Eric Jay Palomar

great article from an expert. :) thanks, it would be very helpful.

Reply

Scott MacDonald

This is a sweet article. I would never have considered diy projects including things like a rasberrypi, but this makes me think I could figure it all out!

Reply

Kaloyan Kolev

I am just about to start a big programming project at my university and ‘picking the right technology’ is one of the things that worry me the most and is very crucial.
Working on personal projects is something I can’t wait to start on, but not until my degree is finished. There are so many ideas that I have written down, and even suggestions for projects from friends. I think engaging with these would develop my skills vastly.

Reply

David

I’ll try this out after I finish the java series at Oreillyschool, their courses use a Windows Remote Desktop sessions with eclipse running. My work is a java shop, that’s why I’m taking what seems like an impractical language. It a lot of work, as you say, especially hard to keep going when my day job doesn’t involve coding.

Erez Zukerman

Well, regardless of what people think of Java for PC these days, I think it’s a good language to know. From what I gather, it has a very solid object model/hierarchy with complex inheritance mechanisms, so it’s a good way to really understand what OO is about. That’s what it looks like on the outside, at least — have never learned Java myself.

Also, it’s good for coding Android apps, which is a huge market that’s not going anywhere soon.

Reply

vineed gangadharan

nice informative articles it explains the most valuable aspect for learning programming for newbies :)

Reply

Scott Macmillan

I have never thought of learning coding but this makes it very tempting,

Reply

Jigar Amin

excellent <3

Reply

NotoriousZeus

Thanks that might help. I’m gonna give it a shot.!

Reply

dpocius

The first tip is spot-on. It worked for me and also for a buddy of mine, who learned embedded C by building and programming a microcontroller-based timer for his clothes dryer to replace the mechanical one that up and died.

Also, I was gratified to see the one about setting up your environment. And to think I was worried about being too anal-retentive about that!

Reply

Chris

I’ve been trying to learn code for a couple years now. After scraping by in my 2 required CS courses in college and not retaining ANY Java I sort of got discouraged. I will give your tips a try! Maybe I’ve been much too impatient. I do get very frustrated at the constant counting programs I have to create in learning code. I would love to work on something that is actually needed in my day-to-day life.

Reply

Marge Plasmier

Wish I’d read this six months ago! True! I spent a couple months of my life, 8-10 hours a day doing exactly what this article says not to do with an online Web Dev Apps course with a truck load of languages. End result: frustration and some familiarity…but mostly frustration.

Reply

Ian Lewis

For a student in software you have a good especially with the plan before you code and for web notepad or especially notepad++ is great. Thanks for the knowledge though, and you are right rush work is your worst enemy-good tip for students and programmers generally.

Reply

Alex A

I think this is the most usefull article I’ve ever read on learning programing… and I’ve read a few! I know what you mean about wasting hours on “big chunks”, all it does is too get you slower and maybe even convince you to give up. Lucky for those times when life forces you to get a project done.

Reply

Charles

This is a great getting started article for anyone who wants to learn code, thanks Erez.

I would like to add a few items to this list. Firstly, make sure you identify why you want to learn code. Different people have different reasons and identifying yours will give you direction.

Secondly, decide how you’re going to learn. There are many different ways of learning, such as books, websites, classes or just experimenting on your own.

Here is another good step-by-step guide for how to learn code:
http://www.codeconquest.com/learn-code/

Reply

Lucero De La Tierra

Thank you Erez; your style reminds me very much of me – just a little more focused. I am very much an applied knowledge, trial-and-error kind of learner. Thanks for the Code Simplicity book suggestion. I’ll be looking for it soon.

Reply

Keith Swartz

Thanks for these! Really good.

Reply

Jacques Knipe

I’ve been wanting to learn how to code for a while now, but like many other people I simply don’t have time or patience to do it. Great advice, almost makes me want to give it a go!

Reply

Kevin Vrancken

Great article, I want to be a coder too. I wanted to start coding Android apps, just haven’t found where to start yet.

Reply

Makers Academy

Shameless Self Promotion -> or… you could do MakersAcademy!!! yeeha (www.MakersAcademy.com)

Disclaimer:
We teach web development, so for all you hard core multi-threaded C++ Hadoop cluster log(n) genies we’re not for you!

Reply

Vinny

I like your artical and this Website.I can not wait for more. When you build what is the order of build , roof -windows – siding of programming, is that in the book ?

Reply

kind_boy

thank you so much. this is a great tips and added a knowledge to me .

Reply

Jon Ellman

Good tips though I strongly disagree with the 4th to last and 2nd to last one. That is entirely up to the learner. For example, had I followed that advice I would have given up programming a long time ago out of boredom. Instead, I became very ambitious to learn fast and ploughed through mountains of information. It’s just how some people learn – I did the same with learning piano – I got a piano, taught myself how to play a bunch of beatles songs through youtube tutorials within weeks of sleep-deprived practice, immediately started making my own pieces, and now I can compose pieces that get great feedback on Youtube. Some people have short attention spans and things need to keep moving for them to stay interested.

Erez Zukerman

Fair enough, thanks for sharing your experience Jon!

Reply

Vishnu Dileesh

Thanks a lot for the advice,will practice the above tips.

Your comment