4 ms·
It usually starts with "is_car", a simple, clear, yes or no. and then at some point someone needs to also check if it's a sedan and instead of turning it into a
by asddubs 2y ago
It usually starts with "is_car", a simple, clear, yes or no. and then at some point someone needs to also check if it's a sedan and instead of turning it into an enum called vehicle_type an "is_sedan" is added, etc.
- PhilipRoman 2y agoThe other side of the coin is making an enum and eventually realizing that some of the types can overlap. I prefer the "set of tags" approach due to its flexibility.
- griftrejection 2y agoCan't developers just... not do that? You can write bad code in any language. What is our responsibility as experts to avoid doing things like this, then?
- asddubs 2y agoif they know better and have the foresight, they do. But stuff like this might not occur to people who've never been bitten by it. Every step of the way you just make things a little bit messier than before.