Today is Refactoring Day!
Posted: Tue Jul 30, 2013 1:42 pm
For me anyhow.
It is that time when the adding of new features and cool ideas has to be brought to a halt before the code becomes too tangled to ever untangle. The time when unnecessary files no longer containing useful code clutter up the source directories. When major files creep up past the 500 LOC mark, when some source directories have more than a dozen or so lua files. All indicators that a bit of house cleaning and reorganization is overdue.
A few tips and tricks I've found useful:
Thanks,
Omnivore
It is that time when the adding of new features and cool ideas has to be brought to a halt before the code becomes too tangled to ever untangle. The time when unnecessary files no longer containing useful code clutter up the source directories. When major files creep up past the 500 LOC mark, when some source directories have more than a dozen or so lua files. All indicators that a bit of house cleaning and reorganization is overdue.
A few tips and tricks I've found useful:
- Searching for names in files: grep - on linux its easy, on windows WinGrep is handy.
- Tortoise Hg (source version control), right click context on windows and select rename to move files around.
- Break the process into steps and commit each step so if you screw up you can easily backtrack.
- Look at chunks of code that do similar things and see if you can't extract out a reusable chunk.
Thanks,
Omnivore