The Pragmatic Craftsman :: Simplicity from complexity ::

Archive for November, 2007

Values for Excellence in Programming November 23rd, 2007

Values for Excellence in Programming

I am reading Kent Beck’s book Implementation Patterns (which is great so far) and he talks about three values that are consistent with excellence in programming: communication, simplicity, and flexibility.

Kent put it so well, and these values are so timeless… that I had to write about it.

Communication“Code communicates well when a reader can understand it, modify it, or use it,” Beck writes.

Programming for the computer works fine. For the computer! Not for the person modifying it. “Good things happen when I think of others while I program,” Kent writes. Program for the other person!

But who cares? I just want to write the code as fast as possible and be done with it. Wrong! Beck writes, “The majority of the cost of software is incurred after the software has been first deployed.” From Kent’s experience, he sees that he spends much more time reading the existing code, than writing new code. And that’s a fact! Is your experience different?

When you think “How would someone else see this?,” you see your code from a perspective of another person.

SimplicityWhy would you make your code simple? For economic reasons, of course. “Eliminating excess complexity enables those reading, using, and modifying programs to understand them more quickly,” writes Beck.

A little complexity is unavoidable. How much? It depends who your audience is. But Kent puts it perfectly, “Challenging your audience a little is fine, but too much complexity will lose them.”

“Pursuing simplicity enables innovation.” I can’t agree more with Kent.

FlexibilityPrograms should be easy to change. Simplicity can encourage flexibility. Enhancing the communicability of software also adds to flexibility.

The bottom line: create simple, understandable applications that can easily be changed.

Random Quote

Topics

Tags

Archive

Recent Entries

Currently Reading

Shelfari: Book reviews on your book blog

:: The Pragmatic Craftsman recommends

:: The Pragmatic Craftsman book reviews

Info

© 2001-2010 Stanley Kubasek About me :: Contact me

@PragCraftsman on Twitter

New on my blog: @PragCraftsman Twitter Weekly Updates for 2010-03-14 http://bit.ly/8ZfjXd -Pragmatic Craftsman - 13 hours agoSOLID principles come in handy here. Especially, "Open of Extension, Closed for Modification." One of the best principles I've learned. - 1 day agoI actually try to follow @unclebobmartin's rule all the time. Sort of. I try not to make it worse. But to make it better? Great challenge! - 1 day agoAlways check a module in cleaner than when you checked it out (via @unclebobmartin in 97 Things Every Progr.). I love the idea! - 1 day agoI put Code Complete #1 over Martin's book because it has "awaken" me as a programmer. But other than that, Martin's book is the best! - 2 days ago