Archive for December, 2009

Fun with the Canon EF f/1.8 50mm Prime Lens

Thursday, December 31st, 2009 | Photography, Photos | 1 comment

As a Christmas gift, I received the Canon EF f/1.8 50mm lens for my XSi. This is an awesome lens for several reasons, not least of which is the fact that it sells for under $100, making it essentially dirt cheap as far as lenses go. The reason that Canon can make a lens with an aperture this large for so little is that it is a prime lens, so it has few parts. The lens is known for having fantastic optical quality, even compared with much pricier lenses, at the cost of relatively poor build quality (it has a plastic housing that apparently doesn’t hold up well to wear and tear).

After messing around with it for a couple of days, I am very happy with it. At 1.8, the depth of field is ridiculous—for example, it is very easy to get the wrong part of a face in focus. The lens has a bit of trouble focusing, particularly in low light, and the motor is fairly noisy. Going for the $350 f/1.4 USM lens would probably fix these problems. I also definitely noticed the lack of IS as compared with the kit lens, but as this thing is so fast I really can’t complain about that. In fact, any criticism of this lens can be more or less rebutted by recalling the absurdly low price.

› Continue reading

Tags: , , ,

Using notify-send to Slack Off Efficiently

Thursday, December 17th, 2009 | Linux, Programming | No comments

I’ve been working on a big project in MPI and the execution times on my code are annoyingly long (on the order of minutes). I like to keep my work in a separate workspace from my browser to minimize distractions, but then when I set my code running and head over to visit reddit or something I often don’t notice when my code finishes. Today it occurred to me that this would be a good use for libnotify. There is a command-line utility called notify-send (you should have it if you have a recent version of Ubuntu; not sure about other distros) which gives a simple interface to libnotify, so I whipped up a tiny script to call it:

#!/bin/bash
 
EVAL_STRING="notify-send -u normal -t 5000 -i info \"Task completed\" \"$@\""
eval $@; eval $EVAL_STRING

I put it in a folder which is in my path, and now I just do

$ notify ./takes_forever

and I know as soon as it’s done. OK, back to work.

Tags: , ,