📜 ⬆️ ⬇️

10 ways to become a good programmer

A good programmer is one who looks both ways, crossing a one-way road.
Doug Linder

What brings a programmer to his workplace every day? A passion for programming and getting pleasure from it. But to really enjoy the pleasure and joy of programming, you need to know some basic things that will allow you to become a good programmer.

I am not going to write mantras, following which you will become a good specialist. My goal is to list the things that helped me achieve success in this profession. There is no clear definition of who such a good programmer is. By such, I mean a person who develops excellent IT solutions and contributes to the development of the industry.


1. Learn the basics


Understanding the basics is the key to success in any industry and any profession. As long as you don't know the basics well enough, you cannot become a good programmer. Knowing the basics will allow you to develop and implement the best solutions in the best way. If you feel gaps in your knowledge, whether it is the basics of computer science, or the concept of the language in which you write, then it’s never too late to go back and repeat what you have forgotten.
')

2. Ask questions (how? Why?) When writing code


There is one thing that distinguishes a good programmer from all others - the desire to know what is happening and how. There are people who will never leave the code alone until they know exactly what happens during its execution. I understand that this brings the deadline closer, that we do not always have time for this, and therefore we often end up working with the code as soon as it starts to perform its functions. And although the behavior in such situations is a topic for another conversation, each programmer can make as much effort as possible in order to penetrate into the work of the code. And believe me, over time, this will become a habit, and you will do it already unconsciously.

3. Teach others to learn.


Most of us only turn to forums and groups when we need help. Another thing that distinguishes a good programmer from everyone else: a good programmer often looks in such places to help others. Such assistance teaches more than the assistance provided to you in solving your problem. Believe me, after you understand the problem and its context, ponder over it and give a solution, you will learn much more.

4. Write a simple, understandable, but at the same time logical code.


As in other areas, the KISS formula (Keep it simple and short - make it shorter and simpler) also works in programming. Write logical code and avoid complications. Sometimes people write complex code just to prove that they can write such code. My experience suggests that simple and logical code always works well, brings fewer problems and is more extensible. I remember a great phrase:

Good code is the best documentation. Every time you want to add a comment, ask yourself: “How can I improve this code so that it does not require commenting?”
Steve McConnell

5. Spend more time analyzing the problem, then you will need less time to fix it.


Spend more time understanding and analyzing the problem and developing a solution. And the rest will be easy to do. Developing a solution does not mean using languages ​​or tools for modeling, you can just look at the sky and think about a solution. For those who are used to knocking on the keyboard as soon as they know about the problem, the result usually does not match the expected one.

If you cannot fully understand the overall structure of the program while you are taking a shower, then you are not ready to program it.
Richard Pattis

6. Be the first to review and evaluate your code.


Although it is difficult, but try to break your code before someone else does. Over time, you will learn to write almost error-free code. Always conduct a detailed and impartial evaluation of your code. And never be afraid to ask what others think of your code. Work with good programmers and listen to their opinion - this will help you become a good programmer.

7. Do not be afraid of the rapid change of technology.


For all my time in the field of IT, I have met many people who were not satisfied with their work, and people who changed jobs to work with the latest technologies. There is nothing wrong with such an endeavor, but an error in the “newest technologies”. Every day there are new tools, APIs and frameworks designed to make development quick and easy. And this trend will not decrease. However, one thing should be understood: fundamental knowledge and fundamentals change much slower than frameworks, new tools and APIs. It is possible to draw an analogy with the sea, on the surface of which there are fast currents, but at the depth the water is calm and makes up most of the volume. Therefore, keep "at depth", closer to the basics. There are many web frameworks in the Java world of enterprise applications, and new ones are released every two weeks. However, the basics of client-server architecture, MVS (Model View Separation) template, filters / servlets / JSP, resource packaging, XML processing, etc. remain unchanged. Therefore, it is better to spend time learning these basics, rather than studying the ever-changing frameworks. Believe me, knowing the basics, learning new APIs and frameworks will be much easier.

8. “Crutches” * do not work for a long time


Many programmers use crutches: from lack of time, understanding of a problem or experience. However, over time, such decisions make the code worse: it becomes less expandable and convenient in support. Always try to write an implementation about which you know everything. I understand that "crutches" are inevitable in some situations, but then the situation reminds something like "always speak the truth, but sometimes you can lie."

9. Read the documentation.


Good programmers read a lot of documentation. These can be specifications, JSR, API, documents, tutorials, etc. Reading the documentation will allow you to understand the basics, and you will solve problems in the best way.

10. Someone else's code can also teach something.


I worked with two excellent programmers who constantly kept source codes of other Java projects in their IDEs and called them every day. They did this not only from the desire to learn how basic things work, but also from the desire to learn how to write good programs. Reading the source code of a well-known open source project, or codes written by your lead programmer, can help you write code better.

One last thing: do not compare yourself with others.


Comparing yourself with others will only result in poor health and unhealthy competition. Everyone has their strengths and weaknesses. It is more important to understand your strengths and weaknesses and work on them. I have often seen so-called fundoo programmers (programmers with good fundamental training) make stupid mistakes. Therefore, analyze and write down the things that you should improve in yourself and for work. Program in pleasure and enjoy it.

Any fool can write code that the computer can understand. A good programmer writes code that is understandable to man.
Martin fowler



* - rather loose translation of the word work-arounds

Source: https://habr.com/ru/post/112017/


All Articles