Develop WordPress plugins and themes using Docker

Developing plugins and themes for WordPress should be super easy — period. You shouldn’t have to care about installing a web server, fiddling with databases and virtual machines. It should be instantly available whenever the need exists. This is a small introduction to my setup using Docker when developing WordPress themes and plugins.

Continue reading

Programming Sucks

You are an expert in all these technologies, and that’s a good thing, because that expertise let you spend only six hours figuring out what went wrong, as opposed to losing your job. You now have one extra little fact to tuck away in the millions of little facts you have to memorize because so many of the programs you depend on are written by dicks and idiots.


Code Review Like You Mean It

Building a solid development workflow is very different now than it was a few years ago ((Basically before GitHub.)). The biggest improvements of workflow and the increase in quality is probably due to the concept of pull requests ((Called Merge requests in Gitlab and is basically a request to merge a branch back to the master branch, and has social aspects such as discussions and inline comments, perfect for code reviews.)), which has made code collaboration explode thanks to the decreased friction that goes into contributing to a project.

This article describe how to properly do code reviews and working with pull requests. Having a focus not solely on finding errors, but using it as a tool for learning and sharing knowledge, as well as for building a common code quality and coding style for an entire project, spanning all involved authors.

Spotify Engineering Culture

This is the first part of a video describing Spotify’s development process and it’s well worth the watch. It addresses challenges facing large scale development teams when using an agile workflow such as scrum or kanban.

PHP: The Right Way

There’s a lot of bad information on the Web (I’m looking at you, W3Schools) that leads new PHP users astray, propagating bad practices and bad code. This must stop. PHP: The Right Way is an easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web

Updated to WordPress 3.0-dev

I just updated to WordPress 3.0-dev which among millions of other things has support for custom post types! Movies and Galleries are natural candidates for getting their own post type, and bundled with custom taxonomies for each post type will be very interesting indeed!

Other cool things to look forward to include custom menus and a lighter admin interface, designed to keep you focused on the content.

Download WP Require Auth at WordPress Plugins

I created a small scratch-an-itch plugin called WP-Requre-Auth a while ago. Its purpose is to disable access to a WordPress blog if a user is not logged in. I am guessing the download statistics for this niche plugin will not exactly skyrocket, but now it is at least findable.

The Trac site is still available for bug reports, feature suggestions and donations, but the plugin itself is now hosted in the WordPress plugins site.

Require login to view a WordPress site

On a WordPress site I have setup, I needed the ability to require user authentication before allowing anyone to view the website. To do this, just add the following snippet to the theme files:

global $user_ID;
if ($user_ID == '')
        header('Location: wp-login.php');

Now you will be greeted with the WordPress login page when entering the site without being authenticated! Note that if you want to be completely sure that no one can retrieve any information without authenticating, you need to either modify the WordPress core files, or use some other type of authentication outside of the WordPress code, such as a basic auth in the webserver.

Edit: I created a WordPress plugin which does this in a much better way – WP Require Auth plugin.

Bought Coda in a big sale

CodaI have long been looking for the perfect editor for my Mac. Ever since I bought the latest Macheist bundle I have been using Espresso, which has been working fairly well. It is a very immature editor though with lots of essential features missing.

I heard that Panic is having a sale on Coda (hurry, two days remaining!) so I decided to get buy it immediately, since it seems to be a very competent editor with a solid reputation.

My first experiences have been very positive! It has innovative features, looks good and does its job very well. I especially like the excellent Subversion integration and remote support via FTP, SFTP etc.

When I have used Coda for a week or two, I’ll write a proper review with images and everything.