Transients are a great tool for the WordPress developer. They allow you to easily save temporary data with their own expiry time – simply pass the transients data into the easy-to-use API and it will sort everything out for you. Caching made simple.
Unfortunately, using transients is not without its downsides and recent experiences have shown a couple of issues that any developer should be aware of.
Recently my WordPress plugin, Artiss YouTube Embed, was bought by a third party – a company named Applian Technologies Inc. They wanted the existing user base to help promote their video software products.
What happened, unsurprisingly, was that the plugin was re-branded and released with links to their site. This included a “download bar” – a series of 3 links which appear under each video. This was switched on by default but could be easily switched off in the settings screen.
Back in January I was a bit “offline” – Artiss.co.uk was certainly extremely quiet. There was a very good reason, though.
Back at the beginning of December I applied for a job at Automattic.I’d applied before but, this time, rather than just send my CV and a small, boring covering letter I thought I’d be a bit, I don’t know, dynamic. Here’s what I wrote…
Dear Automattic,
I’m David Artiss, a developer for 29 years (23 of those professionally, the rest as a teenager wrestling with 6510 assembly).
Although I write code for an antiquated IBM Point of Sale system during the day, my passion is for PHP, MySQL and, particularly, WordPress. The “Code is Poetry” mantra of WordPress is something I vehemently believe in. Coding is an art – it requires passion, imagination and creativity.
I have two blogs (a personal and a technology review blog), both of which are self-installed versions of WordPress. Although my technology blog uses a commercial theme it’s been heavily modified by myself (modifications which I’ve fed back to the theme’s author), including a complete re-write of their commenting system. I’ve also written bespoke competition and review software (which makes use of Rich Snippets to pass review details to search engines). Indeed, I am considering creating my own theme for distribution in the future.
However, it’s my work on WordPress plugins that I’m most proud of. I am the owner of 15 plugins (my username is dartiss), 14 of which I authored myself (the other I took over from the original author after he no longer wished to support it any further). My most recent plugin is Artiss Transients Cleaner, which I created after speaking to your own Andrew Nacin. I’d found an issue with the way transients are housekept within WordPress and confirmed with Andrew that this was a known problem. A change to Core is due, but with no current time-scales so I created this plugin to perform the suggested actions that will, eventually, be implemented within Core. Although I’ve not worked on Core, I believe this is a demonstration of the fact that I could do so ably.
I’m looking for a change in career and this is just the kind of role I’m craving. I’m more than happy working from home – it’s big, has lots of WiFi (I put extenders everywhere) and I’m on 80 Mbps fibre-optic. It would seem churlish to not make more use of it.
My CV is attached. It’s a bit dry, for which I apologise – I’m a bit more dynamic in person and even so more with my code.
I didn’t know if it was a bit too informal but my wife certainly liked it.
A couple of weeks later I was told I was to be interviewed but they had quite a queue so it might be a few weeks. That initial application was, I later came to find, stage 1 of a 5 stage induction process.
Stage 2 came a couple of weeks ago. I had an hour long Skype messaging (not video) conversation with one of their developers. This included some technical questions. I felt it went well, especially when I corrected him on a technicality. After the hour he was happy to move me to Stage 3 – a coding challenge.
I was given an existing plugin to improve in whatever way I felt. I had a week to do it. I turned it around in less than a week and spoke to my Automattic developer soon after. He seemed quite happy at what I’d done but there were a few issue he’s highlighted – security is particularly important to them. Again, I highlighted something he’d missed (he thought I’d not coded something and I had) so potentially gained some points for that (or annoyed him). He gave me a few days to change the code but I turned it around in a day and spoke to him the next night.
I was worried that rushing to make the changes I might have broken something. I didn’t. And the way I solved his issues had impressed him. I was now through to stage 4.
This is when it got exciting.
It even shows up on my WordPress notifications!
I was now officially working for Automattic as a contractor. The idea is that they pay you, per hour, to work on a project. The developer who you’d been assigned would keep an eye on how you’re getting on and let you continue on the project until they’d made a decision either way as to whether you’d failed or passed. This could be days or months.
I get a listing on Matticspace!
Automattic employees, whether contractors or not, gain access to a site named “Matticspace”. As people are scattered throughout the world this gives a private “base” for everyone to congregate online. This includes an employee directory, on which I was listed. Matticspace, though, can only be access via a convoluted set-up process that involves generating and submitting security keys from command line.
However, it was at this stage that it all ended. Not by Automattic but by myself. Bearing in mind I still had a full time job, a family and social life there was no way I could realistically fit in the work that they wanted me to (which, by the way, was to make changes to the debug mechanism for Automattic developers within WordPress.com). So I told them I couldn’t do it.
Stage 5 would have been a meeting with Matt Mullenweg, founder and president of Automattic.
At the very least, though, I can say, if for only a brief time, I was working for Automattic. It looks good on my CV too.
A number of my WordPress plugins make use of transients to cache data. However, I’ve had a number of people – mainly relating to Artiss YouTube Embed – highlight the large number of entries this is creating in their Options table. In the case of that plugin I implemented an option that allowed you to clear old transients down and even list the number stored.
Today I had a chance to investigate it further and found a large number of transients that had expired still in my Options table.