97
submitted 1 year ago* (last edited 1 year ago) by Ategon@programming.dev to c/programmer_humor@programming.dev
top 28 comments
sorted by: hot top controversial new old
[-] daluca@feddit.nz 24 points 1 year ago
[-] ilost7489@lemmy.ca 12 points 1 year ago

What happens when you give a python programmer java

[-] kahnclusions@programming.dev 8 points 1 year ago

Alright, time to update my team's linters and formatters...

[-] Michael0x18@sh.itjust.works 7 points 1 year ago

When you really like the python style

[-] DuckRaGod@programming.dev 7 points 1 year ago* (last edited 1 year ago)

MYYYYY EEEEEEEYYYYYYYYEEEEEEEESSSSSS

[-] Tragic@programming.dev 6 points 1 year ago

Thats one angry python developer

[-] Sleeping@programming.dev 2 points 1 year ago

that does not align with PEP8 lmao

[-] jmk1ng@programming.dev 6 points 1 year ago

I actually winced

[-] lowleveldata@programming.dev 6 points 1 year ago

ok cool do whatever you want. Imma put in a pre-commit hook to auto format everything.

[-] sociablefish@programming.dev 2 points 1 year ago

im gonna install my own reformatter to reformat it back on my machine, win-win

[-] verstra@programming.dev 5 points 1 year ago

I strongly believe that code formatting does not hold any information and that because of it, compilers should reject non-normalized code, saying "run a formatter first". We have the tooling for most of the languages to make this absolutely painless, remove all head scratching of "what the hell is up with this code style" and just focus of the semantics. I believe that you should be allowed to produce code abominations like this code sample and have it auto-formatted into the code style that everyone can easily interpret.

[-] JackbyDev@programming.dev 5 points 1 year ago

Yeah, I like that new languages like Go and to a lesser extent Rust have formatters bundled.

[-] Buttons@programming.dev 3 points 1 year ago* (last edited 1 year ago)

The auto-formatting story is half baked I think. As far as I know most language have a formatter that goes only one way, which is an improvement over having no formatter at all.

What we're missing is good tools to go from the standard format to a personalized format. For example, I was working on JavaScript recently and the team was using prettier with 2 space indentation. I found that somewhat hard to work with because of some minor vision issues, it was becoming a bit of an accessibility issue for me, but I was already viewed as a bit of a troublemaker at the company and pushing everyone to change their style wasn't going to help me any.

I tried to find a tool that would reformat the code for me without altering the repository but couldn't find an easy solution.

So we have formatters that go from "everyone's personal style" to a standard style. But our tools for going the other direction, from standard style to "my personal style" are lacking. (Hoping to be proved wrong on this point.)

[-] delmain@beehaw.org 6 points 1 year ago

Your situation is why tabs are the clearly superior solution. Anyone on the team can just set their tab-width in their editor to whatever they want, and everything is consistent for everyone.

[-] Michael0x18@sh.itjust.works 1 points 1 year ago* (last edited 1 year ago)

Unless you're using them to align things. Then it matters. (Like comments)

[-] cycoder@programming.dev 5 points 1 year ago* (last edited 1 year ago)

You could just have your own local prettier rules which will format things how you want while you work on them, then use something like lint-staged to run the standard prettier rules for your org on commit. That way you work how you wish, and the project gets the files how they wish.

[-] CreeperODeath@lemmy.world 2 points 1 year ago

I don't think it should be forced

But I do think it should be more popularized

[-] BaroqueInMind@programming.dev 5 points 1 year ago

Honestly, I kinda like it.

[-] CreeperODeath@lemmy.world 3 points 1 year ago

I think it looks nice but I can't imagine using it effectively

[-] DuckRaGod@programming.dev 0 points 1 year ago

Found the AI.

[-] chris@l.roofo.cc 5 points 1 year ago

I hate it so much

[-] lasagna@programming.dev 4 points 1 year ago

If anything, it's a good way to enforce line length.

[-] Namstel@programming.dev 4 points 1 year ago

That makes me physically uncomfortable. 😬

[-] csolisr@communities.azkware.net 2 points 1 year ago

Somebody is way too used to Python I see

[-] SubPrimeBadger@lemmynsfw.com 1 points 1 year ago

You monster.

[-] radiofreeval@hexbear.net 1 points 1 year ago
load more comments
view more: next ›
this post was submitted on 13 Jun 2023
97 points (99.0% liked)

Programmer Humor

19623 readers
1 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS