Developer’s Easter Eggs

Did you ever forget posting a blog post that you’ve prepared earlier, the other day? So did I! Some time ago I prepared a short post for April Fools’ day, containing two pieces of code that made me smile recently. However, better late than never – I publish it today! First one is from Cassandra source code and the second one is from a project that company I work for is working on (hopefully it’s not violating my NDA! ;-) ).

Cassandra, HintedHandOffManager class – inspired by (probably fake) quote from Bill Gates about the amount of memory people may need for their computers:

// 64k nodes ought to be enough for anybody.
private static final int LARGE_NUMBER = 65536;

And the second one:

year = date[:4]  # This is going to fail when we reach year 10000. Not my problem.

Warning! It will probably fail to use these quotes as a joke on a party! ;-)

Comments are closed.