Code quality

Abstractions as simplifications

As I was browsing through Twitter the other day, I saw someone complaining about abstractions among the lines of “we add abstraction layers on top

Grandfathering in legacy

So many problems in legacy or brownfield applications stem from invalid state being dragged around throughout the whole application and causing a bug somewhere far

Never talk to strangers

Talking to strangers in 1930s Moscow was not a smart thing to do. Mikhail Alexandrovich Berlioz (chairman of the management committee of one of the

Releasing with confidence

Still scared to ship to production on Friday afternoon? Even after reading our previous post on maturing your release process? Here’s some practical advice

Typed property must not be accessed before initialization

PHP7.4 introduced this cool new feature called “typed properties” which add the existing PHP type system to class properties. This means that you can

Getter, Setter, Never?

What if I told you Morpheus never said “What if I told you?” I know you saw that meme a thousand times but have you

How to integrate Elasticsearch in your Laravel App - 2024

Integrating Elasticsearch with Laravel enhances search capabilities beyond simple LIKE matches. This guide covers Elasticsearch basics, setting up a local environment with Docker, creating a demo application, and implementing Elasticsearch integration using observers and repositories.

Catching bugs early with static analysis

PHP is a dynamic language and while this certainly has its benefits, it also means that it’s not uncommon to see errors about calling

Liskov Substitution Principle Explained

The Liskov Substitution Principle is one of the five design principles that make for SOLID code, and probably one of the hardest to fully grasp.

Does code need to be perfect?

In the past months, I have asked myself a lot why we always strive to write perfect code. Picking up coding again for an internal

Refactoring towards testability

When working on a legacy codebase, you often have to make changes in code you don’t fully understand. When this code is not tested,

Avoiding Conditionals, an example

I didn’t like the code I wrote for a particular feature. It was “notify users when someone comments in a discussion” with these requirements:

Commands, events, global functions and testing

The other day I was listening to the FullStackRadio episode 34 which is about dealing with dependencies in Active Record models. This is a very

*AwareInterfaces: simple interfaces with getter and setter

Sometimes you see simple interfaces with a getter and a setter for a specific type of object. Some examples are league/event‘s EmitterAwareInterface and

Why You Should Avoid Over-Abstracting

Some time ago I started working on an existing project, so I read the documentation before diving in. At the top of the contributing.md

Subscribe