Running a Workshop at a Developer Conference

Last week I ran a quick video call with some of the amazing humans that are speaking at WordCamp Joburg 2018. It mainly focused on how to run a workshop but these could definitely be applied at normal talks.

Tip #1

First and foremost, workshops are interactive. By their nature, they’re designed to show people how to do something. The best way to teach people how to do something, is to get them do it themselves.

Make sure your workshop is designed around getting the attendees to do as much as possible. This also lets them leave with something to show and that’s always super rewarding.

Tip #2

Start with the end in mind. Give your attendees a clear picture of what to expect from your workshop so they know what you’re working towards. It also really helps them understand why some decisions are being made rather than getting distracted by that.

Tip #3

Explain the why behind the what at each stage. This is similar to the above tip but this really helps people see beyond the practical. Copying what someone else has done is easy but really getting into the detail about how this is going to help them makes them want to take this further.

A good gauge here is to see if people are adding their own little bits to the code you’ve asked them to do. Don’t take it as a negative if they aren’t though.

Tip #4

Keep it nice and slow with constant check-ins. I can’t actually stress this enough. I’ve been to so many workshops where the instructor just flies ahead and ends up having two people out of 100 following along.

Like tip #1, this is supposed to be practical so slow down and make sure everyone is up to speed before moving on. If this means less content to get more people involved, then definitely do it.

Tip #5

Don’t be afraid to stop your workshop to help someone out. This leads straight on from #4. If someone is stuck, see if you can help them out. If it’s going to take too long then it might be better to get them to join up with someone else. If it’s a quickish fix then I’d really suggest helping them get going.

Tip #6

Encourage collaboration (this helps out with point 5 as well). Get people to work with others especially if they are more experienced in the topic. You could even ask people that you know could help out before the workshop.

If you can get your attendees helping each other it should mean that a larger part of the audience participates.

Tip #7

Don’t try build Rome in a day. This is really important and it will make the difference between a talk that has everyone staring at you with wide eyes or people that walk away with something tangible.

It can be super enticing to give people as much value as possible but sometimes you can give more value by doing less. Actually, I take that back, you can almost always give more value by doing less.

Tip #8

Get your attendees to prep before the workshop. This can be key to a successful workshop especially if there is a technical setup that is required or even a local development environment.

You’d be able to ask the organising team of the workshop / conference to send a mail asking attendees to do a little prep.

Tip #9

Let the organisers know if you have any special requirements. If you need a whiteboard, a flip chart or special equipment, let the organisers know as soon as possible. This allows them to try and organise it for you before the event and remove a very awkward scenario at the event.

Tip #10

Use the PA system especially in larger rooms. If you haven’t used a microphone before, it can be a little weird that you don’t have to shout to have an entire room hear you (this doesn’t mean that you should not speak clearly and confidently).

I’d suggest just checking to see if everyone can hear you OK in a room that doesn’t have someone managing the sound.

Tip #11

Have a backup plan if the internet breaks. This is really important as it is super awkward when the internet goes down and there isn’t a way for you to continue. A backup could be a screenshot or a video of what you’re wanting to do.

Another backup could be using your own device for internet connection or having everything set up locally for you to work off.

Tip #12

Code snippets shared with attendees. This is something that has caught me out in every workshop I’ve presented before. If you’re going to have code that the attendees need to use, create a repo or online resource that you can share with them to get the snippets of code.

This just means you don’t have endless typos and also means you can maintain a pretty high velocity if you have a ton of content.

WordCamp Joburg 2017 Composer Workshop

Composer has been around for a little while now and it has made the lives of thousands of PHP developers around the world just a little better (OK, quite a lot better).

Using Composer in your theme and/or plugin will allow you to add a range of great features and libraries that are available to the general PHP community without having to worry about actually managing those libraries (Composer does that for you).

In this workshop, we will look at:

  • how Composer works from a very high level;
  • start a very simple plugin and including composer in it;
  • and use some of the really cool packages out there to make our plugin awesome.

You can find the repo for the workshop on GitHub:

WordCamp Cape Town 2017 Composer Workshop

I had the privilege of doing a workshop at WordCamp Cape Town 2017 on Composer and WordPress. I covered how we can use Composer to manage WordPress projects and how we could create parity between the different environments we have (like development, staging and production).

Tools I used:

What I would have liked to have clarified before the workshop was that this was for entire project management and not managing a single plugins dependencies (something that I think I’m going to rather do at WordCamp Joburg 2017).

Here are my slides from the workshop, I hope they help and feel free to pop me questions you might have. 

Setting the PHP version in command line on CPanel Servers

Over the last couple of days, I’ve been really struggling to try to get Composer to install a project on a CPanel server. As you know, Composer can also check environment constraints and for some reason  php -v would show PHP 7.1 but when running composer install or php composer install, it would say that I’m using PHP 5.6.

I tried using the full path to both PHP and Composer (to find that out, you can use which php and which composer) with no luck. After a bit of research, I finally found that EasyApache 4 (the system that manages Apache and PHP on CPanel servers) has the ability to pass an argument to the command allowing you to see the PHP version.

You can replace 56 with the specific version of PHP that you want like 70 for PHP 7.0.x or 71 for PHP 7.1.x. My new command looked like this:

It’s obviously important to run Composer with the version of PHP that your web server is running as it will install the dependencies with those constraints in mind.

Get Custom Post Type by Slug

I recently had a case where I needed to get the post object for a custom post type in WordPress – I had to do this by a slug that the user passed in. There is a function ( get_page_by_path) which I initially thought was to only find the post object for pages but it actually goes deeper.

The function takes 3 arguments:

  1. The path/slug that you’re looking for.
  2. How you want the post to be returned – basically as an array or object.
  3. The post type(s) you want to search through.

So to get the post object (let’s call my custom post type ‘book’) I can just do the following:

Now that I have the object I can reference it as I would any post object in WordPress:

For more information, you can visit the get_page_by_path function reference on WordPress.