The best design does what it needs to, and no more.
https://henko.net/blog/when-nothing-can-be-removed/
[#]programming #simplicity
=> More informations about this toot | More toots from henrikjernevad@mastodon.social
@henrikjernevad This heavily relates to TDD. When you only add functionality you really need, proved by a failing test, you'll end up with a system such as you described. Any removal of production code will result in a red test suite / broken business logic.
=> More informations about this toot | More toots from selmaohneh@mastodon.social
@selmaohneh Very true! 👍 That is one of many benefits of TDD.
(Though I think the topic of the blog post applies at the design level and not just implementation. "Do you really need the feature you were about to write a test for?")
=> More informations about this toot | More toots from henrikjernevad@mastodon.social
@selmaohneh @henrikjernevad Also "what it needs to do" is partly a requirements question. I've sometimes found that getting a deeper understanding of the requirements helps me find a simpler/smaller solution. I personally like building up a mathematical model of the requirements, e.g. by writing a formal spec, especially when an informal description of the spec seems over-complicated or somewhat arbitrary.
=> More informations about this toot | More toots from underlap@fosstodon.org
@selmaohneh @henrikjernevad Other times, building a rough prototype is a good way to understand the requirements better, although there is a risk of implementing the presenting requirements, complete with arbitrary/unnecessary behaviour.
=> More informations about this toot | More toots from underlap@fosstodon.org
@selmaohneh @henrikjernevad I guess the requirements side is especially flexible when working on a component whose users are other components which are also being developed from scratch. There's then the opportunity to "shuffle" responsibilities around to try to discover a set of components where each is minimal in the sense we are discussing.
=> More informations about this toot | More toots from underlap@fosstodon.org
@underlap @selmaohneh I agree! The "no unnecessary parts" idea needs to be applied on all levels. And there are so many levels where one may intentionally or unintentionally add unnecessary stuff.
=> More informations about this toot | More toots from henrikjernevad@mastodon.social This content has been proxied by September (3851b).Proxy Information
text/gemini