This week, we had a provincial statutory holiday here in BC, simply called Family Day. As a freelancer, every day I take off is a day I'm not getting paid, but I save up every time I pay myself to make sure I can take off stat holidays, sick days, and vacation time. So on Monday we ventured to downtown Vancouver to get out of the house, eat some good food, and see new sights. Our boys love asking a billion questions, so I figured downtown would give them lots of things to talk about. I had an awesome burger at Local, while the rest of the family enjoyed items off the brunch menu. After that we had to go get ice cream from Soft Peaks, and it did not disappoint. It was still pretty cold out this week, so the boys were bundled up with toques and gloves on as we gallivanted around downtown, warming up in some stores as we went along. After we finished downtown, we also stopped at the Bloedel Conservatory to look at the flowers and birds in a tropical dome. Upon Jack’s insistence, we were persuaded to add the Lego store as the final stop of our itinerary.
With Monday off, it does make the rest of the week very busy, because even if I only book 4 days of work I still need to deal with my normal weeks work of admin, emails, and content writing.
The big project™
Half the week was spent improving the work I had started for pulling Google Places data from the Google Places API and using WordPress cron scheduler to automate the update of that data on a regular basis. I also added a new manual button for triggering the update of one post’s meta data from within the classic post editor screen. The most challenging part of the task was getting the cron hook properly established within a PHP class. I ended up doing something like this. If you are working with scheduling Cron events in WordPress I recommend checking out WP Crontrol by John Blackbourn, the same developer who created Query Monitor that we have discussed before when improving WordPress performance.
Teach for Canada
A few new bugs were brought to my attention and squashed as quickly as I could find them, and then I started working on modifying a large survey used by teachers working through the Teach For Canada application process. Because the original developers of the Laravel application tool built the surveys and forms in a very static way it means every new question field is manually added to 7 files in probably a total of 12 places across those files. To me that is a crazy and very error-prone way of doing things. Yes it does work, but for a form that changes every year and sometimes throughout the year it takes a lot more time to add new fields or remove fields from the forms. I would love to build a flexible system where new fields could be added in one spot, appear where they need to appear, and each of the PHP controllers and Vue components can loop through the fields, even if they have complex conditional logic and advanced validation callbacks. I don’t know if I will ever be given the time to overhaul the system, but I imagine that long-term it would pay for itself.
To help make sure I don’t miss anything, I created a simple grid in Google Sheets where I can mark off what fields I have done the work in which files. So as I work my way through all the fields in each file my column and row grid will go from red to green (via some pretty conditional formatting).
Other than the big project and TFC, the only other client work I did was attempting a fix to the ISSBC registration page where it would sometimes display very cryptic error messages when registration was submitted. It seemed like it could be due to their page caching plugin, so I tried to exclude our registration page from the cache and hopefully that has helped.
Next week, I’m back to the full five day slate of work and quickly realizing that there’s only 4 work days left in this short month with a bunch of hours I need to cram in before March 1st.