by hnriot · 14y ago · 0 comments
What is absolute competence in writing novels? Writing magazine articles. Publishers want good writers that sell lots of books, young writers want good writers that critique their books.
There is a base level of competence, but even that is often local culture
You write code that will almost for sure, live on for 10+ years and will be changed by a lot of people.
Good code will be maintainable and easy to extend/change. Bad code is just... every programmer's nightmare.
Bad code will still be bad even if it made the product go live, and good code will still be good even if it took a few more days/weeks to produce it. The balance between quality and speed is completely product dependent. But sooner or later bad/fast code will claim it's price.
The parent was making the point that, like writing, good and bad coding style is entirely subjective - necessarily so because many parts of it are simply conventional.
There are some specific constructions in programming that can be shown to be better than others through complexity theory, but even the guidelines we have for these aren't global optimums.
And to go further, where the OP argued that product quality and development time are mutually exclusive; I submit that they are not.
In the right hands, good code can be written quickly and efficiently, just as good novels can be written as quickly as bad ones are, or good music can be written as quickly as bad music is.
If I need someone to crank out a report by afternoon which will never be used again and he was able to do it, he's very competent. If I need someone to crank out a car control system and he took one year to do it but has very low defects afterward, he's very competent.
You can't measure it with a ruler or some lines of code formulae, but good programmers are easily recognizable by other good/experienced programmers.
Replace the word 'programmer' with 'coder' and you might have a point. Whenever I hear the word 'coder', all I can think of is shelf-stacker. A coder writes lines of code, a programmer builds products or 'things'. All the rules and standards regarding code belong to coders - they have nothing to do with finished, shipped, or successful products.
But what do I know? I've only been building products for 13 years. And I'm drunk.
What are the ways to objectively measure the competence of a programmer?
If that was the case, then it would be much, much easier to hire and fairly compensate programmers than it is in reality.
A very rough measurement of programmer competence:
The programmer is given a product specification. He creates the program in T time using S size of code.
1/(T * S * S)
is a very good approximation of how good the developer is. (small size is more important than the taken time, that's why I've taken S square. We can tweak the formula of course. Maybe 1/(T * S * S * S) is even better in some cases.)
TL;DR: the most common thing amongst good programmers in my opinion is that they are masters of the DRY principle, but they do not overabstract; in essence they write smaller code to problems (usually even faster) than not so good programmers. The bigger the system is, the more and more architectural/design skill is needed to keep the code base small.
If a piece of software is needed by the date of a major launch, and a programmer doesn't ship, all because he wants to reduce the amount of code involved, then he's an awful programmer as far as the business is concerned.
Running over time can cost millions of $ of investment in other areas of the business:
- Press organised
- Advertising purchased
- 1000s of hours of staff training underway
- Suppliers informed of increased demand / new supplies purchased
- Customers told to expect delivery by date
Any one of these areas can cost 10x or more of the cost of developing the code.
If you're not writing code which would be affected by that kind of criteria then cool, go for whatever metric you want to define.
Time taken is almost always the number one criteria of any business requirement, or to put it another way, small size of code means almost nothing to anyone except the original developers.
>small size of code means almost nothing to anyone except the original developers.
No. Small size reflects the quality of the code: It reduces the time of future developments (non DRY code keeps growing agreessively and becomes even more non DRY and very time consuming to develop new features into). It is an investment in the future. Now you are right: sometimes it is not worth it to invest into the future, because maybe the code will be thrown away because it will turn out that the startup/product is not viable. Somtimes you know that product has a stable growing market and you will have to develop tons of features into it in the future. Then investing in the future is very important.