Live data from Hacker News

Yagni Exceptions (2021)

lukeplant.me.uk

1–10 of 214 posts

Re: Yagni Exceptions (2021)

#2
> I'm essentially a believer in You Aren't Gonna Need It — the principle that you should add features to your software — including generality and abstraction

YAGNI is not a principle. It is a contextual thumb rule. A codification of expert intuition. Exceptions to thumb rules are quite the norm. Conflating thumb rules with principles is a sign of sloppy thinking. Often engineers will misuse terminology thinking that it "doesn't matter". But it does. Think twice before claiming that something is a principle. The words you use highly influence your thought process[0].

[0]: https://en.wikipedia.org/wiki/Linguistic_relativity

Re: Yagni Exceptions (2021)

#3

> I'm essentially a believer in You Aren't Gonna Need It — the principle that you should add features to your software — including generality and abstraction YAGNI is not a principle. It is a contextual thumb rule. A codification of expert intuition. Exceptions to thumb rules are quite the norm. Conflating thumb rules with principles is a sign of sloppy thinking. Often engineers will misuse terminology thinking that…

Indeed. A rule of thumb is something you're supposed to use, at most, in the absence of any better information. I've written abstractions that didn't end up needed, sure. I've also written abstractions that I've been extremely glad for in hindsight.

Re: Yagni Exceptions (2021)

#5

> I'm essentially a believer in You Aren't Gonna Need It — the principle that you should add features to your software — including generality and abstraction YAGNI is not a principle. It is a contextual thumb rule. A codification of expert intuition. Exceptions to thumb rules are quite the norm. Conflating thumb rules with principles is a sign of sloppy thinking. Often engineers will misuse terminology thinking that…

So what would be an example of a software design principle?

Re: Yagni Exceptions (2021)

#6
Should maybe add security and privacy to that list, in this day and age. Not that it all needs to be implemented right away (depending on jurisdiction you're operating under) but having a plan for how to solve security and privacy considerations and working with that in mind from the start can make it a much less painful experience in the long run.

Re: Yagni Exceptions (2021)

#9
YAGNI is not an excuse to take lots of shortcuts against known good implementation patterns. Second guessing years of people doing things right by naively assuming you won't need something is more likely to be a mistake than it is not. Do it properly the first time. Actively creating technical debt against your better judgment is silly.

Re: Yagni Exceptions (2021)

#10

Bad title. I read it as "you ain't gonna need exceptions" but the author intended "exceptions for the YAGNI-thumbrule".

It's only bad if you read "YAGN Exceptions"

But this would be very good advice! Exceptions (a.k.a. modern-flavored COMEFROM statements[0]) are extremely confusing and have no place in a clean codebase.

[0] https://en.wikipedia.org/wiki/COMEFROM

Post reply on HN