Remix.run Logo
4lx87 3 hours ago

The most effective contributors at your job remove more code than they add? That doesn't sound effective that sounds like digging ditches to fill them. Every line of code removed is a line that was previously added.

sarchertech 29 minutes ago | parent | next [-]

We had a library written by a former employee who was a prolific producer of code. He insisted we needed it and spent over a year developing it in company time.

The library was a masterpiece of what if driven development. It was about 50k LoC, and it had 300k LoC of dependencies. It was a nightmare to modify. And no one wanted to take over maintenance so people would submit PRs to the former employee when they did modify it.

I wanted to change something in the library to support a large migration I was in charge of. When I went digging it turned out that we were barely using any of the features in the 2 years since he’d finished it. I replaced the 50k LoC library and 300k LoC of dependencies with 300 lines in less time than it would have taken me to modify the library (a few days).

banannaise 2 hours ago | parent | prev | next [-]

Turning inefficient, unreadable code into efficient, readable code often results in an overall reduction in LoC.

High-quality code and high-volume code are highly anti-correlated. Incidentally, low-quality code that is excessively long just so happens to be common complaint with AI-generated code.

hhjinks 2 hours ago | parent [-]

Rewriting code to be more compact is orthogonal to productivity.

tauroid an hour ago | parent | next [-]

In a similar way to how a radial burn (https://space.stackexchange.com/questions/44608/what-happens...) may be orthogonal to your trajectory but still may be necessary to avoid becoming a fireball in half an orbit's time.

bryanrasmussen 36 minutes ago | parent | prev | next [-]

you have evidently been blessed to work only in places with acceptable level of quality code and above.

dijksterhuis 4 minutes ago | parent | prev | next [-]

[delayed]

jtbayly 2 hours ago | parent | prev | next [-]

Which is not what is being discussed. Often rewriting code to make it more understandable makes everybody more productive.

risyachka 16 minutes ago | parent | prev [-]

Simplification usually requires the most effort and results in simple and elegant systems easy to understand and maintain with reduced error surface.

So overall increases productivity by a lot

overfeed 3 hours ago | parent | prev | next [-]

> The most effective contributors at your job remove more code than they add

Perhaps they tackle non-code-editing tasks like architecture, design, mentoring and code review (think staff and principal tasks)

> Every line of code removed is a line that was previously added

Yes. This os not a failure. Code has a surprisingly short half-life.

4lx87 3 hours ago | parent [-]

It’s not a failure that resources were spent writing code that was not needed?

gf000 2 hours ago | parent [-]

Maybe it was temporarily needed, but the assumptions around it has changed and now it's unneeded. Then people built on top of that not understanding that they could simplify the whole system, and only later was that option discovered.

What would you keep from this?

fifilura 3 hours ago | parent | prev | next [-]

I definitely agree with the GP, and the point is that most often someone else (or an LLM) added all those LOC that are removed to make the system sensible.

georgemcbay 3 hours ago | parent | prev [-]

> That doesn't sound effective that sounds like digging ditches to fill them. Every line of code removed is a line that was previously added.

Because they were added doesn't mean they were needed and even if the same person added and then removed them, it doesn't mean they are digging ditches to fill them.

The idea that "I would have written a shorter letter, but I did not have the time" also applies to code, and sometimes later you are blessed with more time than you had when implementing something under deadline pressure.

4lx87 3 hours ago | parent [-]

> Because they were added doesn't mean they were needed and even if the same person added and then removed them, it doesn't mean they are digging ditches to fill them.

Huh? If LoC weren't needed then adding them was unnecessary and a waste of time. Someone who is known at an organization for removing unnecessary code screams inefficiency to me. It's paying one person to create a mess then another to clean it up.

georgemcbay 2 hours ago | parent [-]

> Huh? If they weren't needed then adding them was unnecessary and a waste of time.

My previous reply already addressed this?

I can't help but think you are being purposefully obtuse if you can't acknowledge the concept of developers creating known (and hopefully temporary) technical debt due to various forms of deadline related time pressure or changing requirements.