Archive for December, 2009
Fun With Closures and Object Caches in PHP
Intro to Closures in PHP
PHP 5.3 introduced closures. It’s already been pointed out that the Closure class in PHP is not necessarily a closure. Lexical scope is optional in PHP’s implementation, which is a little goofy looking:
//lambda ftw
$lambda = function ($x) {
echo ‘I am an anonymous function ftw.’ . "\n" . $x;
};
//closure lol
$closure [...]
December 29, 2009
Posted in: php
No Comments
The Arc Challenge: PHP and JavaScript
Take the Arc Challenge. For the lazy, here is the problem:
Write a program that causes the url said (e.g. http://localhost:port/said) to produce a page with an input field and a submit button. When the submit button is pressed, that should produce a second page with a single link saying “click here.” When that is clicked [...]
December 20, 2009
Posted in: javascript, php
No Comments
When Test Driven Design Fails
In the last couple years, there has been a lot of buzz around things like “Agile“, “Scrum“, “TDD“, and other stupid stuff that wraps an acronym around common sense. Basically, they’re all a way for people to make money by writing books telling people how to develop software. The target market is non-technical managers, developers [...]
December 13, 2009
Posted in: coders at work, rants, testing
No Comments
