You should read Programming as Theory Building
Summary
The article discusses Peter Naur's Programming as Theory Building and argues that programming is about building a mental model and communicating the theory of the program. It links maintainable code, architecture, and documentation to this theory-building view and suggests design patterns and Domain-Driven Design help convey the program's theory.