Re:My Thoughts on “Bad Code”
by joombaga on Thursday March 16, 2023 @10:07PM
(#35191973)
Oh man I have some bash case statements that fit this description. Could be improved, but it's tested with every commit on every PR and by George it really holds the room together.
[ Parent
| on HN ]
Re:My Thoughts on “Bad Code”
by jiggawatts on Thursday March 16, 2023 @10:22PM
(#35192098)
I've seen snippets of the back-end code of a public cloud, and it is full of multi-page "switch" statements where they have hard-coded lookup tables for what SKUs support what features.
It's ugly, it's a maintenance headache, but it does function, and very robustly too. There are no API calls, no microservices, no performance issues, etc...