My friends and family are under attack in Ukraine. Donate to protect them directly or help international organizations.

Legacy Tales: Arrays Initialized Using Strings

March 29th, 2024

My team was recently tasked to upgrade a suite of applications from PHP 5 to PHP 7, as an intermediate step before going to 8. There are many compatibility issues, but one of them was too fun not to share with the world.

Read more

Progressively Improving a Ball of Mud

July 24th, 2022

I have recently been working on a project which, as usual, is a legacy ball of mud. It is impossibly hard to work with. There is no way to tell whether the change I'm making will break something unrelated, which the client may or may not discover in a few months. Every time I fix a bug, I find a dozen others that nobody was aware of for years. The application breaks all the time, and often multiple times in the same place. Everybody knows it, but what are people doing about it?

Read more

Copy my Slides, but Change Them Just a Little

May 25th, 2022

I'm giving away all my slides. If you enjoyed one of my talks and wished you could present something like it, you can just grab my slides, customize to your liking, and present. No need to even ask.

Read more

The PHP Foundation

November 22nd, 2021

Today, JetBrains announced the PHP Foundation. You can read the details in their news article.

Read more

Should Repositories Only Return Aggregates?

October 6th, 2021

Robert Möstl sent me this question by e-mail. He wasn't sure how to return the number of hammers sold in a given month from a repository. According to Eric Evans' book on domain-driven design, repositories should operate on aggregates, but Robert did not want to execute unnecessary queries to return a list of orders. He felt at odds with the DDD rules.

Read more

Organizing Miscellaneous Utility Functions

June 26th, 2021

Let's say that your application needs to frequently calculate age from a birthdate. It would be very easy to create a `DateUtil::ageFromDob`. However, with this approach, you'll end up with Util classes all over the place, that will often have multiple similar functions, depending on whether your birthdate is a DateTime or a string.

Read more

Code is Cheap, Knowledge is Expensive

June 9th, 2021

Imagine this scenario. You need to add a feature to your code. You spend some time trying to understand the code, then some more time refactoring it so that your feature would be easier to add, then you implement the feature. When you push your code, the feature is fine, but your teammates aren't entirely happy with the direction of the refactoring.

Read more

The Fate of the Legacy PHP Documentation

December 10th, 2020

As you may or may not know, in September 2020, the PHP Documentation Group has retired the manual for end-of-life PHP versions from the site.

The legacy PHP documentation now lives at Myself, Zend and legacy enthusiasts will take care of fixing any inaccuracies through a GitHub repository.

Read more

If We Asked Athletes the Questions That We Ask Developers

July 11th, 2019

We all heard the question "how long will it take you to do this project?" Now imagine we were talking to an athlete.

Read more

Null Hell and How to Get Out of It

July 3rd, 2019

When used without a second thought, nulls can make your life miserable and you possibly don't even realize that they're the ones that cause you so much pain. Let me explain.

Read more

Older Posts