Common thinking: "I need to add code to justify my job"


Common thinking: "I need to add code to justify my job".

Yet some devs remove more code than they add. 👍

"In my 3 years at Facebook, I added 391,973 lines and removed 509,793 lines. If I coded 1000 hours a year, that's about 39 net lines removed per hour!" - Jinghao Yan
And since more code tends to mean more bugs, removing code is a powerful way to improve both quality and velocity. 😎

How?
-Centralize abstractions to remove duplication
-Simplify algorithms
-Switch to more modern tech
-Use libs/frameworks/cloud hosts
-Eliminate unused logic
And here's the hard part: Tickets tend to focus on adding features. Few companies prioritize refactoring.

So to remove code, you may need to:
1. Propose changes that simplify the code
2. Sell management on the benefit to get them prioritized

View original on X