Randy Anderson is a WordPress Developer at X-Team. He lives in Huntsville, Alabama with his wife and young daughter. In this interview, he talks about what it's like working as a WordPress developer, what he likes about it, which challenges he's faced, and which lessons he's learned.
What are you currently working on? Walk me through a day-in-the-work-life of Randy.
My current client job is to migrate an existing site to a custom WordPress theme that will provide a user-friendly content editing experience, while allowing for the client's developers to add new features with known technologies.
After hiring a marketing consultant, the client discovered that the way their current site is built is not so user-friendly. Adding or editing content on the site always required the help of a developer who had to be pulled off client projects. WordPress is the solution to their problems. It will allow their marketing consultant to make highly customized changes while at the same time giving their developers a high level of control and functionality if they want to code a new feature on the site.
In terms of my every day, I wake up, make some pour-over coffee (I could talk all day about delicious coffee), eat some breakfast while playing with my 16-month-old daughter, and then get to work, usually around 8 AM or so.
I have my day’s project tasks listed out on my calendar, and I know exactly what features I am working on that day. I’ll check Slack for any updates from the client team, or any requests from X-Team, and then I get started on today’s task. I’ll generally work for about 3-4 hours before I break for lunch.
After lunch, I might run some errands or go to a park with my wife and daughter for a little while. Recently we bought season passes to a nearby pumpkin patch, so we’ve been enjoying the slides, trampolines, and petting zoo there! I’ll generally get back to work around 2:30 or 3, and work until 5:30 or 6.
After helping with dinner, cleaning up, and more family time, I’ll jump back on the computer around 8:00, and finish up any tasks that are lingering for the day, as well as write my notes for tomorrow and report the day’s work in my X-Team journal.
Because my family is so young, I love the flexibility that I have working with X-Team. I can take the time I need to help or just spend time with my daughter, and then work on my project later that night to make sure I’m on schedule with my tasks. I also find that I work better in chunks of time rather than one long, 8-hour workday, and I can plan my tasks to make this work. Of course, I’m always available to chat with a client if needed, and I’m never out of reach on Slack.
What's the technology you like working with most and why?
I love working with WordPress, and I know that makes a lot of developers a little queasy 😀. I love it because it's one of the most versatile content management systems available. You can scale it up or down in complexity according to a client’s needed. I’ve created highly customized apps that keep up with employee’s time-tracking, invoicing, and expenses, as well as a simple brochure website with four pages for a roofing company, all with WordPress.
Yes, the technology (PHP, MySQL, HTML/CSS/JS) and methodology that it uses are a bit old, mainly because they are trying to be backward-compatible, but WordPress has come a long way in many areas. The new Gutenberg editor allows developers to create fancy, new React-based blocks for users to help create their sites, while WP-CLI allows developers to quickly perform admin and site tasks from the command line.
Additionally, the Roots team is creating a better way to develop in WordPress by changing the folder structure, improving common workflows, and therefore increasing security and manage plugin files with Composer.
I am excited about where WordPress is heading. It is the most-used content management system and the group of users who maintain the core are always trying to find ways to make it better, while preserving what was great about the earlier versions. Also, from a UI point-of-view, I can't think of an easier-to-use system for your website. I’ve also heard from countless clients who were so relieved to learn how easy it was to update their site with WordPress.
Tell me about the most challenging bug (or challenge) you faced this year and how you solved it.
Back in April, I was working on a client’s website that used a WordPress plugin called Ninja Tables, which allows you to write your own custom MySQL queries to collect the data you need from the database. The query I was trying to write was a particularly hard one: I needed to grab very specific posts that were attached to very specific metadata. I was so used to running WP_Query in WordPress, which automatically writes the MySQL for your query, that when it came to writing a complex query I was struggling.
To be fair though, I was also working with a programmer who had been working with PHP and MySQL for 20 years, and she was stumped too.
On day two of trying to fix the query, I remember wanting to take a step back and make sure that the progress I thought I'd made on the query wasn’t what was holding me back from the true solution, which might be found a different way. So I decided to spend the day brushing up on my query-writing skills.
I then decided to save my current progress, but try a new approach as well and see where that got me. Near the end of the workday, and after creating several LEFT JOIN’s and WHERE clauses that contained MySQL functions, and a combination of a lot of trial and error from both of the paths I tried, I solved the problem and was able to retrieve the correct data. Woohoo!
What were some of the biggest lessons you've learned this year?
One of my biggest lessons is that all code can be refactored to be more concise. While working with my first X-Team client, I met a programmer who was brilliant at refactoring code.
She could take several classes that seemingly had little in common, find common attributes and elements, abstract the classes, and make them easier to work with and understand. She taught me to always view code not as it is now, but as it might need to be in the future. If it might be reused one day in the far future, let’s make it easy and reusable now!
The second biggest lesson actually piggy-backs off of the first lesson: you can work too hard on refactoring something. Sometimes the best thing to do is write the code, get it in working shape and organized, and move on to the next task.
I believe the key to a good balance of beautifully-written code and moving swiftly through a project is time and task management. If you can schedule out your work before you start and include a healthy margin of extra time for bugs, you know exactly how long you can work to make your code shine before you need to move on to the next task, so the project isn’t delayed.
Great lessons! Thank you for your time, Randy.