Found in 1 comment on Hacker News
prostitutka · 2017-11-20 · Original thread
My answer to your question is math. Learn to read and write proofs. Any intro to proofs will do: those employed in discrete math, the ones in analysis, the diagram chasing ones, whatever...Working with math proofs will definitely straighten out your thinking and whip your mind into shape.

Some suggestions to get you started:

Book of Proof by Richard Hammack:

Discrete Math by Susanna Epp:

Mathematical Proofs: A Transition to Advanced Mathematics by Chartrand et al:

How to Think About Analysis by Lara Alcock:

Learning to Reason: An Introduction to Logic, Sets, and Relations by Nancy Rodgers:

Mathematics: A Discrete Introduction by Edward Scheinerman:

The Real Analysis Lifesaver: All the Tools You Need to Understand Proofs by Rafi Grinberg:

Linear Algebra: Step by Step by Kuldeep Singh:

Abstract Algebra: A Student-Friendly Approach by the Dos Reis:

That's probably plenty for a start.

Fresh book recommendations delivered straight to your inbox every Thursday.