Doing More with Less Code
codewithoutrules.com
codewithoutrules.com
With code, less is more, less code to do the same means easier to read, easier to maintain, less bugs. So, a 10x programmer means a programmer who is 10x as productive, that is, delivers 10x as much features, fixes 10x as many bugs or not even that, since sometimes you have to do refactoring which improves the codebase a lot in several ways but doesn't provide as a result either features or bugs.
Actually I would expect the mythical 10x programmer to produce LESS code for the same functionality, and most probably be reducing the amount of code littered by other lesser programmers and starting refactorings that would create abstractions, split classes and make the code more modular, that would have as a result deleting classes and methods, and overall reducing the number of lines of code rather than increasing it...
I think a 10x programmer is someone whose efforts increase
profits by 10x.
Careful ;-). I think that falls into the same trap drKarl's critiquing. Someone spewing unnecessary lines of code can jack up their line count and bill more hours, thereby increasing profits. They aren't making complex problems disappear.To be fair to the parent comment, I think he's getting at the super programmers that crack problems others can't. This capability provides competitive advantages. Maybe I'm talking about the other side of the table and did a poor job at that. Sorry!
Programmers at a consultancy/agency are probably billing 20-40 hours no matter what. So if someone spends 80 hours on an 8 hour project, that just means they didn't work on other projects. This impacts cashflow. Additionally, an inflated bill may be challenged and marked down. So, there's no way for a programmer to be 10x more profitable unless they had nothing else to do otherwise.
Now, a company can be 10x more profitable if they hire enough programmers so that they have the capacity to inflate every project. ;)
To be a 10x programmer at a consultancy, you need a combination of a high billing rate and long hours, but the easiest way is to implement a productized service that is billed by value/fixed price instead of hourly.
For example, I know someone whose company was paid $81,000 for him to build an application, but he made a lot more for them charging about $40,000 to re-implement the same thing over and over for other customers. He didn't hit 10x, but he contributed mid six figure revenue in a year whereas the $81,000 was paid over 18 months. Obviously, he couldn't have done this if he was inflating his time.
I'll show this quote to my lil bros living in ~/bin/*.pl
Whilst this can be true, it's not always the case. Squashing code down to fewer lines can also mean doing something in a way that is much harder to understand or hides bugs behind complex subtleties in the code. Obviously it's a balance, and "lines of code" is, as usual, a poor metric of code complexity and readability.
As always there is a balance, but I am more often annoyed by gratuitous verbosity than by cryptic constructions.
Huh. Is that what it "would be" like.
If you're doing the same thing in two places, ok, if you are doing the same thing in three places, refactor.
Let's me get away with copy pasting while I'm quickly prototyping something out, but reminds me that I need to clean it up before I try to iterate again. Plus, it's unlikely that I'll hit the right abstraction on the first or second time I see a problem. Better to wait until I've seen it three times before refactor.
I think any kind of skullduggery is fair game at this stage when you just want to "get it to work". For me the rule of thumb to go beyond this point is the commit (or push if I'm using git). After that point you lose control of it. Other people see it, and start to poke around and change things and retrospectively delivering on your good intentions to provide "done" code becomes more difficult. Always do a personal review before letting your code out of it's box. Of course if you can find somebody who's interested get their feedback too ...
I've been doing mostly front end JS work the last year (as opposed to dabbling), and whenever I have to go back to do Java stuff again, it's really painful.
But hey, we got static types, right? So we "know" our code has few if any bugs in it. (riiiiiiiight)
I'll repeat what I've said before on the "10X" label which causes so many arguments...
To make peace with the "10x" label, I suggest people just think of it as a figure-of-speech instead of a rigorous mathematical term. We don't get hung up when people say "Star Wars IV was ten times better than Phantom Menace" or "I'm not even 1/2 the football player I used to be."
Even if people were to use a new term such as "3-Sigma Programmer"[1] instead of "10X Programmer", the ensuing debates would still be the same.
E.g. "Some people say 3-σ programmers write string parsing loops that are better in speed and quality than 99.7% of the other loops but that 3-standard-deviations-above-the-mean is a myth... etc"
Argument pattern is the same: take a label, any label, hyperfocus on some literal meaning to the exclusion of all else and debate why that mathematical interpretation fails in the real world.
You can interpret the label(s) literally as math or as an English meme. I propose that one of those interpretations will keep your blood pressure from rising.
As a counterpoint to the article, if a programmer knows how to convert a Ruby program with 100 lines and rewrites it in C/C++ in 600 lines so it executes 15x faster and uses less memory so the company can better utilize densely packed virtual machines in a cloud deployment, that's what many would call a "10x programmer" even though none of the inputs & outputs are mathematically "10" anywhere. The programmer wrote more lines of code so that another metric of effectiveness was optimized. The LOC increased but that's irrelevant.
Adding value depends on the context. If the main problem for the company is that the feature set is not attractive to clients, then speeding things up 15x and using less memory may not make a difference. If however, the feature set is amazing, but customers complain about the product being slow and eating up too much memory, then said programmer is adding a lot of value, thus "becoming" a 10x programmer.
The issues I most often face is explaining the running cost, be it due to complexity or hardware requirements. Some potential or minimal income always seems to trump long term savings. Another is "the customers expect us to have XYZ feature", regardless that you can prove that only a limited number of them actually use it. Far less than required to cover the running cost.
- Use the sharpest tool in the shed (programming language, framework, etc)
- Leverage existing code
- Reflect on the problem up front before writing any code
- Relentlessly question if you really need the feature you're adding
http://www.folklore.org/StoryView.py?story=Negative_2000_Lin...
It's worth remembering that when using a library one should know how it works; not knowing how it works may cause bugs and make development last even longer.
I've seen people write their own XML parsing libraries, try to handle dates + timezones on their own, and write REST API helpers for products that already had official packages. In each of these cases, even a brief look at some docs and a wild-ass-guess would've been more productive. It's super frustrating to watch.
I also learnt to appreciate more unix command line tools, I think twice if need to write an script, for instance to do webscrapping, sometimes you can get what you need just using curl | pcegrep | uniq | sed, and move on, if you then have the need for more scrapping then yes, it makes sense to invest the time on using a library, scripts etc.
Also, if you are constantly switching directions without also constantly coming to a deeper understanding of your problem space / market, then all you're doing is destroying momentum rather than creating it. Deeper understandings require orders of magnitude more time, data, and effort to understand the data.
Eventually you'll get that insight but in the meantime it's better to just keep moving forward.
But it takes experience and maturity to not to silly things trying to hit this goal. Sometimes it's just not possible.
0.1x as a term exists only because it's cute.
Instead, perpetually try to be a 0.9x programmer.
Assuming your customer doesn't use cost per LOC as a metric...
That's not what interview tests are for; they're for demonstrating a base level of competence and how you think about code during a discussion of the code. Also for acting as a catalyst for more discussion about programming.