Chris Warburtonwarbo@identi.ca

Irony: Dr David Waldron, a lecturer in history and anthropology at Federation
University Australia and author of Roleplaying Games and the Christian
Right: Community Formation in Response to a Moral Panic. "There was also
a view that youth had an inability to distinguish between fantasy and
reality."

Finally got identi.ca messages showing on my blog again, since the switch to pump.io. The solution: - Use pump2rss to get an ATOM feed URL - Put a script in cron to wget that URL - Pipe the results through "xmllint --format --recover - 2> /dev/null" to fix dodgy markup - Pipe that through xsltproc to strip out the empty title elements - Pipe that through xsltproc again to turn content elements into title elements - Pipe that into a Web-accessible file - Point ocPortal's side_rss block at that file's URL

I've been irked all day by the line "if ($foo == 1) {...}" and finally spotted the problem; it's not that the author's been too lazy to put an extra "=" on their comparison, it's that they've done a comparison at all!According to PHP's type-mangling, "1" is 'truthy', so "if ($foo == 1) {...}" is pretty much like "if ($foo == TRUE) {...}". Hopefully it's obvious to everyone what's wrong with that: "if" casts its condition to a boolean and checks if it's TRUE, so this *isn't lazy enough*! We can just do "if ($foo) {...}"

*I say "the line" but of course this pattern is actually copy-pasted a few times in a row, since it never occurred to the author to use a loop...