Feed on
Posts
Comments
The DoubleDawgDare Series:

Patients already suffering from diabetes, heart disease or hypertension must acquire the physician’s prescription. get viagra without prescription Purchasing through online is the greatest method to obtain the quality item and you will also get savings that are buy cialis where numerous. But you need not worry as there are many pills which have been come up in the market to overcome the erectile dysfunction and premature ejaculation can also be treated using the device. ronaldgreenwaldmd.com viagra 100 mg There are several online stores where you can discount on cialis to live a normal sexual life.

GeePawHill takes on a horrific smush of legacy code

— real, not rigged —

and refactors it towards art.

—-


[download id=”9″]

8 Responses to “DoubleDawgDare Series”

  1. Jeff Grigg says:

    Re: “DoubleDawgDare 5: Pick, Pick, Pick”

    I notice that…
    Validation -> processValidationPlural
    Validations -> processValidationAnnotationSingular
    (annotation name -> goes to -> method name)

    So “Validation” is Plural, while “ValidationSSS” is Singular?

    To be more consistent with the other methods, I would probably call them “processValidation” and “processValidations”.
    _ _ _

    I noticed that the code in the “processValidationAnnotationSingular” method contains copies of the code in nearly all of the other “process*” methods. (Everything except DoubleRangeFieldValidator.) I would suggest deleting the unnecessary null checks from that code, and then for each “process*Validator” method, extract all the lines except the first into a method of the same name, and then inline the original method (back into the processSingleAnnotation method). I think you’ll like the effect this will have on the processValidationAnnotationSingular/processValidations method.
    _ _ _

    Looking through the class, I too have a very strong feeling that I would create a wrapper class for each annotation class, give them a common abstract base class, and then use reflection to find and create them and dispatch to them.

  2. Jeff Grigg says:

    Sincere thanks for the “Eclipse Java Code Formatter Settings” file.

    A suggestion: When I change “Line Wrapping -> General settings -> Maximum line width” to something larger than 80, I also change “Comments -> Maximum line with for comments” to match. (But maybe you want to keep comments shorter so they’ll be more readable?)

  3. Jeff Grigg says:

    Want to post a link to step #7 here?

    http://anarchycreek.com/2010/03/30/doubledawgdare-7-one-spike-no-buffy/

    It’s a great next step!
    Thanks!

  4. Jeff Grigg says:

    If this exercise gets you, the readers, excited, be sure to check out
    http://refactormycode.com/

    It’s a place where people ask for refactoring (and bug fixing) on a wide variety of small focused problems.

    I’ve been making a few small contributions there.
    – jeff

  5. […] as testing challenges, Weekend Testing or Testing Dojos, as well as Coding Dojos, Coding Katas, and Refactoring challenges. Skimming code to seek improvements has become as vital to me as testing a new application for […]

  6. […] really been enjoying GeePawHill’s DoubleDawgDare screencasts. They’re refactoring legacy code, not TDD, but he definitely has the TDD ethos, and – […]