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.

Why I don't like traits

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 »

Expert help

Have a codebase where change is expensive and risky?