• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Winner of our coding contest for GeeCon, Prague event!

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Before getting to the winners of the coding competition for 1 free ticket and numerous tickets with a 30% discount to the GeeCon, Prague event, I would like to thank Tim Cooke, Campbell Ritchie and Paweł Baczyński for coming up with this idea of the coding contest. Also, a big thanks to all the participants who made this a success!

Free ticket winner

We, the moderators, had a discussion about whose post was the best from among the entries submitted and Adam Czysciak was the unanimous choice. Congratulations to Adam for winning a free ticket to the GeeCon, Prague event. I'll be sending you a purple mooseage with the details of the free ticket.

Adam had two entries:

http://www.coderanch.com/forums/posts/list/80/640281#2941278
http://www.coderanch.com/forums/posts/list/80/640281#2941279

and his entry with the "moose art" was very popular within the moderators http://www.coderanch.com/forums/posts/list/80/640281#2941279. Adam, that was a great post and rightly deserved to win the contest! Congratulations again. The organizers have decided that you too can get an additional ticket with a 30% discount (along with the free one) if you want to take a friend to the event! I'll get in touch with you privately to take this further.

30% discount winners

As noted during the contest, the organizers are giving away all participants, who submitted a valid entry, a ticket with a 30% discount. The following are those who have won the discount coupons:

  • M Ga
  • Robert LaValley
  • Jakub Milkiewicz
  • Pawel Szulc
  • Jim Young
  • D Tom
  • Joe Harry
  • Adalberto Toledo
  • vamsee priya
  • Piotr Kalinowski
  • subh kumar
  • Bell Katapa
  • Konstantin Shchepanovskyi
  • ludoviko azuaje
  • Lalit m Upadheyay
  • Guillermo Ishi
  • Dan Del Castillo



  • I'll be sending out purple mooseages to each one of these winners with the discount code details, in the next 24 hours. Congratulations to all the winners and have fun at the event! Remember, our Marshal Ulf Dittmer will be there too and you get a chance to meet him



     
    Marshal
    Posts: 4668
    305
    IntelliJ IDE Clojure Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Congratulations Adam, and many thanks again to all who entered. It was a hugely entertaining event!

    I have awarded a cow to my top 3 favourite entries. Moo!
     
    Rancher
    Posts: 43011
    76
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Congrats to Adam, and thanks everyone for participating! Anyone who comes to the conference is welcome to contact me, and I'll to set up a Ranch get-together.
     
    Ranch Hand
    Posts: 90
    5
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks! I'm glad you enjoyed my art
     
    Marshal
    Posts: 65425
    248
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Congratulations, and thank you everybody who took part

    AC: Please explain the text behind the moose art. You obscured it so well, we couldn't understand it. I know you are creating a class which incorporates a λ but haven't got farther than that!
     
    Adam Czysciak
    Ranch Hand
    Posts: 90
    5
    • Likes 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Well, this moose art is a compiled version of sample class doing all the calculations (in fact this class is a contest solution itself). I took .class file, gzipped it and Base64-encoded. So the main code first decodes and decompresses the String to get byte[] representation of .class file. Then I create inner anonymous class extending ClassLoader to be able to defineClass() - so that jvm is aware of my Class called '$'. Last step is creating an instance and calling the method '$' plus casting the result to desired Map.

    some tricks used:
    $: java identifier for byte[] array
    __ = '7' >> 8: __ is an identifier for total class length, the initialization expression is simply 0, it is incremented when reading decompressed stream chunks
    1<<('0'>>2) means 1 << (48 / 4) = 1<< 12 = 4096 bytes allocated

    $0x7F - ordinary Java identifier starting with $, could be "is" as well
    $.length>>0b1111 when calling defineClass means 4096 >> 15 = 0 (look at defineClass signature, this is starting offset)


    The .class file is a compiled version of this code:


    This "hidden" class could have been retrieved by decompiling the byte[] representation (althought I'm not sure if there are any jdk8 compatible decompilers yet).
     
    Ranch Hand
    Posts: 57
    Oracle
    • Likes 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Congrats Adam. The depths to which you went with obscurity deserved you the win.
     
    Ranch Hand
    Posts: 10191
    3
    Mac PPC Eclipse IDE Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Congratulations Adam!
     
    Bartender
    Posts: 11445
    18
    Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Congratulations Adam! I think your explanation deserves a(nother) cow! Moo!
     
    Campbell Ritchie
    Marshal
    Posts: 65425
    248
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you for the explanation
     
    Jaikiran Pai
    Sheriff
    Posts: 10445
    227
    IntelliJ IDE Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    A purple mooseage has been sent to all the winners. Please take a look at your purple mooseages here http://www.coderanch.com/forums/pm/inbox and reply back privately.
     
    Ranch Hand
    Posts: 789
    Python C++ Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The best man won! Obfuscated as hell and complimentary to the site owners to boot. Nice.
     
    Java Cowboy
    Posts: 16084
    88
    Android Scala IntelliJ IDE Spring Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Congratulations Adam and the other winners!

    I hope you will have a good time at GeeCon.
     
    Creator of Enthuware JWS+ V6
    Posts: 3292
    296
    Android Eclipse IDE Chrome
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Congratulations to all the winners!

    Adam: you definitely deserve another cow! (my brain gave up reading your solution...)
     
    Adam Czysciak
    Ranch Hand
    Posts: 90
    5
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks for all the cows folks The good news to all the other participants is that one of you still has the chance to get this free ticket Unfortunatelly I won't be able to attend GeeCON @Prague (I already miss that mug ), so one of you will be the lucky one. Enjoy!
     
    Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
    create, convert, edit or print DOC and DOCX in Java
    https://products.aspose.com/words/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!