Additional idea:

On
Saturday, 2014-11-15 there is the
http://globalday.coderetreat.org/

usually the "Game of Life" is coded ( we might do so to sharpen our Python 
skills ),

but there is a special version of CodeRetreat, 
called "Legacy Code Retreat",
where we might take code from "our" product and improve it

See
http://www.jbrains.ca/legacy-code-retreat
http://blog.thecodewhisperer.com/
http://www.legacycoderetreat.com/
http://legacycoderetreat.typepad.com/

Tasks 
 1 Golden Master 

   - The Code Whisperer "Surviving Legacy Code With Golden Master and 
   Sampling" 
   
<http://blog.thecodewhisperer.com/2014/09/28/surviving-legacy-code-with-golden-master-and-sampling/>
   .
   - Refactor your code but don´t break anything ( the original output, the 
   tests,..).
   
 2 Pullup & Delegate 

   1. Introduce a superclass “A extends B” ( e.g. “Game extends 
   SpecialAspectOfGame” ).
   2. Pulling methods & instance variables.
   3. Replace inheritance by delegation: “class A() { B b; };” 
   
 3 Extract Pure Functions 

   - The Code Whisperer "Rescuing Legacy Code by Extracting Pure Functions" 
   
<http://blog.thecodewhisperer.com/2011/11/27/rescuing-legacy-code-by-extracting-pure-functions/>
   .
   - Steps:
   1. Step #1: Find code which can be made stateless.
      2. Step #2: Extract into new methods.
      - All input via parameters.
         - Output in return value.
          3. Result: The method is stateless, if you can make it static.
       
Sincerely
Rolf

Reply via email to