vogon
@vogon

the unfortunate things they don't tell you about You Aren't Gonna Need It are that:

a) you might actually need it though
b) the longer before you realize you actually needed it -- the closer you get to being right that You Weren't Gonna Need It -- the harder the work to unwind the assumption will be
c) being wise enough to think in the moment that You Weren't Gonna Need It doesn't get you a discount on that work


strangebroadcasts
@strangebroadcasts

Some features really do get much harder to add after the fact - I like Simon Willison's and Luke Plant's lists of PAGNIs, "probably are gonna need it" features

Sadly none of these lists have the one true example of PAGNI: undo/redo, which is straightforward to solve with the command pattern if you think of it ahead of time, and pain otherwise


You must log in to comment.

in reply to @vogon's post:

i have a notes file in every hobby project labeled "the stuff that gathers at the bottom of the sink" and it's just every code block I deleted that i might need an easier way to find than digging through git.

Yeah XP is absolutely garbage for pulling single principles from, all of their ideas strongly depend on the other ideas being implemented at the same time and scale. YAGNI only works well if you're constantly refactoring as you go and make allowances for that in estimations, which is way harder to convince leadership to budget time for, so you end up with just the corner-cutting bits.

That's a great way to put it, dang.
It's been such an uphill battle convincing people to actually do the refactoring part, but I never connected the two together.

tbh i find myself explaining yagni as: please don't write a plugin system, or a subclass hierarchy, or anything where you find yourself saying "we can just extend it"

as well, those are the things people keep writing that no-one needs

d) entire generations of programmers raised on YAGNI being this cherished wisdom have been enculturated to believe that any time they invoke it, they are automatically Right, even in cases when they're very much not (because culturally, professional programming is often about projecting competence and intelligence even and especially when you're just winging it and/or insecure about your abilities)