Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 34 of 427

Building Backcast, Part 1

TL;DR: I listen to quite a few podcasts and want to make sure that I’m backing them up for posterity. There are apps for this, yes, but I’m a fan of reading how other developers work on their projects. I’ve never written about building something from the ground up. It’s personally edifying and it helps others who are also building things, as well.

This is the first post in a series in which I will talk about building a small application (that will eventually be a WordPress plugin) for backing up podcasts as provided by an XML export from Overcast.


This may be a painful read for some who are experienced developers (so maybe don’t read it). Or maybe it won’t be. But one of the things I recently heard, in a podcast no less, sums up both the point of this project and the project I’m working on:

[the podcaster] simply created a type of show he wanted to hear and hope others shared his taste and a similar desire. 

I, like many of you, am a fan of listening to podcasts and do so for a significant amount of time during my week. My favorite podcast application is Overcast which provides an XML export of all of the podcasts to which I’m subscribed and to the episodes of each podcast.

For a long time (as in over a year which, given last year, has felt like a long time), I’ve wanted to work on an application for backing up my podcasts with the ultimate goal of turning it into a WordPress plugin.

But then I had the idea that maybe I’d start from scratch. And I don’t mean “software developer scratch.” I mean starting from nothing.

  • No web server,
  • No database,
  • No libraries,
  • Just an IDE and PHP,
  • And then I’ll go from there.

Like anyone, the time to work on stuff like this is limited, but this is something I want to build for myself. And given that I like to read other people’s experience with doing this kind of stuff, I’m going to share the process from beginning to end.

I hope to document all of the little problems, frustrations, idiosyncrasies, good ideas, bad ideas, and random thing that go throughout the process of putting this thing together.

So if that sounds like something interesting, then feel free to continue reading.

Continue reading

Writing PHP Command-Line Applications: Command-Line Arguments

TL;DR: $argv is an array of arguments passed to the script with the first index being the name of the script itself. And $argc is the number of arguments passed to the the script (which will always at least be 1).


Arguably, pun intended, one of the key pieces of command-line application is making sure that they are interactive through command-line arguments. In PHP, there are two variables to understand:

  • $argc is the number of arguments passed to script. Note the script’s filename is always passed as an argument to the script, therefore the minimum value of $argc is 1.
  • $argv is an array of arguments passed to script. Note the first argument $argv[0] is always the name that was used to run the script.
Continue reading

Writing PHP Command-Line Applications: A Basic Script

TL;DR: I’ve been writing PHP command-line scripts to help automate mundane tasks. As these tasks are growing in complexity or turning more into applications that interface with third-party APIs, I’m documenting the things I find important that others may also find helpful.


There are three things necessary to get a basic script up and running on your local machine (assuming you already have PHP installed):

  1. Know the path to the PHP binary,
  2. Make sure your script references said binary,
  3. And make the script executable.
Continue reading

An Introduction to DevKinsta

TL;DR: For how much this post may sound like a paid or promoted review, it’s not. The short of it is that I’ve been hosting this site on Kinsta for a few years now and I’ve been happy, and continually impressed at their offering so when they announced their DevKinsta application, I was just as interested to try it out as I have been with Local, Valet, MAMP, and others.


In short, DevKinsta bills itself as a way to:

Design, develop, and deploy WordPress sites from the comfort of your local machine. DevKinsta is free forever, and available for macOS and Windows.

Kinsta

But rather than walk through whatever videos and other collateral the site has to offer, I thought I’d go through the process of setting it up from download to site setup, from creating a site, to loading it in a browser, and taking a look at how everything is set up within the file structure.

Continue reading

I made a goal for myself in January 2020 to stop using Google products by the end of the year. That might sound like way too generous a timeline, but Google owned pretty much all of my data at that point, so it was a fairly large project. Plus I’m a slow and steady kind of person. I know if I give myself a generous enough timeline I can accomplish even things that seem too hard for me at first.

via Kira McLean
« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