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

Zero Arguments for Gatekeeping

August 20th, 2024

Some people don't like teaching beginners. That's alright. You do what's enjoyable for you. There's one type of behavior I don't like though: gatekeeping.

Read more

Missing Static Files from Apache Access Log

July 29th, 2024

I was working on legacy PHP code inside a Docker container. I needed to log all files accessed via Apache, especially the static ones, such as css, js, gif, etc. On the container for a PHP 5 app, things were logged correctly, but on the container for a PHP 4 app, only PHP files were in the log.

Read more

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 php.net site.

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

Read more

Older Posts