Re:Black, the uncompromising Python code formatter, is stable
by lolc on Saturday January 29, 2022 @08:33PM
(#30132798)
I once came in on a project where one dev used "func( arg )" and the other used "func (arg)". They would reformat each other's lines when they changed something, so the diff had a lot of whitespace changes. The two were not on speaking terms any longer, so I was tasked with cleaning up the mess.
First step was to run an autoformatter. I used stock presets so neither of the two would think the other was favoured in the cleanup.
Re:Black, the uncompromising Python code formatter, is stable
by paiute on Saturday January 29, 2022 @11:23PM
(#30134005)
If I worked there I would always do func( arg) or func(arg ) just because.
Re:Black, the uncompromising Python code formatter, is stable
by onphonenow on Monday January 31, 2022 @12:37AM
(#30144946)
Haha. Brilliant :) The extra spaces look so weird to me, but yeah, folks have strong opinions.
Re:Black, the uncompromising Python code formatter, is stable
by hnarayanan on Sunday January 30, 2022 @03:07AM
(#30135018)
Chaotic evil
Re:Black, the uncompromising Python code formatter, is stable
by patrick451 on Saturday January 29, 2022 @10:55PM
(#30133826)
I just don't see why you would care if this extra space is in there or not. If they want to stick it in there, be my guest. I can read either just fine, even if, gasp, it's not 100% consistent through the whole codebase.
Re:Black, the uncompromising Python code formatter, is stable
by onphonenow on Monday January 31, 2022 @12:36AM
(#30144923)
Will you change to match their code style? Great.
However, if another person ALSO has a strong opinion about this - nightmare.
Re:Black, the uncompromising Python code formatter, is stable
by darkerside on Saturday January 29, 2022 @06:16PM
(#30131611)
Terrific point I never thought of. There's definitely a power law, where 80% of the arguing time is spent on the 20% dumbest shit.
Re:Black, the uncompromising Python code formatter, is stable
by IgorPartola on Saturday January 29, 2022 @06:29PM
(#30131723)
I think I figured out why: it’s easy for everyone to have an opinion about simple things. Complex things that are worth arguing about take more knowledge/experience and at that point fewer folks are qualified to argue about them.
Re:Black, the uncompromising Python code formatter, is stable
by darkerside on Saturday January 29, 2022 @07:25PM
(#30132172)
Yup, bike shedding
You see that here.
Things like a = [ 1, 2, 3 ] when 90% of the world is a = [1, 2, 3]
These folks will spend hours / days try to force weird approaches.
Sometimes they are obviously wrong. But it's annoying to have to fight over it. Something like black saves you the hassle and the WEIRD local coding rules someone comes up with if you are on a project with them.