📜 ⬆️ ⬇️

Kostylny programmer

Posted by : Joel Spolsky. Original

The article is devoted to overinering and to those who prefer old crutch solutions only because they are very simple. Translation under the cut.

Jamie Zavinsky is one of those whom I call “crutch programmers.” And I pronounce this phrase with a fair amount of respect. He is one of the breed of programmers who work hard, creating the future and developing all sorts of useful things. Those. they know how to make work products.
This is exactly the person you need if your team builds bicycles, because his two favorite tools are crutches and WD-40 . And he elegantly owns them, even when your bike is racing off a hill at a speed of a mile a minute. In the meantime, other programmers are still stuck at the start, arguing over which is better: titanium or a unique composite material of the space age, which Boeing used in its 787.
When you're done, you get a sloppy bike, but you can be absolutely sure that it will take off.
I just read Jamie's interview in Peter Seibel's Coders at Work . This is a huge set of interviews with great programmers, including Peter Norvig, Guy Steele and Donald Knut. The book is so interesting that I spent 60 minutes instead of the usual 30 minutes on the couch. just read and could not stop. As I said, go and read it.

Forward! I'm waiting.
')
Note Translation: Coders at Work - a collection of interviews. Famous programmers answer the same list of questions. One interview - one chapter. Only 15 chapters.

This is what I love crutch programmers for. Now imagine: you work in a team. You are terribly busy throwing a code frantically. And then someone comes to your table with a cup of coffee in his hand and starts chattering: they say, you can increase the coolness of your application by as much as 34% if you use the multi-threaded COM divisions. And it’s not even that difficult, because he made a pack of templates, and all you have to do is use multiple inheritance, inheriting only 17 templates, each of which takes an average of four arguments, and then you just have to write the function body. You will be shown just a giant list of multiple inheritance heaps of classes and, ahem, multithreaded COM subdivisions. And your mind floats away, and you stop to understand what the hell is talking about this bloke. But he simply does not want to leave, and even if he leaves, it is only to, upon returning to his office, write even more smart classes that are completely based on multiple inheritance without a single implementation. And when the whole structure collapses with a bang, in the middle of the night you will be asked to come and figure it out, because it will already be at some fucking conference on design patterns.

And the crutch programmer will not be afraid to say: “Multiple inheritance sucks. Throw it out. Just throw it away. ”

As you can see, everyone else is too afraid to look like idiots, admitting that they simply cannot hold enough facts at the same time to make multiple inheritance work, or templates, or multithreading, or COM, or any of these things. Therefore, they fearfully agree with any fashionable programmer madness of Architectural Astronauts who speak at conferences, write articles and books, and are so advanced than we that they do not even realize that the things they are promoting are too complicated for us.

And this is what Zawinski says about Netscape: “To release the product in time, we were allowed solutions like not to use C ++ and multithreading”.
Later, he wrote an email client in Netscape, but the team responsible for directly displaying messages on the screen never released its component. “They were required to have a large empty rectangle in the center of the window, where we could simply display text. But they approached the project too theoretically, trying to look at things from the DOM / DTD side. “Hmm, well ... we just need to enter an additional layer of abstraction, and delegate a delegate delegate, after which the character will finally appear on the screen.”

“Looks like overriding annoys you a lot,” said Peter.

“Yes,” said Zawinski. “At the end of the day, just release the fucking product!” Of course, rewriting the code, making it cleaner is cool, and from the third time it will really become more beautiful. But the goal is not the point. You are not here to write code, but to release products!

My hero.

Zawinski does not bother with a bunch of unit tests. They “look great ... in theory. If you have chosen the leisurely pace of development - this is your way. But, looking at “it is necessary to completely create from scratch in six weeks,” well ... I understand that this is unrealistic without some kind of cuts. And I'm going to throw away something that is not too important. And unit tests are not critical. If they are not, the user will not even think of complaining about their absence. ”

Before resenting, remember that Zawinski was in Netscape when they changed the world. They thought that they had only a few months before someone else would remove all the cream. A lot of important code is written in this style.

Kostyulnye programmers - pragmatists. Zawinski popularized Richard Gabriel’s admonition “ The worse the better .” A 50% perfect solution that people already have will solve more problems and live longer than 99% of the ideal that no one else has, because it lies in your laboratory, where you endlessly polish the damn thing. Release is a feature. Really important feature. She must be at your product.

A principle that is well known to every crutch programmer: any coder technology that is just a little over-sophisticated will bury your project. Bonfire programmers tend to avoid C ++, templates, multiple inheritance, multithreading, COM, CORBA, and lots of other technologies, whose use seems to be justified if you think about it a lot and for a long time, but which are a bit complicated for human brains.

Of course, formally, there is nothing wrong with trying to write multi-threaded code in C ++ on Windows using COM. But this is a tragedy with catastrophic bugs, many types of which arise only under certain time scenarios, and all because our brains are really not too good to work with such code. Mediocre programmers are defensive, not wanting to admit that they are not able to write such a highly complex code. And they allow boasters from their team to plow up the project with the dull C ++ template architecture, because otherwise they will have to admit that they are not advanced enough to use what Spock himself would recognize as an ideal programming technique.
Kostyulnye same programmers do not care what you think about them. They are adherents of simple and easy-to-use tools that allow you to free up additional brain power, directing them to create new features for users.

But there is one catch that you should pay attention to: crutch programmers are the IT equivalent of nice guys. Yes, yes, those delightfully-looking dandies who can leave the house uncombed, with unclean teeth, in yesterday's dirty clothes — and still look brilliant by their very nature. You, my friend, cannot appear on people with disheveled hair, otherwise scare the whole neighborhood.
Because you are not a nice guy.
The crutched programmers have enough talent to cope with all this crap. They are good enough to release a product, and we will forgive them if they do not write unit tests or even poke the “Prev” and “Next” pointers on the linked list to free up an additional 32 bits of memory. Because they are good enough to handle it.

Additional materials on the topic:


Java overcurrenting (factory class factory)
Shame for mathematics (great note Dmitry Dolgov)

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


All Articles