Blog:
My thoughts on software development.
Categories
I have many interests in software development and I enjoy writing about then. As such my blog doesn't cover just one topic.
At the last [PHPDublin meetup](https://www.meetup.com/PHP-Dublin/events/242463770/) I was asked "What do you do?" and as usual the answer boiled down to "I design and build event sourced applications". Which leads to the following question. "What is Event Sourcing?".
That's where this article came from, it is my best shot at explaining Event Sourcing and all the benefits it brings.
# The Status Quo
Before we get into the nitty gritty of event sourcing, let's talk about the status quo of web development.
At it's heart, current web dev is database driven. When we design web apps, we immediately translate the specs into concepts fro...
Read more »
Let's talk software architecture. Most of us know [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller), it's the foundation for pretty much every web framework. As your product grows though, problems with MVC will start to appear. Even a relatively simple product can end up with a bloated and messy codebase. MVC is where we start, but what do you do when you need to evolve past it?
Before we go further, let's examine why we have so much trouble explaining the answer.
Here's a common conversation (for developers anyway)
- devA: "Our codebase is really messy, how do we clean it up?"
- devB: "We need to refacto...
Read more »
Below is a collection of notes I made after reading [Growing Object Oriented Software, Guided by Tests](http://www.growing-object-oriented-software.com/). I highly recommend that developers read this book. Writing tests is hard, and using tests to write good code is even harder. It takes a lot of time and a lot of getting it wrong before you can get it right.
Well, the book above explains how to do it step by step, I'm definitely a better developer for having read it. Many thanks to the code wizard that lent it to me, you know who you are.
I'm posting these notes online because it's a useful reference for myself, and hopefully o...
Read more »
Traits in PHP are a bit shite. At best they are an ineffective way to append functionality to a class, at worst they are an anti-pattern. They are often used as toggles for internal functionality (see Laravel's Acceptance tests) or as a lazy way to share common functions across a bunch of classes without using another pattern.
# Why are they bad?
## Reading:
They're hard to read. If you see that a class uses a trait, you have to open the trait to see what it's adding to the class.
Usually the trait uses protected properties of the class, this means you have to flip between the trait and the parent class to figure out the type of...
Read more »