• Space/Science
  • GeekSpeak
  • Mysteries of
    the Multiverse
  • Science Fiction
  • The Comestible Zone
  • Off-Topic
  • Community
  • Flame
  • CurrentEvents

Recent posts

Clearly threatening language BuckGalaxy May 16, 2025 3:43 pm (Flame)

Most common planet type in the Galaxy BuckGalaxy May 16, 2025 1:51 pm (Space/Science)

Large Loathsome Legislation fails in committee BuckGalaxy May 16, 2025 1:14 pm (CurrentEvents)

Large Hadron Collider Eureka! BuckGalaxy May 15, 2025 11:44 am (Space/Science)

Plan(et) 9 from Outer Space BuckGalaxy May 13, 2025 10:58 am (Space/Science)

Shouldn't there be an Afrikaaner-American studies department in our universities? ER May 12, 2025 2:59 pm (CurrentEvents)

The April numbers ER May 8, 2025 5:59 am (Space/Science)

The Orange Criminal POS abandons another ally BuckGalaxy May 7, 2025 10:18 am (CurrentEvents)

Orion spacecraft for crewed Artemis II lunar mission ready BuckGalaxy May 3, 2025 8:13 pm (Space/Science)

Australia election more bad news conservatives BuckGalaxy May 3, 2025 11:54 am (CurrentEvents)

Massive cuts to NASA budget proposed BuckGalaxy May 3, 2025 9:19 am (Space/Science)

Say what? ER May 1, 2025 8:53 pm (CurrentEvents)

Home » GeekSpeak

Codemonkey humor September 7, 2017 11:29 am Robert

Part of the job of a programmer is to document the code by writing comments within it, to help the next codemonkey figure out why the code does what it does (or not). Sometimes when you work in a home office, say, the comments become a stream of consciousness, almost like a diary, as you forget that other people might someday read your comments. More often, though, you find yourself cracking jokes to help you and the next programmer pass the time.

SQWORD GetGlobalTime( const TCHAR* Filename )
{
//return greenwich mean time as expressed in nanoseconds since the
//creation of the universe. time is expressed in meters, so
//divide by the speed of light to obtain seconds. assumes the
//speed of light in a vacuum is constant. the file specified by
//Filename is assumed to be in your reference frame, otherwise you
//must transform the result by the path integral of the minkowski
//metric tensor in order to obtain the correct result.

return Time;
}

I though this one would appeal to the space cadets here. Comment lines are introduced by “//”, and there’s only one line of actual code in this function. Which just returns the time.

This example comes from The DailyWTF, which is a blog somehow linked to The Register web site, about the crazy/stupid things programmers do, that cause their colleagues to exclaim “WTF???”. I read it every day, using the “random” button to go back and read old articles. If you ever want to learn what it’s really like to be a programmer or work in IT, check it out.

    Search

    The Control Panel

    • Log in
    • Register