A retro moment
Warped as it was 8 years ago, in all of its eye-grating goodness.1 Word.
- And before in-browser spell checking. ↩
Warped as it was 8 years ago, in all of its eye-grating goodness.1 Word.
Yet another product I had not heard of. Apparently there is some controversy about Google’s ranking of their own articles at Knol. I’ll crawl back under my rock now.
Be glad you’ve never had a bug this bad. We’ll, I suppose maybe you have. Bad bugs suck.
Essentially, all models are wrong, but some are useful. – George Box
Kottke’s new tweet API is way cooler than Twitter’s. Seems more stable too. I haven’t laughed this hard at something on the nets for a long time. Thanks Kottke!
Here’s a quick cheatsheet for svn stat codes, as I can never find a good one when I need it.1
U Local file updated
G Local file safely merged
M Local file has been modified, needs to be checked in
C Local file contains conflicts that need to be resolved
? Local file not in repository
! File missing from local copy
A Local file scheduled to be added
A+ Local file scheduled to be moved
D Local file scheduled to be deleted
L Local file is locked by a running svn command
svn help stat. The one I never think about the audience. If someone gives me a marketing report, I throw it away. - Wall-E creator Andrew Stanton
Named, optional function arguments are a commonly used calling convention in Perl modules, used for constructors and heavily overloaded functions. They’re usually implemented with hashes in Perl, and while somewhat more work to iterate in the library than fixed arguments, they clearly document the call for the caller (and tend to be far less fragile).
They’re also easy to implement in PHP. Here’s an example (based on some CodeIgniter code I had laying around):
class bar extends Controller {
protected $data = array();
function foo($name, $extras = array('desc' => 'default1', 'on' => false)) {
$this->data = array_merge($this->data, $extras);
}
}
$extra default array parameter value.$this->data.Calling the function is simple:
$b.foo('test', array('on' => true));
$b.foo('test 2' /* uses defaults */ );
$b.foo('test 3', array('desc' => 'Here is a description'));
The caller’s syntax isn’t quite as clean as Perl’s, but applying the defaults is cleaner (and merging the structures is about equivalent). Despite the slightly more complex calling convention, it’s still useful for setup functions with multiple optional parameters.
Why programmers should play Go. A good argument for stretching your thinker in weird and wonderful ways. I’ve played my share of Go over the years, and while I can’t claim to be good at it, I can say that it has changed how I think. The important thing to remember, though, is that the stretching isn’t just a result of learning the game, it’s also the result of thinking about the game, and reflecting on the patterns of play and tactics.