Lines of code deflation
At the beginning of my career, 11 years, I was working on an embedded and secured operating system for SIM cards.
It was mostly some C and JavaCard.
At the time, I was able to push 8-15k lines of code, and I felt really productive at the time.
Until my second performance review, my team leader at the time told me: "we should call you Attila, the code never changes again where your editor has once opened it".
Truth to be told, the source code had grown during 15-20 years, by 150-200 electronic engineers with a strong foundation in software engineering.
The most prolific developers were able to deliver consistently 500-800 lines of code weekly, and 2-3k in green-field projects during a week, once every few months.
To get back to my performance review, he raised two issues:
- The biggest number of defects of the whole department
- The code review pressure was time-consuming for the department
Note: on the bright side, my defect rate, by number of change-set or lines of code, was the lowest, an order of magnitude to the previous best, one every 3-4 weeks.
Fast-forward 11 years, in work full-time in Haskell, producing 400-800 lines for code weekly, 2k when I'm on a green-field project.
Note: I just realized, writing those lines, I have the same productivity of my former coworkers.
My defect rate per lines of code increased to one every 2-3 weeks.
Aside getting older, what could explain this shift:
- Programming language change: Haskell is way more concise than C and JavaCard, which also reduce then the number of lines of code by feature
- Code base context: restructuring a legacy system adds up lines of code quickly
- Ambiguity: at the beginning of my career, I was simply pulling tickets from the bug tracker, I had no exploration to make with the stakeholders to write the requirements
- The department size: since then, I have worked in smaller teams or and departments, unlike in big departments, if we face an issue, we might not be able to rely on your coworkers, wasting time in searching on the web
- My missions changed, at the beginning, I mostly had to build pieces based on an existing architecture and infrastructure, these days I have to define the architecture and build the infrastructure and integrate it (and it's often messy and flaky)
- I'm more involved in the organization (meetings, technical discussions)
Note: I attribute my defect rate increase to Haskell expressiveness, I try to convince myself my defect rate by feature decreased
Over the last month, at the time of writing, I received compliments from four people regarding my outputs.
The thing is, I'm often ashamed of my lower lines of code production, I think, as an industry, we should really stop considering lines of code, as it does not mean anything.