Refactoring the refactoring

Tuesday, the 29th of March, 2016

Taylor is waiting for you…

Tuesday, the 29th of March, 2016

Get ready for Tool Time (ugh, ugh, ugh…)

Tuesday, the 29th of March, 2016
empty image
empty image

Last night, as I subjugated my long-suffering partner Sam to yet another long, sufferable lecture about building Cuthbert – just covering the usual points, what a ridiculously big game it is, how I don’t think I’m doing it well enough, how I don’t know how I can do it better, why it’s important that he tells me it’s all going to be okay every four minutes, that kind of thing – he made a truly fantastic point.

I feel like the sentence ending there makes it sound like that’s a rare and special occurrence – it’s not. Sam’s a freaking genius. (Hi Sam!)

But the point was truly fantastic enough to warrant some drama: in my day job, I’m a web developer.

What?! Adobe Stock

That’s not the fantastic part, I already knew that.

In my day job as a web developer, we don’t all work on a single, amorphous blob – blobs are divvied up into far more morphous projects, which are run and managed by different teams. If, at my work (as a web developer), I was tasked with building something that holds and manages a load of data, I wouldn’t think of adding it to a blob of questionable morphousness. I’d build a tool so the team that managed the data would be able to get around it quickly.

That’s where the dramatic moment comes in – I’m giving more consideration to how efficiently hypothetical people work in an example situation than I am to my own self in my not-a-lot-to-spare time.

Because everything (apart from the stunning artwork, by L. Whyte) is being done by me – the writing, the coding, the… well, no, the game is pretty much those two things – I never thought about writing tools to manage the content properly.

Of course I’ll remember what t1_3_1_4_3_3 means, geez!

In the beginning, I decided it would make the most sense to keep all of the writing in flat files. It’s static data – while the game changes around your actions, what it changes to is something I’ve already written – so it doesn’t make sense to store it in a database, say. It would be more work to get it out and that would only slow the game down.

That still holds as logic, but truthfully I never thought about what it would be like to work on those flat files, how difficult they’d be to manage and add data to and try to find typos in. I’d just get on with it. I’m a developer, I know what I’m doing.

Adobe Stock

If there was a writer managing those files who wasn’t a web developer (and also me), I’d never think of asking them to work on the growing, messy files I’ve been trying to refactor into something smaller and easier to manage. Sam pointed out that, if I’m agonising over the best way of breaking up big, messy files, maybe I’m looking at the problem the wrong way round. And also he can’t tell me everything’s okay every four minutes, we both need to work and sleep.

Always good at spotting the flaw in a plan, that boy.

Since my 2016 timeline has been well and truly knocked off schedule with the unexpected house move, I think I can afford to spend a bit more time building tools that will help me manage content and save time down the line.

Maybe.

Probably.

Tell me it’s all going to be okay.