Five Typical Programming Mistakes For Beginners

Keyboard ExplosionHappy Pi Day! Since Snow Storm Stella has rendered outdoor travel hazardous, I decided to use the extra time to help out new programmers. The reality is that programmers spend a lot of time in front of computer screens, regardless if it’s snowy or sunny outside. This article is to help beginners maximize their efforts, to focus on useful endeavors, rather than struggling with issues that so many programmers battled with in the past. Here are five typical mistakes that beginning programers make.

Choosing a Language / Getting Started

A typical question a beginners asks is, “What language should I learn first?” Just getting started can lead to a typical mistake. I see so many new developers getting caught up on why Python is the greatest thing since the discovery of fire or how PHP kicked your grandma’s puppy. Sure, there are lots of different programming languages. You don’t want to pick the wrong one. The problem is treating it like a sports team. Picking a popular language is helpful, as that increases the chances of that skill being useful. However, this isn’t just a popularity contest.

http://githut.info is “a small place to discover languages in GitHub”. It has a list of the most popular languages at GitHub – an online development platform. What language is at the top of that list? It’s JavaScript! Personally, that’s my favorite programming language. That’s because I’m a web developer and JavaScript was designed to be easy. However, it’s not the solution to every problem. Do you want to make iOS games? If so, then JavaScript is quite limiting. JavaScript doesn’t have the level of access to the iPhone / iPad hardware that Objective-C or Swift would have. Using JavaScript to create iOS games could be frustrating and game performance could suffer.

That’s the point! Picking a language is not just about popularity. It’s about what you’re trying to do. I see a lot of hate towards PHP on reddit.com/r/webdev but I don’t care. They’re not paying my bills.

The reality is that you’ll probably have to learn multiple programming languages. (Even just basic web development involves HTML, CSS and JavaScript.) The tech world is constantly changing. My first programming language was BASIC. While was that great fun on the Commodore 64 and TRS-80 Color Computer 2, it’s not very useful today.

The mistake is in not thinking logically. First, pick a language that has purpose. What are you trying to do? Who are you trying to be? Second, when learning programming for the first time, the language is less important than understanding basic principles. After you learn your first programming language, learning additional languages should be easier. While languages have differences, thinking logically is universal. You should be able to spot similarities and apply that knowledge. Pi is still 3.14159265 (etc.) regardless of which programming language you pick.

Forgetting Punctuation (Syntax)

So yeah, I like JavaScript. That’s because it’s so easy and practical. Most modern computers have web browsers. That means a JavaScript project can be sent to billions of people worldwide. That’s tremendous power. JavaScript is even designed to be forgiving. It doesn’t freak out (usually) if you forget to add a semicolon at the end of a line.

However, like most programming languages, it can be entirely unforgiving if you forget punctuation elsewhere. This is also know as Syntax. A misplaced comma, a forgotten right-parenthesis, a single-quote instead of a double-quote, they all can cause your program to crash when run.

This is where a lot of beginners can get frustrated and give up. A single, tiny and seemingly insignificant mistake can derail your progress. How can you prevent this? Syntax Highlighting is a great feature for a developer to have. Text editors can colorize the code, emphasizing the syntax of that particular language.

Atom is an open source (free download) and multi-platform (macOS, Windows, Linux) text editor. It’s a great way to get started with simple programming projects – especially web development.