Everything you’ve ever wanted to know about dealing with Codeable.

If you have been following my blog you will know that I was accepted as a Codeable Expert in late 2015. I’ve since spent a fair amount of time espousing the advantages of working with Codeable.

Now, one of my Codeable colleagues, Robin Scott from Silicon Dales has written what is probably the most extensive tutorial on working for and with Codeable. As a developer and owner of his own development agency, Robin has the unique perspective of having seen both sides of the Codeable coin, both as a Codeable expert and client.

It really is an amazing read and not only describes the experiences of both a Codeable client and expert, but shares some common tips and pitfalls of hiring through Codeable as well as being hired as an expert.

If you are looking to hire a Codeable expert to help you complete your next project I highly recommend reading this article.

Filed under: Development, Freelancing, WordPressTagged with:

Setting up the PHP Code Sniffer with WordPress Coding Standards Integration for PHPStorm on Ubuntu 17.10

(aka the longest blog title I’ve probably ever written).

Recently I reinstalled my laptop with Ubuntu 17.10 (Artful Aardvark). I’ve been wanting to upgrade since it was released in October to try out the updated Gnome interface since Ubuntu officially dropped the Unity interface for the latest release. Usually I stick with the LTS releases but the draw to try out the new, shiny thing was too much.

As I have adopted PHPStorm as my development IDE this meant I had to set up the PHP Code Sniffer and WordPress Coding Standards integration again. I remember this being a bit of a pain when I did it on my 16.04 install.

The Jetbrains documentation about WordPress Development using PhpStorm (specifically the section on  the coding standards) was written back in 2015 and the issues I had were mainly due to different paths for newer PHP/PEAR versions, so I thought I would document the updated process here.

Step 1) Install PHP Code Sniffer via the PEAR package

sudo pear install PHP_CodeSniffer

I could probably have done this using either the PEAR package or by using the Composer package but I found that the Jetbrains document refers to the location of the Code Sniffer sniffs using the PEAR method and I already had PEAR installed, so it was easier for me to use this method. At some later stage I might try the Composer method.

Step 2) Determine the location of the PHP Code Sniffer Standards

In Ubuntu 17.10 with a default PHP 7.1 install the Standards are located in the following path:

/usr/share/php/PHP/CodeSniffer/src/Standards

Step 3) Clone the WordPress Coding Standards GitHub repository

In this case I simply cloned this repository to the root of my home directory.

git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git

Step 4) Copy the relevant Coding Standard to the PHP Code Sniffer Standards location determined at Step 2

I copy all the available WordPress Coding Standards, and merely enable WordPress-Extra for my projects. I am thinking about enabling WordPress-VIP for some extra fun, but I’m not sure I’m brave enough to be shouted at by my IDE…

cd ~/WordPress-Coding-Standards
sudo cp -r WordPress /usr/share/php/PHP/CodeSniffer/src/Standards/ 
sudo cp -r WordPress-Core /usr/share/php/PHP/CodeSniffer/src/Standards/ 
sudo cp -r WordPress-Docs /usr/share/php/PHP/CodeSniffer/src/Standards/ 
sudo cp -r WordPress-Extra /usr/share/php/PHP/CodeSniffer/src/Standards/ 
sudo cp -r WordPress-VIP /usr/share/php/PHP/CodeSniffer/src/Standards/

Step 5) Enable PHP Code Sniffer with WordPress Coding Standards in PHPStorm

First step is to enable PHP Code Sniffer in PHPStorm. To do so you’ll need to know where phpcs is installed. Run the following from your command line to find out.

which phpcs

Mine is located at /usr/bin/phpcs.

In PHPStorm, go to your Settings screen (File->Settings or CTRL+ALT+S) and navigate to Languages and Frameworks -> PHP -> Code Sniffer. Next to the Local Configuration click the browse button and enter the path to phpcs in the PHP Code Sniffer (phpcs) path field. Hit Validate to make sure PHPStorm can find it, then click Ok.

Next you will need to enable the WordPress Coding Standards. Back to the Settings screen navigate to Editor -> Inspections, scroll down to PHP and open the tree. Then scroll down to PHP Code Sniffer Validation and tick the box next to it. In the box that appears to the right when you select PHP Code Sniffer Validation hit the little refresh button and then choose your WordPress Coding Standard of preference and click Ok.

