bokkie

Only YOU Can Prevent Forest Fires

bokkieMy fellow South Africans will be familiar with Bokkie making sure we know that only WE have the power to prevent bush and veld fires. The emotive tear and the damning words “Look what you’ve done!” accusing passers by of ruining a beautiful natural habitat – even if only by their inaction – were a powerful (if not repetitive) image along the side of the road all over the country.

My American friends will be more familiar with Smokey the Bear giving the same message I’m sure, but the point is the same:

You are responsible for your own environment – only you can make it better.

As a child I generally shrugged this kind of sentiment off as an issue that was simply just not my problem. This is something that I think most people did back then and largely still do today. Not just with forest fires of course, but with everything in life that is too large to fully comprehend or nail down to a specific (in)action on our own part – forest fires, climate change, unemployment, government, crime, or any other global issue. We would rather bury our heads in the sand about these things, instead of actually doing something to help make them better.

This is a common human characteristic – something that we all do to some extent. I applaud those who actually do stand up and take action to improve their place in the world – those who actually heed Bokkie’s words and take responsibility for their own lives and situations. Even if what they do feels so small that barely anyone else would even notice, at least it’s something.

Why am I talking about forest fires?

I’m not.

I’m talking about open-source.

Ken (legend)

Software development never changes

In the early ’80s, my father trained countless Cobol programmers. A mantra that he always repeated to every single one of his students was this:

A good programmer focuses on getting the code right, while a great programmer focuses on what the users have asked for.

That was over 30 years ago. Around the time BASIC was invented – before C++, Turbo Pascal or Perl even existed and long before PHP, Python, Ruby, Javascript or any language that we actually use today had even been conceptualised.

Jump ahead to 2015.

This week I was interviewed on the WisdmLabs blog about my WordPress development practices. They asked me: What is the difference between a good developer and a great developer?

The answer was fairly obvious to me, not because my father had told me (I never knew he even had that mantra), but because this is just the way I have always viewed things:

A good developer focuses on code, while a great developer focuses on users.

So what’s changed in 30 years of software development?

Nothing.

Sure, we have new technologies available to make things easier – simpler languages, more convenient libraries, new coding standards and more efficient IDEs. But none of that will ever change what the main focus of any software development should always be: users.

If users aren’t at the centre of your development then you’re already doing it wrong.


I should probably point out that the guy in the photo at the top is not my dad – that’s Ken Bowler, a systems programmer from the University of British Columbia circa 1980.

What WordPress means to me

WordPress is web software you can use to create a beautiful website or blog. We like to say that WordPress is both free and priceless at the same time.

That’s how WordPress is introduced on WordPress.org – a humble introduction for software that powers a huge chunk of the internet. Not only that, but to many people (myself included) WordPress is more than just ‘web software’ – it enables and signifies something far greater than that. This is what WordPress mean to me.

1. People

I make it no secret that I strongly believe in the WordPress community. Through this community I have met a ton of awesome people who share my passion for WordPress and the people who make it what it is. On top of that, I work at one of the coolest companies in the WordPress space where I get to work with some of the most talented individuals in the community on a daily basis.

2. Purpose

With WordPress powering nearly a quarter of the internet (seriously – that’s massive), being a part of the community means you’re a part of something that is genuinely changing the world. WordPress’ mission to democratise publishing is one that it is currently succeeding at in spades and I’m honoured to be even a small part of that mission. Whether it’s fixing code directly in WordPress core, getting involved in your local WordPress community, or by participating in any of the other ways that you can contribute back to the project, you are throwing your hat into the ring of the evolution of the internet and publishing. That’s a real purpose that is worth getting behind.

3. Progress

On a personal level, I have progressed so much from just being a part of this community – my code has improved (publicly sharing it through plugins will force you to improve very quickly), I’ve learnt a lot about contributing to open source projects, and through organising WordCamps and other meetups I have learnt important management and organisational skills. This kind of growth is truly invaluable.


All of these things are, as WordPress itself is described above, both “free and priceless at the same time”. It is for these reasons that I love being involved in this great community and I will continue to work hard at doing what I can to improve myself and the community around me.

Setting up my WordPress development environment

