Older blog entries for oubiwann (starting at number 169)

PyCon 2008 Registration Discounts Expire Tomorrow!

Hey all, in case you're like me and wait for the last minute to do everything, you need to hop on the good foot and do the bad thing: pay now. Or do the worse thing: pay later, and pay more.

Currently, the rates are as follows:

  • hobbyist registration: $220
  • corporate registration: $400
  • single room: $99 (maybe all rooms are the same price?)
After tomorrow, the rates jump up to the following (until March 7):
  • hobbyist registration: $300
  • corporate registration: $500
  • single room: dunno... I've heard rumors that you might be able to get something for $160/night

Don't wait any longer... :-)

Technorati Tags: community, pycon

Syndicated 2008-02-19 16:50:00 (Updated 2008-02-19 16:51:06) from Duncan McGreggor

Twisted's filepath Module

Glyph recently blogged about some of the buried treasure in Twisted, the filepath module in particular. Since working at Divmod, I've made use of this module quite a bit, and thought I'd share some of the features that I've found most useful (and intuitively nice to use).

Assuming you've got Twisted installed, let's fire up a python interpreter and import the FilePath class and instantiate it with /tmp:

>>> from twisted.python.filepath import FilePath
>>> tmp = FilePath('/tmp')


Now let's test some basic operations:

>>> tmp.exists()
True
>>> bogus = tmp.child('bogus')
>>> bogus.exists()
False


Isn't that nice? I love not having to import and use the os.path.exists function; it's a method on the object representing a file or a path, as it should be. I also enjoy the convenience FilePath offers when it comes to creating paths:

>>> mydir = tmp.child('notbogus').child('anotherdir').child('mydir')
>>> mydir.exists()
False
>>> mydir.makedirs()
>>> mydir.restat()
>>> mydir.exists()
True


We had to call restat() so that the object would check the file system again (since we just made some changes). Now, for some files:

>>> for filename in ['test1.txt', 'test2.txt', 'test3.tst']:
... mydir.child(filename).touch()
...
>>> mydir.listdir()
['test1.txt', 'test2.txt', 'test3.tst']


And if you don't believe that, we can switch to shell:

lorien:oubiwann 20:51:58 $ ls -al /tmp/notbogus/anotherdir/mydir/
total 0
drwxr-xr-x 2 oubiwann wheel 170 Feb 17 20:51 .
drwxr-xr-x 3 oubiwann wheel 102 Feb 17 20:46 ..
-rw-r--r-- 1 oubiwann wheel 0 Feb 17 20:51 test1.txt
-rw-r--r-- 1 oubiwann wheel 0 Feb 17 20:51 test2.txt
-rw-r--r-- 1 oubiwann wheel 0 Feb 17 20:51 test3.tst


Reading and writing operations are the same as usual:

>>> myfile = mydir.child(filename)
>>> myfile.isdir()
False
>>> myfile.islink()
False
>>> myfile.isfile()
True
>>> fh = myfile.open('w+')
>>> fh.write('do the usual thing')
>>> fh.close()
>>> myfile.getsize()
18L
>>> myfile.open().read()
'do the usual thing'


But you can use shortcuts like this, too:

>>> myfile.getContent()
'do the usual thing'
>>> myfile.setContent('and now for somethibg completely different...')
>>> myfile.getContent()
'and now for somethibg completely different...'


Let's get the path and recheck the file size, just to make sure:

>>> myfile.path
'/tmp/notbogus/anotherdir/mydir/test3.tst'
>>> myfile.restat()
>>> myfile.getsize()
45L

Or, again from shell:

lorien:oubiwann 20:52:06 $ ls -al /tmp/notbogus/anotherdir/mydir/
total 8
drwxr-xr-x 2 oubiwann wheel 170 Feb 17 20:58 .
drwxr-xr-x 3 oubiwann wheel 102 Feb 17 20:46 ..
-rw-r--r-- 1 oubiwann wheel 0 Feb 17 20:51 test1.txt
-rw-r--r-- 1 oubiwann wheel 0 Feb 17 20:51 test2.txt
-rw-r--r-- 1 oubiwann wheel 45 Feb 17 20:58 test3.tst


