Because YAGNI is a principle, not a panacea
Software development always involves balancing many requirements. It is not about correctly understanding one thing, and not making mistakes. Only YAGNII will not save your ass.
In this sense, YAGNI exists to avoid the following traps:
- When you need a compiler, create a compiler - not a self-compiling compiler structure (Our strength is solving a common problem is also our weakness).
- Do not underestimate implementation efforts.
- Do not overestimate the life of your application and the stability of requirements.
Balancing competing requirements is difficult. But here's why, ”McConnell asked sharply,“ software development is development. ”
Because other principles are people too.
The principle of other principles - the more fundamental IMO - is the principle of least surprise and encapsulation of complexity: the public interface / contract of an object should be simpler than the implementation - otherwise, to properly call the function, I would need to learn more than I needed to do it myself . sometimes this means that your implementation must be complete.
One example (maybe not very good):
- a simple contract. Oto
/// 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 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 core /// build script which runs roughly once a month. /// \returns [double] estimated time in seconds double EstimateDuration(Batch & batch);
It is not a contract, it is a description of the item. (One could argue that the problems are due to excessive YAGNI or simply poor design, but perhaps because you have fully developed YAGNI)
Design does not hurt
Will the emergence of a flexible, "design phase" received something a bad name. However, to be worse than not planning at all, your plans must be disastrous. The biggest danger is not really bad plans, but an attempt to anticipate every problem and change the request. YAGNI is priceless here.
They are older, because I do not know them. Their tendency may be related to the ideology of the waterfall in the old school and the fear of change. Or maybe they are older people, because they know their job - they learned what parts you are doing now rather than later, and which parts can be sacrificed for the insanity of the future.