Over a million developers have joined DZone.

Java Puzzle – Are You up for a Challenge?

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

If you are anything like me, you have a sweet tooth for programming puzzlers. Ever since I first attended Joshua Bloch “Java Puzzlers” talk ten years ago, I have always enjoyed the feeling how a solution folds out throughout a well-crafted puzzle.

During the following decade, I have faced many real-world situations where knowledge about the nuances embedded into small puzzlers have helped me to solve real problems. So, besides being intellectually interesting, solving puzzles will also make you a better programmer. Now it is time for me to give my first try in creating a puzzle myself. Hopefully you are going to enjoy it as much as I have.

The puzzle is calculating a secret. As you might guess, your goal is to discover the secret. With the current version of the application it is going to take ages. How much exactly, we honestly do not know, but on a typical desktop we are speaking about years. Besides being terribly slow, the current version of the puzzle also is leading you towards a wrong secret.

If you are up for the challenge then your goal is to decrease the running time of this applicationbelow 30 seconds and discover the secret along the way. If you are able to solve the secret, you will have eternal satisfaction, knowing that you were able to conquer the almighty Java Performance Beasts.

To give more incentive to solve the puzzle, we are also adding copies of the Joshua Bloch and Neal Gafter “Java Puzzler” book as prizes. If you are able to solve the puzzle before December 29, 2014 you stand a chance to win one of the three books.

Test group we used to test out the puzzle consisted of 10 people. Among those, six were able to solve the puzzle, with solution times in between 20 minutes and two hours.

Good luck with the puzzle!

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:

Published at DZone with permission of Nikita Salnikov-tarnovski, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}