News for hackers. Stuff that matters.
Re:Avoid Else, Return Early (2013) by ivanhoe on Monday March 26, 2018 @10:26AM (#16679125)
In last 20+ years I've changed the coding style many times, usually to fit the current team style. And in my experience it takes a few weeks for the brain to rewire to the new style. First you hate it, and then you get used to it, and then you're like: wow it's great. Then you switch the standards for a new project and again, the same steps. It's just a matter of habit...
Re:Avoid Else, Return Early (2013) by ohazi on Monday March 26, 2018 @01:01PM (#16680431)
Just give me an opinionated ${LANG}fmt utility to do it for me so I don't have to care and don't have to waste time arguing with other zealots. Let the tool be the zealot.
Re:Avoid Else, Return Early (2013) by georgemcbay on Monday March 26, 2018 @05:34PM (#16682835)
This is exactly how I feel, as someone who has been coding for 22 years (professionally, closer to 32 if you count when I started hacking in BASIC and 6510 assembly on the C64).

I just defer to the code formatter. That way everything is consistent looking internally, which is all I care about. I couldn't care less whether the braces are on the same or a different line or other things like that outside of the fact that I do like internal consistency within projects.

All that aside, as soon as I saw the OP title I knew (via years of exposure to bikeshedding programmers) that this thread would end up having a ton of comments on it and wasn't surprised to see it was up to 500-something and still rapidly climbing.

Re:Avoid Else, Return Early (2013) by npsimons on Monday March 26, 2018 @05:33PM (#16682827)
> Just give me an opinionated ${LANG}fmt utility to do it for me so I don't have to care and don't have to waste time arguing with other zealots. Let the tool be the zealot.

So totally this. I despise indenting with tabs with a passion, but when I heard gofmt did that I was actually pleased. There's no arguing with the official formatting utility: https://golang.org/doc/effective_go.html#formatting

Re:Avoid Else, Return Early (2013) by josephv on Monday March 26, 2018 @10:57AM (#16679359)
Pragmatic programming has lost. If you aren't a zealot about being pedantic, just move into the old-folks home.
Re:Avoid Else, Return Early (2013) by Zyst on Monday March 26, 2018 @12:59PM (#16680401)
Not at all, I'd argue this whole Tabs/Spaces, bracket placement, single/double quote discussion should be getting killed by code formatters.

At the end of the day you can do whatever you want with the code you're writing, and some pre-commit hook can run go fmt/prettier/whatever and then it'll all get standardized.

I've become a very heavy proponent of code formatters (I added prettier to the entire team) and I truly believe that talk about code formatting will never really die off, but at the end of the day you can do whatever you want on your side but still have a standardized looking codebase, and that feels extremely liberating to me.

As a PS: If you are a diehard tab proponent/different bracket placement/whatever but your team formatter configuration uses spaces instead then you can also use code formatters to do spaces -> tabs locally, say, on file open. Once you commit your file your precommit falls back to the team configuration, which removes your tabs. Everyone is happy.

Re:Avoid Else, Return Early (2013) by cortesoft on Monday March 26, 2018 @01:20PM (#16680614)
I think the person you are responding to was being sarcastic...
Re:Avoid Else, Return Early (2013) by always_good on Monday March 26, 2018 @01:03PM (#16680446)
I'd say it's the opposite. Code formatters are winning. It's becoming increasingly trite to bikeshed over formatting when projects are using code formatters.
Re:Avoid Else, Return Early (2013) by cestith on Monday March 26, 2018 @01:36PM (#16680777)
As Andy Lester recently tweeted (but said it wan't his): Should "bikeshedding" be hyphenated?

I should see if he remembers where he got it.

Re:Avoid Else, Return Early (2013) by petdance on Tuesday March 27, 2018 @10:07AM (#16688480)
I don't know. If I remembered I'd have attributed it. I noted that it wasn't mine as the next-best-thing.
Re:Avoid Else, Return Early (2013) by twic on Monday March 26, 2018 @04:11PM (#16682087)
Well, i'm a pedant about being zealous, and i am afraid we are now doomed to war eternally.
Re:Avoid Else, Return Early (2013) by ravitation on Monday March 26, 2018 @12:50PM (#16680309)
I enjoy zealous pedantry. I have strong personal opinions about something that I do a lot (especially the pedantic parts), but most of it is relatively lighthearted.