This is the second part of The Tree of Life series. You can read the first post here.
This is one of the more involved and more interesting HackerRank challenges I did. These posts will describe how I have arrived at my solution. I don’t claim to have found the perfect solution. In fact I have found some weak points in my code and will note them in these posts. Needless to say you should give it a try yourself before reading this.
I have been training Heavy Duty style since October 2013. It took me some time to unlearn volume training, and leave more is better mentality behind. I am not using unlearning as a purely intellectual activity here. Mike Mentzer’s teachings are clear and logical. But when it comes to weight training your body needs to chew on the ideas too. Unsurprisingly I made mistakes in my first few (3 to 6 month long) cycles. But then I got the hang of it. I can now say, with confidence, that Heavy Duty Training works for me. It works damn well.
Just a few tips on using Guice. If you are not familiar with dependency injection this post might make little sense. I hope this will be useful for those of you who are interested in well organized and testable code.
Socko is a library that provides a web server which talks Akka with the rest of the application. I am not sure about the lightweight claim on its website, but it certainly delivers on the embedded claim. Just add it as a dependency and create a WebServer. You are not forced to use a special command-line tool. You are not forced to use a specific build tool. This is but important because I am interested in technologies that provide functionality without dominating my architecture.