3 ms·
Waiting patiently for the other person to produce a post hoc rationalization about why everybody’s code looking different is in fact a good thing
by phoghed 3mo ago
Waiting patiently for the other person to produce a post hoc rationalization about why everybody’s code looking different is in fact a good thing
- insanitybit 3mo agoCan you not read code if it uses single vs double quotes?
- fatata123 3mo ago[dead]
- dewey 3mo agoYou are not making the strongest point by using a relatively subjective rule like that. It includes indentation, how to structure functions and the parameters and many more that in sum make it very easy to jump between projects (Internal company projects, dependencies, other open source projects) without ever getting used to a new style. This makes reading and contributing very easy. Compare that with other languages where you need to load a different set of prettier rules, code formatting tools and follow contribution guidelines on how things should look like depending on the opinion of the maintainers.
- insanitybit 3mo agoI've never found this to be the case having jumped companies a fair bit. I can switch programming languages easily enough, surely I can handle formatting.
- 9dev 3mo agoI can - in fact, I have to, a lot more than I'd like - when someone makes changes with different code style settings in their IDE or tooling, and that affects unrelated parts of the code, and suddenly the PR contains tons of code that just looks subtly different but still does the same thing. If sieving the spam from ham in code reviews is your thing, go have fun. I personally prefer code that is automatically and unconditionally kept in the exact same shape, preserving only the intended changes to stop the team from wasting time on formatting or reviewing.
- insanitybit 3mo agoThat seems like a problem caused by an autoformatted, not solved by one. Obviously having reviewable commits is a reasonable expectation but that doesn't seem like a justification at all.
- 9dev 3mo agoPretty much all tools developers use to write code format code to some extent while editing, but often with individual configuration knobs or default settings that are different between all ICs. Having a single tool that runs before committing, ideally as a git hook, ensures a single, uniform style across all files touched.
- yread 3mo agoThat's exactly what a good cogwheel in the machine would say
- maratc 3mo agoMy argument is more to the tune of "everybody’s code looking slightly different is not a problem in practice as long as I can read and understand it." However since you've asked so nicely here you go: everybody’s code looking different is because all humans are different. It's what makes us human. I am very serious about my craftsmanship, and I bring my "humanity" to it: sometimes I include a cultural reference (as in the example above), or an internal joke in the name of a (very long) variable, or vent my frustration in a comment. My first ten years of writing Python were uneventful; nobody commented about my style and I never commented about others'. With the advent of grammar nazi bots, everyone is supposed to now please them by writing completely bland code, which in my opinion degrades me from a craftsman to a code-monkey. This is dehumanising, in a certain sense.
- refactor_master 3mo agoBut your choice of funny variable names is not a craft, and you’re not a craftsman if you think it matters. What matters is extensibility, maintainability and value delivered. I care how the food tastes, not that the chef has a really cool Japanese knife and is really fast at cutting onions.
- phoghed 3mo agoI need a kitchen linter to highlight dishes red that my kids leave around rather than putting in the sink or dishwasher
- maratc 3mo agoI think you miss the point, but using your foodie reference: would you rather go to a couple of Michelin restaurants -- where each piece brings a reflection of the chef, the geographic area, and what quality ingredients were available on that day -- or would you rather only eat at McDonald's for an experience that is extremely consistent across days, seasons, and continents? Now imagine a chef who has a nice little restaurant but is now being sent a couple of "quality assurance" guys from McDonald's who tell him that his choice of potato variety for chips does not exactly conform to the "standards" defined at the mothership.