I think a huge problem with YAGNI as a principle is that it is - in itself - as subjective as most of the points in this whole discussion.
I've read my fair share of code authored by people who's definition of "done" seems to be "it compiles and doesn't fall over the first time I look at it", ignoring various obvious edge cases that could be triggered randomly. Cleaning up messes like this always costs more than the shoddy implementation saved in the first place. Usually those clean-up session start when some strange edge case occurs on a critical production system.
On the other side, the approach is fine, if the code only runs once or twice an is then discarded. In that case ironing out all possible bugs is clearly a waste of time.
So, YAGNI means different things in different contexts. So, I'd say that being aware of said context is a very crucial skill to have as a developer.
---
When it comes to business problem solving, I couldn't agree more, though. There are a lot of "solutions" that could have gotten so much better if someone tried to figure out the problem first.
I've read my fair share of code authored by people who's definition of "done" seems to be "it compiles and doesn't fall over the first time I look at it", ignoring various obvious edge cases that could be triggered randomly. Cleaning up messes like this always costs more than the shoddy implementation saved in the first place. Usually those clean-up session start when some strange edge case occurs on a critical production system.
On the other side, the approach is fine, if the code only runs once or twice an is then discarded. In that case ironing out all possible bugs is clearly a waste of time.
So, YAGNI means different things in different contexts. So, I'd say that being aware of said context is a very crucial skill to have as a developer.
---
When it comes to business problem solving, I couldn't agree more, though. There are a lot of "solutions" that could have gotten so much better if someone tried to figure out the problem first.