Funny Code Comments Thread
2 08 Oct 2016 00:17 by u/IBegToDiffer
Just found a comment about a deprecated feature in some of my 10 year old php/mysql code, discussing a variable called "$crack"
"$crack allows me to use a mysql variable in a stupid way"
Got any of your own to share?
7 comments
4 u/JohnSka7 08 Oct 2016 01:03
In one piece of code I work on there is a php function that calls a command line program to split a PDF. The guy who wrote the program did it incorrectly, so if the command to do the split doesn't work (like, you pass it a doc or some other non-pdf file), it would just fail to return and, instead of catching the error, he had a comment like
Problem is that it left the user with a blank screen and no explanation. This was replaced with a proper call to the cli function and error handling, and an updated comment:
3 u/captbrogers 08 Oct 2016 14:52
2 u/omegletrollz 08 Oct 2016 15:26
This is the coding equivalent of the age-old warning from Dante's classic book Inferno:
I'd probably not even read the function and probably still have nightmares about it XD
2 u/WhiteRonin 08 Oct 2016 02:24
Over the years I've had a few GF OS's and varying degrees of luck with them. Nothing I ever loved until I came across Wife OS 1.o. Lots of good times until i realized that dependency management was shit all expensive. Like a dumb as I upgraded to Wife OS 1.1 but that included the need for Ruby and gems. Fucking gems and various version. The final straw was that fucking lock file. So I promptly erased my hard drive to start fresh.
Everybody said to use Linux. Linux is great. Get a live version in your USB dongle and insert it into the machine. But as we all know, you lose the uSB sticks so you go try another flavor. At first, a new flavor of the week is awesome but you always have to boot up and reinstall stuff. Don't get me going about how USB fits in only one direction, si have to take it out and turn it over and try again, to only realize it was the other way around. Annoying to say the least -- come on ... It's a USB stick and they are normally pretty generic when you get down to it.
Having had a chance again to try out a lot of distros I started to realize what I was really looking for. I came across what I thought was mature OS so promptly installed GF 10.0.o Beta. As a preview release it was refreshing and the eye candy GUI was pure cool aid. So when it went Golden Master I install Wife 2.0. something, about 20 year younger hipsters was intriguing. As you know, that fruit company uses Delta updates and normally things go well. The hardware it runs on is firm too. The only problem it has is that booting is expensive and new bootloaders go on sale all the time and it's the only department in the store that is always staffed. The benefit of buying new bootloaders is that Wife OS 2.o updates happily and have benefited from better and better compatibility.
Above anythibg, I really suggest trying out various distros before ever installing Wife OS 1.o. Make sure your research all the dependicies and double check for hardware compatibility. To be honest, wife OS 1.0 and even 1.1 had awesome hardware compatibility but fuck ruby, gems and version locks. Whybthe fuck would any sane person design software that locks down future features!?!
1 u/WhiteRonin 08 Oct 2016 01:57
Wife 1.0 had to many dependencies and code was expensive to maintain. Upgrading to Wife 1.1 cost an arm and a leg do to dependicies requring Ruby and lots of gens.
I finally bit the bullet and decided I just needed a new OS to become productive.