Why I’m cheerful when I write code
and why you should be too
1. Every keystroke feels like a success
to me because I use vim and as a vim user I’m really happy when I manage to make use of super awesome keyboard shortcuts and every time I realize that I failed I go back and do it the way that requires less keystrokes.
For example in the following code:
auto foo = this should be a string;
Someone forgot the quotes around the string. my ideal way to add the quotes would be typing
sthyst;”f;is
which would result into:
auto foo = “this should be a string”s;
Modifying code like that is super fun! I obviously don’t have to explain anyone the power of vim and I’m sure you might be just as fast with any other editor but you don’t feel this success with most editors.
2. It’s feels great to look at art
and you should consider the code you write as art and therefore have the goal to make it beautiful when you write it.
It’s ok to come back to some code you wrote a long time ago and consider it terrible code. But that’s even better because then you know that whatever you will write now will be better then what you wrote before.
3. It’s exciting to learn
and while I write code I learn all the time about
- little tweaks in the programming language
- vim plugins which make my life easier
- how to build what I just build
- how to use certain libraries and tools
- what certain libraries and tools actually do under the hood
- how much time it takes me to complete certain tasks
- things I really like or dislike
- the next project I need to build to make my life easier
- etc.
4. Everything is part of the bigger picture
and I want to complete the bigger picture!
It’s awesome to see things works in the end and when I don’t like a certain thing I have to do I just look at the goal I want to achieve.