by Kurt

5 Things to Remember When You’re Learning to Program

1*5D1vjHPHdlAWOrNpwghF6w

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*82yhqAfk18DoRb18en1qCA

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.

1*_W-8AXoQwmvFmcA4yBmbrg

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.

1*PXidXHfLUSQnawv_CqJxUA

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.

1*lYaNxfx6DJfU1Igne3ijKA

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!”

1*oUdGRyyECN7BiqgZzqaV4w

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…

Preventative Programming — how fix to bugs before they happen
…and why Sherlock Holmes would have been a brilliant programmermedium.comHow I Became a Programmer. And When I Started Calling Myself One
I’ve wanted to start blogging about programming for months now and like so many others before me I set off full of…medium.comHow to write a jQuery like library in 71 lines of code — Learn about the DOM
JavaScript frameworks are all the rage. Chances are that any JavaScript related news feed you open will be littered…medium.comMaking it rain code — Matrix Style
An introduction to HTML 5 canvas animationsmedium.comTurning code to cash — How to make money as a Web Developer and live to tell the tale.
So you just learnt to code. You’re eager and anyone who can’t code thinks you’re a genius, word gets out and all of a…medium.com