Yagni (2015)
I think coherency of implementation is a lot more important than YAGNI.  For example:<p><pre><code>  class Car:

      def honk(self):
          print(&#x27;Honk!&#x27;)
</code></pre>
Cool, now we have a car, but it only honks.  But we only needed it to honk, so that&#x27;s fine.<p><pre><code>  class RoadTrip:

      def __init__(self, car, destination):
          self.car = car

      def go(self):
          self.car.start()
          self.car.drive_to(destination)
</code></pre>
Oh no, we built a car but it does nothing that a car does.  Let&#x27;s add this functionality.<p><pre><code>  class Car:

      def __init__(self):
          self.started = False
          self.gps = []
          self.location = cool_app.get_current_location()

      def honk(self):
          print(&#x27;Honk!&#x27;)

      def start(self):
          self.started = True

      @property
      def location(self):
          return self.gps[-1]

      @location.setter
      def location(self, new_location):
          self.gps.append(location)

      def drive_to(self, location):
          self.location = location
</code></pre>
Super easy.  Except a different user of our library implemented this functionality already for a different reason, but in a different way.<p><pre><code>  class CarEngine:

      def __init__(self, car):
          self.car = car
          self.started = False

      def start(self):
          if self.started:
              raise Exception(&#x27;Already started!&#x27;)
          self.started = True

      def turn_off(self):
          if not self.started:
              raise Exception(&#x27;Not started!&#x27;)
          self.started = False

  class CarGasTank(self, car):

      def __init__(self, gallons):
          self.car = car
          self.capacity = gallons
          self.level = gallons

      @property
      def empty(self):
          return self.level == 0

  class MotorCar:

      def __init__(self, engine, gas_tank, mpg, location):
          self.engine = engine
          self.gas_tank = gas_tank
          self.location = location
          self.mpg = mpg

      @property
      def started(self):
          return self.engine.started

      def start(self):
          return self.engine.start()

      def drive_to(self, location):
          distance = location - self.location
          fuel_required = distance &#x2F; self.mpg
          if fuel_required &gt; self.gas_tank.gallons:
              raise Exception(&#x27;Not enough gas!&#x27;)
          self.gas_tank.gallons -= fuel_required
          self.location = location
</code></pre>
I&#x27;ve lost count of the number of times I&#x27;ve seen stuff like this.  Sometimes the original implementation is in a different library that&#x27;s hard to change.  Sometimes other code rely on specific details of the original implementation so changing it requires changing that code too.  Sometimes additions seem &quot;out of scope&quot; so they are actively pushed to dependencies.<p>It might feel like this is a process problem -- like there should have been better upfront design or communication -- but these &quot;failure cases&quot; are actually the success cases for code.  You want code to rely on your libraries.  You want to consider all users of your libraries when making changes.<p>The problem is actually YAGNI, because that mentality encourages us to churn out big, incoherent bags of functions when we should be thinking about code responsibilities and designing whole systems.<p>You can see this in action with JavaScript most infamously.  Its standard library is extremely YAGNI, and it led to whole new programming languages being built on top of it because it was so anemic.  The complexity has to live somewhere, and if you don&#x27;t deal with it in a coherent and orthogonal way, someone else will have to deal with it and their options will be a lot more limited than yours.<p>Following simple mantras like DRY, YAGNI, and whatever else fits on a poster is the surest way to mess up your design.  It requires thoughtfulness and experience, and there are no shortcuts.