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

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.

Read more

Fake PHP Version in Composer

February 23rd, 2019

Say you run the latest PHP version on your machine, but the server runs PHP 5.5. This means that when you decide to add a Composer package, it might propose a version that may not be installable on the server.

Read more

What Do Speakers Look for in Reviews?

February 15th, 2018

Every public speaker is different, so let me tell you to what I personally pay attention in post-talk reviews.

Read more

Testing Legacy PHP Scripts

January 26th, 2018

I gave myself a challenge: to test a legacy "controller" in isolation, yet with minimal impact on the original code.

Read more

How I Got 100% on Google PageSpeed Insights

January 4th, 2018

I set out to redesign my blog and throw in my consulting services in there. I decided to try a few techniques that I learned over the past couple of months, to get some practice. 90% of my work consists in experimenting, so that my customers would later benefit from the results.

Read more

Older Posts