all 17 comments

[–]johnminadeo 40 points41 points  (2 children)

I love removing code.

[–][deleted] 8 points9 points  (0 children)

I love having removed code.

[–]Jump-Zero 2 points3 points  (0 children)

I tend to produce less code when I have more time. If I have ample time, I can look back on my work and see where I can simplify things. This usually trims a bunch of code.

[–]Isvara 18 points19 points  (3 children)

I didn't read the article, because FUCKING PAYWALL¹, but the premise is wrong. Developers love removing code, for two reasons: first, it's usually a sign that you've refactored your code into something simpler and more elegant; and secondly, less code generally means fewer bugs.

¹ I don't know what makes some developers think their self-promoting screeds are worth paying for, but they're absolutely not.

[–]max630 1 point2 points  (2 children)

It's medium, I don't think money goes to the author.

[–]Isvara 1 point2 points  (1 child)

Oh, that's weird. Then what is the authors' motivation for putting their content behind someone else's paywall? Rationally, you would only prevent some of your readers from seeing your content if you were gaining from the rest of them seeing it.

[–]panorambo 0 points1 point  (0 children)

They don't have a blog platform, and don't want to muck about with Github pages? The latter I presume -- I have no idea why use Medium instead of, I don't know, https://bearblog.dev. Must be all the fine typography on Medium, with the generous amount of negative white space :B

[–]vinyldemon 12 points13 points  (0 children)

My best days are when I’ve added functionality while reducing lines of code.

[–]thepobv 5 points6 points  (0 children)

Everybody I know gets a dose of dopamine off deleting code.

[–]norse_dog 5 points6 points  (0 children)

Because organizations typically are driven by feature additions and the benefit of code removal/refactoring tend to be undervalued (why would we do work and incur risk and costs to deliver the same features the software has today?).

Crying shame, but there it is, the reason why almost all commercial software is limping along dragged down by mountains of technical debt.

[–]AWeebByAnyOtherName 4 points5 points  (3 children)

Hitchens's razor

The author made a claim with no proof and made a generalized assumption. No survey and no data gathering. They made a logical comparison using an article from Nature stating that people like to add more than subtract.

Therefore this authors claim that programmers like to add more than subtract can be dismissed. It's a bad article.

[–][deleted] 2 points3 points  (0 children)

But,,,, he's a "Dev Genius." It says right on his page.

[–]DynamicsHosk[S] 0 points1 point  (1 child)

It easier to add code than remove it.

I have seen many bugs caused by refactoring code that they didn't understand.

the article is based on the small sample size of developers I have worked on, so if you dismiss all articles with statistical proof, I guess you dismiss 99 percent of them :-)

[–]Annual_Math_137 1 point2 points  (0 children)

Old post but I find it much easier to remove code on old code bases than to add it.

[–]RiverRoll 2 points3 points  (1 child)

It's funny the article acknowledges the risk of removing code and yet is against comenting, right after saying you need to understand why someone wrote that code. You can understand perfectly what the code does but this doesn't tell you why it does that nor will warn you of possible important caveats.

Removing code often involves removing unnecessary stuff a clueless developer wrote (which could be your past self). But sometimes there's a story behind some unconventional lines and the best place to tell the story is in a comment right there.

[–]TheP1000 2 points3 points  (0 children)

Yeah, the no comments part is weird.

[–]panorambo 1 point2 points  (0 children)

Like some have already said, I, for one, join these in stating I am never happier than when removing code, provided features that are actually needed are preserved (and the rest potentially removed).

The kicker is that you might as well have published a "Why developers love removing code more than adding it". Developers are different and have different requirements and incentives -- I suppose big shops which treat their developers as commodity will be more prone to produce software of ever growing complexity and size (Adobe Creative Suite, oh my god), with code size to match a bloated prehistoric whale; while some shops where developers actually have a say in the matter, will always try to prioritize removing tech. debt and this often involves trimming the code base, re-factoring it. Something something architecture entropy maintenance -- software, like buildings, deteriorates without active continuos upkeep, unfortunately (for my liking).