Say What, Why, and for Whom Before How

User Stories Support Object-Oriented Development

The number one worst practice I see consistently in object-oriented software development is writing procedural code. Even object-oriented programming projects contain code that is highly procedural. You’ve probably seen code like this yourself where it’s basically a series of steps that prescriptively describe a process that is then wrapped within a class. This is really …

Read More
Build in Small Batches

How Small should a Story Be?

Stories should be as small as possible while still providing some value to the user. Usually, we strive to create the smallest increment of value possible but this is sometimes not as straightforward as it may seem. Sometimes we write stories with the intention to build upon them later or combine pieces of common stories …

Read More
Articles

Polymorphism

Polymorphism is a big word for an important technique in object-oriented programming to help make code extendable. Rather than expressing business rules as conditional statements in code, we move them into factories and use them to instantiate objects that do the actions we want to take. We need to know different things when we create …

Read More
Collaborate

Pair Programing Paradoxes

Of all the software developer practices I teach, the one I get the most resistance from managers is pair programming. They tell me they have too much work for their team to do and if they paired then their developers’ throughput would be cut in half.  There is a naïve assumption in that statement. The …

Read More
Specify Behaviors with Tests

Drive to Testability

There are patterns, things that developers do when writing code that support testability of code and there are anti-patterns, which are things that developers do that lead to writing code that is difficult to test. As a developer, I’ve found it helpful to become aware of some of these testability patterns and anti-patterns that I …

Read More
Integrate Continuously

The Importance of Continuous Integration

Perhaps the most important yet easiest to implement of all the software development practices in Agile is continuous integration. Continuous integration is simply creating an infrastructure where the code that is being built can immediately be integrated into a project. One of the biggest challenges when writing software is the dependency relationship between the code …

Read More
Rants

The Importance of Technical Practices (Again)

Software development has undergone many revolutions over the last few decades. The way we build software today is fundamentally different than the way we did just a few years ago. Our industry is maturing and we are beginning to pay attention to the quality of our work. No longer is just fulfilling the specification enough …

Read More
Beyond Legacy Code: Nine Practices to Extend the Life (and Value) of Your Software

Summary of Seven Strategies Series

I finished my “Seven Strategies” series of 72 blog posts with seven strategies for implementing each of the nine practices from my book, Beyond Legacy Code: Nine Practices to Extend the Life (and Value) of Your Software. These posts are filled with practical advice for implementing the nine core practices from Scrum, Extreme Programming, and …

Read More
Refactor Legacy Code

Refactor to Learn What Not to Do

One of the things that I was not expecting when I started refactoring other people’s code was that I started to see improvements in the way I wrote my own code. I didn’t make those same mistakes. Refactoring other people’s code has taught me a great deal about things to do and things not to …

Read More
Refactor Legacy Code

Refactor to Clean Up Before Moving On

Of course, the best time to refactor code is while it’s fresh in your mind, right after having worked with it. Once I get a feature to work, I go back and think about how I can make the code easier to understand. I’ve done this so often that it’s natural for me, almost of …

Read More
Refactor Legacy Code

Refactor to Redesign When You Know More

One of the reasons that I’m such a proponent of doing emergent design or just-in-time design, is that this is how we learn a system and this is typically how a system needs to be built. It’s fallacious to believe that you can easily envision every aspect of a complex system and come up with …

Read More
Refactor Legacy Code

Refactor to Clean Up as You Go

We should be refactoring the code we write and all the code that we encounter all the time. Making little improvements to code should be just something that developers do without even thinking about it. I find that many of the anti-patterns the developers engage in when writing code are easy to spot and after …

Read More
Refactor Legacy Code

Refactor to Retrofit Tests in Legacy Code

The so-called safe refactorings are a subset of the refactorings from Martin Fowler’s book, Refactoring: Changing the Design of Existing Code. We call them safe because they require only straightforward changes to code that can be automated and proven to be correct with no unintentional side-effects. Safe refactorings are refactorings like Rename Method that lets …

Read More
Refactor Legacy Code

Refactor to Make Small Improvements

Another strategy to help you justify refactoring is to do it in order to make small improvements in an existing system. Don’t try to bite off the whole Apple at one time. Really bad legacy code got that way over long periods of time and in my experience, a similar, gradual approach can be good …

Read More
Refactor Legacy Code

Refactor to Learn an Existing System

One of the best opportunities to refactor code is when you’re starting to get to know it. This not only helps improve the code but it also improves your understanding of the code and helps everyone else who touches the code in the future. There are many kinds of refactorings that one can do to …

Read More
Refactor Legacy Code

Why Practice 9: Refactor Legacy Code

Having put the words “legacy code” in the title of my book, people often confuse my book with Michael Feathers’ book, Working Effectively with Legacy Code. On one hand, it’s great to be in such esteemed company. I love Michael’s book and I refer to it often. It’s full of great techniques for taming legacy …

Read More
Implement the Design Last

Practice Good Development Habits

As you can see from my last seven blog posts, doing emergent design is not for beginners. Doing emergent design is an advanced development practice. But it’s not enough to know about good development principles and practices. It’s not enough to know about design patterns. We have to use them. We have to apply them. …

Read More
Implement the Design Last

Be Merciless

One of the most important characteristics that I find senior developers have is the ability to change their minds and let go of an existing design when it no longer serves its purpose. What I find time and time again is that developers become attached to the current design even in the face of changing …

Read More
Implement the Design Last

Focus on Code Quality

I believe in the Agile Manifesto. I know most of the original authors and they know that I think they’re pretty cool. They got so much right in such a short amount of space and that’s very admirable. But there’s one thing that I think they kind of missed the mark on, so I’m going …

Read More
Implement the Design Last

Understand Refactoring

Refactoring code is not just changing the design of code without changing its external behavior, it’s also doing it in small, safe steps that are repeatable. This is what elevates refactoring to a discipline that we can talk about and create best practices around rather than just willy-nilly ways of changing code. It was Martin …

Read More
Implement the Design Last

Understand Test-Driven Development

Another important aspect of doing emergent design is doing it safely and that means doing it while code is under test. But not just any tests, we have to write behavioral tests that don’t break when we refactor our code to emerge our designs. These are precisely the kind of tests that I’ve been talking …

Read More
Implement the Design Last

Understand Design Patterns

Doing emergent design is an advanced practice that requires knowledge of a great many skills. One key skill that all professional software developers should acquire as they journey towards mastery is a deep understanding of design patterns, both in concept and in terms of the 23 design patterns called out by the Gang of Four …

Read More