Thanks past-notleigh!

I thought I would have to make a small change to an old installation project today. One of the APIs it connected to needed course timestamps posted to it, and those times had to be based on the local time of the server. Obviously not ideal.

Fortunately it's now getting changed to UTC, but of course anything that relies on that API has to get updated. Because the worst programmer you have to deal with is yourself yesterday I assumed I would have just put the time zone offset in the service connection code with a //HACK comment in there.

It turns out past-me went one better, though I don't remember doing this at all. I had externalised the UTC offset in a text config file that goes along with the binary. All that was required was a quick note to the client to tell them which config variable to change.

I really do not remember doing it. This part was completed quite late on-site, but git blame said I did it the right way the first time.

I'm guessing it's just one of the practices for installation work that's just so ingraned at this point - externalise everything. I think that's partly come from it being just plain good practice, partly to give anybody installing the app some flexibility, and partly from the practical concern of having revisions that need to occur on-site and wanting to avoid having to recompile/redeploy.

In any case, thank you, past-me. You did present-me a solid.

Comments