In addition to thinking critically, programmers should try to understand the underlying nature of each problem they face.
Programmers should reflect on their work, every decision they make, every project. They should never run on autopilot. They should critique their work in real-time. Mantra: “Think”.
For example, Articulate why you are repaying technical debt.
Another practice is to Listen to your nagging thoughts.
Ryan Holiday agrees in The Daily Stoic: “Never do anything out of habit”.
This is a specific application of the more general idea of mindfulness to engineering.
In the context of programming, however, there is some tension between this idea and that we should achieve the state of flow, or “enter the zone”. Joel Spolsky writes:
We all know that knowledge workers work best by getting into “flow”, also known as being “in the zone”, where they are fully concentrated on their work and fully tuned out of their environment.
Programmers in the “Agile camp”, where Thomas and Hunt belong, usually argue that the flow state is not desirable, for example, Robert Martin in The Clean Coder:
Here’s a little hint from someone whose been there and back: Avoid the Zone. This state of consciousness is not really hyper-productive and is certainly not infallible. It’s really just a mild meditative state in which certain rational faculties are diminished in favour of a sense of speed.
To think about why you are making a decision and what effect will it actually have is one of the Elements of decision making.