📜 ⬆️ ⬇️

The perfect programmer. Part 1

Article-abstract on the book of Robert Martin "The Perfect Programmer" . After reading the book, I changed my attitude to programmatic life. The book covers the process of writing code, the code itself, the relation to tasks, TDD, and many other utilities. Read the need to developers and project managers. Partially applicable to designers.



1. Professionalism


Non-professionals do not take responsibility for their work. They delegate this responsibility higher in the hierarchy: you are the boss, and you answer. If a layman crap one's pants, the employer has to clean up the excrement. A professional cleans up after himself. What else do professionals do and do not make amateurs?


2. Say No




Slaves cannot say no, but wage earners can. If you are a professional, it is your responsibility. When the manager sets an unrealistic term, your duty is to say no. If you are offered a quick, but architecturally weak solution, your duty is to say no. When you are offered to work at night, your duty is to say no.

The worst thing you can say is to say that "you will try." There is nothing worse. Answering this way, you are not doing your job, and your job is to say: “No, this is not possible.” You can try to avoid unpleasant negotiations, but these are just cowardice:

- You need to do a search for tours by Friday.
- This is impossible; it takes two weeks to develop and debug a search.
- We need to show the client on Friday. Let's try.
- OK I will try.

You avoided a conflict situation today, but provoked an explosion on Friday. This can lead to a quarrel with the client and, eventually, to the loss of the customer. Stand on your own: impossible - then impossible.

The phrase “I will try,” “I will try,“ I will try ”should be completely excluded from your vocabulary and you should not accept such answers from anyone else. If you are told such phrases, specify and insist on a direct answer. “I will try” means that you will make extra efforts to complete the task. And what kind of effort? Have you worked before not in full force? Or are you ready to work around the clock now? Or do you put it on the shoulders of the team? If you do not have energy reserves, a new plan and are not going to change your behavior, then you are simply lying. No need to try.

3. How to say yes. Promise language


One of my good, but inexperienced friend met with a client on the site and invited me to negotiate. A man came and began to talk about what a good project he had, but he had already been burned several times by non-professionals; so we need to do preliminary layouts. I know about the dangers of preliminary layouts, but my friend did not know, and as soon as I was about to open my mouth, he had already answered that “yes, well, we will do it”. This was the first and only step towards the loss of a client. By the deadline, he did not make a layout, did not receive a new order and the client was disappointed.

The promise can be divided into three parts:

  1. You say you will do something
  2. Responsible to your words
  3. Follow the promise

Saying “yes” means that you need to say that you will do something without any modifiers. What are these modifiers? “Need” (I need to lose weight), “should” (we need to find new clients), “try” (I will try to persuade the investor), “it would be nice” (it would be nice to go to the cinema), “I hope” (I hope we will meet next week), "let's" (let's do authentication by Thursday), "if there is time."

Track your speech and the speech of others. Notice how often these words occur around us and how often you try to absolve yourself of responsibility.

A serious promise suggests that you perform a specific action. Even if you can’t do everything you’re asking for, you can do some specific part of the offer.

- Please make a report to Birt. This should be done by Monday.
- By Monday I can not. But by this time I will prepare web services.

In general, a serious promise looks like this: "I will do this by that time." If you did not cope with the promised, as soon as possible inform the one to whom you promised.

4. Writing code


Code readiness is its state when several tasks are solved at once:


Programmers are paid a lot, because it is a difficult job. You need to concentrate on work and, if this fails, you will get bad code. If you are tired, do not write the code, but rather sleep a little . If your wife left you, do not write the code. If your cat has just given birth to seven sons, do not write the code.

Night programming is unacceptable . Your nightly code will be like a boomerang coming back to you again and again for corrections and improvements. Why so fond of night programming? First of all, it allows you to look like a hero: “while working all night I wrote a ton of govnokod”. Secondly, no one distracts at night. But after all, during the day you can organize everything so that nothing distracts. A couple of times a week, I transfer the phone and messengers into airplane mode so that you can safely think about the task without distractions.

The flow zone is evil. So programmers call superproductive time, when they manage to write-write-write code and don’t want to be distracted for anything, but continue and continue. In this state, the programmer considers himself a superman, and his code is good.

The problem is that the code quickly written in the Zone more often causes errors. You may lose part of the overall picture and the code will be poorly coordinated with the rest of the parts or the business. If you feel you are entering the Zone, make conscious efforts to get out of it. Helps pomodoro, pair programming and wife.

The sure sign of the Zone is when you are rude to answer phone calls and are not happy even to good people.

The creative crisis can be overcome. It usually comes from fatigue or monotony. Introduce something new into your life and relax more. Read books from different areas: classical literature, science, science fiction, Daria Dontsova. Creativity begets creativity.

Reduce debugging time. This time seems to be an inevitable developer, but the less you sit behind the debugger, the more you do something really useful. It helps TDD / TLD and contract programming.

Stop it. Programming is a marathon, not a sprint. You do not need to stay, just because you could not finish your task yet. The feeling that "this shit is about to work" may not leave you for hours. Allow your head to rest and use the saying “Morning is wiser than evening”. The decision may come to you later on the way home, in the shower or at breakfast. Let it happen.

5. Schedule lag


, , , , , . : , () . : 1 . , 4 - . , , , , , .



: , .

. , . : . , . : , . . , .

, . . , . . , .
. , : .

— , .

6.


, — . . , . , . , 14:00 16:00.

— . , . , . , , : « » . . , , , . , - .

. , TDD, , , , , , , .

.

→

UPD: .

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


All Articles