I wholeheartedly agree with "don't immediately jump on the modularize and abstract everything right away". I think that "modularization and abstraction is always and uniformly good" is one of the big lies of our profession. It’s easy to see how it’s attractive : programming is intellectual work, and displaying capacity of abstraction is rewarding. I was extremely enthusiastic about that stuff when I was young, too. T…
Write code that is easy to delete, not easy to extend (2016)
21–30 of 113 posts
Re: Write code that is easy to delete, not easy to extend (2016)
#22This guy has a talk too with the same kind of tone about the whole industry. Had a good laugh when I was starting out. https://youtu.be/AUYPnxv0yss
Re: Write code that is easy to delete, not easy to extend (2016)
#23I wholeheartedly agree with "don't immediately jump on the modularize and abstract everything right away". I think that "modularization and abstraction is always and uniformly good" is one of the big lies of our profession. It’s easy to see how it’s attractive : programming is intellectual work, and displaying capacity of abstraction is rewarding. I was extremely enthusiastic about that stuff when I was young, too. T…
> Also, changing the slightest things required to go through 5-6 files. That is a sign it was incorrectly modularised. Good modularisation means high cohesion and low coupling. Having to make changes in multiple files means the opposite. Don't rack on modularisation (great concept!) when your only experiences are of bad implementations of it. (Which is not surprising, because most people do get it wrong.) Maybe the t…
Re: Write code that is easy to delete, not easy to extend (2016)
#24Re: Write code that is easy to delete, not easy to extend (2016)
#25This guy has a talk too with the same kind of tone about the whole industry. Had a good laugh when I was starting out. https://youtu.be/AUYPnxv0yss
Here's his github too, if anyone's interested. Fairly prolific to say the least: https://github.com/tef
https://github.com/tef/0.0/commit/59575ac7d888c60eb043fe3b3c...
Re: Write code that is easy to delete, not easy to extend (2016)
#26Re: Write code that is easy to delete, not easy to extend (2016)
#27Earlier quoted context omitted.
> Also, changing the slightest things required to go through 5-6 files. That is a sign it was incorrectly modularised. Good modularisation means high cohesion and low coupling. Having to make changes in multiple files means the opposite. Don't rack on modularisation (great concept!) when your only experiences are of bad implementations of it. (Which is not surprising, because most people do get it wrong.) Maybe the t…
That sounds like myriads of programmers have done it wrong for decades. Can you elaborate on this and maybe add a few sources?
Re: Write code that is easy to delete, not easy to extend (2016)
#28The unfortunate side effect of this (very good) advice is that all code that's easy to delete will eventually be replaced with code that's hard to delete (and thus will eventually be impossible to delete in order to be replaced with something better).
It is like the Murphy's law of deletable code "Anything that can be made hard to delete will be made hard to delete".
Re: Write code that is easy to delete, not easy to extend (2016)
#29The unfortunate side effect of this (very good) advice is that all code that's easy to delete will eventually be replaced with code that's hard to delete (and thus will eventually be impossible to delete in order to be replaced with something better).
Re: Write code that is easy to delete, not easy to extend (2016)
#30The unfortunate side effect of this (very good) advice is that all code that's easy to delete will eventually be replaced with code that's hard to delete (and thus will eventually be impossible to delete in order to be replaced with something better).
I don't see your point. Code that's more modular, pluggable is by definition easier to delete. That should not be a reason to prevent us writing easy to delete code.
> all code tends to be refactored to its level of unrefactorability.
This was a neat way to look at it!