Chapter 6: Formatting Code for Easy Reading
How to format code can be a divisive topic, especially in a language designed for programmers' happiness. In this chapter, you'll learn about different mindsets for code formatting, the advantages of consistency, the disadvantages of arbitrary limits, and the trade-offs of code formatting enforcement. You'll also learn about Ruby's built-in code formatting checker.
We will cover the following topics in this chapter:
- Recognizing different perspectives of code formatting
- Learning how syntactic consistency affects maintainability
- Understanding the consequences of using arbitrary limits
- Checking basic code formatting with Ruby
- Realizing the actual importance of code formatting
By the end of this chapter, you'll understand better whether to enforce code formatting when using Ruby, and how best to do so if you decide to.