Because YAGNI is a principle, not a panacea
Software Development is always about balancing many requirements. It's not about getting one thing right, rather getting none of many wrong. YAGNII alone won't save your ass.
In that sense, YAGNI is there to avoid the following pitfalls:
- When you need a compiler, create a compiler - not a self-compiling compiler framework
(Our strength - solving the general problem - is also our weakness)
- Don't underestimate implementation effort.
- Don't overestimate lifetime of your application and stability of requirements
Balancing competing requirements is hard. But that's why - as McConnell poignantly stated - software development is engineering.
Because other principles are people, too
Other principles principle - more fundamental IMO - is the principle of least surprise and the encapsulation of complexity: the public interface / contract of an entity should be simpler than it's implementation - otherwise, to call a function correctly I would have to know more than I needed to do it myself. sometimes, that means your implementation needs to be complete.
One example (maybe not a very good one):
/// Estimates the time required to comlete the batch.
/// If the time cannot be estimated reliably, the return value is -1
/// \returns [double] estimated time in seconds
double EstimateDuration(Batch & batch);
is a simple contract. OTOH,
/// Estimates the time required to comlete the batch.
/// If the time cannot be estimated reliably, the return value is -1.
/// This function does not support looping batches (right now, looping
/// batches only run under a servicve account with no UI, so it's not needed).
/// Also, when the moon is full, the return value is -1, but an estimate
/// is found in batch.JeffsEstimate. This value is used only by Jeff's core
/// build script which runs roughly once a month.
/// \returns [double] estimated time in seconds
double EstimateDuration(Batch & batch);
Is not a contract, it's a description of the imlementation.
(One could argue if the problems are a result of overzealous YAGNI or simply bad design - but maybe that's because you YAGNI'd design altogether)
Design doesn't hurt
Will the advent of agile, the "design phase" got something of a bad name. However, to be worse than no planning at all, your plans must be catastrophic indeed. The biggest danger is not genuinely bad plans, but trying to anticipate every problem and change request. YAGNI is invaluable here.
They are senior, after all
I don't know them - Their tendency may be due to old-school waterfall indoctrination and fear of change. Or maybe they are seniors because they know their job - they've learnt what parts you rather do now than later, and what parts can be sacrificed to the uncertanities of the future.