“To become an expert in the practical or scientific field, you need a lot of work and a long time. If a person works conscientiously every hour of the working day, one day he will wake up one of the most competent specialists of his generation. ”
Hives jamesWe talk a lot about how to build software architecture, how to choose names for variables, how to better document the code and why, etc.
But after all programs are written by people the same as we are. Some become outstanding programmers and achieve great success, while others abandon the profession. To paraphrase a classic, you can say: "show me your code, and I will tell you who you are." Studies show that the best programmers create programs 10 times faster than their less qualified colleagues. The time spent on debugging the code, as well as the volume and speed of the final program, the level of errors and the number of errors detected also differ by about 10 times.
')
In this article we will try to answer the question of what qualities a person must possess in order to write perfect code.
Intelligence and modesty
Intellect does not seem to be a trait of character and in fact is not. The highest level of intelligence - not the main condition for a person who wants to become a good programmer.
The best programmers are those who understand how limited their capabilities are. They are modest. The worst programmers refuse to admit that their abilities do not match the task. Character does not allow them to become excellent programmers. The harder you work to compensate for the limited capacity of your mind, the better you will program. The speed of your development depends on your modesty.
Curiosity
As soon as you recognized that your abilities are too small to understand most programs, and realized that effective programming is a search for ways to compensate for this shortcoming, you begin this search, continuing until the end of your career. And therefore, an important trait of a programmer’s character is curiosity about technical issues.
- study the development process;
- experiment;
- read about problem solving;
- analyze and plan before you act;
- study successful projects;
- read books and periodicals;
- communicate with like-minded people;
- constantly strive for professional development.
Professional integrity
“Any fool is able to defend his mistakes - most fools do just that.”
Dale CarnegieThe formation of a highly qualified programmer involves the development of a heightened sense of professional integrity, which can manifest itself in various forms:
- waiving the role of an expert if you are not;
- willing recognition of their own mistakes;
- the desire to understand the interpreter / compiler warnings instead of turning them off;
- the desire to clearly understand the program and the refusal to compile the code for the sole purpose of finding out if it works;
- providing realistic project status reports;
- providing realistic estimates of the duration of the project and upholding their position, even if managers are asked to adapt the assessment.
Communication and collaboration
Truly excellent programmers learn to collaborate effectively, which always means writing readable code. The computer probably reads your program as often as other people, but it reads bad code much better than people. While working on the code, do not forget about people who will have to change it in the future. Programming is first of all communication with another programmer and only the second with a computer.
Creativity and discipline
Some programmers believe that standards and conventions suppress creative freedom, but it’s hard to agree. Can you imagine a Web site, on each page of which different fonts, colors, text alignment methods, graphic styles and navigation methods would be used? What kind of creativity is chaos here? If standards and conventions are not used in a large project, it becomes impossible to complete it. Do not waste your creative energy on something that does not play any role. Set up conventions for secondary areas and focus on the really important aspects.
Laziness
Laziness can manifest itself in several ways:
- postponement of an unpleasant task;
- Immediate execution of an unpleasant task in order to get rid of it as quickly as possible;
- writing a tool to perform an unpleasant task so that you never have to perform it again.
The first manifestation of laziness will hardly ever be profitable.
You will be able to get rid of the first type of laziness if you develop the habit of doing these
tasks right away. This habit corresponds to the second type of laziness - “enlightened”. You are still lazy, but you solve unpleasant problems by spending as little time as possible on them. The third option laziness involves writing a tool to perform an unpleasant task. This is "long-term laziness." Undoubtedly, this is the most productive type of laziness (if, of course, the tool allows you to save time in the end). In this context, a certain laziness is even beneficial.
However, laziness has a downside. “Haste” and “efforts” are not as highly valued in programming as they are in physical education classes. Haste is additional, unnecessary effort. She indicates activity, but not performance. Movement is not difficult to be confused with progress, and employment with productivity. The main role in effective programming is thinking, and thinking people usually do not seem to be busy.
Properties that are less important than it seems
In addition to haste, there are other properties that are relevant in other areas of life, but not particularly effective in software development:
- perseverance, if understood as an ass of stubbornness;
- experience, with the modern dynamics of the industry development (an example is the commitment to the old approaches and technologies);
- passion for programming - working 16 hours a day, you can simply burn, or make mistakes, which then have to be corrected several times longer than the “time won”.
Habits
Developing good habits is extremely important, because a lot of what you do as a programmer, you do without thinking. For example, once you could think about formatting loops, but you don’t think about it when writing each new loop. You write them as used to. This applies to almost all aspects of code creation.
Bill Gates says that any programmer who becomes good afterwards is good in the first few years. After this change is almost impossible.
Learning to do something, immediately learn to do it right. The first time you are actively considering your actions and you can still easily change your approach. Having done something a few times, you begin to pay less attention to your actions, and the “power of habit” takes its toll. Make sure you get exactly the habits you want.
What if you have not yet developed the most effective habits? How to change a bad habit? You cannot replace a bad habit with a lack of habit. You can replace a bad habit with a good one. Try to develop new, effective habits. For example, develop the habit of writing a class in pseudocode before encoding or carefully reading the code before compiling it. Then you will not have to worry about getting rid of bad habits - they will naturally be superseded by new habits.
Summary
- The ability to write programs depends on personal nature.
- The most important qualities of a programmer are modesty, curiosity, professional honesty, creativity and discipline, as well as “enlightened” laziness.
- To become an excellent programmer, you can not have a special talent, but you must constantly strive for self-improvement.
- Surprisingly, intelligence, experience, and perseverance do not harm programmers
less than help. - Many programmers do not actively search for new information and methods, but rely on random encounters with new information at work. If you devote a small amount of your time to reading books and learning programming, in a few months you will be far superior to almost all your colleagues.
- Good character is in many ways a product of good habits. If you want to become a great programmer, develop the right habits, and everything else will come by itself.
Steve mcconnell