Greatest SciFi Scene

Posted December 29th, 2009 in Television by Stephen

This is perhaps the greatest scene from a science fiction tv show or, indeed, any show.

Ping Pong!

Posted December 29th, 2009 in Personal by Stephen

Having an older brother who lives just down the street with his wife and baby is awesome. Their new Ping-Pong table serves very well to reinforce that conclusion. We played a bit last night, I even managed to reach the marginally upper teens in a couple games.

Eucalyptus App

Posted December 28th, 2009 in Software by Stephen

Own an iPhone/iPod Touch? Like books? Like free books? You need to buy Eucalyptus App. Eucalyptus is an interface to Project Gutenberg: no more, no less. And it’s gorgeously well done. Mini-reviews, book cards, smooth page turning animations, searching, and a slick discovery interface to the 20,000+ books in Project Gutenberg.

Eucalyptus is currently on sale for $6 instead of $10, so check it out soon.

Git vs Hg vs Bazaar

Posted December 28th, 2009 in Programming, Software by Stephen

Heh.

http://whygitisbetterthanx.com/

http://whyhgisbetterthanx.com/

http://whybzrisbetterthanx.github.com/

Merry Christmas!

Posted December 27th, 2009 in Personal by Stephen

It’s the end of the third day of Christmas, here’s what I’ve learned so far:

  • If your receiver has the capability, go for the front wide speakers before the front height. Dolby Pro Logic IIz is supposed to be designed with videogames in mind, but even as a committed gamer I find the smoothing of the surround effect transition from front to rear more engaging than the addition of the height ambiance.
  • My son has discovered that presents themselves are pretty interesting. Last year it was all about the wrapping paper
  • My wife makes awesome meals using her new slow cooker, and very tasty ebelskivers using her new pan
  • The Mysterious Cities of Gold DVD set is more awesome than it has any right to be. For what is nominally a children’s cartoon, they really went all out. A nice art booklet, postcards, a map of the journey, an interesting interview with the cast of the English dub, and a fantastic restoration of the picture and sound.
  • Demon’s Souls is interesting enough to get its own post
  • Wooden train sets are even more awesome than they were when I was a kid. Sarah and I like to play with his new set almost more than he does.
  • The special features disc of the Star Trek blu-ray has some really interesting stuff.

Veering off on that tangent. J.J. Abrams is the anti-George Lucas. Doing effects in camera whenever possible, using real world (and outdoor) locations whenever possible, using camera tricks rather than digital effects whenever possible, listening to his crew, soliciting input from everyone involved all the way down to the extras. The extras! Seriously, he met with the extras every day and even ended up giving some of them lines. When you see him talking with anyone it’s clear that his passion is infectious. The people working with Lucas seem both terrified and annoyed at him, the people working with Abrams seem to be having a blast. Also, Abrams at one point during filming was wearing an “Infocom” t-shirt. There is no way that isn’t awesome. If he’s pandering, then the fact that he’s pandering to a crowd that would recognize and appreciate that bit of geekery (i.e. me) is awesome. If he isn’t pandering, then nerd alert (awesome).

Smashing Book is Smashing

Posted December 23rd, 2009 in Books by Stephen

My copy of The Smashing Book arrived today and, from a quick flip through, it looks completely chock full of fantastic advice. Sort of a Pragmatic Programmers for Web Design. Expect highlights.

WordPress 2.9 is out

Posted December 21st, 2009 in Site, Software by Stephen

Ars Technica’s report on WordPress 2.9.

I’ve upgraded this blog to 2.9, and the improvements are very slick. Expect more picture posts in the future as the new media library handling is extremely nice.

The auto-embedding of linked videos is deliciously simple as well:

Easy Directory Jumping

Posted December 17th, 2009 in Programming by Stephen

In the server section of my bash profile, I find the following (obfuscated) snippet to be very handy.

Updated to allow delving into subdirectories.

# easy directory jumping
for dir in $(find /webroot -maxdepth 1 -mindepth 1 -type d | cut -d'/' -f3)
do
  alias $dir="root $dir"
  alias inc$dir="inc $dir"
done
root() { cd "/webroot/$1/$2"; }
inc() { cd "/webincludes/$1/$2"; }

With this in place I can jump to any directory under webroot just by typing it and tab completion makes it even smoother.

# assuming /webroot/production and /webroot/preproduction
# and /webincludes/production and /webincludes/preproduction
$ pro[tab][return] # jumps to /webroot/production
$ incpro[tab][return] # jumps to /webincludes/production
 
# (update) and to delve into subdirectories:
$ production some_project/subdir # jumps to /webroot/production/some_project/subdir
 
# similarly
$ pre[tab][return] # jumps to /webroot/preproduction

sed search and replace

Posted December 14th, 2009 in Programming by Stephen

Just a reference post as I always forget the syntax for doing this:

$ ack -l --print0 "search" | xargs -0 -n 1 sed -i.replace-backup -c -e 's/search/replace/g' -e 's/additional search/additional replace/g'

Breaking that down:

# print0 all the files containing "search"
$ ack -l --print0 "search"
# pipe to xargs
# -0 : processes print0 list
# -n 1 : maximum of 1 argument per invocation
$ xargs -0 -n 1
# sed is called by xargs
# -i.replace-backup : original files will be left in place, appended with .replace-backup
# -c : use copy instead of rename for -i  (avoids changing input file ownership)
# -e : the actual search/replace regex(s) to execute (can have multiple -e)
$ sed -i.replace-backup -c -e 's/search/replace/g' -e 's/additional search/additional replace/g'

Wired How-To picks up on the Hacker’s Diet

Posted December 1st, 2009 in Snippets by Stephen

As any good programmer knows, one of the best ways to improve a system is to eliminate the possibility of user error. So why are all diets plotted around the willpower of a flawed, faulty user? If you’re having trouble shedding five pounds, just remember: it’s the system’s fault, not yours. So rethink your system and lose the weight without even thinking about it.

Engineer Weight Loss – Wired How-To Wiki.

Exactly the case. It’s good to see that the Hacker’s Diet is starting to get some more traction.