I love writing code. There are moments in coding that I feel exuberant. The moment when I discovered how to code correctly to achieve the goal I set for myself, I feel very proud. The correctness is not just I think it was correctly, I showed the logic proof to myself that is the case. When the code is simple and correct, it is beautiful! Coding is an art. There are freedom to write code to behave according to what you want, but to do it well, there is less freedom and it requires deep thinking to discover the way to move forward. There are considerations on a) does the abstraction makes sense? b) what easy it is to break for forseable changes that I may be making? c) is the code too complicated? d) can what i code here to group as a concept to be understandable easily by common sense?
Writing code is like playing piano sometimes to me. There is a logic flow and it takes on its own which is beautiful. Steps by steps, and takes what is needed, and call into abstractions that I have built. At each step, I consider what may went wrong, and I assign why it went wrong and the severity of it. Possible reasons are a) programming mistake that breaks invariance, b) invalid data that due to some other code living in a separate machine has changed, c) concurrency access of data, d) backward compatibility, e) connection or network issue, f) malicious hacker, g) prepare for unknown failures. All these detials are thought of in coding that makes the logic prepare in all cases that serves the end goal. g) requires me to know what are possible unknown error, and I would try to continue the program in the best possible way if it makes sense. I tried hard to fail hard (program stop), which is only acceptable if the hard failure can be detected easily in the development stage.
Let me show you some moment in code that I feel exuberant:

