Wednesday, February 15, 2012
A couple quick lessons I learned while refactoring: (these are also useful ideas for how testers might model bug appearances or doubt representativeness of one or several results, overcoming representativeness bias).
- Ask "where else?"
- Search for the affected function names
- Loop back to the top of the file
- Take a moment to slow down and ask if there are other changes
- Is this statement or construct unique or does it occur elsewhere?
- When adding something in a lot of places, wrap around until you come back to a starting point.
- Don't just go to the end of file.
- Ask how this refactor, even if small, might affect the quality criteria (see CRUSSPIC STMPL)