Remember to do this last bit for each new (or existing) WordPress project as you can have different Code Sniffer rules set for each project type (for example if you’re working on any non WordPress projects, like Laravel).

Filed under: Development, Freelancing, WordPressTagged with: ,

Introducing Boss Box – a WordPress ready development environment

Local Development

A modern, easy to configure, WordPress ready Vagrant box, perfect for local development.

As a developer, one of the most important pieces of technology I use daily is my chosen virtual server stack. Depending on your operating system of choice, there are a few solid options out there, but since discovering Vagrant I've always preferred it over other options. A preconfigured Vagrant box is, in my opinion, the closest you can get to a local, real world web server without actually building one yourself (and I've actually done that as well), all possible from a virtual machine that is just as easy to discard and replicate should you need to.

While there are many WordPress developer friendly options out there, from VVV to 10up's WP Docker, I found Scotch Box a little while ago and it provided me with the best combination of features and ease of use. I liked it so much I even customised it a little further and released that customisation on GitHub.

Why ScotchBox?

What I enjoyed the most about ScotchBox was how easy it was to get up and running for my existing workflow. I tend to work on a few client projects at a time so it means at any one time I have two or three web project folders I am busy with. All of the existing options tended to shoehorn me into a specific workflow/url mapping/directory structure and configuring them to fit my setup seemed like a lot of work. ScotchBox was different, I could just take the Vagrantfile, pop it into my project web root directory, start up ScotchBox and everything just worked.   

Why customise?

There were however a few things missing or not set up exactly how I would have liked it

  • It did not come with PHPMyAdmin installed and I like using PHPMyAdmin for quick data lookups.
  • While it offered the option to run multiple sites on one box, it required a little too much editing of the Vagrantfile to use the same base box for different projects at the same time.
  • It did not support Xdebug out of the box.
  • The MySQL root password was 'root', I always use 'password', meaning I had to edit each site's wp-config.php to change it.
  • Finally, I prefer my vagrant configuration files to reside inside a folder called 'vagrant', so that there is less clutter in my web root.

This is what lead to the customised version of ScotchBox I wrote about earlier.

Then why BossBox?

ScotchBox has served me well for the past year and a half but I've been yearning to create something a little more streamlined but meeting my specific requirements ever since I first released my 'tweaked' version of it.

Earlier this year ScotchBox developer Nicholas Cerminara updated the free version of ScotchBox and released ScotchBox Pro, which includes an updated server version (Ubuntu 16.04) and therefore updated versions of all the bundled software. The Pro version also included the install script that he uses to create the base ScotchBox in the first place.

This gave me the opportunity to not only build my own version of ScotchBox but also remove all of the software that I don't specifically need and add some additional software and settings that I do need, and so BossBox was born.

BossBox comes in two variants, one with Apache as the web server and one with NGINX. Besides that, both versions are identical, WordPress ready development boxes that are easy to set up and use. I invite you to take a look, try one (or both out) and leave your feedback, either in a comment on this blog post or, if you find a bug, as an issue in the respective GitHub repo. The BossBox Vagrant, configuration and setup files, as well as the box itself, is licensed GPL 2.0, so feel free to use it, modify it and customise it to your needs.

Enjoy.

Filed under: Development, WordPressTagged with: ,

WP Hacker Cast – the official launch post.

About a year ago (literally, I got the domain renewal notification two days ago) I came up with a podcast idea.  I had just finished reading “Milestones – The Story of WordPress” and I thought how awesome it would be to interview every single one of the core release leads, from Matt all the way up to Helen, and dive deep into the ins and outs of leading a WordPress release. I started by reaching out to two of the release leads, Drew Jaynes and Helen Hou-Sandi. Helen because she had just lead the 4.7 release and Drew because I’ve actually met him in person. Both were keen but had other things going on at the time. So I put it on hold until they were available. A few months later the idea resurfaced in my head, mostly because I had just helped Craig Hewitt launch the Seriously Simple Hosting extension for the Seriously Simple Podcasting plugin. I thought about all the WordPress developers I already know, both locally and internationally, who weren’t necessarily WordPress release leads but whose stories I would love to hear. So I decided to retool the podcast to focus on those folks I refer to as ‘WP Hackers’, people who use WordPress and write code with/for it every day. I’ve since recorded my first four episodes (3 of which are publicly available on the WP Hacker Cast website) and I’ve had good responses so far. I’m slowly learning about the extra things needed for a podcast, like a subscription option as well as submission to things like iTunes. It’s all a great learning process. I’m happy to anncounce that you can now subscribe to new podcast episodes via email, directly from the site. Use the ‘Subscribe to the WP Hacker Cast’ form in the sidebar to receive fresh podcast notifications in your inbox. The podcast is also now listed on iTunes and Stitcher, so you can consume the episodes using your favourite podcast player. Please feel free to comment on the episodes, or contact me directly with feedback, comments and suggestions. I’m always looking for WP Hackers to talk to or interesting topics to discuss.
Filed under: Experiences, WordPressTagged with: ,

