Logic for Programmers


Cover Type: Ebook

Detail: English | 2025 | ISBN: NA | 150 Pages | PDF, EPUB | 2.3 MB

Format: EPUB

Download

Description:


This book teaches the basics of logic and nine special logic-powered techniques: property testing, decision tables, constraint solving, and more. Over 40 exercises are provided to help readers master the material. No prior math background required!

If I start a build at 3:05 PM and it takes 12 minutes to complete, when will the build be finished?

To answer this question, we need to know how to manipulate numbers. The mathematics of numbers is called "arithmetic". Arithmetic shows us how to multiply two numbers, use fractions, determine which of two numbers is larger, and more.

If I have the conditional if(sensor_offline || inactive), and I know for sure that sensor_offline is true, does the value of inactive matter?

To answer this question, we need to know how to manipulate booleans. The mathematics of booleans is called "logic". Logic shows us how to simplify a boolean expression, use sets, determine if one statement is stronger than another, and more.

But there is one key difference between arithmetic and logic. We were taught arithmetic in elementary school. Few of us were formally taught logic. Most programmers pick up a little logic by osmosis, but even that rarely exposes people to anything beyond the basics. This makes logic the single most useful topic in math a programmer can learn.

That is the goal of this book. Reading this will teach you the basics of logic and how to apply it to various everyday software problems, like testing code, designing a database, working out customer requirements, and more. Over 40 exercises are provided to help readers master the material. No prior math background required! 





Maybe You Like: