Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Java Puzzle – Are You up for a Challenge?

DZone's Guide to

Java Puzzle – Are You up for a Challenge?

Free Resource

Just released, a free O’Reilly book on Reactive Microsystems: The Evolution of Microservices at Scale. Brought to you in partnership with Lightbend.

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!

Strategies and techniques for building scalable and resilient microservices to refactor a monolithic application step-by-step, a free O'Reilly book. Brought to you in partnership with Lightbend.

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.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}