News for hackers. Stuff that matters.
Re:Ask HN: What's the funniest thing you've done with code? by caw on Tuesday September 16, 2014 @08:12AM (#8324074)
My job as a student involved working in an IT office, and we had a policy of "always lock your screen". Those who didn't got creative pranks put on their computer. Only rules were no root level pranks and it had to be SFW.

Some of them I can remember

- Randomly eject CD drive. This was done in various formats like a background script running, aliased commands, etc.

- Alias 2 commands to each other (e.g. switch ls and cd)

- Switch key bindings

- Wallpaper switching

- Screensaver switching

Re:Ask HN: What's the funniest thing you've done with code? by Nib on Tuesday September 16, 2014 @11:19PM (#8328379)
"Alias 2 commands with each other"

You sir, deserve the Nobel prize...

Re:Ask HN: What's the funniest thing you've done with code? by 8joe on Wednesday September 17, 2014 @09:50AM (#8329903)
agreed
Re:Ask HN: What's the funniest thing you've done with code? by jpetersonmn on Tuesday September 16, 2014 @02:11PM (#8326000)
I write a lot of little vb.net applications for troubleshooting/repairing software for our helpdesk. Sometimes if I'm writing something that only 1 specific person is going to use I'll do something like every 3 days set their homepage to that david hasslehoff speedo gif that zooms in on his crotch over and over. Totally inappropriate at work, but I get a chuckle out of it. Since it only happens every three days they haven't figured out what's causing it.
Re:Ask HN: What's the funniest thing you've done with code? by Nib on Tuesday September 16, 2014 @11:18PM (#8328373)
LOL XD

Simple and chuckleful... :p I like it...

Re:Ask HN: What's the funniest thing you've done with code? by 8joe on Wednesday September 17, 2014 @09:48AM (#8329895)
hilarious!
Re:Ask HN: What's the funniest thing you've done with code? by canadaj on Tuesday September 16, 2014 @05:10PM (#8327135)
Not really a prank, but a while ago my group of friends thought that the smiley with a nose ( :^) ) was really weird and creepy in casual conversation (we never use smileys).

So naturally I wrote a twitter bot that finds all normal smileys and adds the nose.

Re:Ask HN: What's the funniest thing you've done with code? by Nib on Tuesday September 16, 2014 @11:19PM (#8328377)
Haha, it really is weird...
Re:Ask HN: What's the funniest thing you've done with code? by canadaj on Friday September 19, 2014 @05:41PM (#8342638)
:^)
Re:Ask HN: What's the funniest thing you've done with code? by brickcap on Tuesday September 16, 2014 @12:29PM (#8325339)
I don't know if it's funny but I once added a "This image is not required" in the alt text of the image. The src pointed to a non existent image. Haven't seen anyone else laugh at this but myself :)
Re:Ask HN: What's the funniest thing you've done with code? by Nib on Tuesday September 16, 2014 @11:20PM (#8328382)
I didn't really get the joke...
Re:Ask HN: What's the funniest thing you've done with code? by brickcap on Wednesday September 17, 2014 @02:13AM (#8328782)
Ha ha well okay. The alt text of the image is displayed only when the image can't be loaded. I set the src attribute to a non existent resource. So an image tag was used to show a text that the "image is not needed". Yeah I know not that good :)

it is here if you want to see it in action

http://brislink.github.io/specter/

Go all the way down on the page.

Re:Ask HN: What's the funniest thing you've done with code? by stephancoral on Tuesday September 16, 2014 @12:32PM (#8325360)
I set up Nagios alerts to send a YO! to a very senior engineer anytime there was a warning
Re:Ask HN: What's the funniest thing you've done with code? by MonCalamari on Tuesday September 16, 2014 @07:57AM (#8324027)
#define true false