Skip to main content

8 docs tagged with "programming"

View all tags

Best Practices in Test-Driven, Object Oriented, Green- and Brownfield Development

Developing clean, testable, code has been a passion since my first full-time job as a programmer, when I inherited a mess of spaghetti-code in the form of a large ASP classic web application. Since 2009 I've written written more than a dozen blog posts on unit testing, created several presentations, and evangelized unit testing at every opportunity.

Legacy Refactoring Isolation Patterns

Any code that has been released is "legacy code." This article is about that really old legacy code your team inherited (from itself?). It wasn't designed in a way that is amenable to unit testing, and yet you're on a mission to add features, stamp out bugs, and improve the quality through refactoring. Here are some brief, practical tips for getting through this Gordian knot without a scimitar.

Patterns for Writing Clean Test Cases

Each team will want to find its own style for expressing unit tests. Or multiple styles, depending on the situation. The patterns below represent just a handful of techniques that may be useful in creating easy-to-read and easy-to-maintain unit tests.

SOLID and Unit Testing

S.O.L.I.D. (henceforth "SOLID") is a set of object-oriented design principals, assembled by Robert C. Martin and popularized in many of his articles and books. The following table is from his article The Principles of OOD: