Last month I announced my new book, Logic for Programmers, is now available in print.
It's long overdue to talk about what this book actually is and why I think most software engineers would find it worth reading.
There are two fields of math indispensable to programmers. The first, arithmetic, concerns manipulating numbers. Everybody learns this in grade school.
The second, logic, concerns manipulating boolean expressions. A few lucky programmers learn this in college math classes, and everybody else picks it up through osmosis.
So the book starts with a crash course in logic, maybe 16 pages of basic math. Then, because this is logic for programmers and not for academics, the next 200 pages are all applications. How to refactor better, how to test better, how to make better data models, etc.
So, what do you actually get by learning logic? Three things.
First, it opens up a lot of useful software techniques. Once you know some logic you can do things like property-based testing, constraint solving, goal planning, requirements analysis, lots of fun stuff.
In particular, formal methods is extremely hot in AI right now, and do to basically anything with FM you need to know logic. Your clanker might be able to clank its way through the implementation details but you need to know the fundamentals to make it implement the right thing. That's why three chapters of the book are on various aspects of formal methods.
Second, logic unifies different-seeming ideas in different areas of software. Did you know there's a deep connection between the Liskov Substitution Principle, database migrations, and Hyrum's law? Did you know that the "Rule of Least Power" and "Make Illegal States Unrepresentable" are consequences of the same essential tradeoff?
Third, knowing logic just helps you understand stuff better. One database expert said the book had the most lucid explanation he's ever seen of inner and outer joins. But that explanation only works because the book already taught set builder notation and Cartesian products, after which it's pretty easy to formally define joins!
So, if you want a deeper understanding of your craft and exposure to lots of cool and useful techniques, I'd strongly recommend learning logic. As for why to learn it from my book? Because it incorporates feedback from fourteen domain experts and fifteen public alphas. I spent three years of my life making this the absolute best book on the subject I could write.
You can buy Logic for Programmers as a PDF, epub, or stack of bound paper. Check out the link for more info and a free sample!
logicforprogrammers.com/