609
top 50 comments
sorted by: hot top controversial new old
[-] SpaceNoodle@lemmy.world 137 points 1 week ago

These are normal and healthy comments

[-] merc@sh.itjust.works 73 points 1 week ago

Most of the places I've worked I'd have been told to get rid of the cursing before checking something in. But, my own personal codebase has tons of this sort of thing.

But, aside from the cursing, these actually look like excellent comments. Comments should warn you when the code isn't what you might expect. These are excellent from that point of view. If this is what a random sampling of the comments in the codebase looks like, it is probably a very well commented codebase.

[-] SpaceNoodle@lemmy.world 21 points 1 week ago

Why are the fart sniffers reading the code? Or does the mere thought of a naughty no-no word give them the bad tingles?

[-] wheezy@lemmy.ml 34 points 1 week ago* (last edited 1 week ago)

The fart sniffers are there to prevent your pull request from being accepted because they have nothing better to do. They exist because they are promoted so your manager, that contributes nothing, can point to them as a "team player".

I swear to God. Corporate code would literally work better if we auto accepted every pull request and just had a single meeting each month to decide if we should revert back to last month and try again or accept our current state as "better".

Fuck waterfall, Fuck agile. Just go with the "was it worth it?" monthly review method.

Did we create more problems than we solved? Like, I feel like the Windows search function wouldn't have passed this review and we wouldn't get 0 results for the "uninstall" search string and start suggesting Bing results if this minimal method of rational discussion existed at a higher level.

[-] SilentSyntax@programming.dev 64 points 1 week ago

Wasn't there a graph posted somewhere at some point which showed the frequency of different swear words in comments in the Linux kernel code?

[-] meekah@discuss.tchncs.de 32 points 1 week ago* (last edited 1 week ago)

I'm pretty sure its a website that just analyzes the git repo and you can search for your own terms as well

Edit: https://www.vidarholen.net/contents/wordcount/

[-] Ephera@lemmy.ml 61 points 1 week ago

Man, at $DAYJOB, if we open-source something, they tell us to check for checked-in passwords and whatnot, and force us to throw away the commit history, which always feels stupid when we've known upfront that we're going to open-source it and so kept things clean from the start.

But then, yeah, you see a post like that and just think that it really wouldn't have been too difficult to search for swear words before publishing.
I mean, I also don't really care, since it's code rather than an official communication channel, but I can understand why management might care.

[-] SpaceNoodle@lemmy.world 92 points 1 week ago

Management can go fuck themselves. Do they want the code to fucking work or not? These are load-bearing fucks.

[-] wheezy@lemmy.ml 20 points 1 week ago* (last edited 1 week ago)

It literally helps future programmers. There is nothing more inspiring than reading comments you can feel solidarity with. These literally are load bearing comments.

I also enjoy the sarcastic "I won't regret taking this shortcut" comments. Like, you're trying to fix some ass-holes code and they are literally mocking you for the fact that they knew they did it wrong but it would be someone else's problem in the future. It's a "pass the torch" kind of thing that I always enjoy. Like, I can't be mad because I just feel so connected in our mutual frustration of wage labor bull shit.

[-] Mountaineer@aussie.zone 54 points 1 week ago* (last edited 1 week ago)

These are pretty calm messages to an Australian and Garry is British, so culture checks out.

// What the fuck
// Fuck dynamic compiling.
// what the fuck is this shit
// What the fuck, why isnt this a method

Should this by the by commentary be there?
Not really.
But as a programmer, I understand each and every time I see something like:

// Urgh this is so dirty, Invalidate() and Refresh() do nothing.
tButt.AutoSize = false;
tButt.Width = maxWidth;
tButt.Height = maxHeight;
tButt.AutoSize = true;

[-] Deebster@programming.dev 53 points 1 week ago
  // this is bollocks, delete it

That's almost certainly from a Brit.

  // this looks like I'm being a fancy arsehole, but this is all because  
  // the window shows up white for some reason when first opened, and this  
  // disguises it.

Could be either.

chefkiss.png

[-] conorab@lemmy.conorab.com 36 points 1 week ago

Now THIS is art!

[-] 01189998819991197253@infosec.pub 31 points 1 week ago* (last edited 1 week ago)

