News for hackers. Stuff that matters.
Re:Write code that is easy to delete, not easy to extend (2016) by aszen on Wednesday November 04, 2020 @01:03PM (#24991400)
The problem with removing ball of mud code is that you don't know much of that mud is entangled with useful code. I do think oop design patterns bring a lot of indirection sometimes but atleast we can use small well thought out functions instead of connecting all things inside one giant one
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.