NEVER DO THIS! Mistakes of Web Beginners
Well, as it is said: "Live and learn and pass it on", these are typical mistakes of web beginners, read and never do like that.
1) Writing Code Without Planning
High-quality written content, in general, cannot be created easily. It requires careful thinking and research. High-quality programs are no exception. Writing quality programs is a process with a flow:
Think. Research. Plan. Write. Validate. Modify.
Unfortunately, there is no good acronym for this. You need to create a habit to always go through the right amount of these activities.
2) Planning Too Much Before Writing Code
Yes. Planning before jumping into writing code is a good thing, but even good things can hurt you when you do too much of them. Too much water might poison you.
Do not look for a perfect plan. That does not exist in the world of programming. Look for a good-enough plan, something that you can use to get started. The truth is, your plan will change, but what it was good for is to force you into some structure that leads to more clarity in your code. Too much planning is simply a waste of your time.
3) Underestimating the Importance of Code Quality
If you can only focus on one aspect of the code that you write, it should be its readability. Unclear code is trash. It is not even recyclable. Never underestimate the importance of code quality. Look at coding as a way to communicate implementations. Your main job as a coder is to clearly communicate the implementations of any solutions that you are working on.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
4) Picking the First Solution
While the first solution might be tempting, the good solutions are usually discovered once you start questioning all the solutions that you find. If you cannot think of multiple solutions to a problem, that is probably a sign that you do not completely understand the problem.
Your job as a professional programmer is not to find a solution to the problem. It is to find the simplest solution to the problem. “Simple” means the solution has to work correctly and perform adequately but still be simple enough to read, understand, and maintain.
5). Not Writing Tests
If you think you are an expert programmer and that thinking gives you the confidence to write code without tests, you are a newbie. If you are not writing tests in code, you are most likely testing your program some other way, manually. If you are building a web application, you will be refreshing and interacting with the application after every few lines of code. There is nothing wrong with manually testing your code. However, you should manually test your code to figure out how to automatically test it. If you successfully test an interaction with your application, you should go back to your code editor and write code to automatically perform the exact same interaction the next time you add more code to the project.
You are a human being. You are going to forget to test all previously successful validations after each code change. Make the computer do that for you!
6). Not Targeting the End-user Experience
What is the easiest way to add a feature to an application? Look at it from the point of view of yourself, or how it fits in the current User Interface. Right? If the feature is to capture some kind of input from the user, then append it to that form that you already have. If that feature is to add a link to a page, then add it to that nested menu of links that you already have.
Do not be that developer. Be one of the professional ones who put themselves in their end-users’ shoes. They imagine what the users of this particular feature need and how they might behave. They think about the ways to make the feature easy for the users to find and use, not about the easy way to make the feature exist in the application somehow without any thoughts about that feature’s discoverability and usability.
7). Having the Wrong Attitude Towards Code Reviews
One sign of coding newbies is that they often look at code reviews as criticism. They do not like them. They do not appreciate them. They even fear them.
This is just wrong. If you feel that way, you need to change this attitude right away. Look at every code review as a learning opportunity. Welcome them and appreciate them. Learn from them. And most importantly, thank your reviewers when they teach you something.
May 17, 2019