If it’s raining, I must be on the computer

The last few days have been mostly rainy, so I’ve been doing things on the computer (as if I wouldn’t have been doing things on the computer anyway).

I got most of the District 101 Toastmasters code back in operation and talked with someone who would like to get involved in maintaining and improving it.

I fixed a “nonce error” in the code I use to extract selected entries from Tripit and put them on my Google calendar. The “nonce error” seems to happen if my code sends requests too quickly; I’d tried to fix it a few weeks ago by trapping the error, sleeping for a second and retrying the failed request, but the fix didn’t do anything. I found out the problem yesterday – a comment saying “Sleep a second” is not nearly as effective as actually calling the function to sleep a second.

We did manage a few walks between the storms (and during the storms, too!), so it wasn’t a completely sedentary weekend. And our neighbor’s tulips are blooming already, which is a nice sign.

Today I learned CSVs can contain formulas

I’ve been asked to help get the backend code I wrote for District 101 Toastmasters operational again. Toastmasters has made some changes to the code at their main website while I’ve been away; in particular, they no longer provide a CSV of information about all the clubs in a District, and my code wants to download that CSV and use it.

Instead of the CSV, now they provide a JSON file with the same information; I spent the evening writing very tedious code to extract the fields I need from the JSON file and write a CSV so that the rest of the code could use that CSV without my having to change the code.

I got the code working and loaded the CSV into Excel; everything was OK except the “Phone” column, which threw “#NAME” errors. After much head-scratching, I finally discovered that Toastmasters was giving bad data for the “Phone” column – values like “=undefined” or “=+1(408) 555-1212”. And that Excel was treating entries starting with a “=” as a formula, which, of course, didn’t work.

I patched my code to quote the “Phone” column and Excel was happy again; the data is still wrong (even on their “Find A Club” page), but I assume Toastmasters Central will fix it soon (it was OK a few days ago).

Sheesh.