Portfolio and Technology Blog
by Kevin Boyd

Beautiful PHP

Every once in a great while, there comes an inspiration the likes for which the world has been heretofore unprepared.

BeautifulPHP is one of those inspirations.

I've owned the domain since March 1st, 2015, but until last week I had been struggling to find a purpose for it beyond a pure joke. You see, I actually do feel that PHP deserves some accolades. A lot of people tend to bash it, the same way that I've caught myself bashing Perl. And Java. And Python. And C++. And Dot-Net. (They're good languages, Bront.) Except when PHP gets brought into the fray, things get waaaaay out of hand.

Read more of this post »

March 1, 2018

Tags: coding, dev, development, php, opinion, computer-history, fun, projects

Who Watches the Watchmen?

I'm a contributor to the Sculpin open source project. Sculpin is a PHP-based static site generator that helps you create blogs or informational websites. Posts and pages can be written in Markdown or HTML, and it uses the Twig template library to provide enhanced functionality. The best part is, the resulting output is static - it can be hosted on any HTTP server, including AWS Simple Storage Service (S3), without having to worry about maintaining databases or other headaches.

When users create sites in Sculpin, they often use it in --watch mode. In this mode, Sculpin runs as a simple PHP server that watches the filesystem for any changes to your blog posts, pages, and templates. When it detects a change, it regenerates the affected HTML files. It's not speedy enough in this mode to serve the site to the Internet - plus, it only has a single process - but it's great for development and local testing.

Earlier this week, a bug was reported on Sculpin's develop branch, where the watch process wasn't properly applying changes to inherited templates. I had to go to some creative lengths to solve it, and while I'm not entirely certain that my proposed solution is the proper one, it contains at least one thing worth blogging about.

Read more of this post »

February 22, 2018

Tags: sculpin, coding, dev, development, php, howto, utilities, debugging, testing, command-line, phpunit