Wednesday, November 19, 2008

Nice trick with functools and os.path.join

Sometimes os.path.join('something', 'something_else', 'more' ... ) gets old. With functools.partial, you can preload os.path.join to clean up your code. For example:

import functools
my_path_plus = functools.partial( os.path.join, 'a', 'b', 'c')
m = my_path_plus('x', 'y', 'z')
# m is 'a/b/c/x/y/z'
n = my_path_plus()
# n is 'a/b/c', for when you don't want to add anything.

Thursday, May 29, 2008

What cities whisper to us

Another great post by Paul Graham. I think I'll stop linking to his stuff unless I have something to add. Just go an read his essays.

I wonder what message Istanbul sends to residents. (edit) Having been to Istanbul again recently, I still don't know what it says to you, but can say it's a very sweet song, (if you've got money).

Friday, May 23, 2008


Paul Graham posted again in his usual good form. I canceled my cable years ago, and have never regretted it. Amusingly, I follow his formula for email at work, but only because Ironport uses exchange, and I haven't gotten around to setting up a windows vm on my Linux desktop. Hmm.. Thinking about it, I should try using Evolution instead. I'll give that a shot and report back...

Update: Evolution might get the job done, but I don't like it. Back to thunderbird, and ignoring meetings...

Unit tests force decoupling

I just read Vidar Hokstad's post on reducing coupling via unit tests, and I can't agree more. I'm currently trying to untangle some code that was written without unit tests, and is very tightly coupled. It's easier to fix in Python than it would be in, say, Java, but that still doesn't make it fun. A recent post on proggit makes the argument that unit testing is on the wane. I really hope he's wrong. I've been doing TDD for several years now, (since reading Kent Beck's book on the subject), and I find it much better than any other methodology.

I was also sad to hear that Agitar went under. I was never in their target market, but I always thought they had some cool tools.

Saturday, May 10, 2008

Nokia 810 goodness...

I just unwrapped my new 810 last night, and have been impressed. To have a Linux machine that you can carry in your pocket it wonderful, especially with apt-get. Add in a bash shell, vi, ssh, openvpn, and it just keeps getting better and better. I'm really impressed with the 800 x 480 screen. I think I've found my new sidekick. And I haven't even started in on the hacking sites. (Is that a python in your pocket or are you happy to see me?)

Friday, May 2, 2008

Beginning of the end of Linux Driver issues... has an article on major OEM's (ASUS, Dell, Hewlett-Packard, and Lenovo) would put language into their acquisition contracts with their suppliers to require either Linux drivers or open api's to speed Linux driver development. In the last couple of years driver problems have gone from show stoppers to annoyances, but this, combined with the ever growing install base of Linux, promises to make driver issues a thing of the past. I was at Smart & Final the other day and picked up a usb key, and was amused to see that in addition to the windows logo, it had a linux penguin.

Thursday, May 1, 2008

Flash & Silverlight bait and switch...

Beware of geeks bearing gifts...
Personally I've become so cynical that I use open source as a purely defensive measure. I've been burned too many times.

About the title of this blog.

It's my bit of homage to my favorite British comedy, Coupling. If you've never seen it, you are missing out on one of the funniest shows in years. I don't watch tv, don't even have cable, but this was so good I went out and bought it. You can get it off netflix either on disk or via watch now, too. It ran four seasons before the actors went their separate ways. If I ever make a mint, I'll pay for a reunion series personally... ;-)

Ubuntu + Wine = Windows 7

I was reading Joel's latest post, about the architecture astronauts that are running MS, and it occurred to me that they're going in exactly the wrong direction. After all, Wine is great. I can run most of my apps on it with minimal fuss. As wine doors takes off, I can see that I'll be able to run them with different settings. Since Linux is already a much more stable environment that the crap Microsoft keeps pushing out, how long is it going to be before people start writing against the wine api and let people run their software wherever they want?

Saturday, April 26, 2008

Linux is making progress

I was browsing through magazines at the dentist's office, and started looking through PC World. In the few minutes I glanced through it, I counted 3 articles on Linux (all Ubuntu)! When did such a stalwart Microsoft mag start paying attention to Linux?!

I guess all the hard work is paying off. Thanks to everybody who helps out with Linux, we're really making progress.

The Wonders of IPython

IPython is an excellent tool. If you work with python and you're not using it, you're missing out. It's one of the first things I install on any new machine. To see how much you're missing out, take a look at these screencasts. They're about an hour total, and it's worth every second.