As I studied the human mind, its limitations, and its potential, I found a striking coherence. All the mental problems with which I struggled boiled down to automatic and systematic mental phenomena - chains of triggers and responses, inputs and outputs. More interestingly, the solutions to these problems that worked all fit into the same framework. I labeled these patterns algorithms, and the sum of these algorithms became psychological software. Within this software framework, my mental challenges began to make sense.