Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 240 of 427

A Quick Tip To Extract Data with RegEx

In a recent project, one of the features that I was working on required that the application make periodic calls to a third-party API in order to retrieve a piece of information to be used later throughout the application.

This piece of data changes over time (though the intervals are irregular) and the end point to which the application connects doesn’t return a standard XML, JSON, or the information in any other standard protocol. Instead, it returns a string of mixed HTML and JavaScript.

The piece of key information is prefixed stored in a JavaScript so it’s easy to get the proverbial bearings from the API’s response, but in terms of grabbing the unique data, it requires some work to extract the data with a regular expression.

Continue reading

Open Source Criticism (Closed Source is Better!)

This weekend, WordPress Lead Developer Andrew Nacin shared a link to a short, but interesting article from the CEO of Slack.

Though the article, in its entirety, is worth a read, one of the biggest points made in the article (and in the associated tweet) is:

I feel that what we have right now is just a giant piece of shit. Like, it’s just terrible and we should be humiliated that we offer this to the public. Not everyone finds that motivational, though.

For anyone who has worked in software for long enough to release something to be public (be it 100 users or 100,000 users), this statement is kinda validating isn’t it?

That is, for the majority of the programmers that I know (including myself) both online and offline, I rarely hear any of them talk about how proud they are of the entire architecture of their application. Sure, some talk about parts they are proud of, but more often than not, it’s more about the general problems they have with the current state of the entire system.

The interesting bit is that for those who care about what we’re doing, we try to read books, blogs, articles and discuss topics that go into building quality software. And software, in this sense, isn’t limited to a desktop application – this can be a mobile app, a web application, a web site, a WordPress theme, or even a small JavaScript application that runs in the context of a larger site.

Regardless, it’s easier to talk about how things should be rather than writing things how they should be. Good thing we have that whole refactoring bit, right?

But that’s beside the point of what I’m actually getting at. Instead, the point I’m trying to make is that I think open source software often times is far more harshly criticized than its closed source counterpart.

And why shouldn’t it be?

Continue reading

Making The Switch To Postmatic

Earlier this week, I decided to install the latest Postmatic beta on this site in order to give it a try. For those who aren’t familiar, Post Status has a great write up about it and you can watch the promotional video for it below:

In short, I think that anyone who manages a blog with any number of subscribers and commenters wants an easier way to manage their comments.

Maybe not. Maybe that’s just a few of us. But I know that I spend a significant portion of my day in my inbox, and I know that I try to respond to every comment that I get on this blog.

Sure, some fall through the cracks and that sucks, but having everything aggregated into email should alleviate that problem, right?

Continue reading

Yes or No To WordPress Frameworks?

Comments are closed on this post. Please leave your comments on the original article.

I don’t know if there’s ever been a time in WordPress-history where we’ve had such a plethora of options from which to choose as it relates to WordPress frameworks.

We have anything from drag-and-drop page builders to code-level abstractions that aim to make it easier to work with a variety of APIs.

But is using a framework always the best idea? Maybe. In my latest article on Envato, I weigh one of the pros and cons of using WordPress Frameworks in order to help determine if this is something that you may want to use or not.

Continue reading

A WordPress Plugin Boilerplate Generator

Since the release of the latest version of the WordPress Plugin Boilerplate, the top two things that people have requested are documentation complete with examples, and a generator to ease the pain of having to replace certain tokens throughout the boilerplate’s codebase.

And I’m all for it – I’ve even committed to begin providing this material in early 2015 (and not just via the project’s website, but a few other channels, as well – more on that later). The awesome thing about open source is the contributions that can come from other people.

Sometimes these come in the form of patches or pull requests, other times they come in the form of extensions, enhancements, and other types of projects that help improve the initial project.

It’s awesome, isn’t it?

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