Hmm... for some reason, I really like this file and want to keep it. What do I do?

>>> docs = FilePath('/Users/oubiwann/Documents')
>>> myfile.moveTo(docs.child('special_file.txt'))


That's it! Nice, eh? Of course, we're careful, so we check to make sure it happened:

>>> myfile.exists()
False
>>> newfile = docs.child('special_file.txt')
>>> newfile.exists()
True
>>> newfile.path
'/Users/oubiwann/Documents/special_file.txt'
>>> newfile.getsize()
45L
>>> newfile.getContent()
'and now for somethibg completely different...'


To see more, check out the source, or at least do dir(FilePath) to see what other goodies this class has to offer, and enjoy :-)

Technorati Tags: howto, python, twisted

Syndicated 2008-02-18 03:21:00 (Updated 2008-02-18 03:24:07) from Duncan McGreggor

14 Feb 2008 (updated 21 Feb 2008 at 22:03 UTC) »

Twisted Presence at PyCon 2008

A quick post to let folks know that there is a planned Twisted presence at PyCon this year (last year's was a happy coincidence). We're already coordinating travel and have some BoF ideas up our collective sleeves that are sure to intrigue if not titillate and please.

Twisted brothers and sisters: be there or... well, you'll just miss out on all the goodness that is the unstoppable force of Twisted :-)

Technorati Tags: community, pycon, python, travel, twisted

Syndicated 2008-02-13 23:36:00 (Updated 2008-02-21 21:11:27) from Duncan McGreggor

Blendix Update

Glyph just posted a great entry on Blendix -- I highly recommend it!

We've had a really excellent response from tons of new users both with accolades and fantastic suggestions. You guys are awesome and I hope you stick with us, helping us make this app something useful to you and one that you enjoy using :-)

Technorati Tags: blendix, community, divmod, software

Syndicated 2008-01-19 00:04:00 (Updated 2008-01-19 00:06:37) from Duncan McGreggor

Divmod's New Product: Blendix

In several previous blog posts, private email conversations with some of you, and Facebook conversations with others, I have referenced Divmod's new product. We quietly released our first beta on November 9th and are currently about 85% through the second beta (to be released some time in the next couple of weeks). I'm blogging about it now because I just can't wait any longer :-) And we've been getting some really great feedback from users.

"But what is this mystery product?" you ask. Say no more! I am talking about Blendix. As the front page says, this first incarnation of Blendix is primarily a tool for consolidating web properties into a single URL, for your convenience and that of your friends/family. A striking example of this is my page on Blendix: https://blendix.com/users/oubiwann/. As you can see from the "Now Blending" panel, you'd have to visit 14 URLs at 10 different sites to see this same content. By checking me out on blendix.com instead, you are not only saving yourself the time and trouble, but you're getting a more complete picture of what I've been up to.

"Um, yeah... looks like an RSS reader to me..." True, there are a lot of similarities. But there's another twist: you can add your friends, too. Even the ones that don't want to create an account on Blendix :-) I'd say that it's a safe bet most of us have friends who publish some sort of content online but who also can't be bothered to join yet another social networking or similarly service-oriented site. With Blendix, that's not a problem -- you don't have to wait on anyone :-) You simply add them to your contacts where you can provide feeds, email addresses, and user names. Then, their public content (i.e., "feeds") will be displayed at a unique Blendix URL.

Right now, anything that provides an RSS feed can be added to your profile (and your contacts' profiles). Additionally, we're getting custom content from such sources as Amazon wishlists, last.fm playlists, weather, Google maps, and Flickr images... with lots more planned :-)

