WordPress Automation
The developer profession is going extinct?
Well… There are programs that can write programs. The code might be janky, but It’s better than the HTML DreamWeaver used to spit up.
Programs can code themselves because there is a “right” way to sort an array of numbers with 50 indices. Programs can code themselves because there is a “right” way to filter a list of 8 trillion objects by a specific property. Yes, you could spend time memorizing all the different sort algorithms, and their Big Os… or you could use something like JavaScript’s array.sort method.
Array.sort()
JavaScript’s Array.sort() is 5x better at sorting than most librarians
See? We’ve already automated this decision so we can focus on using the result. Granted, I do know my sort algorithms, but I prefer to use the sort() method because I’m a lazy developer. A lazy developer who prefers to delegate the decision of which sort algorithm is most efficient to a machine, because the machine is good at that. My lazy human brain is not.
Automation in WordPress: A stigma of hacker elitism
I recently hosted a San Diego Advanced WordPress meetup session and decided to focus the topic on automation. While preparing for the event, I realized that Automation is a highly-focused, tiny vertical in the WordPress ecosystem. It’s unfortunate that, in this space, automation is dropped into the “hack” category.
It’s ironic because, on one hand, “WP Automation” is the suite of tools that are “for beginners.” They let malicious web owners cheat the system, or give you an unfair advantage against the competition, who’s “playing by the books.”
On the other hand, “WP Automation” is the arcane knowledge of programmer trolls who scoff when they find out you don’t have your own custom wp-cli bash script for setting up a new site.
Really, automation exists in between these extremes and is already a cornerstone of developing with WordPress. For example, a plugin like WooCommerce automatically adds pages when it’s activated. By dumbing down the setup process, the user can jump straight to adding products and content, instead of spending valuable time on planning architecture design and overhead.
30 years ago, it was someone’s job to type handwritten memos - now we have spell check and (maybe regrettably) auto-correct. 10 years ago, if you wanted a taxi, you’d call a garage in some unknown part of town, and wait an arbitrary amount of time for the cab to (maybe) find you - now we have GPS-connected pocket computers, and dispatch REST APIs.
Automation is not a new concept to WP, it’s not a new concept to tech, it’s not a new concept to human progress.
It’s not a war against the machines
There’s a lot of news today about automation moving too fast, that it’s too disruptive. “My job’s going extinct” - sound familiar?
I disagree with that sentiment. The concept of automation is not the replacement of a person, but of delegating a task to something that is more efficient than you.The developer profession will always be a human task (at least in my lifetime), but that doesn’t mean developers should shy away from automation techniques. From code snippets in your IDE, to build tools, to RSS feeds triggering WP actions - embracing automation is not giving up at this, it is leveraging these incredibly powerful concepts to push your human skills further.
Resources and idea inspirators
I have to give major props to my friends who not only allowed me to pressure them into speaking, but also helped formulate the ideas in this post:
- Leon Magee: Automated Post Creation
- Jim Walker: Using IFTTT for Social Media Automation
- Joseph Abraham: Social Media Automaton for SEO
- Scott Stewart: Tools that Help Reduce Repetitive tasks
- Mike Payne : Automation - Building Reflexively with WordPress
- Austin Gil: Automation Scripts to Maintain Development Standards