The most important book in my opinion for post-apocalyptic programming is Charles Petzold’s Code https://www.charlespetzold.com/code/
It details how to build a working computer starting from relays. The greatest moment for me as a teenager reading this book was figuring out how a flip flop worked. Having information stored in a dynamic system’s state seemed like the most magical thing I had ever seen.