I wanted to write about Blendix here (on my blog) before we made any official press releases because you guys -- the members of the python community -- are our "home town" :-) We want you to get "first dibs" (as it were) and we wanted you to hear the news from one of your own, not from the cold lips of some news story. We're keeping things small for now, but if you have any interest (or if you use similar features with a related service), please come check us out (oh, and this too), sign up, take an account for a spin, and email us with any problems, questions or suggestions.

The team has been in amazing spirits during this multi-month push, working really hard, and adding new features left and right. We've been at it for a while, so competition is growing in this increasingly important user space. We may not be the shiniest or have the most users, but it is consistently apparent that our product is addressing needs and features that others seem to be skipping. Our development process may have taken longer than others due to the infrastructure we decided was essential to build, but this has given us an edge over other shops with similar plans.

And boy, do we have some nice surprises in store for you in the months to come :-)

Technorati Tags: business, community, divmod, internet, software, web

Syndicated 2008-01-17 04:32:00 (Updated 2008-01-17 04:32:38) from Duncan McGreggor

New ED Blogger Template

Well, I finally got around to migrating my blog over to the new blogger templates.

I customized their "Rounders" style by Douglas Bowman of stopdesign.com to use the colors and background image of my old-style blogger template. I found the process most painless and am happy with the results; it's nice to be able to manage the content in discreet chunks and the added convenience of the various widgets blogger offers is a big bonus.

I've also added a couple new sections that are populated based on the view/click rankings in feedburner. This should provide folks with easier access to the content they find most interesting.

I feel that the blog is now crisp, cleaner, and more enjoyable to read. Hopefully, so do you ;-)

Technorati Tags: blog, design, web

Syndicated 2008-01-16 08:32:00 (Updated 2008-01-16 08:36:30) from Duncan McGreggor

Reflecting on the Future via Thunderbird...

I've been using Thunderbird/Mozilla Mail/Netscape Communicator for quite some time now, with mbox files that date back to 1997. A few months back, however, I had some issues with Thunderbird handling my 7GB+ of archived email. This happened a couple years ago, too, when I added a near decade's worth of email to "Local Folders." Thunderbird took 10-15 minutes to load, every time I started it up.

Recently, I started seeing a similar but worse problem: it never finished loading at all. Not having the time to investigate, I gave up and started using GMail exclusively. I'm a big fan of GMail for both personal and business communications, so I had no problem with this. My only annoyance is that GMail seems to really slow down FireFox after an extended period of time (after being open for a week, for instance).

However, just the other day, I had desperate need of my archived mail. As such, I set about to find a way around the ThunderBird problem once and for all. What ended up working was adding one *.sbd folder at a time, checking it, quitting TB, restarting it, and adding the next one.

After all the old data was added and TB was running smoothly, I noticed that many of my mail folders were several GB is size, despite the fact that they contained only a few KB worth of messages. Peeking inside the files, I saw some really old emails that ThunderBird wasn't displaying. On a hunch, I went to the "File" menu and noticed the "compact" item. Bingo, that did the trick.

So far, everything is running great and I'm glad to be using TB again.

But here's the point: I'm really glad to be using TB again. I can't tell you the bizarre amount of contentment and near-euphoria I felt after seeing all that mail in its "rightful place", where I can search and find what I need, where I can reminisce, get old business information, content from which I can draw new inspiration, etc. I felt some weird form of "cleanliness" about having my mail in its own app and out of the browser.

I mean, hell yeah, Google's got a good thing going -- no denying that. But with the decreasing cost of storage, historical correspondence is something I want at my fingertips so that even if I have no internet connection, I can still get to it; even if I have no ThunderBird, I can still fire up vi and dig around.

And this made me think: we're all looking at web apps, MMOs, Amazon's EC2/SimpleDB, etc., but what about users like me? How many are there of us? What kind of market do we form? What *other* tools might we like to have besides email clients? I want to manage my data on my hard drives under my conditions. I like little scripts and even GUI apps that do one or two things really well. I'd love to have little GUI apps like that could be combined with other apps, forming exactly what I need when I need it with little or no pain.

