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?
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.
The PHP Foundation
November 22nd, 2021
Today, JetBrains announced the PHP Foundation. You can read the details in their news article.
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.
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.
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.
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.
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.
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.
Randomizing Test Data is a Bad Idea
March 8th, 2019
Any form of randomization in automated tests is a bad idea, yet everyone does it. It can lead to tests that fail unpredictably, while giving a false sense of confidence every time that they don't fail. Randomizing is basically hoping that with enough builds, we may find a bug that existed all along.