Taking back ownership of the word ‘freelancer’

PHPSouthAfrica

Based on some prompting by Hugh I applied as a speaker at PHPSouthAfrica this year. Apparently they still don’t know how little I actually know as they accepted my talk submission 😉

I’ll be talking just after afternoon tea about a topic that has been on my mind since 2010, that of the common perception of the freelancer, specifically when it comes to developers.

A freelancer or freelance worker is defined as a person who is self-employed and is not necessarily committed to a particular employer long-term. Since becoming a freelance developer in 2010 I’ve discovered that there is a stigma attached to the word. I don’t know if it is developer specific, but every time I meet or take on a new client the fact that I am ‘freelance’ tends to inspire visions of horror, usually of poor deliverables, bad client support and just a general lack of responsibility. In my talk, I would like to unpack this problem and provide some solutions to it.

Here are the slides for this talk.

Filed under: Development, Experiences, FreelancingTagged with:

2017 24 Hour Roll-a-thon fund raiser

This coming weekend I will be taking part in the 24 hour roll-a-thon at Gracie Jiu Jitu Cape Town, raising funds for cancer sufferers/survivors and a local hospice. If I’m honest though, the main reason I am doing this is my jiu jitsu buddy, Juan Poerstamper.

Juan has been dealing with Cancer since around 2012. He’s had a rough time of it over the past five years, finally being declared clear (again) earlier this year.

What amazes me about him is how friendly and positive he has been through this all. He is an amazing young man and I am happy to do anything to assist him.

In part, the roll-a-thon this weekend is raising funds to help him pay for his increasing medical expenses. As I am fortunate enough to have a slightly international reach, I would ask that anyone who follows my blog please consider donating, even $5, towards this cause.

When you make the donation, please ensure to add your name so that I can make sure to credit you in the follow up post on Monday.

Thank you.

 

 

 

Filed under: Experiences

Gutenberg day ??? – well that was hard!

I remember the first time I read about Jerry Seinfeld’s productivity secret. At the time it seemed trivial, but after trying to write a blog post per day for the month of September using Gutenberg, and then failing miserably at it, I can admit to the fact that planning to write something every day and actually doing it, are two very different beasts. Then I woke up this morning and saw that it has been decided that Gutenberg will no longer be using React. That’s a pretty big deal if you ask me. It also makes me realise that even one of the biggest open source projects in the world can make drastic changes to how it’s original goal was envisioned. So instead of trying to blog every day I’m just going to try and blog more, maybe once a week, with a better ‘check’ against myself to ensure it gets done. With Gutenberg still a long way from being merged into core it’s on me and everyone else who makes a living from WordPress to ensure that when it is officially released, it’s awesome, not just good.
Filed under: Experiences, WordPress

Gutenberg day 8 – Contributing to Core

I’m attempting my first shot at contributing to WordPress core with ticket that was opened 8 years ago!

I feel like it’s small enough that I can get something done by the time the next release rolls around but useful enough that it will make peoples lives easier.

Feel free to follow the ticket to see how it pans out.

In other news, using Gutenberg today was a bit of a pain. Because I use Jetpack’s publicise functionality to share my content socially and Jetpack does not yet support Gutenberg (for obvious reasons) I have to write up the post in Gutenberg but not publish it and then edit the Post in the usual way and publish it. Today this lead to me loosing all my content and merely switching to the regular post editor. Fun times.

Filed under: Development, Experiences, Freelancing, WordPress