Got too bold in refactoring (Point was to make a first step, not run a marathon)

Yesterday I continued my refactoring of the ISP/VoIP billing and provisioning system... and went too far. I realised I went too far around 4pm, then stayed up past 2am trying to scale back to a reasonable change-set.

The problem basically was that I got so into the project that I started fixing every problem simultaneously, descending into the madness of trying to make a perfect user-written application... and thus a far too general application, verily even unto the threshold of an application framework, some might say, the dawn of a new language.

When I got to the point where I was defining database-based meta-classes and then generalising to allow for meta-meta classes it became obvious I'd gone too far.

This afternoon I'm going to attempt to scale back to the original idea, just unify the 6 or 7 different package-types with one shared ID-type that can be referenced when we want to reference anything-billable. Get that working first then worry about the rest of the machinery.


  1. kumar303

    kumar303 on 11/17/2006 12:20 p.m. #

    the way I like to refactor is to take the 3 or 4 "objects" (py modules, classes, whatever) that need refactoring, run the tests for them that pass. Do my dirty work quickly - in and out - until the tests pass again. Make sure the full suite passes. Commit. Repeat. But if you get interrupted in that process by new features, bug fixes, etc, then you have to start branching and that can get ugly.

  2. What about chairs???

    What about chairs??? on 11/18/2006 6:25 p.m. #

    I like kumar303's suggestion for refactoring, but there is a much more basic problem that you are all ignoring. Your chairs!<br />
    <br />
    How much effort and elegance do you, Mike, put into PyOpenGL ctypes compared with how much effort and elegance went into the chair that tortures you for hours each day?<br />
    <br />
    We programming types think we're so smart, but actually we're just distracted looney little nerds doing crossword puzzles while walking across the street, not paying attention to the MOST BASIC problems before us.<br />
    <br />
    Why isn't there a good chair in our lives?<br />
    <br />

  3. Mike Fletcher

    Mike Fletcher on 11/20/2006 11:05 a.m. #

    Actually, at home I have a decent lowish-cost task chair ($300 CDN). At the cafe, of course, I'm sitting in a cafe-style chair. Interestingly the difference in my fatigue after a day is almost all varying with posture and stress, very little effect wrt which chair I sit in (though the one at home is a little better for a regular day).<br />
    <br />
    Regarding the refactoring. Yes, what I was planning to do was to pull out a tiny bit (a single field) and work on that, then get all the tests working. What happened with that is that the field is so "key" in the system that changing it largely rewrote the application.

Comments are closed.


Pingbacks are closed.