General

Posts that cover general aspects of programming.

Keychron K2 Wireless Mechanical Keyboard: A Review

13th July 2020
I (like a lot of other people) recently started to work at home a lot more, and with a permanent desk setup at home I wanted a decent keyboard to work with. My work machine is a MacBook Pro 2018 and I dislike the keyboard quite a lot. It feels 'poppy', has some interesting key placements (the up and down arrows in particular), has no escape key or function keys at all.

Grep Context

27th June 2020

Grep is a really powerful tool for finding things in files. I often use it to scan for plugins in the Drupal codebase or to scan through a CSV or log file for data.

For example, to scan for user centric ViewsFilter plugins in the Drupal core directory use this command (assuming you are relative to the core directory).

grep "@ViewsFilter(\"user" -r core

The -r flag here recursively scans the 'core' directory. This command returns the following output.

Wrap Around Increments

21st June 2020
Something I've been writing long hand for a number of years is wrap around increments. This is essentially adding to a value that has an upper limit, and wrapping back to 0 when that max value is reached. This can be done with an if statement.

Creating A Chatbot Agent With Dialogflow And Kommunicate

19th April 2020

Having a chat feature on your website (commonly called 'live chat') is useful when helping your users overcome any difficulties they are having. You can pop up a little chat window in the page and ask if they need any help finding what they need. This can be especially useful on large commerce sites where users might get stuck looking for things.

Adventures In FizzBuzz

29th February 2020

Tests for programmers in an interview process are not uncommon. For the last couple of years I have asked a quick pre-interview question to junior developers to see what sort of stuff they come up with.

As I don't want to set any developer a task that will take longer than absolutely needed I opted to set a very simple task for them. Commonly known as "FizzBuzz", this task is as follows.

Image Colorising In PHP

14th January 2019

Colorising images is fairly simple to accomplish, especially using PHP's GD library. All we need to do is load an image, create a blank image of the same size in a particular color and then merge the two images together.

In fact, we can do this entirely with the imagecopymerge() function, but creating a function to wrap all of this makes sense as well.

BSides Manchester 2018

18th August 2018
For the second year running I attended BSides Manchester conference, held at the Manchester Metropolitan University Business School on Thursday 16th August. This is a technical cybersecurity conference that is organised by a dedicated team of volunteers. I was really impressed by last years conference so was really keen on attending this year.

BSides Manchester 2017

8th October 2017

I recently attended the BSides Manchester conference, which was held at Manchester Metropolitan University Business School on 17th August 2017. This was a security and hacking conference that was free to attend, but had a very limited number of tickets available. After missing the first two releases of tickets I managed to get one from the waiting list.

Why I Went For A Macbook Pro

13th September 2012

I very recently took delivery a 15 inch MacBook Pro (my first Apple computer) and I thought I would write about my reasoning behind it. Normally, people don't tend to ask why you bought a computer, but with Apple products it seems to be different. I think I have stated my reasons to a few different people already, so I thought it would make a good blog post.

LAMP And Beyond: A Review

3rd July 2012

Saturday 30th June saw a one off event organised by the PHPNW community called LAMP and Beyond. The idea was that it would bring together people of differing abilities with the aim of sharing skills and experience with servers, programming, source control, or whatever happened to be of interest at the time.