Design Patterns: The First Step to Maintainable Code

John has an existing project, and he wanted to add a new feature, that means include some additional pieces of code! How could he do this?