Plenty of posts have been written about setting up a local development environment for WordPress, but when I moved to a new Macbook (running OS X Yosemite) I couldn’t find a post that contained all the instructions I needed. After some searching I got everything up and running and thought it would be worthwhile to share my process and tools here for posterity.

I use my local development environment for:

  • WordPress plugin development
  • Working on WooThemes products (plugins & themes)
  • WordPress core contributions
  • Working on client sites

For this I use the following tools:

  • Vagrant for the general development environment
  • SVN for checking out WordPress trunk and managing my plugins on the WordPress.org repo
  • Git for managing my public plugin repositories as well as all of the WooThemes product repositories
  • Sublime Text for editing code

Vagrant

logo_vagrant-81478652The initial setup of the Vagrant environment was easy using Varying Vagrant Vagrants. They have a complete step-by-step on their GitHub repo, so you shouldn’t struggle getting that up and running. It did take quite a while to set up, but that’s only because it has to download a lot of software in order to work – it’s relatively uncomplicated to get it working though.

VVV comes with some handy features for WordPress development, most notably it includes the WordPress trunk repository checked out from SVN. This enables you to get the latest development version and create patches to submit to Core Trac easily.

One thing that VVV doesn’t include by default is the ability to easily generate new WordPress sites on the fly. If you’re developing sites for clients, or if you often require new sites for testing, then this is pretty much essential. Luckily, there’s a VVV add-on script that handles this for you very easily: Variable VVV by Brad Parbs. The wizard is a single script that is super easy to use and will generate new sites for you with no additional work on your part – simply follow the simple guide in the GitHub repo and you’ll have no problems.

Additionally, Leo Gopal has created a new VVV dashboard that lets you manage your WordPress installs with greater ease – it provides a friendly UI and easy to use tools. You can grab it from GitHub.

SVN

There’s no need to install SVN before setting up VVV, but in order to use the WordPress trunk SVN repo you need to upgrade the default SVN version. If you’re not sure how to do that, then this guide will run you through the (very quick) process.

vsIf you aren’t comfortable using SVN in the command line then I recommend using Versions to manage your SVN repos through a robust GUI.

Git

LSprVcwqYou don’t need to install anything extra to manage your Git repos, but if you would rather not use the command line to manage things then SourceTree is your best bet for a functional GUI for managing both GitHub and Bitbucket repos.

Sublime Text

Sublime_Text_LogoThe code editor you use is entirely based on your own preferences, but I like to use Sublime Text 3 for development. The main reason for this is the plethora of add-ons that are available for it – some of which are hugely helpful for WordPress development.

Before you can install add-ons for Sublime Text, you need to enable Package Control. Once you’ve done that you can install any of the available add-ons. These are the ones that I use:

The colour scheme I use these days is the Material Colour Scheme – based on Google’s Material Design UI. It provides a dark background with bright colours – kind of like the popular Monokai, but brighter.

That’s my setup – what do you use?

Better bbPress admin icons

After recently training a client on how to use their new bbPress-powered site, I discovered that the default admin menu icons for bbPress are not very intuitive and the client found them slightly confusing:

The default bbPress icons

They are (I think) a beehive, a honey dipper and a bee. That second one took me a little while to figure out – at first I thought it was a paintbrush. For a client who couldn’t care less that the name of the forum software is ‘bbPress’ (which I assume is the reason for the bee references), these icons are a bit weird and unintuitive.

My solution was simple – replace them with icons from WordPress built-in dashicons collection:

My updated icons
My updated bbPress icons

These, I’m sure you will agree, make a lot more sense and make the admin menu just that much easier to navigate for a user who has never encountered WordPress before.

Here’s the CSS I used that changed the icons – just add this to your theme, make sure to load the CSS in the dashboard and you’ll be good to go:

Storing snippets in Gist

Gist has been around for ages as a service provided by GitHub to store and share code snippets for any language. I’ve been using it for a while, but only as a way to quickly share snippets of code with people. I’ve now decided to change that a bit and make better use of the service – as a result I have added all my snippets from this blog to my Gists and I will continue to add even the smallest snippets as I develop them. So from now on whenever I work out a useful snippet of code I will add it to Gist whether I blog about it or not.