Refactoring my Launcher

Sometimes coding feels like Rimmer in the first episode of Red Dwarf. Like I’ve covered myself in this accumulated code and it’s a big mess of gibberish. There’s a temptation to slap down that palm-print and ship-it! Which isn’t always a bad thing. Most of the time though, a good refactoring is in order.

I intended to roll my own patching system into COOPERRATA’s launcher, but DarkPatcher from the Unity asset store seemed robust enough to handle the task. One problem: It has an expected flow for patching which is different from my original plans. So I could either kludge it in, or redesign my launcher.

This is a good excuse for me to take apart what I have so far and re-assemble it in a more orderly fashion.

I used to think refactoring was a chore and doing it right the first time was how the coding gods did things. Although perhaps that’s how Greek gods spawned so many tragedies– Well I don’t really know how it works for other people, but I’ve come to embrace iteration. Sometimes that means a good rewrite, or at least a rearrangement.

I enjoy refactoring now. Sure, it’s not as exciting as making something fresh, and it certainly doesn’t have that rush I get from prototyping. But there is a catharsis to it. I’m more comfortable about code I’ve written all over my body, after I’ve rewritten it a second time.

(Feel free to comment via Rog's G+ post: refactoring-my-launcher)