Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default Christmas Challenge: Day 3

    Today's challenge is a little bit different, as you may be able to tell by the differing forum there will be some coding going on today. Nothing too complex however.

    Simply, you must create a PHP script that can create a 1000 digit long pseudo-random number, you may not use any randomizing functions or hashing functions and the script must be self contained. The number must be generated and not pre-defined. Some ways to create a pseudo-random number:

    Product of time of day, date, and other frequently changing system variables. Points for creativity and for the amount of entropy the number has. In order to test the entropy I will be taking three runs of the script and seeing how far ZIP archiving will compress it. If the data is completely random then there will be no compression. Using pre-established formulas to generate pseudo-random numbers is allowed however will be severely penalised.

    Final entries this time tomorrow, I will try and have the winner of the VIP decided early evening.

    Note: This is not an official Habbox Competition.
    Chippiewill.


  2. #2
    Join Date
    Nov 2011
    Location
    Malaysia
    Posts
    611
    Tokens
    123
    Habbo
    twinart

    Latest Awards:

    Default

    OMG! This is hard. Good luck to all who're joining.

  3. #3
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Not sure how to submit.. in private or on here? Here's the code:

    http://pastie.org/2959651

  4. #4
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    Not sure how to submit.. in private or on here? Here's the code:

    http://pastie.org/2959651
    Yes please post in the thread, unfortunately you're not allowed to use hashing functions (Unless you actually made the function yourself..)
    Chippiewill.


  5. #5
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Hmm, okay. You said no hashing functions, here it is again but with an encoding function, base64.

    You're not a programmer so I wouldn't expect you to understand thesillinessof your hash rule. Hashes are no where near random so it wouldn't be spoiling the competition. Every hash with the same value is the same.. hey will be MD5'd the same every time, no randomization there.

    Base64 is encoding, not hashing.. and that wasn't in your rules.

    I'd figure with a competition such as this, you would have got a real programmer to come up with the rules.

    http://pastie.org/2960590

  6. #6
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    It wasn't the randomness of the hash function I was worried about, it was the lack of resemblance between the hash and the value used to generate the hash, makes it too easy, in hindsight I should have asked someone a bit more wiseup about the rules but it was a bit of an afterthought.
    Chippiewill.


  7. #7
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Anyways, agree that my Base64 method is acceptable?

  8. #8
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    Anyways, agree that my Base64 method is acceptable?
    Technically it's against the intention of my rules but I'll let it slide. No bonus points for creativity however.
    Chippiewill.


  9. #9
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Haha seriously? I give up on you. You're a non-programmer judging a programmer's work, I don't see how you could determine creativity.

    Would you enter the competition? I'd love to see yours.

    What's creativity to you? Using a random number to generate a pixel filled bitmap image, pulling a certain section out, analyzing the pixel's color attributes based upon the random colors that were assigned and using that to create a number?

    I believe your tests should calculate the actual randomness of it. Run tests for like 100 digit numbers, 1000 times. Calculate how many times the numbers get within like 3 of each other. Give that a percentage.

    Your method of creativity is just stupid. Trust me Oh how the D&D section has went down. Be thankful that you wasn't an original 56er.

  10. #10
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    I believe your tests should calculate the actual randomness of it. Run tests for like 100 digit numbers, 1000 times. Calculate how many times the numbers get within like 3 of each other. Give that a percentage.
    Compress-ability is a test of randomness.

    Quote Originally Posted by Dentafrice View Post
    You're a non-programmer judging a programmer's work,
    Not strictly true, I may not post in the D&D forum often and I'm certainly not an avid coder, however I have worked on web projects for my game servers.
    Last edited by Chippiewill; 03-12-2011 at 09:28 PM.
    Chippiewill.


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •