self.deprecate

Learning that Ruby is a self.aware programming language has been one of the highlights of my experience with the Flatiron curriculum. Not only does this concept provide for a nice, deep dive into…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Refactor Every Time You Touch Code or Tests

Create Your Successful Agile Project — by Johanna Rothman (82 / 168)

👈 Consider Continuous Delivery | TOC | Work as a Whole Team to Create the Produ ct 👉

I said earlier in this chapter that we want to keep the code and tests clean. You may have worked on a large product that had some automated tests. And eventually those tests didn’t work anymore. No one refactored those tests as the code changed.

Even worse, you may have seen projects where “all of a sudden” the build didn’t work. Often, the suddenness arises from lack of integration. But part of the problem is also that no one updated and simplified the code or the build scripts.

I’ve seen code bases where the code had several ways to get data and several ways to output data. They didn’t all work the same way. By the time a new team worked that code base, it needed to redesign the code, not refactor. I’m not suggesting that you never have to redesign, but refactoring simplifies and makes everything clear as you proceed. You are less likely to need to redesign.

Refactoring is simplification. It’s not redesign. It’s not rearchitecture. Refactoring — by itself — does not add features to a product. It’s entirely possible that when you add a feature you first add functionality. Then, you refactor to simplify.

Refactoring works for both code and tests.

👈 Consider Continuous Delivery | TOC | Work as a Whole Team to Create the Produ ct 👉

Add a comment

Related posts:

Tracing

Adoption is more than programming. Elixir is an exciting new language, but to successfully get your application from start to finish, you're going to need to know more than just the language. The case studies and strategies in this book will get you there. Learn the best practices for the whole life of your application, from des

Getting a driving licence in London!

Getting a driving licence in London!, a Medium series by Nicusor Vatafu

Chapter 2 The Big Picture

Programmers run into parsing problems all the time. Whether it's a data format like JSON, a network protocol like SMTP, a server configuration file for Apache, a PostScript/PDF file, or a simple spreadsheet macro language--ANTLR v4 and this book will demystify the process. ANTLR v4 has been rewritten from scratch to make it eas