Had to search it, since I've never heard of s&box.

s&box is a spiritual successor to Garry’s Mod and a love letter to Source 2

Edit. A game engine. So, super cool.

load more comments (2 replies)
[-] HexesofVexes@lemmy.world 30 points 1 week ago

Clearly they gave every last fuck they could about that code.

[-] Lightfire228@pawb.social 28 points 1 week ago

I literally just wrote this a few hours ago (line 55)

[-] melvisntnormal@feddit.uk 7 points 1 week ago

You writing an interpreter/VM? For what language?

[-] Lightfire228@pawb.social 5 points 1 week ago

Lox

Once i have a solid implementation, I wanna morph it into a custom scripting language for generating diagrams (a la graphviz or mermaid js)

https://github.com/Lightfire228/lightweaver

[-] melvisntnormal@feddit.uk 4 points 1 week ago

I thought as much! Didn't want to assume though just in case. I've gone through that book twice and I want to look at adding types to my implementation. Good luck!

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

The more insane, unlikely, and catastrophic the error, the more appropriate an insane, terse, apocalyptic error message is.

[-] NullPointerException@lemmy.ca 27 points 1 week ago
[-] sp3ctr4l@lemmy.dbzer0.com 20 points 1 week ago* (last edited 1 week ago)

Yep.

Not too long ago I was explaining to people how Garry is both an asshole and bad at coding... now we get to see the unprofessional struggle session.

Like, if you are frustrated that calling methods from your own code base doesn't work... maybe fix your code's utility functions?

Instead of doing one off hackjobs for everything?

Any serious, experienced coder has tendencies toward this or even versions of their code with some of this kind of stuff in it.

... but you fucking clean it up and rewrite the rage with actually helpful documentation, if you actually give a damn about other people who might use it.

As the TF2 Sniper put it:

Professionals have standards.

[-] merc@sh.itjust.works 23 points 1 week ago

I don't see anything unprofessional there. Just naughty words. But, the naughty words are somewhere where they warn you that the code below doesn't behave as expected, or complain because there isn't a better way to do something. That seems like the best time to use strong language.

Cleaning it up is a great idea in theory, but in practice almost everybody has higher priority things to be doing. Leaving a comment in the code for why something is ugly is the best thing you can do when you don't clean something up, so that someone coming along after you doesn't struggle with it. We have no idea how many "naughty" comments are no longer there because the issues they addressed were cleaned up.

[-] sp3ctr4l@lemmy.dbzer0.com 9 points 1 week ago

If you were to talk like this in any job I've ever worked at, you'd be fired in about a week, maybe faster.

Same with writing emails with this language.

And you're missing my point that if you made your own functions... and they don't work right, ... you should fix those functions, rework them.

Not doing that is how you get technical debt, spaghetti code, which is bad for you, bad for what you're trying to do, bad for anyone else trying to help you do it.

Commenting on a bunch of slapdash fixes is like covering holes you punched in your wall with framed graffitti about how frustrated you are.

If you saw that in a date's home, you'd hopefully recognizr that as a red flag and nope the hell out.

If everybody else is too busy to actually fix the code, you have inept project management.

You as well have clearly never worked in an actual professional software dev environment, if you think this is reasonable or defensible.

[-] Incogni 6 points 1 week ago

Absolutely correct.

I always tell our new developers: If your new feature works, you aren't done, you have to check if your code has to be refined first, before checking it in. (e.g. duplicated passages made into a common function, ugly hacks removed and "done properly", stuff like this) Documentation and testing are also mandatory, but that's because of the industry we work in.

[-] sp3ctr4l@lemmy.dbzer0.com 4 points 1 week ago

Yep.

You can avoid having to do something like a total refactor that takes half the year, if you do the rough equivalent of a sanity check / clean up pass, when any new system or feature set is added, and make that habitual.

Its... kinda like how if you just do a bit of regular shopping, regular meal prep, regularly do the dishes, whatever, everything just flows easier in general.

The longer you run lean, move fast and break things.... yeah it can improve output in the short term, but medium to long term, you'll run yourself ragged, and things will break and fall apart.

[-] SpaceNoodle@lemmy.world 19 points 1 week ago

Where the fuck are you coming up with the time to refactor all of your fucking frameworks?

