Richard Bagshaw


Web Developer, Dog Herder, Dad

Learning React

I've been recently spending a lot of time in the evenings on various e-learning sites and GitHub repositories enhancing my knowledge around React and its ecosystem, as I have been going through this process I have found quite a few pain points and thought I would make some notes.

I primarily work as a PHP developer building backend systems and APIs at Gathercontent.com, but every so often I like to be sure that I am up to speed with how we also build the front end, and for us that's becoming more and more React based.

I've listed some

Continue Reading

Clean Code

Clean Code

Does clean code matter? or is it simply a vanity metric for developers and programmers to get over-excited?

Obviously, as a developer, my answer is YES, clean code is incredibly important, but let's take a look at what can happen when the cleanliness of code isn’t considered important.

Inspired by Clean Code Episode One by UncleBob Martin

Why is clean code relevant?

I have experienced first hand these types of comments at one point or another during my career, from both large multi-national organizations to tiny one-man start-ups.

  • Clean code is a “nice to have” it’s
Continue Reading

PHP 7 Null Coalescing Operator

In this series of blog posts I will be covering some of the new features available in the upcoming release of PHP 7, I know we are all very busy bees, so this series gets to the point and may be useful for anyone just wanting to understand these features quickly.

Part #1 - Scalar Typehints
Part #2 - Return Types
Part #3 - Spaceships
Part #4 - Null Coalescing Operator

The null whut .... ?

Firstly, judging a book by its cover you would probably expect this blog post to be quite a lengthy one. However, the opposite is probably true.

Continue Reading

PHP 7 Spaceships

In this series of blog posts I will be covering some of the new features available in the upcoming release of PHP 7, I know we are all very busy bees, so this series gets to the point and may be useful for anyone just wanting to understand these features quickly.

Part #1 - Scalar Typehints
Part #2 - Return Types
Part #3 - Spaceships
Part #4 - Null Coalescing Operator

The Combined Comparison Operator

The Spaceship Operator is the unofficial name for obvious reasons; the more professional sounding name is the "Combined Comparison Operator" but what does it do

Continue Reading

PHP 7 Return Types

In this series of blog posts I will be covering some of the new features available in the upcoming release of PHP 7, I know we are all very busy bees, so this series gets to the point and may be useful for anyone just wanting to understand these features quickly.

Part #1 - Scalar Typehints
Part #2 - Return Types
Part #3 - Spaceships
Part #4 - Null Coalescing Operator

PHP 5.x

Currently in PHP 5.x there is no way to specify what type should be returned by a method, you could argue that you can cast

Continue Reading

PHP 7 Scalar Typehints

In this series of blog posts I will be covering some of the new features available in the upcoming release of PHP 7, I know we are all very busy bees, so this series gets to the point and may be useful for anyone just wanting to understand these features quickly.

Part #1 - Scalar Typehints
Part #2 - Return Types
Part #3 - Spaceships
Part #4 - Null Coalescing Operator

PHP 5.x

Previously in PHP we would pass arguments to a method by just declaring the name of the argument as part of the method declaration like so.

Continue Reading