Practice WOD: DigitsTelephone

The goal of this WOD is to practice the creation of new Scala templates for application-specific situations. In this case, you will create single line containing two form controls: a telephone and a telephone type:

Instructions

Create a revised version of your Digits application in which you put the telephone number and telephone type from the last WOD on the same line.

  1. Start your timer.
  2. Create a new branch off of your last WOD. Name this new branch “DigitsTelephone-1″, indicating that this is the first attempt at the DigitsTelephone WOD.
  3. Enable checkstyle.
  4. Create a new template in the bootstrap3 directory called telephone.scala.html that combines a telephone number and telephone type in a single form group that spans 12 columns.
  5. Place the error text directly under the form control. Test to make sure error text shows up correctly.
  6. As this is a domain-specific control, you can hardwire labels and so forth if you wish to simplify the parameter list.
  7. To end the WOD, commit the working code to your branch.

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

Rx: <20 min Av: 20-30 min Sd: 30-40 min DNF: 40+ 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.