all of them. countless wasted hours.

as fate decided to turn me from $random-dev-geek into "the guy that calls the shots in tech", one of my earliest decisions was to automate formatting.

everywhere, automated at CI.

gofmt was an inspiration for the industry.
js?/ts? use prettier
C++? use ClangFormat

always default settings.
enforced by pre-commit hooks and CI.

never a single argument about bracket style, I don't care if someone likes single or double quotes better.

"fucks given" counter is fixed at 0.
everybody prefers it (ok, sometimes after a while sometimes)

of course there is still some more conventions to do for us humans.
IMHO the most critical ones.

like naming or even casing (camel, snake, kebab, - which one works where), but taking out most of the "so what" decisions takes discussions to a much more resonable level.

  • 2
    ... what is kebab case?
  • 5
    @Midnigh-shcode this-is-kebab-case (cause it looks like pierced), I read the term once and found it cute. probably there is a more correct one
  • 2
    @h0ru5 what language supports such naming style? I'm pretty sure C/C++ don't like that because they always treat - as a minus sign, and I think python complains too.
  • 2
    on small teams ive just bitten my tongue because its not worth arguing. on larger teams/ bigger companies even if i put my opinion out there it would be lost. there’s no point. there’s always louder or more entitled that get to call the shots. its cool you get to set the standard at your place
  • 1
    @endor js allows -
    I know of vuejs library that allows kebab case.
  • 0
    @endor I see it often it in frontend (web components, CSS classes) and URIs and some special things like e.g. HTTP headers

    opposedly, this_case (I know it as snake) and thisOne/ThisOne (camel, isn't it?) for variables and JSON keys.

    I currently try to seperate name and case, i.e. keep the same words for the same thing across the system (polyglot in our case) and alter just the case.
Add Comment