ciplogic.com
Live with grace. Write superb software.

funny

  • Good Code Exists

    A PHP programmer was begging on a street corner. With dirty clothing, extremely sad and distracted, was watching the ground. On the cardboard in front of him was written: "Help a poor PHP programmer".

    From time to time, a Java or C# developer would give him something.

    A Python programmer that happened to pass by, stopped, took the cardboard, wrote a few words, then left.

    Something amazing happened. Ruby, Groovy, C# and Java programmers were stopping, reading what was written and giving plenty of money, some of them with tears in their eyes, crying with deep sorrow. A pretty large crowd gathered around him, so the PHP programmer raised his eyes. He read the cardboard, and cried with a shriek from the bottom of his lungs, lungs of a despaired man, from his truly unfortunate state. Tears started flowing over his cheeks, faced now with the truth revealed to his soul, when he read the words:

    "Help a poor PHP programmer. I know good code exists, I just have never seen it."

    A Perl programmer, extremely dirty, with his ripped clothing, and disheveled hair also passed trough the crowd, bumping into people. Unfortunately no one discovered the meaning of the senseless words he was muttering, so they let him be, to continue his painful existence.

  • How Programming Languages Relate to Girlfriends

    C

    The simple girlfriend that doesn't really get you. Whenever you go to a new place, she doesn't want to go. Goes if you really insist, but causes a scene there.

    C++

    The borderline insane girlfriend. One mistake, and she goes bonkers. Tries to be friends with all of your friends, even if no one likes her.

    Python

    Your true love, but you know deep inside you two won't last. She's nice, but whenever you want something from her she's nowhere to be found.

    Java

    Boring as hell. You pity her and you think you should like her more. You just can't get yourself to do it. She keeps trying to make it work.

    C#

    The slightly prettier sister of Java, with all the mental issues of C++.

    PHP

    The beast from Beauty and the Beast. Reasoning with her is like talking with a grizzly bear.

    Perl

    She always hungers for human flesh. Congratulations, you're dating a zombie.

     

  • Inspecting CSS Using IE8 Development Tools

    WHY!? How?!, I don't even...

  • JsDoc: Holy Mother of Evolution

    So here I was, minding my own business, and trying to write some JavaScript documentation, when IDEA tells me in their very thin documentation, that they support JsDoc.

    Good, let's see it:

    Sourceforge? Was it written by dinosaurs? I remember dinosaurs used to use Sourceforge and put their stuff there. T-Rexes typing with their tiny hands, were the main committers using it, but since poor T-Rexes went away, no one replaced them. Come back T-Rex. We miss you.

    Fine let's see the Rhino-based JSDoc.

    Notice the vibrant community of 2 committers, and yet starred by 841.

    And then finally:

    Wow!!

     

    Let those numbers sink in: 51 contributors, last commit 17 hours ago, 2593 people starred it.

     

    Wow!

    You can literally feel the history of this project, and the fantastic boom that had it now, which tell you in turn what happened with JavaScript since 2010 till now.

     

    And still has Rhino support in case you missed it from v2. Completely unrelated quote:

    Let it go! Let it go!

    Elsa (Frozen)

    I'm not sure of the context where she said these. Might have been unrelated to JavaScript, and in relation to some past history and ice and snow of hers.

  • o=o YUI3 is Watching You

    Do you know why you would name a configuration object „o”?

    Because then you can write this:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
        /**
        Applies a new configuration object to the config of this YUI instance. This
        will merge new group/module definitions, and will also update the loader
        cache if necessary. Updating `Y.config` directly will not update the cache.
     
        @method applyConfig
        @param {Object} o the configuration object.
        @since 3.2.0
        **/
        applyConfig: function(o) {
     
            o = o || NOOP;
     
            var attr,
                name,
                // detail,
                config = this.config,

    Personally I would have preferred:

    1
        o= !o ?NOOP :o ; // note how many emotions are bundled in this code.

    But it looks amazing anyway, that o=o is looking straight into my developer soul.

    From here: https://github.com/yui/yui3/blob/master/src/yui/js/yui.js 

    PS: Why else would someone name an object variable "o"?

  • Pointy Thingie: The Linux Font Measuring Unit

    Since I don't want eye strain, and have a mild OCD, I want the same font and sizes across all the monospaced text editors that I am using.

    The font I decided in using is Ubuntu Mono with some patches to look good on my vim. It's a regular truetype font.

    Thus I went into the journey of setting it up across four applications (gvim, terminal, IDEA and VS Code).

    Turns out that IDEA and Visual Studio Code think that the font size should be 16 Pointy Thinigies, while GVim and the terminal would rather go for 12 Pointy Thingies, to render a text with the exact same size in pixels.

    Good job Linux.

  • Smile at the World, and the World Will Smile Back

    I have this idea, where we should by convention name all the iterables P or D.

    So iterating over a list would become:

    1
    2
    3
    4
    5
    int haha, sum;
     
    for (haha :D) {
      sum += haha;
    }

    Obviously cryptic as hell, but the code will smile back at you.

  • Sweet-Sweet JavaScript Debugging

    Who said dynamic languages can't be fun to debug?

  • Vimscript: Where "true" is False, and "false" is Still False.

    Found this gem while reading the documentation from good ol' vim:

       What Vim calls true is anything that is not zero.  Zero is false.
            Note:
            Vim automatically converts a string to a number when it is looking for
            a number.  When using a string that doesn't start with a digit the
            resulting number is zero.  Thus look out for this:
                    :if "true"
            The "true" will be interpreted as a zero, thus as false!

    First language that I know of, where checking references to stuff actually return false.

Germanium

The one to rule them all. The browsers that is.

SharpKnight

SharpKnight is an Android chess game.

MagicGroup

MagicGroup is an eclipse plugin.