Glyph was recently showing me the latest version of the Glade UI builder, and I was really impressed. It reminded me of working with Apple's XCode a few years ago -- a wonderful experience. And now... I wonder. What it would take to build a "meta IDE"? Where instead of assembling pieces of code and GUI widgets, we're assembling little GUI apps that all communicate via a shared, open protocol. Apps that could be easily reskinned to look like one complete application...

As a developer, the first thing that comes to mind is a tool that would be a combination of an IM/IRC client, a bug tracker, a wiki editor, an IDE, an email client, an svn client, and a time tracking tool. Each would be able to communicate with any other, allowing data to be correlated, tagged, cross-referenced, etc. Building that monstrosity from scratch would be heinous. But building each part wouldn't be too bad, really. What about having the flexibility to use any one of those as a stand-alone app, or combined with as few or as many of the others as you desired? That'd be killer. And wouldn't it be great not to have to use a web browser?

There has *got* to be some demand for this sort of thing...

Technorati Tags: software, web

Syndicated 2008-01-10 23:23:00 (Updated 2008-01-10 23:24:02) from Duncan McGreggor

2 Jan 2008 (updated 17 Jan 2008 at 01:04 UTC) »

Divmod Rocks

So I've been working at Divmod for several months now, and I thought I'd report on things a little bit. I've actually wanted to do this for a while, but things have just been soooo busy here, that I honestly haven't gotten the chance.

Simply put, this is the best company I have ever worked for. The team is brilliant and hard-working; the (virtual/distributed) working environment is highly creative one; the CEO is amazingly supportive and gracious; the software and supporting architecture is fascinating; and our product is actually useful and people like it :-)

I've done my time in Corporate America and swore I'd never go back. I've been a consultant since 2002, and the fact that I am actually an employee again really says something about the company I'm working for and team I'm working with.

Technorati Tags: divmod, work

Syndicated 2008-01-02 13:30:00 (Updated 2008-01-16 23:54:51) from Duncan McGreggor

Rest in Peace, Twist

Well, today was a sad day. After months of care and rehabilitation, my big, strong, proud alpha horse had to be put down.

He was an older horse, and after the abuse he suffered before we got him and a couple bad falls, he started losing full control over his hind legs. For the past few weeks, we kept him warm and well-fed in a stall, with Marjorie caring for him like a brother. There was amazing improvement, but when we took him for a walk a couple days ago, our hopes were crushed. He had to go right back in the stall, for fear of hurting himself and others (by falling on them).

We are concerned about his best friend, Timer; Timer's whole life has been spent with Twist -- they've never been apart. Hopefully, between Marjorie's pony Kelly, our friend Nola, Marjorie and me, we'll be able to provide a nice transition for Timer.

Great and Strong Twist: run with the spirits my friend. Race the bardo winds unencumbered and taste freedom like never before.

Technorati Tags: life

Syndicated 2007-12-11 16:26:00 (Updated 2007-12-11 16:30:42) from Duncan McGreggor

9 Nov 2007 (updated 19 Feb 2008 at 23:04 UTC) »

Twisted AJAX/COMET Tutorial Pre-release

As promised earlier, here is the new Athena tutorial!

Currently, the tutorial consists of a topical introduction and two example applications, built with the reader step-by-step. Note that this is still in branch and hasn't been reviewed for inclusion in trunk. Please feel free to leave comments to this blog post about the tutorial (good, bad and ugly). This will help us improve the content and prepare it for inclusion in trunk.

The tutorial includes detailed instructions on setting up an environment, obtaining the source code, and running the applications. There are also pointers on how to conceptually approach development with Nevow/Athena.

Due to concerns over code compactness, we pulled out the CSS that nicely styled the echo and chat tutorial apps. The curious can view the styled versions here:




And if you want to pretify your example apps, you can update the fragment templates per the links given below.


Technorati Tags: ajax, comet, divmod, documentation, howto, python, twisted

Syndicated 2007-11-09 17:52:00 (Updated 2008-02-19 22:54:31) from Duncan McGreggor

160 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!