Good Architecture

Published by

on

Sometimes you code a thing and hate it while you’re doing it. You figure “eh, it’ll be fine, I probably won’t need to mess with this again” and for a while you’re even probably right.

The time has come around where you need to modify that thing with all the teeth. As you start you realize that the fragile thing you’ve created, wrestled with while you were making it the first time, and then forgotten about entirely, was in fact just waiting to come back and bite you.

In this case, the code Fracterebus shows you when you beat the game, which is called the verify code, was waiting to blow up. It keeps track of a bunch of things about the run through the game that you just finished, and I needed it to have 2 more things and to change its form a bit. Due to the complexity of the verify code, it was barely holding together as it was, but adding to it and changing its form was enough for it to blow up in my face.

I needed to revise my approach entirely and it took me almost a whole day of work to weave those changes through it. The cool part is that the structure of the verify code is now considerably easier to change and supports more features than before.

Previous Post