News for hackers. Stuff that matters.
Re:Write code that is easy to delete, not easy to extend (2016) by taeric on Wednesday November 04, 2020 @02:01PM (#24991935)
That is true of all code you delete. It had some use, or it would never have been added in the first place.

I'm not arguing for the entire thing to be a ball of mud. Just pushing that there are trade-offs. And, in general, less code is better code. Even if it is a larger method.

Granted, I think a lot of this is in strawmen. Breaking 5 lines out of a 40 line method so that you can be better abstracted is usually fighting the wrong things. Breaking it out of a 500 line function is different.

There are no comments on this comment yet.