© Carleton DiLeo 2019
Carleton DiLeoClean Rubyhttps://doi.org/10.1007/978-1-4842-5546-9_1

1. The Qualities of Clean Code

Carleton DiLeo
(1)
Boulder, CO, USA
 
So what is clean code? If you ask three different developers, you will get three different answers. It’s a hard concept to define. You know clean code when you see it, as if written by a programming wizard from a distant land. We all want to write good code that others admire. Sometimes we don’t know where to start. How do we take our messy, unorganized code and turn it into something beautiful?
Many factors determine clean code, but we will focus on these:
  • Readable
  • Easy to change
  • Straightforward
Examine code you’ve written. How many of those questions can you answer yes? It’s unlikely you said yes ...

Get Clean Ruby: A Guide to Crafting Better Code for Rubyists now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.