|Ned Batchelder : Blog | Code | Text | Site|
» Home : Blog
A friend asked what IDE I'm using for Python these days. Because it was already in use at my new job, I'm using Eclipse. Here are my impressions so far.
I was interviewing a woman for a QA position, and asked her why she liked QA. She said,
This page about a fractal representation of tic-tac-toe is from Fractal Images of Formal Systems. I don't understand the larger work, but the image is very cool: it shows the progress of a game of tic-tac-toe by drawing the next state of the board in the square the current player fills. Words don't do it justice, go take a look. Even better is the animated version (clever titled tic-frac-toe), which lets you actually play the game, zooming in to see the branching possibilities visually represented. End states are represented as colored squares showing who won. Very clever.
Just a quick note: let's say you are using the Python Imaging Library to composite a number of images with borders into a larger image. The ImageDraw.rectangle method is fabulous for drawing borders. BUT: The ImageDraw.bitmap method is not what you want for putting little images onto the larger image. I don't what it is good for, but it isn't good for that. You want the Image.paste method. It works great.
Just this morning I had another graphic example of how hard it is to get metadata right. This time I don't mean that the semantics are difficult to nail down, I mean that in the real world, people will do a poor job creating data that is useful.
Penn Jillette has a daily radio program, and is podcasting five-minute excerpts. Yesterday I downloaded a dozen of them (very handy for my unexpectedly hour-long drive to work in the snow this morning!), and they all appear in iTunes the same way:
In any case, Penn is very entertaining, and politically believes the things I do, but is more outrageous in espousing them. By the way, if you like Penn and Teller audio, you should listen to Teller. It's hard to do, since he's the silent one of the two, but he did an NPR commentary back in November: Alien Encounters: Dolphins and a Magician. It's very good, in a quieter more contemplative way.
One of the fascinating parts of old-style scrolling 2D video games was that you were playing in a large world, but only seeing a tiny part at a time (the part that fit on the screen). Using screen captures from game emulators, Ian Albert has produced huge single images of the worlds you were exploring piecemeal: Video Game Maps. An impressive piece of work.
Antonio wrote today about Unwitting Bloggers. He started by pointing to Bill Burnham's pompously-titled A Unified Theory of Search, Social Networking, Structured Blogging, RSS and the Active Web, so I started reading there.
Bill is very excited about RSS, and its extension into Structured Blogging. He forsees a world in which everyone has a web page, and rather than post bits of content on sites like eBay or Craigslist, everyone will post structured blog entries on their own sites. Specialized search engines will find those pieces and aggregate them for people looking for movie reviews or apartment listings.
This is a nice ideal, but there are a pile of things wrong with it.
Luckily, Antonio didn't buy into the structured blogging thing either. He's excited about unwitting bloggers, and I think he's right. People are more and more willing to have bits of themselves online. Some are more than willing, they are eager, but need help getting started with a substantial presence. I think there's lots that online services could do to turn members into unwitting bloggers. There's lots of exciting stuff coming down the pike.
I'm trying to create a table layout with a lot of cells spanning rows, but it doesn't render properly. Both Firefox and IE add extra gaps into the table cells (differently, of course). I'm hoping someone has a suggestion for how to get the browsers to display the table correctly. I know this is a particularly troublesome area, but I have a great deal of faith in all of you!
Driving cars is America's tough habit to break. We all know it contributes to global warming, but it's tough to stop driving. TerraPass is a clever campaign: they fund alternative energy projects that reduce the amount of carbon dioxide in the atmosphere. To join, you pay based on the estimated emissions from your car (determined by year, model and mileage). They use the money to fund a project that offsets your emissions. I joined.
In a comment here last week, Mikey asked for a small review of my Toshiba Tecra M3. Overall, I am very pleased with it. My previous computer was a Thinkpad T30 with a 1.86 GHz CPU and 1Gb of RAM. The Toshiba has a 2GHz CPU and 1.25Gb of RAM, but feels faster than those numbers would suggest, because it has a 7200 RPM disk, one of the prime reasons I chose it. Building this web site (a task that involves a lot of disk and CPU) goes about twice as fast on the Tecra than on the Thinkpad. The 60Gb disk is not gargantuan by today's standards (some laptops I looked at had 100Gb!), but is 50% larger than my last one, and the speed is great.
Overall, the Toshiba Tecra M3 seems to be a good workhorse portable desktop replacement. I use it for some heavy development (Django, MySQL, Eclipse, Firefox, Thunderbird, and VMware player all running at once), and it has not let me down.
The Conversations Network looks like a good thing. Doug Kaye, the founder of IT Conversations has branched out. IT Conversations always did a good job putting up audio from tech conferences. Now The Conversations Network is expanding on that idea to distribute informational audio content from a broader range of disciplines. Listening is free, but a paid membership will get you a listening queue, recommendations, and write access to their forums.
I got a Toshiba port replicator today, and packed in the box was a small slip of yellow paper with tiny print that read:
WARNING: Handling the cord on this product will expose you to lead, a chemical known to the State of California to cause birth defects or other reproducive harm. Wash hands after handling.
One way or another, this is stupid. Either there actually is a risk of harm, and why does the manufacturer make the power cords that way, or there is not, and why put alarming notices in our faces?
Tim is clearly coming at this from a document-centric (rather than data-centric) point of view, and from an interoperability rather than convenience point of view. Let me explain.
There are two broad camps of XML languages. Document-centric languages are for describing rich content, with flexible structure. They are often arbitrarily hierarchical, and can have nested namespaces for mixing applications together. Data-centric languages are for more structured information. There's no clear distinction between the two styles, and there are middling languages that have some flavor from both camps, but these are the two ends of the spectrum.
There are also, broadly, two reasons for using XML. The first is interoperability: you want a data description that can be used for many things, by many different systems. The second is convenience: everyone's already got an XML parser, so why not use XML to describe data, it'll be easy to parse, and people will know what they're looking at when they encounter it.
The two dimensions are closely coupled: document-centric languages tend to focus on interoperability, and XML chosen for convenience tends to be about structured data. XML's design center was interoperability of document-centric languages, and Tim is coming from that point of view. But many many XML applications are not. The public, highly visible ones are (XHTML and RSS for example), but the base of the iceberg is more about convenience parsing of structured data. If you are considering using XML, first understand whether yours is an Interoperability solution or a Convenience solution. If yours is Interoperability, then take Tim's words to heart. If yours is Convenience, then don't worry about it.
But another thing about Tim's screed against inventing XML languages is that it's very pessimistic:
Tim is right about all this of course, but his conclusion ("Don't Invent XML Languages") is I think an overreaction to the difficulty. After all, you could global search and replace the concept "XML language" in Tim's paragraphs with "software" or "startup" or "screenplay" or "sculpture", and come to the conclusion that no one should undertake those endeavors.
Yes, it's hard, yes, it's undertaken too lightly by many who have no idea what they are getting into. "Don't Invent XML Languages" is writerly bravado meant to grab the reader's attention. Don't take it too literally.
One last thing: PDF is not an XML language, and I think Tim may have implied that it was.
I have a Tecra M3 laptop. It has an nVidia graphics adapter, "GeForce Go 6200 TE 64M/6600 TE 128M" to be exact. I have a Dell 2005fpw flat panel display, with a native resolution of 1680×1050. The graphics adapter does an ungodly number of tricks I don't need (who needs software keystoning on an LCD?), but does not offer 1680×1050 as an option. It offers 1600×1200 and even higher, but not the one I need.
In a previous situation like this, I installed some scary hacked gamer video drivers, and they worked great. This time, I tried OmegaDrivers.net, which claims to provide nVidia drivers with more options for resolutions. No luck.
In fact, after installing the omega drivers, 1600×1200 wasn't even an option, but now 1440×900 is. Huh? Uninstalling all the drivers and re-installing the official ones from Toshiba didn't get me back my 1600×1200. Does anyone have any advice for how to get a supposedly high-end graphics adapter to do something simple like drive a very popular flat panel display?
Cleaning out my cubicle on Friday, I found a number of sheets of doodles I had made during meetings. I'm not a big note taker, and I need something to occupy myself instead of just sitting and listening. Even when I'm engaged in the discussion around the table, I'll often be doodling away. I tend to typographic or geometric doodles (no surprise there), though some kid-influenced images appear from time to time. Here are a few of them:
I'm always interested in how people's creativity leaks out of them in work environments (like making business card cubes). Anyone else have doodles they'd like to share? Maybe we can get one of those blog memes started...
OK, so I'm a liar.
On Thursday, I updated my email validation code in response to an problem a reader was having with it. In the comments, as I expected, I was chastised for excluding some valid but unlikely addresses. I explained why I was not going to support those addresses. Then I went ahead and supported them.
Revenge of the Tattooed Nerds starts innocently enough, with Apple logos tattooed discreetly on a wrist or the small of a back. The transistor symbols are kind of cool, and the eight-bit video game sprites are a great example of one lo-fi art form mimicking another. But when I got to the guy with the circuit board tattooed on his forehead, I thought, "that's just not right". And don't even get me started on The Lizardman at the end!
Window, Mac, or Linux, what's your pick? It doesn't matter: learn musically why Every OS Sucks.
Last year was really a breakout year for the Ruby programming language, for example with the over-hyped news that Ruby books outsold Python. It seems like everywhere you look, Ruby is the next big thing, especially in web applications.
Now here's another milestone: I noticed this on the Jifty home page:
Seeing the venerable (if execrable) Perl introduced by relating it to Ruby is a real turnabout.
Naturally, fixing a bug in my comment system and mentioning it here yesterday merely encouraged the quiet malcontents to bring up their petty annoyances! I'm kidding: keep the bug reports coming. Platypus pointed out that the email validation didn't deal properly with his domain name.
Anyone else have a complaint?
Updated: I've since improved the code to deal with some of the issues in the comment thread here: Email validation again.
I think I finally have it nailed, but then again, I thought that last time...
Reddit is a bookmarking service, kind of like del.icio.us, but with voting and comments thrown into the mix. I first heard of it in the list of demos at the Boston Web Innovators Meetup. Then it made news when the developers scrapped their Lisp implementation (newsworthy in and of itself), and rewrote the whole thing in Python, which led to much Lisp vs. Python handwringing.
But the thing that drew my attention to reddit yesterday was that my last post about how Joel Spolsky is a crotchety old man has been near the top of reddit's hot list for the last day. Reddit seems to have a lot of users: my referrer log indicates that they've sent me over 2300 visitors. Nice way to start the year!
Joel Spolsky's latest essay is The Perils of Java Schools. He explains in detail why he thinks teaching computer science with Java is a bad thing. It basically comes down to not learning about pointers or recursion. He laments the state of computer science education, and fears for the entire industry as a result.
At least Joel has the good sense to start the piece by making fun of himself for griping about "kids these days". He has his knickers in a twist for no good reason.
For a variety of reasons, 2005 was a very interesting year, and its close finds me and my family happy. We're looking forward to 2006 and all that it may bring. For 2006, my wish for all my readers is a classic: may you live in interesting times.