January 20, 2018

An Ode To Code Formatting Tools

Your modifications fix the calculation
But I’m afraid you forgot a tabulation.
This is the beginning of your tribulation.
Your perfect correction won’t bring you elation.

If there was a way to just automate,
Maybe you could avoid arguing with your mate.
Should there be a space after the bracket
How many white spaces, How many line breaks

Did you know tools could format your troubles away?
You have to choose, there is no midway
Tool-able or arguably palatable?
Tastefulness is debatable, not checkable!

You may be expressionist or constructivist.
Alas the whole situation is surrealist.
Kernighanists are not great artists
Neither are Whitesmiths and Allmanists, that’s the gist.

I too like Guillaume Apollinaire.
Hand crafted alignment falls in disrepair.
Are you trying to win the IOCCC ?
Your sole concern should be consistency.

There is no value in what is invisible.
No semantic in what is not expressible.
A line break or not, what’s the différance
For Git, noisy inconvenient difference

Is indentation really communicative?
Of what can emptiness be indicative?
There is no point, your patch is not applicable
Not comparable, not even shareable.

For the love or your project’s contributors
Don’t act like an art gallery curator.
Clear rules should control the look of each line
Put them in an enforceable guideline

It took a while, now we have modern tools.
The have limitations and act like fools.
For they have one goal, uniformity.
Pick a style then use it consistently.

Your code won’t be magnificent and perfect.
But it will be readable, it’s what I expect.
Tool-able, Merge-able, Refactor-able
Qualities that I find truly adorable.

Pick a style then use it consistently.
Then concentrate on things that matter really.
And so use a tool and accept its caveats
For your productivity, use clang-format.

Share on