[-] moseschrute@lemmy.world 7 points 1 week ago

But the trick is to keep the code good enough that it runs, but bad enough that you have job security

load more comments (1 replies)
[-] ZoteTheMighty@lemmy.zip 26 points 1 week ago

ToLower() to compare paths 🤮

[-] waldfee@feddit.org 7 points 1 week ago

it's valid on macos tho...

[-] SlurpingPus@lemmy.world 7 points 1 week ago

Apple's filesystems in fact have an option for case-sensitivity.

[-] InFerNo@lemmy.ml 3 points 1 week ago

Then they're not the same path...

[-] waldfee@feddit.org 2 points 1 week ago

apfs is by default case-insensitiv, for some reason, so the paths would still be the same. It apparently even causes issues with some installers when macos runs on apfs(case-sensitive)

[-] ChairmanMeow@programming.dev 3 points 1 week ago

There are StringComparison options to pass that allow you to ignore case sensitivity when comparing. No need for ToLower.

I can't swear or reference other team members anymore, it was considered hostile. Fuck Steve, trying to get his git numbers up by running a linter on my feature branch while I am developing the branch. Now I can't fucking quickly read the code, it is a mess for a reason, it is temporary. I hate Python for this, I come from C++ land and need my whitespace.

[-] JackbyDev@programming.dev 23 points 1 week ago
git pull
# you see bullshit
git reset --hard HEAD@{1}
git push --force

Solved! Tell your coworker to make their own branch!

[-] pokexpert30@jlai.lu 8 points 1 week ago

That comment made me laugh so hard

[-] Ajen@sh.itjust.works 9 points 1 week ago

If it's your feature branch, just revert his commits (or reset the remote branch to your local branch)? Not sure why a feature branch would be shared between devs...

Ask Steve why he was working on my feature branch. Steve is not a smart person. He also built a feature that another team was working on, over a weekend and implemented it on Monday morning. The feature was already finished on Friday and the PR was waiting for approval. While 10x devs work fast, they create 10x the work for everyone else. He no longer works here and it turns out he burned every single team with shit like this. It is so hard to get rid of someone who can work fast. When upper management is convinced someone who is productive and smart can do no wrong. They ignore the fucking carnage they create.

[-] smeg@feddit.uk 2 points 1 week ago

Just don't pull his commit

[-] swicano@programming.dev 18 points 1 week ago

They wrote what we're all thinking!

[-] Zacryon@feddit.org 16 points 1 week ago

The more experience I gain over the years, the more this feels relatable. I had to pull myself together to keep my comments regarding kaputt Nvidia APIs civil in my code and commit messages.

Ah Nvidia. Always a fucking PITA (not the bread kind). I wonder how they have managed to become the most valuable chip manufacturer worldwide.

load more comments (1 replies)
[-] axx@slrpnk.net 16 points 1 week ago

These are good comments. 

[-] JackbyDev@programming.dev 15 points 1 week ago

Honestly, yeah. I mean, not the best but I definitely am more in favor of comments being a commentary than explaining what's happening. Explaining why is better than what, but in general, comments where anything absolutely bonkers is happening are useful. Bare minimum, I think some sort of acknowledgement that the person writing the code also recognized their code was weird (necessarily or not) is nice.

[-] moosetwin@lemmy.dbzer0.com 16 points 1 week ago* (last edited 1 week ago)

fuck me c# - is this how we compare paths

hahaha I've done this exact thing before, with windows formatting folder paths as x/y/z and file paths as x\y\z.ext, especially since some modules would only accept one format or another

[-] dreadbeef@lemmy.dbzer0.com 8 points 1 week ago

I am glad I worked on codebases where we didnt run fast and break things. Well built software is achievable, but not flashy

For fucks sake Garry!

[-] Chaser@lemmy.zip 7 points 1 week ago

Poor Garry :'(

[-] fin@sh.itjust.works 2 points 1 week ago

got me interested to try learning c#

[-] DeltaWingDragon@sh.itjust.works 2 points 1 week ago

Reminds me of these

Comments in Netscape when it became open source

load more comments
view more: next ›
this post was submitted on 26 Nov 2025
609 points (100.0% liked)

Programmer Humor

27690 readers
389 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 2 years ago
MODERATORS