Do not kill the part of you that is cringe - kill the part of you that cringes
I disagree wholeheartedly! Had a component that had to have exactly 3 objects in an array so I added a check and warning for it. The warning was the whole Monty Python holy hand granade of saint Antioch speech rewritten for whatever that object was. I wrote it like 2-3 years ago and everyonce in a while a new team member finds it and they crack up and share it in our team slack. No code I have ever written has brought me as much joy than that funny error message that only a dev will ever see.
that’s epic enough I kinda want to write code that needs 3 of something.
Make a baseball simulator!
I like coming across my old comments in master like
// temp fix to return xyz, will refactor when daves PR is merged
And then seeing that commit was 5 years ago.
And Dave’s PR still isn’t merged
Dave's a carpenter in Scandinavia now
Making a trek all the way to Dave's off-grid cabin just to knock on his door and ask him to fix the conflict so that it can finally be merged (the issue was already closed accidentally after someone merged a similar but unrelated fix)
I once saw a comment that was like
// Coming soon: the ability to [insert some extra bit of functionality here]!
The comment was several years old, and the functionality of course did not exist.
idk about you but i enjoy reading my old improv code comments
When I come across something just silly or funny i appreciate past me
I was working with homography matrices (basically matrices to convert from one coordinate system of an image to a possible real world coordinate system or another image coordinate system if you skew it or something) at work, to which I made the variable name homo_matrix to shorten it, and given it was June in America, made a comment of Happy pride! So we'll see how the code review goes when we finish all of it.
Reminds me of the Trans(action)Request concept in a protocol I designed
Always made me giggle a bit internally
I made a wrapper around python to execute the python commands in a docker container. Called it dython.
The file descriptor was “Mike Tyson’s vacuum cleaner”
Reminds of the story of one guy that looked at his code and was trying to figure out what the hell was the variable "feet", he ended up looking through the git history and saw that ot changed from LegendHandles to LegHands and finally to feet
This is so hilarious and dumb it’s almost OK
The code that sent us to the moon has funny comments and references for the whole world to see, even decades later. You'll be alright.
I'd like to see, if you have a source :)
I ran into an old colleague from my first job once. I was more immature back then, although maybe not that much.
Apparently a lot of my old code was still in use and going through my dumb and funny comments was a rite of passage for the new people. They were even appreciated.
All I heard was that my code was still in production, which was a pretty big ego boost.
My old comments are always like "yeah this isn't the best code, but it's functional and that's what matters."
I agree old me, I don't need to remove the duct tape and fix it if the duct tape is good enough.
//I can haz mallocs trooolllolololo
😫
Somewhere out there, in code written for Lloyd's of London, lurks my comment "You gotta fight... For your right... To write the byte.."
I once saw a function for removing the tail end of data as a circumciseFieldName.... These are the kind of code comments and functions I live for...
Legend has it that at the behest of his loony CEO, a lone programmer once called it on two hundred field names, when only one hundred actually needed the tail end removed!
Peak programmer humor right here! Shame it'll get lost in the void. Well done!
This is me reading old code with variable names of poop and fart. Hard to make sense of what is going on.
“Who wrote this stupid shit?”
“…damn it”
Remember, you can joke verbally here and now, when you know it is appropriate. 10 years down the line written joke may be cringe, or it may even be a reason to cancel you.
Even more a reason to write your comments. Why should we bow in advance to a world we do not want to become a reality?
I once worked at a company where one of their products was a POS system at a seafood restaurant. During the December holidays, they ran promotions, and the developer who coded it was absolutely fed up. When I first joined in December, on Christmas Day, we got a ton of bug reports because it's a local tradition in my city to eat at that restaurant. I put my turkey aside and dove into the code in production, and this is what I found in the comments:
// Merry Christmas! Hope you're having a good time. I’m sorry to inform you that this isn’t going to work. I never really fixed it. Hope it doesn’t cause too much trouble.
And then, there was an ASCII Santa:
__
.-' |
/ <\|
/ \'
|_.- o-o
/ C -._)\
/', |
| `-,_,__,'
(,,)====[_]=|
'. ____/
| -|-|_
|____)_)
Now he's a baker... You wouldn't believe how much I envy him.
I regularly write “I know I shouldn’t do it this way there has to be a better way but my brain doesn’t know how” lol
We took over a legacy project from the company we merged with. It had useless 'funny' comments, jokes as class names, barley any documentation and if a function had documentation it was wrong.
We're almost working on this project for two years, and we're still not done removing all the legacy bullshit.
developer who took over my code told me they found my comment "this is hacky and bad, but do you have a better idea?"
That's a great comment, actually! Acknowledges that the code is messed up, acknowledges that the mess works, and prompts other people to try to find a solution. One of your successors might just have that better idea you've been waiting for someday!
Coworker was reworking some Billing Account Numbers (BANs) and named his branch onlyBans. Everyone agreed it was an absolute banger of a branch name.
I had the word "DOZENA" instead of "doesn't" in my comment, because some person I knew kept pronouncing it that way, it's not code related but it gave me a hefty laugh looking at it.
alright, i wont write funny comments but this post made me laught so i guess i broke the rules
TODO: something better than this
my funny comments are always sad funny and when i find them again they hit the same
"The revenge of the return of the son of the <task>"......................................yeah.
I had a variable named has_holes
that I really liked but it never made it past the code review, I still often think about it a few years later.
My favorite one is “something is fucking up our shit” during a memory overwrite issue in assembly, so I had to manually alloc a protected buffer to prevent it from happening >:(
Na, just never reread code you write years ago.
Why funny comment when you can just leave "at the time of writing this, only God and myself knew the function, alas now only God knows.
Number of hours spent figuring it out: XXX"
real
“Funny comments” tick me off more than they should
That sounds like a horrible way to live tbh
No, having the codebase I’m required to spend 8 hours a day on littered with attempts at stand up instead of anything meaningful is the horrible way to live
Counterpoint: you wouldn't have stayed at the same job for that long if you hadn't had a sense of humor and the freedom to exercise it.
One of my favorite code lines is
QUrl supportLink; // HEY! LISTEN!
My first C++ program had the stupidest names, which includes How_Many_Times_Do_We_Have_To_Teach_You_This_Lesson_Old_Man
I created a shell script that relied on another tool being installed to work. We all had the tool installed by default so I wrote and error code saying "make sure XYZ.exe is installed numbnuts!". No one never saw it because all configurations were the same.
Years later our company was bought out by genericMegaCorp who did not give us default configurations. I ran my shell script during setup and got a fun error code.
You want to nibble on your old codes tit?
bro just coded his way into the matrix
"funny" code comments and "funny" commit messages are always cringy. I once saw a commit in our repo with the description "beautifully crafted in the Alps -- Co-Authored-By 6 people"
I had a comment that said “replace this with the less stupid idea you had”
3 years later when I came across it again, I could not remember what the less-stupid idea was
you really had the audacity to roast your own code but couldn't be bothered to write down the actual solution lmao
I’ve done worse than that before - nearly 10 years ago I had a problem that I posted to StackOverflow, and got rinsed for it instead of anyone actually helping with the problem. After a few days hard work, I figured it out myself, and went back to SO seething with hatred, and left a comment along the lines of “Solved, and I’m not sharing how..”
Guess who had the exact same problem and stumbled upon his own StackOverflow post 5 years later… I never actually figured out a proper solution the second time around either
For how much of the world relies on code you would think there would be better resources
Take my upvote you…
Ah, my guy Fermat
I once found a Todo of mine that said "This isn't the right way to do it, replace with" I don't remember what got in the way of me finishing that sentence but it still haunts me because that piece of code is still there, I couldn't figure out what I wanted to do instead.
Replace with nothing, or replace with infinite whitespace. Could be either or.
Not a programmer, but I am a DM, and I hit myself with that all the time. Abbreviations? Yes. Definitions??
You probably did replace it but forgot to update the comment