Many people are scratching their heads trying to figure out how to become a programmer, or even how to become a good one. But there is no magic trick turning a regular person into a senior coder able to make uber like app overnight. It usually takes time and experience, but there are some tips helping to accelerate the process. For the purpose of this post, however, let me flip the problem, and tell you of some of the things that certainly won’t advance your programming skills.
Table of content
1. Being Afraid to Ask for Help
This is probably the most common pitfall rookies fall for – pretending to know everything, even if it is not true. Most of the time it happens out of fear of the consequences of lack of knowledge. But what is really happening is the exact opposite. By not asking others, we are falling deeper and deeper into the hole of trying to catch up with what we don’t know, and consequently fail to do the task, or take inordinate amounts of time to do it. It’s always better to look for help, or at least to openly admit it when you don’t know something. I know the pain and anxiety of openly acknowledging your weaknesses and asking for help, but most of the time the person you ask will happily share his or her knowledge with you.
This is also the case when asking for help online – there is, in fact, a possibility that your question is trivial and people will downvote it, dismissing it as basic knowledge. But to be honest, who cares? Just ignore it and do whatever it takes to find an answer. People you meet online don’t know you and will not point their fingers when you walk down the street. Everyone, just like you, was a rookie once and didn’t know some of the things others considered easy.
2. Avoiding Code Review
This mechanism works much like the previous point. Because your performance is dominated by the internal fear that you did something wrong and your code is not perfect, you always reluctantly show it to others.
The principle of code review is to look for mistakes and show you the good habits, rather than lynch you to oblivion for your errors. If there someone more experienced at hand willing to look at your code, the best thing to do is to let him do it. We learn the most from experienced people who once were in the same situation as you and know the errors you are making now. I personally think that code review is the fastest way to learn how to become a good coder.
3. Not Enough Practice
This case is always a big issue – one that’s not limited to programming. Whatever you do, if you want to learn something, it takes practice. I often read about something, learn it, and assume that I know how to do it, but what really happens is I forget it straight away.
Reading about something is one thing, but then trying to do it is another. When learning a new programming language, or when learning programming as a whole, I always try to encourage myself to create some sort of a small project, just to have a goal. I then practice by trying to achieve the target I set for myself. Such an exercise is almost certain to generate new challenges to overcome and learn new things, boosting your experience in the process.
4. Lack of Organisation
When working hard to gain experience and feel more comfortable with programming, there is this a trap around the corner: lack of organisation. And I don’t mean being chaotic in life, but chaotic in code. When writing bigger and bigger projects and working on more complex solutions, it’s very hard to keep everything clean and organised.
A good principle of programming is writing code that enables easy maintenance and addition or modification of features. But how to achieve it? How to keep things organised? I recommend reading about design and architecture patterns. There are many great solutions helping to build a solid structure. But be warned: many of these patterns make you write more code. It may feet counterintuitive at first, but you will reap the advantages in time.
Read our previous article about code Refactoring. Find out when code needs refactoring and how to minimize threats related to the process.
Tests are the bane of many developers. Even those more experienced ones are guilty of the sin of not writing any tests – many of them never wrote a single test in the first place. I know the drill, I’ve been there. There is so little advice on how to do tests. All developers will tell you that it’s good to do tests, but not many tell you how to go about it properly. Or even if they do, it’s just some simple examples. But the biggest mistake is not doing tests at all. Beginning is not easy, because mostly you have to learn it yourself, but after some trial and error you will gain a foothold.
Testing helps maintaining your code and catching some errors. I am not telling you to start Test Driven Development straight away, but writing some test cases for functions after you write them is enough to get a taste of the advantages of testing.
You can read more about testing programs on our blog in article: Introduction to unit tests in Angular
I would not recommend to go about writing tests at the very beginning of the adventure called programming. However, at some point, when you get a solid grasp of programming skills, it’s good to sit down and look at testing your code. What’s more, some programming languages will require structural changes to the code to enable tests at all, so it’s not always smooth sailing, but it’s worth a try.