mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

16K
active users

I'm going to have to write a whole fucking essay explaining that automatic code formatting is bad and you're wrong if you like it, aren't I

@jessewilson as a matter of research shall we say, how would you summarize your issues with code formatters?

@autonomousapps

The formatting rules are dumb.

Maybe I have some code that’s got a tabular structure and I want a few lines to match up vertically.

I get it just the way I want, then the code formatter comes and throws that careful alignment away.

@autonomousapps

The IDE integration is clumsy.

I’ve got .editorconfig but the tools still disagree on unimportant stuff like how aliased imports are sorted.

I don’t want an IDE plugin for whitespace! That’s just another thing that can be slow or break.

@autonomousapps

The robot does dumb things and I’m accountable for them.

Maybe I’ve got a file with a special copyright header because it’s originally authored by somebody else.

Now I’ve got to register that file in a special build file somewhere, otherwise the robots will claim copyright on a file somebody else created.

github.com/cashapp/redwood/blo

Multiplatform reactive UI for Android, iOS, and web using Kotlin and Jetpack Compose - cashapp/redwood
GitHubredwood/build.gradle at 3fe178c14ec112982e1f33f2a931936dae962d9d · cashapp/redwoodMultiplatform reactive UI for Android, iOS, and web using Kotlin and Jetpack Compose - cashapp/redwood

@autonomousapps

Suppressions don’t refactor well.

Suppose I’m breaking naming rules throughout a file for a good reason. I’ve got a @file:Suppress at the top.

When I move declarations out to another file, the suppressions don’t travel with them.

Unlike automatically reforming stuff, the tool always makes me add the suppress annotations myself.

@autonomousapps

Sometimes they change the formatting rules.

It will reject code that it formatted itself yesterday!

Renovate helpfully tries to update the formatter library, and the new formatter library insists on changing a bunch of innocent files as a side-effect.

Shall I accept that the formatter now owns me and makes me do tricks for its amusement?

@autonomousapps

It messes up git blame.

The ‘introduce ktfmt’ commit message is an unwanted layer of plastic film beneath which the true authorship lies.

According to line counts, the person who introduced the formatter is now the project’s largest contributor.

@autonomousapps

It creates faux consistency in the codebase.

When I pick a table at Arby’s, I pick one that’s not covered in crumbs. It’s probably got fewer germs.

If you brush the crumbs off the table without sanitizing it, you can trick me into contracting a minor illness.

If you reformat some horrible engineering manager code into something that looks good cosmetically, I might overlook that it’s using ObjectOutputStream. Which is the JVM equivalent of contacting a minor illness.

tony 🏳️‍⚧️ 🏴 🤖 🚴🧗🏻

@jessewilson lots of gold in this here thread! ty for indulging me and also the implicit peer pressure to follow through on my repeated threats to attempt to explain my deep seated hatred of code formatters in a consistent way