News for hackers. Stuff that matters.
Re:In the Defense of Spaghetti Code (2013) by kd5bjo on Monday July 22, 2019 @06:53AM (#20496824)
> You cannot fix essential complexity with any kind of design. If there are options in design, your code will reflect them at some layer.

That’s certainly true; my favorite method at the moment for this sort of thing is to make it data-driven: have a structure that contains all of the parameters that change based on vendor (including enums/flags for optional behaviors) and a single process implementation that refers to it when needed.

Re:In the Defense of Spaghetti Code (2013) by AstralStorm on Monday July 22, 2019 @06:56AM (#20496836)
You end up with a big if-then block. Essentially spaghetti but localized.

A joke I sometimes make is that spaghetti is best of a plate or in a box from which it cannot escape. Otherwise it would spill.

Ravioli does not spill but the relationships become implicit.

Re:In the Defense of Spaghetti Code (2013) by kd5bjo on Monday July 22, 2019 @07:17AM (#20496911)
Localized is good. It means that the next time there’s a new thing, there’s only one place you need to change to specify its unique set of properties. Often, this can even be removed from the code entirely into a configuration file, so that a recompilation isn’t necessary for every new situation.