Fun in the Open Source code

Bug Icon by valessiobritoSometimes reading a code of Open Source Software gives a lot of fun. Programmers put many different and weird things into blocks of comments. It’s like a kind of source code blogging, isn’t it :-). You can find jokes and funny sentences or sentences expressing anger on a mad manager who forced a developer to stay next 12 hours at work in front of debugger screen…

Today, I was browsing sources of the OSGeo FDO Provider for OGR and I encountered one of these source code jokes. Here it is:

const double OgrSpatialContextReader::GetZTolerance()
{
    //zero tolerance!!! Yeah!!!!!!
    return 0.0;
}

Now, I wonder if the value returned from this function is what a user usually expects or may be it’s actually an expression (or better, a materialization) of programmer’s state of mind advertised here ;-)

5 Responses to “Fun in the Open Source code”

  1. Andy Morsell Says:

    This is my favorite from MapGuide Open Source:

    OgcWmsService.config.awd

    element that isn’t EPSG:4326
    then the whole enchilada is serious GIGO. –>

  2. Andy Morsell Says:

    Previous message got reformated

    Hack!- these are guard values in case the Layer.Bounds property
    is not well formed; Studio is offering zero data validation on
    its input via the UI. Of course, this isn’t a perfect solution
    either, but it guards against the most likely cases. If somebody
    types in a badly-formed [Bounds /] element that isn’t EPSG:4326
    then the whole enchilada is serious GIGO.

  3. Daniel Morissette Says:

    A good one from the CVS logs of MapServer’s mapgd.c:

    * Revision 1.136 2006/08/30 16:06:37 hobu
    * northwest airlines sucks. I fixed the libiconv warning on my Memphis->Greenland->Boston leg of my trip to Italy
    *

  4. mloskot Says:

    Heh, I see hobu is a source code blogger ;-)
    Here is another one of hobu’s commit log from GDAL:

    r10886 | hobu | 2007-03-07 21:43:32 +0100 (Wed, 07 Mar 2007) | 3 lines
    * it’s amazing what msvc lets you get away with ;)
    * Clean up the heap corruption issue next

  5. Jason Birch Says:

    twelve plus nine? I almost had to pull out the calculator…

    I guess it’s not a coincidence that my kids are making me feel dumb these days :)

    Anyway… here’s a good one:

    Revision: 1225
    Author: traianstanev
    Date: 11:06:56, March 14, 2007
    Message:
    Text position was scaled twice by the same scale. Scaling once is more accurate — by a factor equal to the scale, heh.
    —-
    Modified : /trunk/MgDev/Common/Stylization/StylizationEngine.cpp

Leave a Reply