Practice WOD: CleanHelloMe

To prepare for this WOD, enable Checkstyle on the HelloMe Eclipse project you created during the above WOD. Notice how many errors are generated? The goal of this WOD is to learn how to efficiently get started developing Play applications that pass Checkstyle.

You might want to compare the play-new-passcheckstyle source code to your HelloMe project to see the differences.

In addition, before starting this WOD, you might want to tell Eclipse to open the default Text editor when editing *.scala files. To do this, go to Preferences General Editors File Associations. Then add “*.scala” as a file type, then associate it with the Text Editor:

Instructions

  1. Start your timer.
  2. Create a Play application called CleanHelloMe by downloading the play-new-passcheckstyle repository, then renaming the directory, the Eclipse project, and the Play project to “CleanHelloMe”. (To change the Play project, edit the build.sbt file, then invoke “reload” in the Play console to reload the project definition. See this screencast for details.)
  3. Now enable Checkstyle on your CleanHelloMe project. If there are any errors or warnings, remove them.
  4. Now edit the source code so that the resulting web application generates a page containing only the words “Hello, Me! I’m super clean!”.

Your application should present the following page:

In addition, your Eclipse project should not contain any Checkstyle errors or warnings:

When finished, stop your timer, and record how many minutes it took you to complete the WOD.

Rx: <5 min Av: 5-7 min Sd: 7-9 min DNF: 9+ min

Demonstration

Once you’ve finished doing the WOD a single time, watch me do it:

Standard WOD Caveats

You’ll learn significantly less from watching me solve the WOD if you haven’t attempted the WOD yourself first.

While it’s an achievement to finish the WOD no matter how long it takes, you might experience “diminishing returns” if you work longer than the DNF time. Thus, it might be strategic to stop working at the DNF time and watch my solution.

After watching my solution, I recommend that you repeat the WOD if you have not achieved at least Av performance. If so, be sure to:

Feel free to keep trying until you make Rx if that’s of interest to you.