Time after time I see reflections of myself in the "young" programmers. They fight with the same concepts as I once did, fall into the same mental traps and, in general, make the same mistakes. Having written the post
4 wrong ways , I wondered how common these errors are, and whether we can categorize them. I fell into each of these traps at least once, some in several, and I saw the same mistakes in others.
Newbie enthusiast
A beginner is full of passion for his only programming language, which is undoubtedly VB, PHP or actionscript. Finally, having mastered the syntax of this language, he feels that he has fully studied it. The newbie writes incredibly fast, but it turns out one huge file with a bunch of global variables. This is a very productive stage, if all you need is a snake game or a few small utilities.
Distinctive features of the code: Each program is one file containing one hundred global variables, none of which are longer than four characters.
Misconception: Programming is very simple.
Bribing feature: A
little thrill every time he opens an IDE and stares at an empty project full of potential.
Reads: Fan fiction.
Most likely he will say: “Just look at this cool flash game that I just finished!”
')
A budding genius
After several years of programming, having mastered the second language, the budding genius is firmly convinced that he is the Messiah of the programming world. He is convinced that everything that he does not understand (that is, almost everything) is useless, outdated, or just a waste of time.
Distinctive features of the code: It uses its own implementation of the class Vector. Starts class names with its initials.
Misconception: The whole world needs to learn much more from it than it does from the whole world.
Bribing feature: It’s so easy to offend and force him to go into deep defense by mentioning something that he doesn’t understand well.
Reads: Your own blog.
Most likely he will say: “Ha, well, of course, everyone knows that functional programming languages ​​are useless to solve * any * real-world * problems!”
Abstraction Freak
After a while, all programmers begin to realize that they are starting every new flash-game, copying 90% of the old one. Suddenly, it seems to them that they can write a “super” engine, and then creating a new game will become a matter of selecting sprites and writing a configuration file containing the rules! Inspired by success, the programmer begins to believe that the architecture of any program should be generalized, then generalized and, finally, generalized once again ... Unfortunately, following this rule for too long, programmers turn into advocates of abstraction.
Distinctive features of the code: Adds five new classes each time it implements a new function of the program, and each of these classes contains in the title the applied design pattern and no information about which function of the program they belong to. Any application business logic is hidden in some kind of xml configuration file somewhere in the repository.
Erroneous opinion: Write a program that interprets a set of configuration files clumsily and with a bunch of errors describing the program is better than writing a program that needs to be written.
Bribing feature: An expression of painful concentration on his face as he struggles with code analysis paralysis, shortly before rewriting the login function for the fourth time in a month.
Reads: Design patterns, from cover to cover, every day instead of lunch.
Most likely he will say: “I think that we should start a new project on time accounting by writing a generalized application framework ...”
Veteran
Any programmer experiencing the bitter moments of work in a soulless commercial company, mixing bytes on a hard drive for the same salary every month, sooner or later acquires a certain protective shell. Neither the speed nor the ingenious code are additionally paid for, therefore often a professional developer develops a very cautious, measured style, which ensures that the administration does not catch it from mistakes.
Distinctive features of the code: The first ten lines of any function, even a getter or setter, contain exclusively assertions. All exceptions and negative scenarios are carefully handled, comments are lavishly scattered everywhere.
Misconception: Doing things “right” is the same thing as doing the right thing, only better.
Bribing feature: Aura of balance and tranquility, which makes it clear that even in the case of terrible need, it will not work faster, leaving a feeling that it would be better for him to work as a bonsai master, rather than as a programmer.
Reads: joelonsoftware.com (yes, even after Joel stopped writing)
Most likely he will say: “Well, I can’t give the dates until I prepare a proper assessment next week, but it will be ... will ... [air draws with tight lips] ... In general, at least four people will be required to implement the preview before printing -months, without testing and documentation, of course. "
"Guru"
After a decade of jumping from one stereotype to another, our newcomer has grown up and feels like an empty shell from the enthusiast he once was. One morning, he wakes up and realizes that a huge pile of unit tests, assertions, tests and design skills that have grown around his style are just crutches. Crutches that are his and that he no longer needed! He discards them and starts writing such simple and "bare" code as he can think of, just to do exactly what he needs! Freedom for new features! Freedom code! Freedom!
Distinctive features of the code: Writes only in dynamically-typed languages ​​with a strongly pronounced functional component. Its code is very similar to the beginner code, except that the code itself is smaller, and the names of the variables make sense.
Misconception: He thinks that his enlightenment makes him a guru without quotes.
Bribing feature: A little
flutter every time he sees an interesting problem that he could solve with “just six lines” of code.
Reads: news.ycombinator.com/newest
Most likely, he will say: “You know, polymorphic inheritance is, in fact, a pitiful replacement for functional literals and dynamic typing.”
And ... Here it is, my career as a programmer is. I wonder - did anyone go through the same stages?