📜 ⬆️ ⬇️

A cool developer should not write code, others write for him

I want to continue the theme of cool developers and their approach to development, which has already published several articles . This time we will talk about the code and the attitude to its writing. Who cares, I ask under the cat.

cool developer

You heard right - I really think that a cool developer should not write code. After all, he is a cool developer who understands common truths:
')


How does a cool developer organize his work to write this code as little as possible? To do this, he applies some very simple techniques.

1. Uses third-party libraries.


For this, a cool developer reads a lot and communicates with other developers to know how rich the world of open source solutions is. When he is confronted with a new task, he first of all analyzes whether it will be possible to immediately take a ready-made solution from the existing ones. He does not hesitate to ask the advice of his colleagues in order to take advantage of an even greater amount of experience and knowledge, and also search a little on the Internet, at the same time refreshing his knowledge. If it wasn’t possible to find it, the cool developer thinks about decomposing the task into parts and repeats the described plan from the very beginning. A Java developer should at least have knowledge of products from the Apache Foundation and Google Guava Libraries , which will already allow writing an order of magnitude less code.

2. Excellent knows your IDE.


Modern IDEs make every effort so that the code is generated almost automatically by pressing "hot keys". Intellij IDEA has a lot of intelligent code generation . I would strongly recommend re-reading these two blocks of documentation, which can significantly reduce the amount of hand-written code: Auto-Completing Code and Generating Code . Virtually all standard language constructs can be generated with one click. A single word can be put in for automatic refactorings. When refactoring, the risk of error is especially great. Therefore, try to trust as much as possible in this issue IDE.

3. Reuses once written code.


This rule operates in two directions at once. Before writing your code, a cool developer will look for a similar solution in his project. If he finds it, he will most likely make it convenient for reuse using refactoring, and then use it in a new place. This is much more reliable, because the old tests guarantee the efficiency of the code, and the chance to make a mistake becomes much lower. But not all code should be reused. Often there are standard techniques or designs that are used everywhere, but cannot be easily abstracted from details. In this case, “live templates” come to the aid of a cool developer — he simply creates templates of similar constructions for the future and next time creates them by pressing a couple of keys. This greatly reduces the risk of error and speeds up the appearance of working code.

After a certain time of work on the project, the cool developer already has a code base and templates that have been developed, which allow him to write virtually nothing from scratch. And this makes it much more efficient than other developers. Observing how others work, I can tell you with confidence that a cool developer can work 2-10 times faster than the average. I hope you aspire to this too!

Your CEP.

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


All Articles