Skip to main content

Posts

Showing posts from August, 2005

Code Jam 2005

I tried my hand against around 5000 other programmers in Google's Code Jam 2005 . Last year Windows corrupted the hell out of itself halfway through, when I had foolishly not saved any work. The time and concentration lost rebooting killed me. (I had the infamous anti-aliasing problem for my 500pt question. The lowest qualifying score from that group was in the 170s, IIRC. Google dialed down the difficulty considerably this year.) This year I went into battle armed with Visual Studio 2005. TopCoder doesn't recognize any of the beta additions, but Studio 2005 has a pretty decent Emacs mode. Instant 10% productivity bonus! The alert reader will have already noted the use of the past tense in the first sentence and concluded that I didn't make it into the top 500 to qualify for the next round. Correct; I missed the cut by 4 points (732 to the 100th place guy's 736). Ouch. I'd kinda rather have been way outclassed than lose by 4 points out of 1000. Now I...

Durus 3.0 alpha released

Thought this was worth pointing out since the Durus guys don't seem to make PR much of a priority. (No slur intended. You could say the same thing about Spyce. :) Durus is a python object database similar to ZODB, but (much) simpler. Their Pycon 2005 paper is a good intro. Here's the 3.0 changelog . IMO the coolest parts are zlib compression and incremental packing. Spyce has a Durus interface (spyDurus) that makes persistence even simpler than the various ORM tools. The to-do demo uses Durus.

A little PHP humor

(Seen in a slashdot comment .) Possible mottos for the PHP project: PHP: We'll be there for you if your development environment doesn't have enough side effects. PHP: Because we know the money's in the maintenance contracts. PHP: Because you obviously don't know any better. PHP: We take security as seriously as Microsoft ten years ago. PHP: Doing it fast is always better than doing it right. PHP: Proving that if any idiot can write an e-commerce package, any idiot will. PHP: Yet another great reason to make regular backups. PHP: Fast, cheap, and robust. Two out of three ain't bad, right?

Guido's OSCON Python keynote

Guido has posted his powerpoint slides in the usual location . (Opens fine in OpenOffice.) The slides are mostly the same as the ones from EuroPython a month ago; here are the main differences: Some odd slides during the introduction (anyone who was there care to explain these?) language data scraped from sf.net -- or you could just look at this page ; no need to scrape and piss off SF for something this simple. (Poor Dylan -- even less projects than Cobol -- 2 vs 4.) "What does this buy us" slides added to 342 (generator) and 343 (with) PEP discussion (highly recommended if you haven't been following python-dev religiously) Exception reform discussion Personally, the "with" statement excites me the most. The exception cleanup is overdue but less sexy. :) The static typing subject has been talked to death but I'll add my two cents. Basically, it's a bad idea because it kills duck typing by requiring interfaces like "iterable"--a horri...

Open-source, subversion, mono, and gcc

I read a blog entry about a subject dear to my heart: migrating from cvs to svn. I know svn isn't perfect, but it's just so much better than cvs that it's no contest. If you have objections to svn that are even just a few months old, they have probably already been fixed. One of the first things I did at my new job was to perform the migration and everyone (well... all one other developer who was hired before I was and is still there) thinks it was a great move. But I digress. Sort of. Reading said blog, I thought, "Ha, cool! Those Mono guys whined about svn blame being slow, but then those manly GCC guys dug in and fixed the problem instead of whining some more!" What a poster-perfect picture for the virtues of open-source, huh? Except, while looking for more details, it turns out that the developer responsible for the fix, Daniel Berlin, was a svn developer from way back. As well as (possibly more recently) gcc. (Does this guy ever sleep?) So it...

NagleQueue

Here's a piece of code for the one or two other developers writing intensely network-dependent code in Python. The idea is, instead of a protocol that looks like [command][arg] [command][arg] ... You save overhead (in your protocol and in the network's, if you're doing one connection per command) by batching things: [command][arg][arg]... Pretty obvious stuff, no doubt. But I thought the following class makes it rather elegant. class NagleQueue: """ When an item is put, NagleQueue waits for other puts for aggregate_time seconds (may be fractional) and then calls aggregate() with a list whose maximum length is max_items. TODO: currently, NagleQueue always waits the entire aggregate_time, even if max_items items are added sooner. NagleQueue starts a thread to handle the aggregate() call; this is not a Daemon thread, so you must call stop() before your application exits. NagleQueue will process any remaining items...

Python at the .NET user group

I was invited to present on Python and IronPython at the Northern Utah .NET User Group last night. I spent the majority of the time on Python itself, guessing (correctly, with the exception of a couple Zope users) that most people wouldn't know anything about Python beyond having heard of it. There was a lot of participation. It ended up lasting about 90 minutes, with a lot of Q&A throughout. I enjoyed myself and I think most of the .NET guys did too. Thanks for the chance to speak! A PDF of my slides is up here .