4 ms·
Yes, during a rewrite of a product I had a (new) team member scream YAGNI at me with supercilious delight when I pointed out all functions needed to account for
by djtango 2y ago
Yes, during a rewrite of a product I had a (new) team member scream YAGNI at me with supercilious delight when I pointed out all functions needed to account for the full primary key of (id, territory) rather than just (id) because we will definitely be needing it imminently although the current build only worked with data for one territory.
We then had to spend a long time cleaning up the mess when lo and behold, we needed to add more territories to the dataset.
I think we've swung too far in the wrong direction when it comes to "premature abstraction" and yagni.
The only acceptable reason I've seen for writing bad code is "we might not be here tomorrow" but that is literally only valid for extremely young startups and even then those decisions could ripple and indirectly kill the company in the future when they're no longer able to pay off the tech debt in time
- Guid_NewGuid 2y agoAs someone who has been operating in hacky mode for years there's another situation where > we might not be here tomorrow Is true and increasingly common which is the recurring rounds of layoffs we all seem to be experiencing. It's in the individual developer's interest to bodge something in if it makes them appear productive in time for the next layoff. Certainly not a healthy incentive for building good software but it is what it is.
- ohthatsnotright 2y agoIf the MBA-management class wanted good software they wouldn't be so short sighted, but it's all about the pump-and-dump right now.
- mewpmewp2 2y agoFor me database structure should be built with decent flexibility, everything else is easier to refactor in the future when needed and best to keep simple unless it is a pattern you have definite experience with in the past and it is basically no cost and high certainty of working out. I hear YAGNIs when I know a pattern from experience with past projects even though deep down I know it is not that high effort due to past experience and we will need it. I hate hearing YAGNIs when it is something I specifically have had experience with in the past and they think it is too complex because they haven't done it. And they won't get it because they haven't gone through it.
- marcosdumay 2y agoYou know, I plainly disallow composed PKs on my workplace just so nobody ever makes that specific argument. Nobody can work with partial keys if your keys all have a single field.