Richard Bagshaw


Web Developer, Dog Herder, Dad of Two

Maintaining the Master of Disguise

Hello, Friend

We've probably met on twitter (@bagwaa) or maybe on a forum, or maybe you've been lucky enough to bump into me in real life at a PHP conference? (sarcasm btw).

However ... thinking about it, I know something you don't, we've never actually met, you've never spoken to me, and we've never had a conversation.

I know this because I am the master of disguise, I wear a mask every day, you can't see me, you can only see my projection.

Pretentious bullshit? let's see.

What?

I was attending a conference this weekend, the most excellent PHP South Coast

Continue Reading

Prophecy

For a while now I have been using Mockery as my test double framework of choice, however recently I have been taking a look at Prophecy as an alternative.

Taken directly from the Prophecy GitHub Repository the framework is described as follows.

Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking framework. Though initially it was created to fulfil phpspec2 needs, it is flexible enough to be used inside any testing framework out there with minimal effort.

Prophecy and PHPUnit

Since PHPUnit version 4.5 Prophecy is baked in as part of the framework, any test

Continue Reading

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