Common mistakes programmers make



Not keeping code formatting consistent‏
It doesn’t matter if you put the brackets on the same line as the “‏if‏”
statement, or if you name variables with camel case or underlines. Just ‏
make sure you keep it consistent. If you don’t do this, your will code look very amateur, and hard to maintain.‏






Bad variable naming‏


This is by far the most common mistake beginner programmers make. Name your variables and functions as if your mom was going to have to read and understand what each one means (assuming your mom isn’t a ‏
programmer, of course).‏
In three months, are you going to remember what the variable you named “‏dsld‏” means, or what that function you creatively named “‏nstnc_crt‏” does?‏



Not using comments‏
Comments are an amazing way to remind you what a piece of code does. Too many beginners don’t utilize comments at all, which makes code messy and hard to read. However, there is a fine balance between how many comments you should use in your code.‏
If you add too many comments, you’ll have to change the comments every time you change the code that it’s describing. It is best to use comments ‏only‏ when a piece of code is not ‏completely‏ self-explanatory.‏

Not utilizing the debugger‏
When you run into a code error that you do not know how to solve, don’t ‏
make the mistake of just diving into the code and reading. Use the debugger. Most IDEs have them. With the debugger, it makes solving ‏
issues a breeze; you can watch your code run line-by-line, so you can see exactly what’s going wrong.

Not backing up your project‏
This is a mistake that could lose you years of your life. Backing up your code is extremely important, even if you are not working on a team. Do not be intimidated by GitHub! They created a great application called ‏GitHub Desktop‏. GitHub Desktop makes it extremely easy to sync & save your work without even touching the command line. Best of all, it’s free!

Not utilizing the debugger‏
When you run into a code error that you do not know how to solve, don’t ‏
make the mistake of just diving into the code and reading. Use the debugger. Most IDEs have them. With the debugger, it makes solving ‏
issues a breeze; you can watch your code run line-by-line, so you can see exactly what’s going wrong.

Post a Comment

Previous Post Next Post