Author Archives: Mark Baker

An Attempt at Poetry

It’s been nearly two months since my last post, two months trying to pull myself out from the state that I’d got myself into. 2020 isn’t a forgiving year, and I’m hurting myself and others with the darkness that I’ve … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Fear and Self-Loathing in Amsterdam

  I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

Citizen of Nowhere

Tonight at midnight (local time) I become a “citizen of nowhere”.

Posted in Uncategorized | Leave a comment

Filtering and Mapping with SPL Iterators

Four or five years ago, the most popular talk that I gave at conferences was entitled “A Functional Guide to Cat Herding with PHP Generators” (the cats proved a very enjoyable talking point at every event where I gave it, … Continue reading

Posted in PHP | Tagged , , , , , | Leave a comment

Parallel Looping in PHP with SPL’s MultipleIterator

There was a time, back when I was working with PHP 5, when I found the Standard PHP Library (SPL) an extremely powerful and useful toolbox; and I particularly enjoyed working with SPL’s Iterators and Datastructures. Sadly, SPL was always … Continue reading

Posted in PHP | Tagged , , , , | Leave a comment

Withdrawal from Speaking at PHPCE 2019

I’m always nervous when I speak at a conference or in front of a user group; but I also enjoy sharing my passion and excitement for things that I’ve learned, or new tools that I’ve discovered. That makes it particularly … Continue reading

Posted in PHP | Tagged , , , , | 27 Comments

A Year in Retrospect

At New Year, many people write a retrospective of the old year, and about their hopes and dreams for the new. The roots for my own changes over the last year really lie earlier: 2017 was the year when a … Continue reading

Posted in Uncategorized | Tagged , | 2 Comments

Using PHP Anonymous Classes as Package Private Classes

I’ve written before about the benefits of using PHP’s Anonymous Classes for test doubles; but Anonymous Classes also have potential usecases within production code as well. In this article I’m going to describe one such usecase that can be particularly … Continue reading

Posted in PHP | Tagged , , , , | 5 Comments

Discharging Static #2

In the first article in this series, I wrote about the problems with testing static methods in classes, and showed a few approaches that allow us to write mocks for statics. Testing classes where we have static properties is a … Continue reading

Posted in PHP | Tagged , , | 7 Comments

Aspects of Love — How deep does the rabbit hole go?

If you’ve read my previous post (Discharging Static #1), then you’ll know that recently I’ve been exploring different approaches to creating test doubles for statically called methods, and other testing problems, and had begun to look at Michael Bodnarchuk’s AspectMock library … Continue reading

Posted in PHP | Tagged , , , | Leave a comment