Mistakes Some Beginners Developer make

Mistakes Some Beginners Developer make

blame.jpg

Are you tired of programming?

When you’re learning to program, it goes without saying that you make a lot of mistakes. The problem is, sometimes you don’t know you’re making them. From my working experience I see that beginners make some mistakes and it affect them, so am going to analyse those mistakes one-by-one.

1. Fear and self-doubt fear.jpg

The #1 mistake you can make as a beginner programmer is to think you’re not good enough, not smart enough: that you have the wrong type of brain, and you’ll just never get it. I believe that anyone can learn to program to at least a basic level if they stick with it.

Code will seem like jargons at first. That’s normal! But bit-by-bit you learn what each part does, and it’s not scary anymore, and then you see it’s really all very logical when you know what it means. There’s definitely an element of natural talent to programming and logical thinking, but it’s massively outweighed by hard work and hours spent plugging away at your code, reading tutorials and looking-up documentation.

Mastering your fear, or fear will be your master! Or something. I’d advise any beginner programmer to play with the drag-and-drop visual programming tool Scratch. It’s a brilliant way to learn programming concepts like loops, “if” conditionals, variables and arrays, without being put off by mistyping code. Because there’s no typing! It’s increasingly being used in schools to introduce programming, and I can’t recommend it highly enough. But I can recommend W3School because it is a great reference for beginners.

2. Messy code formatting

mess.png One way an experienced programmer can almost instantly spot code written by a beginner is messy formatting, such as not indenting code properly or having inconsistent use of new lines and white space. Many languages, such as JavaScript, don’t impose many restrictions on how you format your code. The JavaScript interpreter will do its best to run code no matter how it is laid out. But programming language like python and dart follows the rules of indentation and that is will I keep recommending python for a beginner. This can lead to beginners being somewhat haphazard with their formatting. This is a mistake because the indenting code is one of the ways we show its logical structure. By tabbing or spacing code in from the edge of the window, we show where functions, loops and conditionals start and end, so we can be sure all our code is in the right place. Another bad habit is leaving big chunks of commented-out code that you don’t need any more, but you’re keeping there “just in case”. We all do this every day, so it’s good to take a skim over the code and delete any commented-out sections – you’re not going to need them again!

3. Bad variable and function names var.png We might laugh at Java programmers’ long-winded class and variable names like the famous “AbstractSingletonProxyFactoryBean”, but there is actually a really good case for writing longer, descriptive variable names instead of short abbreviations.

The intent of the code becomes a lot clearer, and you’re much less likely to have two different variables with the same name in different places, which can confuse you, or even break your code. In JavaScript, where file-size is an issue, there’s more of an argument for shorter variable names, but even there you shouldn’t be abbreviating to the point of losing all meaning – and you can always use a minified to get the size down.

For instance, you are writing a program to solve simple interest and you want to name the variables if I were you I will name it like this

**var rate = 10;
var principal = 5;
var time = 2;
var simple_interest = rate * principal * time/100
**

4. Over-commenting commenting.png I’m a big fan of self-documenting code – that’s code where the variable, function and class names and overall architecture communicate the meaning of the code to other developers (and your future self!) without the need for lengthy comments. However, I do also see the value of commenting, especially where it flags a work-around for a specific issue that might not be obvious. Avoid putting an unnecessary comment in your code to make it readable. Remember it is a comment, not a story.

5. Confusion between languages, frameworks, platforms and IDEs

frameworks.jpg

When starting to learn to program, especially web programming, you’re bombarded with different languages, framework and IDEs, and it can be very hard to know what they all are, so let’s quickly settle some of the common misconceptions.

Firstly, without wanting to be too pedantic, HTML and CSS aren’t programming languages. HTML is a mark-up language and CSS is a styling language. They’re great skills to have, but when you’re writing HTML and CSS, you’re not technically programming.

For front-end web programming, the language is JavaScript.Some student even thinks that java is the same thing as JavaScript. This is understandable - the name JavaScript is an unfortunate bit of cross-promotion with Java that has caused ripples of confusion for almost two decades now! Another common confusion, when you see $(“#thing”) all over example JavaScript code, is the relationship between JavaScript and jQuery.

libaries.png Using the jQuery library makes working with JavaScript much, much easier, but it’s good to remember that it is just a library, not part of JavaScript or a language in its own right. Another misconception is to think your HTML, CSS and JavaScript are tied to the IDE you created them in. Unless you’re using something like Dreamweaver templates, whatever IDE you use, your code is just standard plain text that you can open and edit in any other IDE or text editor, even Notepad!

ides.jpeg

6. Thinking you know it all thinking.png Here’s one I was guilty of for far too long, and it’s an easy mistake to make. After a lot of persistence, you finally write some code that actually works! Your confidence grows, and before too long you’re teaching stuff to your friends and you feel you can take on the world! This is awesome, and you should enjoy that feeling of finally having the computer do what you want it to.

But while you’re grinning your face off, banging out line after line of code, don’t forget that you’re still just learning. Maybe it’s time to start looking back at your old code and reflecting. Which parts of your code do you understand one hundred per cent, and where are you just copy-pasting? Maybe now’s the time to delve into that function marked “DO NOT TOUCH” and work out what the heck it does.

7.How to choose a language to learn program.jpeg It happens to almost all beginners, even I was a victim of it also while you just start learning to program you will feel like learning this and that, you just keep learning all languages at a time and that is not a good aspect of programming. If you truly want to be a developer you must make sure that you go for programming one after another. If you want to learn python you make sure that you know its core before moving to any other programming language. Stop jumping you will always fall. Thank you, please remember to follow my blog, subscribe to our newsletter to get an update when I publish my new article. Remember to leave a comment if you find this helpful, thank you.