this post was submitted on 01 Mar 2024
8 points (100.0% liked)

Programmer Humor

32000 readers
1744 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 10 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 6 months ago (1 children)

This is why I spend a good amount of time setting up linters on new repos before even starting to make the application. It saves a ton of time in peer reviews because no one has to think about formatting. Some people may not like the rules chosen but official direction from the boss is "get over it". There are 0 comments on PRs about formatting which only ever annoys people and is a waste of good dev time.

[–] [email protected] 3 points 6 months ago

On my current team, when we were trying to choose a style, my only input was "any style that can be checked/applied with a git commit hook."

I get some people prefer reading code in a particular format. Let them configure their editor to apply it, but let's keep the version history in one unavoidably consistent style. Pretty please.

[–] [email protected] 2 points 6 months ago* (last edited 6 months ago) (1 children)

for a second I thought I read

publ;c

[–] [email protected] 1 points 6 months ago

Nah, it's actually publ;c

[–] [email protected] 1 points 6 months ago (1 children)

I felt that. I have a colleague whose coding style is different to mine and whenever they work on code that I originally wrote, I have to resist the temptation to modify things to camelCase.

[–] [email protected] 2 points 6 months ago (1 children)

Linters make these kind of things easier. Then you get mad at the tool rather than your coworker.

[–] [email protected] 1 points 6 months ago (1 children)

Does Prettier count as a linter?

I always thought linters were more to find bad practice and possible errors than control the code style

[–] [email protected] 2 points 6 months ago

Some linters can do both. Getting one set up as an automated job whenever code is pushed to the repo is on my TODO list...

[–] [email protected] 0 points 6 months ago (1 children)
[–] [email protected] 1 points 6 months ago

java_devs_when_they_see_snake_case