Chris Falter

.NET Design and Best Practices
posts - 38, comments - 58, trackbacks - 24

My Links

News

All source code published on this blog is placed in the public domain.

Archives

Post Categories

Image Galleries

About Me

Friday, March 07, 2008

Refactoring to Comply with the DRY principle (Don't Repeat Yourself)

Every time I see an example of copy-and-paste programming, I'm like a bull who just spotted a waving red flag. "Don't Repeat Yourself" (DRY) is a principle every programmer should live by, for Turing's sake! Read on for a discussion of why copy-and-paste is egregious, and how to refactor an expansive set of conditional logic branches into a concise and elegant piece of code.

posted @ Friday, March 07, 2008 7:45 AM | Feedback (0) | Filed Under [ Coding Practices and Design Patterns ]

Powered by: