Chris Warburton (warbo)
-
Of course, using strings as functions is giving in to PHP's braindamage. Much better to just use nice higher-order functions.
-
How about "if (in_array($f, array('foo', 'bar', 'baz'))) return call_user_func($f);"
-
Code smell of the day: "switch ($f) { case 'foo': return foo(); case 'bar': return bar(); case 'baz': return baz(); }"
-
Really nice 64K demo "Turtles all the way down" http://ur1.ca/diqwk Probably won't run on my A1200 though :P
-
For example I can assert a page's title is foo by "$this->assertTitle('foo')" or bar by "$this->assertTitle('foo')" but not 'foo or bar' :(
-
Found myself wanting higher-order assertions just now; then realised that's just Boolean logic on the conditions. Give me the conditions!
-
TFW security updates break your unit tests
-
Mocking SimpleTest with Drupal's SimpleTest, so I can use SimpleMock. I'm having quite a meta day :P
-
EShell has just become even more fantastic
-
Just figured out how to "ssh user@host" then "sudo -u root" using TRAMP in Emacs. Tweaked "recommended for Ubuntu" from http://ur1.ca/dfelo
-
Annoyed that this API requires my array indices to include the string "indexes" >:(
-
Compiling is definitely the most tedious thing to do on my XO-1 :P
-
Why is the world full of 'setTimeout("x();", y);' and 'function() { return x(); }' but not 'x = parseInt("10")' or 'x = 10 * 1' !programming
-
Trying to fix an app which overwrites its database on every request, but gets data from OAuth. Every user is clobbering everyone else! #WTF
-
Except for list(), probably the worst set of answers I've ever seen on StackOverflow http://ur1.ca/d9i4q !php
-
Just had a look at rust-lang.org . Seems like a modern ML dialect, with C-like syntax. Pretty nice. !programming
-
PHPdoc -> "@return string HTTP Response Code." method body -> "return (int) $this->responseHttpCode;" #DocFail
-
Pet peeve: Negative conditionals which have "else" branches: "if (!a) { ... } else { ... }".