vendredi 19 juin 2015

Reconciling the paradox of YAGNI vs foresight

I've taken some courses and read about the purposes of YAGNI. But, this principle as a whole has never sat well with me. It introduces a logical paradox.

As a hypothetical, you're designing a framework that you intend to scale forward. YAGNI (and possibly TDD) would encourage you to focus on the now. Make it work for your foreseeable hardware. After all, the requirements for the future are fuzzy and, well, in the future.

But, that inherently limits your framework's viability. And in this hypothetical, you have the foresight to know what the future will hold. It may be worth your time to do some prototyping and working ahead, knowing that it could very well help you down the road. After all, the very essence of a framework is to facilitate some functionality across environments-- so how can you be designing a framework and adhere strictly to YAGNI principles?

I'm not sure if I'm asking for a concrete on "how to use YAGNI"-- I get that it may be more philosophical than that. I might just be asking more seasoned developers in industry where the line is between YAGNI, the antithetical principles, and best practice. Is YAGNI enforced? Is it even regarded? Or is it just something our schools teach us because it's in our books?

Thanks.

Aucun commentaire:

Enregistrer un commentaire