A Collection Of Funny Source Code

Funny things seen in source code and documentation is a page that contains:

Some funny stories

Once I had a junior programmer writing VB code that needed to know the day of the week. He decided to write his own code, and read something like:

if (day = 1) or (day = 8) or (day = 15) or (day = 22) or (day = 29) then
weekday = "Monday"
elseif (day = 2) or (day = 9) or (day = 16) or (day = 23) or (day = 30) then
weekday = "Tuesday"
...

Trying to be educational I asked him for his opinion about his own code, and he said that he would simply modify it every month.


... and some angry comments

// Either the app is exiting or the world is coming to an end.
// Take your pick.

// I'd trade my office mate for a layout manager.

/* PB, is this right? -- AW */

// Everything is shamelessly stolen and rewritten.
// Feel the consequences of GPL ;-)


... and some hilarious errors

% tar cvf foo.tar
tar: Cowardly refusing to create an empty archive

In the middle of something innocuous, an angry message box appeared:

Dammit, Darin! I told you not to call me!


// TODO: Don't forget to write something funny and add a warning that some jokes (replace with: a lot of jokes) may be hard to understand for non-programmers.

// This text was posted by an automated script.

Labels

Web Search Gmail Google Docs Mobile YouTube Google Maps Google Chrome User interface Tips iGoogle Social Google Reader Traffic Making Devices cpp programming Ads Image Search Google Calendar tips dan trik Google Video Google Translate web programming Picasa Web Albums Blogger Google News Google Earth Yahoo Android Google Talk Google Plus Greasemonkey Security software download info Firefox extensions Google Toolbar Software OneBox Google Apps Google Suggest SEO Traffic tips Book Search API Acquisitions InOut Visualization Web Design Method for Getting Ultimate Traffic Webmasters Google Desktop How to Blogging Music Nostalgia orkut Google Chrome OS Google Contacts Google Notebook SQL programming Google Local Make Money Windows Live GDrive Google Gears April Fools Day Google Analytics Google Co-op visual basic Knowledge java programming Google Checkout Google Instant Google Bookmarks Google Phone Google Trends Web History mp3 download Easter Egg Google Profiles Blog Search Google Buzz Google Services Site Map for Ur Site game download games trick Google Pack Spam cerita hidup Picasa Product's Marketing Universal Search FeedBurner Google Groups Month in review Twitter Traffic AJAX Search Google Dictionary Google Sites Google Update Page Creator Game Google Finance Google Goggles Google Music file download Annoyances Froogle Google Base Google Latitude Google Voice Google Wave Google Health Google Scholar PlusBox SearchMash teknologi unik video download windows Facebook Traffic Social Media Marketing Yahoo Pipes Google Play Google Promos Google TV SketchUp WEB Domain WWW World Wide Service chord Improve Adsence Earning jurnalistik sistem operasi AdWords Traffic App Designing Tips and Tricks WEB Hosting linux How to Get Hosting Linux Kernel WEB Errors Writing Content award business communication ubuntu unik