News for hackers. Stuff that matters.
Re:On over-engineering; finding the right balance by djtango on Wednesday September 11, 2024 @04:57AM (#41509471)
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

Re:On over-engineering; finding the right balance by mewpmewp2 on Wednesday September 11, 2024 @08:00AM (#41510497)
For 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.

Re:On over-engineering; finding the right balance by Guid_NewGuid on Wednesday September 11, 2024 @07:17AM (#41510239)
As 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.

Re:On over-engineering; finding the right balance by ohthatsnotright on Wednesday September 11, 2024 @07:57AM (#41510472)
If 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.
Re:On over-engineering; finding the right balance by marcosdumay on Wednesday September 11, 2024 @10:58AM (#41512003)
You 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.