Slashdot Mirror


Why Is "Design by Contract" Not More Popular?

Coryoth writes "Design by Contract, writing pre- and post-conditions on functions, seemed like straightforward common sense to me. Such conditions, in the form of executable code, not only provide more exacting API documentation, but also provide a test harness. Having easy to write unit tests, that are automatically integrated into the inheritance hierarchy in OO languages, 'just made sense'. However, despite being available (to varying degrees of completeness) for many languages other than Eiffel, including Java, C++, Perl, Python, Ruby, Ada, and even Haskell and Ocaml, the concept has never gained significant traction, particularly in comparison to unit testing frameworks (which DbC complements nicely), and hype like 'Extreme Programming'. So why did Design by Contract fail to take off?"

1 of 178 comments (clear)

  1. Re:Management by Anonymous+Brave+Guy · · Score: 4, Interesting

    People have a tendency to confuse bluster and arrogance with ability and experience.

    They do, yet in my experience, these things are inversely correlated. This applies to all guidance/oversight roles, including business analysts, software architects, consultants, and indeed managers themselves. As I've commented here before, you can always identify a good leader by three characteristics:

    • They can set a clear direction and convey this to others.
    • They organise adequate resources and set realistic expectations.
    • Having done the above, they get out of the way as much as possible.

    The third one is usually the easiest way to identify morons. If you come across a leader in software development who places more value on reports and metrics so they can track things than they do on supporting the developers and test teams working for them, then you know you're dealing with an incompetent.

    And yes, that does mean many leaders in software development organisations today are incompetent. That's why the genuinely good people are worth so much.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.