this post was submitted on 09 Sep 2023
760 points (97.3% liked)

Programmer Humor

31260 readers
754 users here now

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

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 24 points 10 months ago (6 children)

Solution: Code Style Guidelines doc that the team agrees on. A checkbox in the PR template that affirms that code is compliant with the guidelines.

This way it’s not personal, it’s a rule that everyone should follow as a shared standard.

[–] [email protected] 12 points 10 months ago (5 children)

I tried going the style guidelines route, but we didn’t have a good code review process to really enforce it. It basically would have ended up being me doing 100% of the reviews. At the time I was just happy to get them to actually use source control properly.

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

This sadly sounds like one of the projects on my teamat the moment and it's horrifying.

One guy working on it, I'm really the only reviewer. Code is all stuff like this. Variables named j1 through j20, dozens and dozens of nearly identical functions with tons of brute force, copy-pasted code, etc. Works well enough but it's just horrifying to try to read and review.

Edit:. Just remembered, he had all these grouped functions passing (and sometimes returning) 60+ identical variables that didn't need to be local because he refused to use class vars, etc.

He's gotten a lot better about this stuff in the last year though

[–] [email protected] 2 points 10 months ago* (last edited 10 months ago)

You know, as an amateur with massive impostor syndrome who's probably going to be applying for jobs soon, this comment and those like it give me strength.

load more comments (3 replies)
load more comments (3 replies)