Thursday, March 31, 2005

Spyce: Not Dead Yet?

Now that the Python web framework discussion has heated up, it looks like the moribund Spyce framework is finally getting some love. Spyce is a PSP (Python Server Pages) framework with its own templating language. Jonathan Ellis's Spyced blog mentions recent checkins to a new Subversion repository, but I can't find a reference to it on the Spyce website.

I've just about settled on CherryPy for my web framework needs, but if Spyce is coming back, it looks like yet another thing I need to check out one of these days.

Update: looks like the svn repo is at

Tuesday, March 29, 2005

The Secret Lives of Pythonistas?

You know, looking over the PyCon blogs, I suddenly realized that you never see Mark Lutz and Kai Krause in the same room...

Monday, March 28, 2005

When Financial Analysts Attack

I don't know why, but I take perverse pleasure in seeing financial analysts outside the tech industry make colossal, sweeping predictions, basing them on incredibly wrong, sometimes borderline-supersititious premises. (I imagine they feel the same way when they see some random geek sounding off on The Motley Fool or Yahoo! Finance.)

Thomas Hazlett of The Financial Times starts off with an interesting question: "Is Microsoft Toast?" He believes that while the anti-trust suits failed to break Microsoft hegemony, Google, Mozilla, and Apple are examples of the rest of the market "chipping away" at the giant.

Wow. Major revelation to anyone who hasn't been online in the past five years.

It gets worse. The article is coated with a glossy sheen of outright errors:

Apple, with its tight, integrated interfaces cinching hardware to software has proven powerfully resistant to viruses and spyware, the poisonous infections of the Internet. Meanwhile, Microsoft users scramble to update their software with the latest patches, frantically downloading anti-viral software, running and re-running spyware disinfectants.

Erm, no. "Cinching hardware to software" has nothing to do with preventing malware infections, at least not until we get into the realm of things like Microsoft's "Trusted Computing" systems. Apple OSs do seem to have less malware issues, but hardware isn't the cause: it's a combination of marketing and software issues. Commercial malware authors wouldn't make enough money from Apple ports of their software to justify the costs, and most noncommercial (i.e., virus) authors don't run Macintoshes, so they can't program for them. Cross-platform languages don't typically lend themselves to the small size and tight OS coupling required for stealthy malware, and Apple's shift to the UNIX-based OS/X means they have a better security model than either their traditional OSs or "home"-targeted Microsoft OSs. (Beside that, I have a hard time taking seriously anyone who thinks I "scramble" when I update, or that I'm "frantically downloading" random software on any of the OSs I run).

Recall that the government’s anti-monopoly solutions focused on gaining access for multi-media software, such as that provided by RealNetworks, to piggyback on the Windows network. Yet the creation of an entirely new web-based gizmo, tied online to Apple’s iTunes, has proven the killer app. And despite the explosion in (legal) online music downloads, RealNetworks has seen its shares rise less than the Nasdaq over the past two years

Mr. Hazlett seems to be confused about who's benefitting from iTunes. This sentence falls at the end of a paragraph talking about how Apple is eating Microsoft's lunch. But then he tosses in RealNetworks. So which "entirely new web-based gizmo" is the "killer app": Apple's iTunes (which is being brutally undercut by other, cheaper services), or RealNetwork's Harmony (which Apple is trying to kill off by making their iPods incompatible with Harmony downloads)? I don't think Mr. Hazlett groks the phrase "killer app".

He also doesn't seem to understand much about Google or thin-client computing:

[T]ake the Google gambit. A company provides a new and improved search engine, splices in a few well-targeted ads, and is now capitalized at $50bn. Microsoft, despite ‘owning’ the software on which the applications run, did not get here first.

The whole idea of thin-client computing (like Google Search) is that the applications run on the server, not on the client. Microsoft doesn't own the software on which the applications run, and that's to their detriment. The software Microsoft owns is the eyepiece, not the telescope.

Apple is today on the upsurge because its personal computing systems have been vacuum-sealed, and because the company has – to the point of fetish – delighted in producing its own devices. While either was a distinct liability a decade ago, when Microsoft blew past by seizing the scale advantages of “open” operating system software, Apple’s obsessions look smarter now.

Perhaps Mr. Hazlett is unaware that the operating system that's powered Apple's comeback (at least on the non-iPod hardware) is itself based around an open-source operating system. Even so, as a developer I'm gobsmacked to hear someone describe Microsoft's operating system software as more open than Apple's. They're really about at the same level of openness for an applications developer, and Apple certainly has a higher level of openness if you're looking at the OS itself (Microsoft's limited and legally-encumbered "Shared Source" program for Windows CE notwithstanding).

And then, one more non-sequitir: a faint-praise swipe at Mozilla and Google themselves:

Yet, Mozilla opens its code to the world, generating robustness on pretty much the strategic polar extreme. Somehow, this seems to work in today’s marketplace, as does the Google business model, which looks a lot like the standard pre-bubble With the exception of the revenues (Google has some).

It works for Mozilla because Mozilla is not a sold product. Financial people seem to have a hard time grasping the idea that people in open source work for non-monetary rewards.

More surprising was that offhand shot at Google. I suppose $3.19 billion qualifies as "some" revenue; in fact, I think Financial Times would be rather happier with those numbers than with its own.

To be honest, Mr. Hazlett's hypothesis actually squares pretty well with what I see from my technological vantage point. It just makes me cringe to see a good-looking house built on questionable timbers.

Tuesday, March 22, 2005

Choose Python spotting at Pycon?

