views:

36

answers:

5

An excerpt from Programming Perls:

A Simple Design : Antonie de Saint-Exupery, 
the Fresh writer and aircraft designer, said that,
*"A designer knows he has arrived at perfection 
not when there is no longer anything to add,
but when there is no longer anything to take away."* 
More programmers should judge their work by this criteria.

Can any one elaborate this, please?

What does the author mean when he say "...TAKE AWAY"

A: 

Basically it means when you can't simplify it any further, you are done.

Daniel DiPaolo
A: 

The author means there is elegance in simplicity.

Antoine de Saint-Exupery was not a programmer, but a writer and engineer, long before computers were around (he wrote "The little prince").

Oded
+1  A: 

the Take Away part means that the design can be considered simple if all that remains are essential components, if you take away anything, it won't work.

Alex Larzelere
A: 

In terms of programming, it would mean deleting lines of code. The principle being that you should strive for solutions that are of course correct, but also elegant, simple, etc.

There are many benefits of this, but for starters having less code makes your programs easier to maintain, since they are easier for anyone reading them to understand. It can also allow for more flexibility, since when modifying a simpler solution you have less code to change, and can be more confident that your changes have not broken other parts of the application.

Justin Ethier
A: 

It's an elegant way of expressing what is a very good principle - "make your code as simple as possible".

Be careful not to misinterpret this however - the point is to take away design complexity, not do less typing. Example of good things to take away are:

  • Repetitive code (DRY principle)
  • Unnecessary function parameters
  • Unnecessary integration layers or boilerplate code
  • Features that the customer doesn't need or value

Bad things to take away:

  • Comments
  • Decent length, descriptive
    variable and function names
  • Extra code explicitly used to separate the code base into cleanly defined modules (if you like you can consider this an "essential feature" for future maintainability)
mikera