Warning: Constant ABSPATH already defined, this will be an error in PHP 9 in /home/unhinder/www/www/Phi/wp-config.php on line 22
And people accuse _me_ of using long method names – I am … unhindered by talent
Warning: Undefined array key "HTTP_REFERER" in /home/unhinder/www/www/Phi/wp-content/plugins/google-hilite.php on line 58

And people accuse _me_ of using long method names


Warning: Undefined array key "HTTP_REFERER" in /home/unhinder/www/www/Phi/wp-content/plugins/google-hilite.php on line 58

JMock logo

MJ tipped me to this amazing method name in the Matcher interface in JMock2:

void _dont_implement_Matcher___instead_extend_BaseMatcher_()

Yeah, I’m not making that up.

As the documentation goes on to explain:

This method simply acts a friendly reminder not to implement Matcher directly and instead extend BaseMatcher. It’s easy to ignore JavaDoc, but a bit harder to ignore compile errors :).

The third grader in me loves stuff like that. To be honest, I’m not entirely convinced that this is a great idea – it smells like a workaround instead of a solution. Still, it’s clever and funny and accomplishes a meaningful task, which is more than I can say for most code in this world.

Makes me want to go do this just for fun. I just need to create an interface you shouldn’t implement … Well, like I said, I’m not sure it’s such a good idea after all…