I feel like you're being a little myopic if you feel that all of programming is logical. Look into the probability stuff like machine learning. Read books from Nassim Taleb like Antifragile to understand that it's very easy for us to convince ourselves that logic and increasingly complex models solve everything. In reality there are many meta-strategies you can use like "via negativa" to still be rational, but make the world appear less crazy, and make the crazy in the world look more obvious, and avoidable.