Search This Blog

Thursday, March 08, 2018

Unsettling

There is something deeply unsettling about a fragment of code that has run every day for 402 days without failure - but on day 403 it fails and claims the problem is with syntax. The Gorse Fox was troubled. For a start it is a fragment of code written in Python. He is not fluent in Python... he can get by but finds the whole language construct to be obtuse. He started to dig. The problem appeared to be a variable that had not been set. Well, it hadn't been set for the last 402 days either and the code was happy then. Clearly some update has been applied to the underlying language libraries and this has triggered the error. The Gorse Fox made a couple of minor changes and the code burst back into life. Fortunately it's very design is such that it tracks back to find anything that may have been missed from previous days, so within a few seconds the whole kit and caboodle was working and bang up to date.

Maybe it's time the Gorse Fox played around some more with Python so he doesn't get caught out again. (Note he would have written the whole thing in Rexx if he had the opportunity but there is no Google API for Rexx).

No comments: