Learning to program is challenging. Aside from choosing a language or setting up a development environment that you know nothing about, there are thousands of articles and tutorials out there that quite simply will make you feel dumb, demotivate you or make you think that everything you have learnt so far was a waste of time and that you’ve been doing everything wrong.
I’ve been there, so I thought I’d put together a short list of things you should keep in mind when learning to program to stop you from thinking that you are mentally challenged, or from making people feel mentally challenged when reading your tutorials.
1. Remember you’re on the internet.
You don’t believe all the news you read is legit or that the photos you see aren’t Photoshopped, so don’t take everything that you read literally. Just because it’s about programming does not mean it’s reliable or correct. It was written by a person, and people make mistakes and are biased.
2. The only code that is truly bad is code that does not work or do what it should.
You’ll come across a lot of articles that start something like if you… you’re doing it wrong. The vast majority of these are just opinions. Focus on your code returning the correct result first.
You can write a simple function that returns the same result in almost any language in a hundred different ways; if their way of doing it is so “right”, what makes the other ninety-nine wrong? And what’re they grading it by — readability? Execution time? It’s all relative to what you need when you code.
Bad naming conventions, indentation and documentation are more likely to produce “bad” code than the method you choose for a loop.
3. Programmers have a knack for making other people feel dumb.
Two common concepts in programming are obfuscation (obscuring of intended meaning in communication, making the message confusing, wilfully ambiguous, or harder to understand) and abstraction, and for some reason this seems to carry through to a lot of stuff that programmers write about.
They tend to use very large words, or terms that only relate to the field of programming when they’re writing. If you have to google a word fifteen times while reading an article, keep in mind you’re not dumb. On the contrary, the writer most likely wanted to you to think he was really clever and impress you.
What he didn’t realize is that when reading an article with big words people in general tend to think the writer is normal and they are dumb.
4. There are no “bad” popular programming languages.
When you meet a fellow programmer, the first question they’re likely to ask you is,
“What language do you code in?”
Your answer then generally forms their initial opinion of your expertise and skill level. I can’t express just how biased this is! There’s a good chance that they’ve never even touched the language they’re judging you on, or that they can’t properly justify their opinion. All languages have strengths and weaknesses.
Programming is a trade and a programming language is the same to a good programmer as a tool is to a mechanic. It is his choice to select the best tool from his box for the task at hand, and I’ve never heard anyone say, “Don’t ever use that spanner!”
5. Learning concepts, data structures, design patterns and theory is more important than knowing syntax.
Programming concepts are all relatively similar. If you know your stuff, you’ll be familiar with the term ‘Array’, you’ll know what it is, what built-in methods it’s likely to have, and can then look up the syntax for it in any language in a heartbeat.
All popular languages are based on programming theory, concepts and principles, and usually they try to build on and add to them. Knowing and understanding this allows you to transcend the limitations of a single programming language, and instead use the best tool for the job… even if you need to Google a little to get there.
I hope this helps you learn and stay motivated.
Oh and FYI — remember EVERY programmer has spent a few hours pulling out his/her hair debugging a typo and they are lying if they deny it.
If you enjoyed this post take a look at some other stuff I’ve written…