|Ned Batchelder : Blog | Code | Text | Site|
» Home : Blog
I was in New York over the weekend, and walked over the Brooklyn Bridge, which I had never done before, despite having grown up in Manhattan. In college, I wrote a History of Science paper about Roebling and the bridge, so I have long been interested in it. My brother Patrick (the photographer who specializes in New York architecture) came with us, and we had a good time on the Bridge, and then in SoHo.
Patrick told us how they are considering letting pedestrians up to the top of the towers, and we couldn't quite figure out how they'd manage that. Then Charles Miller happened to describe his family outing to the top of the Sydney Harbour Bridge, so I guess it's possible. If they set it up in New York, I'm so there.
Metakit is an interesting embedded database engine. It isn't strictly relational, but draws heavily on relational concepts. Where relational databases talk about tables of rows and columns, Metakit has views of rows and properties. They seem isomorphic except that a property can itself be a subview, like another table inside a single row. It includes bindings for a number of languages, including one for Python. There's an implementation of SQL for it, if you are more comfortable working in that query language.
Doodle-O is an easy drawing game that my kids and I like to play. It is a creative game rather than a competitive game, and requires nothing more than blank paper and a pencil. It is ideal for long car rides (such as one might take the day before Thanksgiving).
Uru is the latest installment in the Myst series of games (Myst, Riven, Exile). This one boasts full freedom of movement, avatars, and an online version that allows for interacting with other players. I downloaded the demo, and poked around a little bit. The freedom of movement seems to be accomplished by lowering the quality of the rendering. One of the things I really enjoyed about the other Myst games was the exquisite detail in the worlds. The Uru demo has that flat synthetic feel of texture-mapped 2½D worlds. I hope the full game will look better, the screenshots certainly do.
The Curious Incident of the Dog in the Night-Time is a gem of a book by Mark Haddon. The narrator is Christopher, an autistic boy who sets out to unravel a mystery in his life (the murder of a neighbor's dog). Haddon expertly captures an autistic mind set (at least, what we neuro-typicals imagine it must be like). Because of Christopher's dispassionate outlook, the book's emotion is indirect: we know how the other characters must be feeling, even though Christopher can't see it himself, and we feel for Christopher as he encounters situations he can't fathom.
I especially liked hearing Christopher's thoughts on the differences between autistic and typical people, and his view that maybe they aren't so different after all. Although we often have difficulty understanding why autistics do things they do, Christopher shows that we must be baffling to them as well, and he ends up with a more accepting view of the similarities between us.
In searching for happiness and a rightness of place, Christopher is simply doing what all of us are doing. He deals with a more complex and overt set of difficulties than most of us, but it's a difference of degree, not of kind.
Jonathan Caves works on C++ compilers at Microsoft, and has started a new blog. His first entry is about LKG, or Last Known Good, the strategy for releasing fairly new compiler builds within Microsoft. Another early entry is about Gauntlet, the automated distributed regression testing system used by the C++ development team. (I'd post direct links, but I think his permalinks are out of whack.) Interesting stuff even if you aren't a C++ user.
If you are writing C++ with Visual Studio, and your builds take longer than you would like, you should try IncrediBuild. It's a distributed build tool that just drops in to the Visual Studio environment. Worker machines are enlisted to help with the compilation, and the results are collected back on your machine. We're trying it at work, and it isn't quite automatic (there seems to be some fiddliness with projects involving IDL files producing TLB files to be included in RC files), but it's close. They've got a whizzy graphical view of the build being spread across a number of machines, and they don't even require Visual Studio to be installed on the worker machines. Magic.
I'm not sure how their data is collected, and I'm not sure what it means in the long run, but The Money Map is an interesting way to look at how presendential candidates are raising money. It graphically shows funds to each candidate by geographic region. Fundrace.org also has The Money Index, which tallies candidates by various criteria such as who is collecting the most grass roots money, who is collecting the most fat cat money, and so on. Fascinating.
A few times in the past week, I thought of the story I barely remembered about a country that switched which side of the road they drove on. It seemed unimaginable that an entire country could decide at a certain point in time to just change sides of the road. But a number of countries have done it. The one I was remembering was Sweden, which changed over on September 3, 1967.
Details are in the Changing from one side to the other section of the abundantly researched Which side of the road do they drive on? page. Another summary of who drives where and why is at Why Don't We Drive On The Same Side Of The Road Around The World?
My wife wrote an op-ed piece that appears in the Washington Post this morning: My Autistic Child in the Balance. It's about the difficulty of having to choose an educational path for our son.
Andy Hunt and Dave Thomas, the down-to-earth wizards who wrote The Pragmatic Programmer: From Journeyman to Master, have a new series of books out called The Pragmatic Starter Kit. They're short focused books on in-the-trenches topic like version control and unit testing. If they are anything like the first book, they'll be fantabulous.
Recipes have been collected and traded on the Internet for as long as the net has been running. Recipezaar finally pulls all the technology together in a way that fulfills the promise of recipes on computers. It lets you search, then refine the results by categories in 6 facets. The recipes are presented with reviews, other recipe recommendations, computed nutrition facts, serving adjuster, and more. It's the kind of site that makes me wish I cooked!
One thorny issue with structured data is where does it come from? You could ask users to enter data in separate edit controls, but that's asking them to shoulder the whole burden. You could let them enter free-flowing data willy-nilly and hope to sort it out later. Apparently, Recipezaar gets the best of both worlds. Recipes are entered free-form, then parsed into structured data for presentation. Contact managers often work the same way. Both recipes and contacts have the advantage of a narrow domain, where the information can be expected in semi-structured form.
Bill Cutler makes good old-fashioned wooden puzzles, except they are diabolically clever. Most look like the traditional six-piece burr, but have been designed with computer support to be as difficult as possible. Also, some puzzles are more interesting looking, such as the Spider's Web:
First, a friend sends me this editorial about Cargo Cult Software Engineering. Then, Charles Miller writes about misimplementing stand-up meetings. Both are about following the form of a practice, and missing either its spirit or its underlying mechanisms, or both. In both cases, the celebrants don't achieve what they wanted. Richard Feynman explained cargo cults like this:
TidBITS, a venerable Mac newsletter, has launched Take Control electronic books. They're short, focused, timely, and only cost $5. They're designed to cover the middle ground between long web articles (often hobby-written, aimed at too technical an audience, and too short) and weighty 500-page tomes (too bloated with stuff you don't need, and too long a production cycle to get the info you need now). It's interesting to see the spectrum of publishing options get populated with more product points.
3 art links and 3 word links:
¶ Paul Schmidinger - Screen- and Webdesign, Java, Applets. Cool toys.
¶ Egg Art Sculptures Carving. Fragile.
¶ The Economists. Visual commentary on a mindset.
¶ Joho the Blog: The Dream Comes True. "The aqueous Hawaiian and great sequoia stood in a queue to ask, in onomatopoeia, what the hell a cooee is."
I downloaded some software from Oracle yesterday, and got to the Eligibility Export Restrictions page. It had five checkboxes for me to assuage their fears that I might use their software for some nefarious purpose. The first four were kind of expected. They asserted that I was not from a bad-guy country, that I wouldn't send the software to a bad-guy country, that I wasn't considered a bad guy by the Department of the Treasury, and that I wouldn't share the software with anyone who was. But the fifth checkbox stood out:
What exactly is the theory of this checkbox? Are North Koreans shopping the web for database software, and trying to download Oracle, and being stymied by this paragraph? Is the act of untruthfully checking this box the last straw in their back-breaking moral load? Does it cause them to pause and reconsider? I mean really, do we really think this is somehow preventing people from building weapons of mass destruction?
I can see it now: some depraved terrorist manages to build and deploy a horrific weapon of mass destruction. Somehow, he's been identified and his methods uncovered, but he's discovered a loophole in the justice system, and is going to go scot free. The day is saved by the ever vigilant Oracle legal team, who successfully prosecute him for violating the terms of his software download!
Keeping tree-structured data in a relational database is always a challenge. Storing Hierarchical Data In A Database demonstrates a nifty technique that is heavily tipped toward fast queries. It stores two numbers that link all the nodes together in a depth-first traversal. This makes all sorts of queries possible and efficient, but updating rows is a real pain. If you have data that is read far more often than written, it could be a good choice.
He's also just started something called del.icio.us, which is like a group muxway. A URL API lets you add and retrieve links, for example, so you can use it as a remote repository for links to display on your own site.
MaxDB is another open source database product from MySQL. It's a re-branded and enhanced version of SAP DB. It provides features that MySQL doesn't yet have, like views, stored procedures, and triggers. It's more expensive than MySQL, but not by a lot. Read the press release for more details.
A great pedantic rant about proper usage of words: Words and Expressions Commonly Misused by Insipid Brothers-In-Law.
BTW: I'm not implicating my own brother-in-law in this.
More web design minutia: The second difficulty (see previous blog entry) I was having with IE had to do with font sizing, but I finally solved it.
I've been screwing around with the behind the scenes stuff on this site, and a few things about IE caused me some head-scratching. Maybe a reader out there knows an answer. One of the problems is link targets.
For no particular reason (yeah, right!), I was reminded at work of this claim by Philip Greenspun:
Many more quips about computers and programming languages can be found at Quotes for Programmers.
Things to read (eventually):
Some pithy observations and principles about innovation, from Phil Windley, apropos the Segway:
These are tricky to keep in mind during the heat of battle. How far outside your comfort zone is OK? Expect conflict, but there's some point that's too much, right? Balancing on the knife edge is where skill and experience come into play.
BTW: one of those tricky spelling issues: "principal" is a person (or a lump of cash to invest), "principle" is a guiding idea.
I usually adopt technology slowly on this site. I've never put up a FOAF file, and my bookmarks are not available in OPML. I don't support trackback or pingback. I'm still not even entirely sure what Atom is. But I've decided to jump on the LOAF bandwagon. I think it's the kind of universally useful technology that will find application on lots of sites. And its elegantly minimalist specification ensures widespread adoption.
What's with footnotes on web pages? Footnotes to references used to be a compact way to point off to other resources without unduly interrupting the flow of the text. On a printed page, it was a good solution. But now we have better technology.
Alex Wright has written an introduction to the work of Paul Otlet, who I had never heard of. He anticipated the Web, devised the Universal Decimal Classification (the Dewey Decimal system on steroids), and tried to build what was essentially a search engine on 3×5 cards. Fascinating.
In case you've been living in a cave recently, or don't read about web design much, the big news is that it is possible to run multiple versions of Internet Explorer on the same Windows box, side by side, just like any other application. Microsoft has claimed for a long time that IE was too integrated into the operating system for it to be a separate application, and web designers have struggled with how to test their sites in more than one version.
Turns out, there's been a secret back door ever since the IE3 days, something to do with an empty file called iexplore.exe.local. You can download simple zip files, unpack them in whatever directory you want, and run the iexplore.exe you find in them. You get a number of different IE versions running simultaneously. Some people are warning that in fact, you may not have precise fidelity with the actual versions, since there are bits and pieces pulled in at runtime from all over. That's probably true, but I tried the downloads, and sure enough, I got old browser behavior from the old ones and new behavior from the new ones, all at the same time.
So far, this month, I have had no visitors at all using IE3 (why would they!), but now at least I know what they would have seen.
A friend told me that he didn't understand my position after reading my posting of a few days ago, about Clay Shirky's lambasting of the Semantic Web effort. Let me clarify.
The Creatures in my Head is a site with a daily creature drawing by Andrew Ball. There are almost two years' worth of creatures here, and they all have a real spirit, with expressive features and sly humorous captions.
Here's "...and that was the best day of my life":
Before the fairly recent introduction of the new top-level domains (.info, .biz, .museum, and so on), there were only seven three-letter top-level domains. Four of them were familiar to any web surfer: .com, .org, .net, and .edu. Two others were less common, but certainly not unfamiliar: .gov and .mil. The mysterious seventh domain, though, was unheard of: .int.
The official top-level domain page describes .int as "Organizations established by international treaties between governments". Odd, then, that my first sighting of a .int domain was tpc.inc, a free fax gateway service. It's established by RFC 1530, but I don't see where an international treaty was involved.
I found that NATO has a .int domain, though other organizations that you would think were formed by international treaties, like the United Nations, don't. Of course, the original justifications for the seven top-level domains have long been loosely interpreted. After all, everyone's got a .com, and even the seemingly unambiguous .edu has been used by the Smithsonian Institution.
A cool Flash thingy about how Lego bricks are made.
Clemens Vasters posts a puzzle (literally): Lightweight Transactions. He's advocating using transactions for general error handling and state management. His presentation about transactions calls this style of coding Prepare/Commit/Abort, and the more traditional style Do/Fix. (Actually, he first calls the new style Consider/Confirm/Perform, but I still don't understand how those names map on to the concepts: there's no Abort.)
Do/Fix is when you can ask a class to do work (Do), and then you can ask the class to undo the work if needed during exception handling (Fix). The problem with this is when you have a number of classes Do'ing things in a row: how do you know how to properly Fix across all of them? Prepare/Commit/Abort is when you can ask a class to consider a chunk of work (Prepare), then either do the work (Commit) or not do the work (Abort). These ideas will be familiar to anyone who has done transactional database work, but the point is that this style is applicable to many more domains. Just because databases first took problems seriously enough to apply transactions to them doesn't mean that only databases should.
The puzzle he posts is a sliding block puzzle program where the different pieces of logic are implemented as separate transactional resource managers, interacting through a transaction manager to decide, for example, whether the puzzle is completed. This may be a contrived example. It's interesting as a demonstration of using transaction for very undatabase-like work, but I don't see that we've improved the lot of sliding-puzzle-writers by organizing it this way.
But he makes some good points in the presentation (it can be hard to follow since it is mostly diagrams, but you get the gist. Just skip any acronyms you don't understand, they seem to be about Longhorn.) I can see the power in the transactional style. I've never built software this way, so I don't know how it would feel in a real-world situation. I note that Joel's challenge to me about exception handling would be handled more naturally with this sort of transactional model.
I tried it, and sure enough, it works, at least on the sample URLs he presents. I tried other experiments with it, and wasn't able to get the results I wanted. I don't where the deficiency lies, in the technology, or my understanding of it.
Interesting links from recent heavenly events:
In a commentary at the Guardian, Dylan Evans argues that we need to get beyond Windows to the code in order to be truly free in the 21st century: Smash The Windows:
What kind of crap is this? You might as well have argued that when printed books came along if you couldn't run a printing press you were doomed. Or the ascendancy of the automobile meant we'd all have to be mechanics.
Pito Salas makes exactly the opposite point: computers today are about where cars were in 1950, and as the technology progresses, users of it need less and less expertise in the internals.
Tim Bray considers the issue as well, and concludes:
Graphic Design USA has a run-down of 15 Trends Taking Shape in Logo Design, from droplets to wire. I wonder if any of these will become as popular as the swooshes or spirals that so monopolized the dotcom era logos.
OneLook Dictionary Search is a search engine specialized for searching dictionaries ("6,067,605 words in 963 dictionaries indexed"). They've got a cool reverse dictionary too: search for "causing anxiety" (I've always wanted an adjective to describe things that cause anxiety) returns:
plus hundreds more. The search is noisy, since it is by its nature fuzzy, but still useful. Also, you can use wildcard characters so it's a great way to cheat at crossword puzzles.
Clay Shirky has another long and intelligent essay. This time, it's about the misguided efforts to build the semantic web: The Semantic Web, Syllogism and Worldview. In it, he argues that (ironically) the semantic web effort is focusing on syntax, which is easy, and ignoring semantics, which is impossible.
He lampoons the focus on logical deduction (syllogisms) as a foundation for understanding the real world. Unfortunately, he does so by presenting poorly constructed syllogisms, where top-notch ones would have failed equally well. I'm sure his essay will be criticized for not understanding the logical foundations properly. This will be missing the point.
The point is that the true semantics of the world are too shifting and slippery to easily accommodate in strict terms. The "semantic web" projects that have worked have had tiny domains of knowledge to work in, where the semantics are easy to describe. For example, RSS describes weblog postings, and FOAF describes loose connections among people. Even in these areas, there has been disagreement over semantics, schisms over syntax, and uncertainty about compliance. How are we to address anything truly interesting?
The most ludicrous example of people not understanding this is HumanMarkup, an attempt to design an XML dialect that can encode those things that make us human: emotions, intentions, and so on. I'm astonished anyone believed in this quixotic effort long enough to register a domain name, much less create all the empty puffery that fills the site. Tellingly, all of the links to hard information like schemas point to nowhere.
I saw Matrix Revolutions on opening day, and enjoyed watching the robot fight scenes, but was surprised at just how many open questions from Matrix Reloaded were left still unanswered. There's a great deal of Christian symbolism, which seemed to me to be too pat a resolution for the clever story begun in the original Matrix.
For another take on the same issues, read Diego Doval's The Matrix Revolutions: the abridged script It's like a Mad magazine script that skewers the movie for all of its incomprehensible plot holes and simplistic story leaps.
Dave Shea at Mezzoblue wrote today about Plugging the RSS Usability Hole, where he finally gave a good reason for styling RSS feeds: so that unsuspecting users who click an RSS link see something intelligible. It's good idea, so I did it on this site. I also wrote a page to help explain RSS while I was at it.
If you haven't heard of this idea yet: the RSS feed includes an XSLT stylesheet reference, so if it is loaded into a browser, the XSLT will transform the XML gibberish into pleasantly laid out readable HTML. RSS readers ignore the stylesheet reference, so they continue to read the XML directly as before.
I'm the last guy in the world to believe in mystic underpinnings of random phenomena. But there's something kind of spooky about the way Kabalarian Philosophy can provide a paragraph about your personality given only your first name. Uncanny.
On Sunday I wrote about Reading mp3 metadata, in an effort to create m3u playlist files for mp3 files stored in directories by artist and album. I got an unexpected solution from an unexpected source.
Update: In January 2004 I finally got a complete solution together.
The best parts:
Unsure where you fall in the broader political spectrum? Political Compass will tell you. Answer a quick (some would say simplistic) survey, and they will plot you against two axes: Economic Left/Right, and Libertarian/Authoritarian.
For the official record, my score:
Of course, the authors of the site have a political view as well. The problem with trying to identify anything as left or right is that the placement of the center is subjective. I think that's one of the reasons why conservatives believe the media is biased left. Politics in the US today don't have any serious voices that are truly radical left. For example, Political Compass identifies most of the Democratic presidential candidates as right of center: The US Presidential Primaries 2003.
Dasher is an unusual text input mechanism. Letters flow across the screen guided by subtle mouse gestures. Choices are presented proportionally to their predicted likelihood. I tried the download, and found it disorienting and difficult to control. But I appreciate the new ideas it presents and the fact that it could be good for disabled computer users.
Ben Langhinrichs wrote about his frustrations with anchor links in Notes the other day. I commented there, but wanted to say more about it. Most of his frustrations are right on: the feature could have been made easier to use. But one is a direct analog to a problem on the web: you can't link to something if the author didn't anticipate the link.
Ben complained about this aspect of anchor links, and I thought about it and looked into XPointer, and saw that there was nothing to be done about it, since web browsers don't do anything fancy like XPointer. The best I could do was to use lots of id='foo' attributes. So I updated my XSLT code that produces this site, and now every <h1> and <h2> tag on the site includes an id attribute generated from the text of the tag.
So, for example, the section entitled "Use a real log" in my Log message style guide article is tagged like this:
and therefore can be targeted thusly: text/log-style-guide.html#h_Use_a_real_log. Link away!
Stencil Revolution sounds like a hip blog with a cool retro name, but in fact, it is about stencils. Yes, cut-outs that you spray paint through to produce images on streets, walls, t-shirts, and the like. I liked the tutorials which explain how to do advanced stuff like three-color layered stencils. It's nice to see the old crafts being handed down, even if it is for urban guerilla art warfare.
¶ Short Words to Explain Relativity, complex physics, in words of four letters or less.
¶ Sky Shooter, Lego Mindstorms to control a sky camera.
¶ nBot, a two wheel balancing robot.
¶ Large Numbers at MROB, if you want to know what a myllion is.
¶ Enormous machine, does anyone know what this is?
There's now a mug with my star logo available at my CafePress shop:
This has got to be one of my favorite children's books of all time: Horton Hears A Who! It's one of Dr. Seuss's earlier books, with more story and character, and less arbitrary whimsy. It isn't designed to be read by children, but to children, so the writing is more interesting than the Cat In The Hat style that (rightfully) earned him his strongest following.
Take this bit, with its impeccable meter, lush alliteration and clever internal rhyme:
The story is energetic and dramatic, and pulls young children in with its tale of tiny people in peril, and the elephant who believes in them. I never get tired of reading it. If you haven't tried it, I heartily recommend it. Coming in a close second is Dr. Seuss's other story about Horton, Horton Hatches The Egg, where he insists on caring for an egg left carelessly in his care.
For some time now, I've wished for a simple script that could make m3u files (play lists) from a directory tree of mp3 files (songs, of course). I figured it would be an easy enough thing to do, but it is not.
I looked into the ID3 2.4 spec, and it's not too bad reading the ID3 metadata from an mp3 file, but the data varies wildly depending on what ripping tool produced the mp3, and (surprisingly) what players have played the file. Windows Media Player likes to annotate the files when they are played.
There are a bunch of python implementations of ID3 tagging out there, but ID3 keeps changing and the ones I could find were for older versions. I hacked around with adding the latest stuff, but the disparity of actual tags in my files left me discouraged.
By the way: the ID3 spec describes itself as "an informal standard". I guess the author means that the standard has not been created under the stewardship of an official standards body. The document itself is the farthest thing from informal that I could imagine.
OK, so I could read the ID3 data from the file where it exists, but the m3u file also wants the length (in seconds) of the mp3 file. This information seems to be stored nowhere. I'm guessing most tools compute the length by examining the mp3 frames themselves. This theory is boosted by the fact that a few of them get the length wrong for variable bit rate files, presumably because they examine the first frame, then assume all other frames are the same rate (and that the file is almost all data frames).
At this point, I gave up. What's the fun in dealing with dirty data? Does anyone have a tool that does what I want? My mp3's are in directories by artist and album, and I'd love to have a .m3u file in each directory that listed all the mp3's beneath it.
Update: In January 2004 I finally got a complete solution together.
This has got to win some kind of award for the most complete game implemented on the least-capable platform: Pac-Man for Excel. It's a complete, playable, faithful implementation of the arcade Pac-Man game, written in Excel macros, with pixels of the game displayed by changing the background colors of minutely-sized cells! I'm flabbergasted. I don't even know enough about scripting Excel to be able to read the code this guy has written.