Browsing the blog archives for August, 2023.

Always be Knolling – the joy of auto formatters

work safe

Knolling is the practice of aligning your tools in your work area so they are easy to grab, easy to place down, and out of the way. In many workshops where the focus is on creativity and the work, the phrase Always Be Knolling has become a mantra of working clean and fast with respect to your tools.

Small things matter. Until they don’t.

There is a pattern adopted by many self-considered elite thinkers. They wear a Personal Uniform instead of a wardrobe. Steve Jobs was iconic in his turtle neck, jeans, and New Balance sneakers. Likewise, Albert Einstein wore a Gray suit and white shirt every day. The modern productiva have latched on the the ‘Personal Wardrobe’ as both a productivity hack and as a personal brand. They reveled in the ability to reduce the ‘trivial’ choices that let them spend their time on more important things in life.

While I don’t find the same joy in sartorial pursuits as some folks do, this does feel like either the girl who only eats chicken nuggets or that one guy who build a personality around a band he liked at age 14. Why was it always Metallica? However, I do have one winter jacket. We each have things we care about and things we don’t find interesting.

And that’s why the number one code review comment I HATE and never want to see again is someone taking time out of their day to take time out of my day to tell me the indentation of a section of a code file is ‘a bit wonky. Could you be a sport and fix it?’, just because their tabs happen to be set differently to mine in an xml file we should be editing with a designer anyway, but it was just easier because designer tools often fall short.

The compiler don’t care, and some days neither do I.

In some ecosystems this is solved using a code formatter or linter. The Go language and Elm both have community wide standards they use with no configurability. This means the triviality of which line gets the bracket is never going to be argued over. Not once.

And it may not suit you perfectly, but having a house style is useful.

Long story short, all your code should be formatted before it’s committed. And you shouldn’t have to think about it. Either Format when Visual Studio Code saves, or Learn how to use git hooks to apply formatting.

It is always much easier to clean as you go. And the best cleaning is when you don’t even think of it was ‘work’.

Comments Off on Always be Knolling – the joy of auto formatters