2 ms·
My grandfather invested in a new apartment building back in the 50s. At the end of every day he'd go there with a case of beer for the construction workers. He
by noduerme 5y ago
My grandfather invested in a new apartment building back in the 50s. At the end of every day he'd go there with a case of beer for the construction workers. He said, "I want to make sure they care. So if they see a place where one nail is enough, they'll hammer in two nails just to be sure."
That's how I feel for my clients; I hammer in all the nails I can think of. The result is, usually I'm shocked by how few bugs there are in production. I've had business software running 24/7 that goes for years without any intervention. The occasional upgrade or minor UI fix. Error-proofing is the state of mind you're in when you write that parser and google for every edge case you can think of.
[edit] I just want to add another thought. There's such a thing as needing to ship. If you add every bell and whistle, every speed improvement and cache, you'll just keep going and never finish. The important thing is to think about these possibilities as you're writing the code, and document them so you know where the pain points might be if this software is still running much more intensively ten years down the road.
- Sammi 5y agoGreat story. I think it is about a different problem that what the post is about though. The post is about yagni and not adding unneeded configuration and complexity, and having an opinionated design instead. I think you story is more about solving the actual real problem for the end user well.
- noduerme 5y agoHm. Thank you. And good point. Designing for other coders to work with your code is very different than designing for only a client, and your future self. Too many options or unnecessary hooks in an API is a pain when you just want to do something clear with it. Not enough options can render a platform unsuitable. In some ways this is a classic problem - if you run a shoe store, do you put out one beautiful shoe that everyone tries to fit into, or too many shoes to choose from. But in software, the feet change shape. So the more opinionated something is, the more it runs up against an unforeseen future (I'm thinking about Actionscript, JQuery, D3...) Maybe a good balance would be to design an opinion into the software, but with alternate futures in mind, to try to foresee breaking changes... this can be opinionated, but still leave options open in case requirements change..? But yes, it's harder if you're building an ecosystem. TL;DR I still think writing more options is better as a rigorous thought process, if not as actual code. If you must, hide them from the API consumer, but have them in the arsenal. (In itself, that's an opinion).