Chapter 27

Refactoring

In the second half of this book, as you have worked with longer pieces of code, there are a few things that you should have realized about working on bigger programs. For example, the first time that you write a piece of code, you probably do not do it in an optimal way. Also, when you first lay out how to put something together, you likely miss details that have to be added on. What is more, sticking pieces onto code in a haphazard way often leads to really brittle code that is hard to work with. If you were writing software in a professional environment, there would be another rule that could be added on here, the customer often does not really know what he/she wants.

When you put all of these together, it leads to the ...

Get Introduction to the Art of Programming Using Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.