Wednesday, October 10, 2012

The Paradox of Software Complexity

A common principle in user interface design is the conservation of complexity. Every task has some fundamental, irreducible complexity. Designers can either hide this complexity behind a simple interface or expose it to the user through a richer, more complex interface. What if a designer adds useless widgets to the interface? Because complexity is added beyond what the user needs, the interface has been complicated. This same principle applies when designing abstractions in software; hiding complexity behind abstractions is one way our limited minds can build complex software! After all, it is much easier to reason about structures and functions than raw memory addresses and stack frames. Herein lies the paradox - partitioning software into abstractions is fundamentally a complication.

Complexity can be looked at as the "inter-connectedness" of the parts of a system. The more parts and connections between them, the more complex the system becomes. An abstraction takes some of these connected parts and hides them behind a new part. We have hidden the details, and the top-level is now (hopefully) simpler. The complexity from the details does not just go away; it is only hidden behind the abstraction. On top of this, we now have a new part and its new connections. The system is now complicated! If an abstraction is not worth the cost of this complication, then it is a bad abstraction.

For this reason, good abstractions are highly coherent and minimally coupled. A perfect example is a C compiler. A good compiler can abstract away the details of the machine code and free our minds to build higher-level abstractions. The programmer still has to worry about managing resources, but can have the convenience of functions and loops rather than the moves and jumps that are implemented by the CPU. In specific cases, a programmer will need to know these hidden details anyway. A C compiler is so decoupled that it does not need to be shipped with the binaries it produces. The C standard library, however, is supported by a platform-specific runtime library. This allows a lot of higher-level, platform-dependent parts to be abstracted away too. We can continue to hide complexity with virtual machines, network stacks and GUI toolkits. Every part hidden is another part we can afford to build.

In a perfect world, this article would have ended after the last sentence. As we covered earlier, there is a complication - all of these abstractions add unnecessary complexity. Their fundamental complexity does not just go away; somebody has to manage that complexity. To make matters worse, it is sometimes necessary to understand some of the abstracted details anyway. These leaky, complicated abstractions often result in performance, maintenance and security issues. Sometimes the complication pays off: the software components can be reused or divided more efficiently among a team. Other times, the cost of this complication will scale much faster than the software.

6 comments:

  1. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point Xim Xim

    ReplyDelete
  2. yeap, it's really paradox.
    But y'r right.

    Best regards
    Toby, secure virtual data room

    ReplyDelete
  3. One difference between roulette and all different desk video games is that roulette chips don't have any worth denomination printed on them. This truly is the true definition of a chip, one which indicates its worth is technically known as a check. The roulette desk comes with six to eight units of various colored chips, each 메리트카지노 set consisting of 300 chips.

    ReplyDelete
  4. WAGGINGTAILS is certainly one of two deposit bonus codes you should use|you need to use} at Red Dog. This supplies a 225% deposit match bonus and can be utilized a lot as} five instances, with a total of $12250 bonus funds to be claimed total if 온라인카지노 you’re keen to deposit $1,000 each time. Yes, you can to|you possibly can} win actual money from on-line casino bonuses, but you'll want to satisfy the wagering requirements first. As may have} seen on this article, there are numerous kinds of on-line casino bonus provides out there. It is tough choose on} the objective greatest casino bonuses end result of|as a outcome of} an offer’s suitability depends largely on a player’s gaming fashion.

    ReplyDelete
  5. You both wager on a red or black quantity, which is the ultimate even cash, one-to-one wager can even make|you 1xbet might make}. In 1963 Sean Connery, filming From Russia with Love in Italy, attended the casino in Saint-Vincent and received three consecutive times on the quantity 17, his winnings driving on the second and third spins. They have been arrested and kept on police bail for nine months, but eventually launched and allowed to keep their winnings as they had not interfered with the casino equipment.

    ReplyDelete
  6. In this regard, our suggestion is to play on sites with slot machine reviews, such as ours, need to|if you wish to} play free video games online no obtain no registration, or making a fee. Free slot machine video games with out downloading or registration at the moment are|are actually} in mass circulation due to how enticing and mouth-watering they're. The idea of free slots no downloads merely permits playing lovers to 온라인카지노 play extra of the best video games and have prime quality|a high quality} gaming expertise. The obtain and registration that normally accompanies casino video games can be pretty cumbersome, annoying, and very restrictive; hence, there is a reason for free slots no obtain option. There are so many wonderful casinos online providing great free slot machines proper now. In truth, the toughest part is choosing which sport to play first.

    ReplyDelete