PHP, Language of Mystery

PHP seems so arbitrary sometimes. function test_nine() { $$”9″ = 22; } fails to parse. (which is good, I suppose) This passes: function test_nine() { $n = 9; $$n = 22; $this->assertEqual($$n, 22); } -Andy Friesen, of giant-communist-robots.com.

PHP5, you king of bastards (setting an instance member inside a static class call)

If I’m in an instanced class, and I call another class’s method statically inside of a method in the first class, and that static method should happen to (erroneously) have $this->whatever inside of it… …it sets $whatever on my outer instanced class. Here’s some illustrative code: <?     class Inner_Static {         function burrito() {             $this->_member = ‘A keyboard. How quaint.’;         }     }     class Outer_Instance {         function taco() {             Inner_Static::burrito(); [...]

Simple scripts always ship.

Simple needs, simple deeds. A need for a simple one-off occurred Monday evening at work. Some non-engineer coworkers needed to be shown how to make some non-Latin-1 text into html entities. Basically, they needed a 5 line php script. Right before sending them to any number of sites that already do this 5-line operation, I [...]

Split-Testing and Late-Night Coding

When testing a feature wrapped in a spiffy-keen augmentation of an experiment system live, please remember to take into account that you have a 50% chance to land in the “nothing happens” side of the experiment. This will probably save you a lot of trouble.

The Fish, as they say, Rots From The Head…

I do not give a shit if you’re a republican, nor a democrat. If you think the system as it is is shitty, and you’re not in a battleground state, and you didn’t vote third party, then you’re a non-sentient hypocrite nimrod whom I have no respect, intellectual or otherwise, for.