cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohit Yadav <bhais...@apache.org>
Subject Re: 100 brownie points :P
Date Mon, 11 Feb 2013 12:54:51 GMT
On Mon, Feb 11, 2013 at 4:55 PM, Donal Lafferty
<donal.lafferty@citrix.com> wrote:
> "VMOp"
>
> I'll give half my points to whoever explains 'what it is used for' as opposed to 'what
this is' :)

Kudos, if you found this on your own :)

So, if you try to understand the code, we're just trying to create
unique values for different variables and we chose a number and bit
shift to 32 fields to get the BASE a random (not so random :) long int
that can be OR-ed with incremental numbers, so we can have upto 2^32
unique numbers in the range of BASE, they could also have used any
whole number starting 1.
I don't think there could be any other reason :)

Regards.

>
>> -----Original Message-----
>> From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On Behalf
>> Of Rohit Yadav
>> Sent: 11 February 2013 09:43
>> To: cloudstack-dev@incubator.apache.org
>> Subject: 100 brownie points :P
>>
>> Riddles in codebase: see SerialVersionUID in cloud-utils, git blame and claim
>> your 100 brownie points.
>> Will post my four liner python solution after the designated 72 hours :P
>>
>> public interface SerialVersionUID {
>>     public static final long Base = 0x564D4F70 << 32;  // 100 brownie points
if
>> you guess what this is and tell me.
>>
>> Have fun!

Mime
View raw message