As I've mentioned before, work duties and recent surgery conspired to keep me out of Pycon this year. If anyone happens to see a Choose Python or PySpotting shirt in the crowd, I'd be grateful for a digital snapshot.


Sunday, March 20, 2005

Google and Firefox: Cheap and Easy Feature Integration

Recently I was reading a web page that, in passing, mentioned "The Yes Men." That tickled a memory--I recalled hearing of it, but couldn't recall whether it was a book, a band, a web site, a movie... so my reflex was to highlight it, right-click "Search Web for "The Yes Men" and click. Right--it's a movie; ctrl-F4 to close the tab and go back to reading.

Firefox's "Search for <selection>" (and to a lesser extent the small, unobtrusive search box built into the interface) are good examples of creating and integrating features cheaply, without increasing clutter. They use the existing tabbed page functionality, which may not be as elegant as a more customized presentation, but adds no additional code and no additional program behavior for the user to learn. They leverage someone else's freely-available interface and program (Google's in this case), without using either a specialized integration interface or a complex general-purpose integration layer. They expose 80% of the external feature with 20% of the work. And, most importantly, they do it in a way that feels natural to the user.

The original version of "Search for <selection>" brought up the search page in the current tab. One could argue that that's the correct thing to do, but it's just more convenient for the user to put it in a new tab, even if that requires additional action from the user to view and dismiss the tab.

The moral of the story? Feature integration doesn't always have to be a high-ceremony, elegantly-scripted and standardized process, despite what the Web Services folks (among others) might say. The current implementation of "Search for " works very much like a normal conversation--if you mention something I'm not familiar with, I'll say, "What's that?" You tell me what it is, and then we shift context back to the original conversation. Because it's so simple and so natural, it can become part of the user's standard repertoire without the user even realizing it.

Friday, March 11, 2005

Comments and Templates

Apologies to anyone who tried to post a comment recently; it looks as if's recent comment changes broke some of my template code. I've reverted Aftermarket Pipes to a default template until I can figure out what went wrong.

Language Design by Consensus

Guido van Rossum recently proposed a small addition to the Python language (any and all predicate functions). In the discussion that followed, he made an interesting comment:
What worries me a bit about doing a PEP for this simple proposal is that it might accidentally have the wrong outcome: a compromise that can carry a majority rather than the "right" solution because nobody could "sell" it.
For those not familiar with Python development, a "PEP" is a Python Enhancement Proposal. Generally, when someone proposes a new feature for the Python core or standard library, they float the proposal on Python-Dev, and if it seems promising, they write a formal PEP, which covers the reason for the feature, the potential effects, a reference implementation, etc. Then after more discussion and informal voting, GvR makes a "pronouncement" accepting, rejecting, or deferring the PEP.

When maintaining any project (but particularly a large infrastructure project like a programming language), there's a natural tension between having a single authoritative architect, and having a democratic process that tries to meet the needs of as many users as possible. If the project leans too far toward the single-architect model, it can wither because it doesn't meet the needs of enough new users; worse, if the original architect loses interest, it can die on the vine. On the other hand, if the project goes fully democratic, it can suffer from loss of focus, bureaucratic slowness, and feature bloat.

As Guido mentioned, ideas can become "sanitized" into a least-common-denominator version based on political will rather than usefulness, aesthetics, or logical correctness. For example, in The Design and Evolution of C++, Bjarne Stroustrup explains why pure virtual methods use the awkward "virtual foo() = 0;" syntax rather than a "pure" keyword: the last standards committee meeting for release 2.0 of the spec was just around the corner, and if he'd suggested adding a "pure" or "abstract" keyword, the resulting debate would have delayed inclusion of abstract classes beyond the impeding release of the spec. In other words, a short-term hack, based on the fear of bureaucratic delays, has been enshrined in the language for all time.

The need to placate and compromise is another source of problems in hyper-democratic projects. At a previous job, we were developing a coding standard by team consensus. On indentation, we were divided roughly equally into a "four spaces, dammit!" camp, a "two spaces, dammit!" camp, and a "I don't care, just make a decision, dammit!" camp. We ended up with three-space indentation, which had the alleged benefit of pleasing no one, but offending everyone equally.

Based on completely non-scientific observations over my career, more projects (both open-source and proprietary) stay coherent and successful when a single architect can make decisions. That doesn't mean an autocratic process: like Linus Torvalds or Dave Cutler, they can have "trusted lieutenants" to whom the single architect can delegate trust and responsibility, but a single vision tends to keep a project's design tighter and less susceptible to unproductive ratholes and non-orthogonality.

Chief architects walk a fine line, of course: they need to exert just enough control to keep the project coherent, but not so much that the project stagnates (or in the case of open source projects, people abandon the project). It's more an art than a science, though. I don't think you can describe hard-and-fast rules for how to do this; on the other hand, there's good money to be made convincing people otherwise.

Disclaimer: I'm not disparaging projects linked to here, and I'm not saying they're inherently broken. Each is successful by some measures, but each has flaws that can be traced to its location in the "autocratic-democratic" continuum.

Monday, March 07, 2005

Microsoft PPC200x Developer Power Toys

>>> self.happiness = sum([pig.happiness for pig in slop])
I can't believe it took me so long to find out these CE development tools exist.

Among the goodies:
  • A real command shell for Windows CE 4.x (ok, it's not bash, but it's better than nothing)
  • A remote control app (no more stylus-mistapping-on-the-cradled-device nonsense).
Even stranger, they appear to be reliable and solid.