Advertisement

Clean Ruby pp 55-71 | Cite as

Using Boolean Logic

  • Carleton DiLeo
Chapter

Abstract

Software consists mostly of testing data and determining whether certain conditions are true or false. Every program makes thousands of these decisions. Since boolean logic is so vital to an application, it’s important to take care when programming them. A single boolean statement is easy to understand, but complex logic with two or more boolean statements can be hard to understand, making it hard to maintain and the source of bugs. Even small improvements to boolean logic can help prevent misunderstandings. In this chapter, we will discuss different techniques you can use. Each method has pros and cons. Check each option before choosing the one correct for a situation.

Copyright information

© Carleton DiLeo 2019

Authors and Affiliations

  • Carleton DiLeo
    • 1
  1. 1.BoulderUSA

Personalised recommendations