The Holy Java

Building the right thing, building it right, fast

Posts Tagged ‘exercise’

Refactoring Spikes as a Learning Tool and How a Scheduled Git Reset Can Help

Posted by Jakub Holý on November 21, 2011

To learn how complex your code base really is and how much effort a particular refactoring might require compared to the initial expectations, follow these steps:

  1. Schedule git reset --hard; git clean -fd to run in 1 hour (e.g. via cron)
  2. Do the refactoring
  3. WT*?! All my changes disappeared?!” – this experience indicates the end of the refactoring :-)
  4. Go for a walk or something and think about what you have learned about the code, its complexity, the refactoring
  5. Repeat regularly, f. ex. once every week or two – thus you’ll improve your ability to direct the refactoring so that you learn as much as possible during the short time

Read the rest of this entry »

Posted in General | Tagged: , , , , | Comments Off