These are normal and healthy comments
Programmer Humor
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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
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.
Why are the fart sniffers reading the code? Or does the mere thought of a naughty no-no word give them the bad tingles?
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?
I'm pretty sure its a website that just analyzes the git repo and you can search for your own terms as well
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;
// 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
Now THIS is art!
Clearly they gave every last fuck they could about that code.
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.
Typical Garry.
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.
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.
Where the fuck are you coming up with the time to refactor all of your fucking frameworks?
Ah, yes I also work professionally, in very clean non-swear-inducing code without hackjobs that are in production and does a job, because it exists, and I know because I code a lot professionally and never see hacks or swear ever and it also reflects my flawless personality. In fact, here they are now, in the room with us. All the code that is perfect and without hacks are greeting us and they speak highly of me and badly about that unprofessional garry even though we don't really know who he is we are definitely superior since our code is without any hacks and doesn't use any libraries with swear words in the comments
But the trick is to keep the code good enough that it runs, but bad enough that you have job security
Funny how you bring up TF2 at the end when TF2's own codebase is legendary spaghetti
I wasn't sure if Garry was commenting on his own code, or someone was calling Garry out on Garry's code. Either way, your comment works.
Its likely a mix of Garry and maybe 2 to 4 other coders, who Garry assigns to develop various subsystems off of his broken core systems.
Thats exactly how he did it during Garry's Mod.
I literally just wrote this a few hours ago (line 55)
You writing an interpreter/VM? For what language?
Once i have a solid implementation, I wanna morph it into a custom scripting language for generating diagrams (a la graphviz or mermaid js)
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!
The more insane, unlikely, and catastrophic the error, the more appropriate an insane, terse, apocalyptic error message is.
ToLower() to compare paths 🤮
it's valid on macos tho...
Apple's filesystems in fact have an option for case-sensitivity.
There are StringComparison options to pass that allow you to ignore case sensitivity when comparing. No need for ToLower.
They wrote what we're all thinking!
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.
git pull
# you see bullshit
git reset --hard HEAD@{1}
git push --force
Solved! Tell your coworker to make their own branch!
That comment made me laugh so hard
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.
Just don't pull his commit
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
Why don't they just have a FilePath class with an == operator?
I've never felt so elated for taking up Qt instead of going with the .NET C# route.
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.
The competitors don't really try to be better.
And if, the driver is a mess.
These are good comments.
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.
I am glad I worked on codebases where we didnt run fast and break things. Well built software is achievable, but not flashy
Poor Garry :'(
For fucks sake Garry!
got me interested to try learning c#

