envelopmenuskypeburger-menulink-externalfacebooktwitterlinkedin2crossgithub-minilinkedin-minitwitter-miniarrow_rightarrow_leftphonegithubphone-receiverstack-overflow

Show your Java refactoring and win a ticket to the GeeCON conference

Two weeks ago, in the Road to a more functional Java with Javaslang - example refactoring blog post, we shared a short demo of Javaslang Try capabilities . We know that any code could be improved almost infinitely, but for the purposes of our article we had to say "stop" at some point to show you some concepts of Try.

But what surprised us is that many of you (in the comments below the post, during conversations in various public Slack channels) actually took time to point out that our code could be improved even further or written in a much better way. And we completely agree! That is why we decided to organize a small coding contest where you could show your Java refactoring skills and win a ticket to the GeeCON 2017 conference in Cracow!

Rules

  1. Write Java code having the the same functionality as our original FacebookImage class:
    • Load the content of a website
    • Extract the first og:image from the meta tag in <head> section
    • Return a URL of this image
    • If there is no such page, in case of any exception or if there is no og:image, log a warning and return a URL of a default image as a fallback
  2. No library restrictions, just add them in build.gradle in a separate section to make merging easier :)
  3. Logic should be written in Java, tests can use any JVM language.
  4. Code could be object oriented, functional or a mixture of these two approaches.
  5. All your code (classes, interfaces, etc.) should be located in a separate package com.softwaremill.java_fp_example.contest.your_github_login where last part should be your GitHub username.
  6. Add MIT License file signed with your GitHub username (template file with readme is already in the repository)
  7. Share your solution as a Pull Request to our GitHub repo with your code, tests and signed license.
  8. The Pull Request should be sent before 23.04.2017 24:00 CEST.
  9. Full contest rules in Polish can be found here. If you have any questions, please ping us via konkurs (at) softwaremill.com or in the comments below.
  10. You have to be adult person from Poland.

Winner will be announced within 7 days after the contest end.

Prize

Our Java developers will analyze all solutions and pick the best one (i.e. one that has a nice design, good readability and generally conforms to "clean code" rules). The winner will get a ticket to the GeeCON 2017 conference which takes place on 17-19th May in Cracow.

Wrap up

The rules are pretty clear: write some code, create a PR and get a chance to attend one of the best Java conference in Poland. As simple as that, so do not hesitate, create your fork today and start coding.