What is your favorite comment you came across in code?
30 25 Jun 2015 01:52 by u/for_satan
Whether your own comments or code you ran across in the wild.
30 25 Jun 2015 01:52 by u/for_satan
Whether your own comments or code you ran across in the wild.
24 comments
16 u/dogmatic 25 Jun 2015 04:08
Back in the day, in an age before the internet here was a COBOL payroll system. The system ran weekly. There was an error message generated for the check stub description line if an amount had more than 4 digits for dollars (>9999.00). The error message was "THIS PERSON MAKES TOO MUCH MONEY". It was triggered. Management was...somewhat less than pleased.
10 u/taxation_is_slavery 25 Jun 2015 02:05
Probably a few others in business apps, but they elicit the wtf, and don't ask it.
4 u/for_satan [OP] 25 Jun 2015 02:07
That one is always a good one. Made a lot of game code faster.
10 u/Unleeb 25 Jun 2015 09:40
I have two that come to mind:
First one was a piece of software used to simulate some military hardware interface. Since I do not have access to the code anymore, this is a recreation from memory:
And another one, which I merely have observed on the Internet (Edit: As pointed out by Enemby; this one is from xkcd):
2 u/Enemby 25 Jun 2015 10:26
the 2nd one is from xkcd.
0 u/Unleeb 25 Jun 2015 12:28
How could I not remember that?!
9 u/captbrogers 25 Jun 2015 04:33
I can't remember it exactly, but it was something like:
Backstory: My team lead was heavily against using any 3rd party code, including frameworks (writing PHP like it was 1998, but it was just two years ago!).
So I had to writing something that does pretty much what Carbon does, but object oriented code wasn't used on this project. Had to do it as procedural with several functions. Any attempt to just scrap the file and rewrite it would end up just as corrupted with spaghetti as before as he made some edits. I'd get it working, he'd break it again. I lasted 6 months at that job.
1 u/for_satan [OP] 25 Jun 2015 05:03
We had something similar in a code base that I worked in, effectively
It was also PHP coded like 99, in 2012
1 u/captbrogers 25 Jun 2015 05:15
Same kind of mentality I had to face. It was salt in the wound because I took the job out of necessity. I had to drive over 40 miles one way, so it took me nearly an hour because of traffic when driving.
4 u/taxation_is_slavery 25 Jun 2015 16:45
If a company survives long enough on products like that, they usually start asking why development is so expensive, then they outsource to Indians which sends the company into a swan dive above concrete.
2 u/captbrogers 25 Jun 2015 20:28
Oh they already did that for the HTML/CSS. Tables. Tables everywhere. Nested. I was surprised it didn't say "best viewed in IE".
7 u/yewbontheboat 25 Jun 2015 02:52
Came across a set of comments in an automated mrp export program written in c that is about 10 years old
//if (qty == 507)
//return;
//why the fuck did I have to comment this out
//why did you even setup this fuck you bomb to go off 3 years after you left
Or something like that haha, I of course left it in
6 u/kilroy 25 Jun 2015 03:47
3 u/HentaiOjisan 25 Jun 2015 23:18
I like this one:
And this one;
2 u/shmuklidooha 25 Jun 2015 15:51
Not really a comment, but when I was modding a game, the original maker called the variables for time and date $whatTimeIsItScoob and $likeNowScoob.
2 u/botbot 05 Jul 2015 15:33
#define POPE_IS_CATHOLIC 1
if (POPE_IS_CATHOLIC){ code }
1 u/trytohurtme 25 Jun 2015 11:22
There is a music lyric website aggregator software called LyricJam. It scrapes lyric content from a variety of sites. The scraper base class is called ScrapeJam. Here's the comment for the class:
https://github.com/ss23/Lyrics-Database/blob/dev/Scrapers/ScrapeJam.py#L47
1 u/ColaEuphoria 25 Jun 2015 21:58
It always cracks me up.
0 u/kuda 26 Jun 2015 12:57
/**
*MAGIC STARTS HERE, DO NOT TOUCH
*
*/