Easter Eggs and Open Source

    "Easter Egg" (English Easter Egg) is a secret in a computer game, film or software, laid by the creators. The difference between an Easter egg in a game and a usual game secret is that its content, as a rule, does not fit into the general concept, looks in context improbable, ridiculous, and often is an external link. Easter eggs play the role of original jokes for attentive players or spectators. ( wiki )

    Easter eggs are different. For example, a well-known team apt-get moothat draws a cow in the console:

      / |    ||   
     *  /\---/\ 
        ~~   ~~   
    ...."Have you mooed today?"...

    Perhaps everyone will agree that apt-get mooit is not a destructive function. This Easter eggs may seem ridiculous, or not, or even completely out of place, but it surely will not break anything for you. You can also see some other Easter eggs in linux .

    In this article I would like to dwell on one particular easter egg. And specifically about "christmas" in ant-design . This is a good UI library of controls for React-ecosystem. About her could write a separate article, but now is not about that.

    Having opened a project today using this library, I saw something strange:

    For all buttons, the title attribute turned into "ho-ho-ho," and the key buttons received a snow cap. This was achieved at the expense of this commit using the "christmas" class and the custom style to this effect.

    const isChristmas = now.getMonth() === 11 && now.getDate() === 25;
        const classes = classNames(prefixCls, className, {
          // ...
          christmas: isChristmas,
        // ...const title= isChristmas ? 'Ho Ho Ho!' : rest.title;

    At first I laughed. Got into the code. He laughed again. Looked at the date. And then I remembered production. Hmm, yes, yes. Christmas mood reached there.

    Got to google, how so. Maybe I should have written some key ala env? I came across this issue , with apologies from the author:

    It is derived from my commit 00aebeb at Sep 10th. Tooltip ho ho ho! at the specificed day of dec 25th. It is a complete stupid decision.

    Are there other eggs in antd's code. No.

    Are there the same events would happen in the future? No, I promise. We are an open source project, please supervise us like this time, like always.

    After the update, the problem is gone. The author acknowledges the problem and repents. His act is called "stupid decision".

    I note that the library has 38 thousand stars and 13 thousand forks. And she really is not bad.

    Actually in the comments I want to raise the question: what do you think about Easter eggs in public projects? Are they permissible? What can they be? Let's say to drag 2 MiB comic-picture with a meme - definitely brute force. And draw an ascii cow? Where is the very edge? Is humor in open source appropriate?

    Only registered users can participate in the survey. Sign in , please.

    Are Easter eggs acceptable in open source?

    Also popular now: