|Ned Batchelder : Blog | Code | Text | Site|
» Home : Blog
I listened to Christopher Lydon's interview with David Sifry a few days ago. Lydon asked Sifry about metadata, what it is, and why it is important. Sifry described in fairly technical terms the kinds of metadata found in an RSS feed. I thought he should have given some real-world examples. My latest article is what I would have answered: Metadata is nothing new.
First the good folks at Lego.com gave us Junkbot. Now they have created Inventor Saves The Day, another fun Lego-themed logic game. Try to build contraptions that accomplish particular missions. It starts ridiculously easy, but gets difficult!
These days, we have great interpreted languages, and great IDEs for our compiled languages, and usually we can work at a pretty high level. But occasionally, the only way to solve a problem is to get down to the nitty gritty and do some old-fashioned detective work. Here's the story of a server crash hunted down to its lair the hard way.
If you have a small child, and carry him or her on your shoulders, here's a simple game to make it more fun. As you walk, when you pass something about chest height (newspaper box, parking meter, that sort of thing), place their feet on top of it, as if they are standing on it. Then have them "jump" off it, and carry them over to the next chest-high thing, where they can "land" on top of it. Then you can expand on this idea, for example, "missing" their next landing, holding out their feet for more graceful "flight", landing on the sides of signposts like Spiderman, and so on.
Of course, if your child is getting heavy, and you want them to walk on their own, making the whole thing more fun may be the last thing you want to do!
I find, no matter how my day is going, if I can write some code that has the word "shenanigans" in the comments, it's just that little bit better.
Here are some useful PHP articles I had in my miscellaneous bookmarks pile. Now you and I can both enjoy them here:
The idea taht sicbralnmg ltreets dso'ent hurt the rdbeaaitliy of txet has been boglegd eerhvywere by now:
But tpryhoapgi.ca has the most atvthutiraoie iifonrtmoan aobut it, iducinlng comnetms from the guy who did the ongiairl rasceerh (25 yaers ago).
Funny: now that I've created that paragraph, I find it very hard to read!
Joel Spolsky has finally gotten his dream offices, and I have to admit, they sound fabulous. The coolest part is how the architect took a single exterior wall of windows, and created a row of "corner" offices. I'll be interested to read Joel's assessment of the office after a year of use, to see how they performed in practice, but in theory it certainly sounds like a great place to work.
My friends Mark and Robbie work for startup Maven Networks, which just recently emerged from stealth mode. They're building a cool video delivery platform. As their advisor and director Jeremy Allaire puts it:
The Boston Globe also wrote about the announcement. They've built some cool software. Take a look.
Paul Ford over at FTrain has written a rant about the difficulty of producing web sites. It starts from Processing, moves on to a micro passion-play about RDF, and then bemoans the state of web technology:
It's a great cheese log of an essay (you'll see what I mean). If you've ever struggled with duct-taping together all the disparate technologies that are behind the scenes of a modern web site, you'll want to read it.
The topic of resumes keeps coming up. Kevin Fox's resume is interesting for its presentation: it's two columns. The main body is in one wide column, with the bullet-list stuff (skills, languages, etc) in a sidebar down the right. It figures: he's an human-computer interaction specialist.
The latest addictive puzzle game from the pygame crowd: Pathological. Balls bounce around through mechanical mazes, interacting with various contraptions. You have manipulate the contraptions to bring same-colored balls together to remove them from the board. Fun.
I'm a software geek, which means I'm perfectly happy to deal with hardware and icky things like wires as abstractions. The grungy details of how IP gets around are a perfect example. I don't know, and for the most part, I don't care. I have a home wireless network with a cable modem and firewall router. I put it together, but I just barely know how it works. I haven't had to fiddle with it in over a year (knock wood).
Network Address Translation (NAT) is one of those network technologies I didn't know much about. That's changed, thanks to Charles Miller's readable explanation of it all, complete with an assessment of why it's flawed. I'll be honest — I still don't want to know all the details. I'm happy to leave those things to others who care and are fascinated by them. But now I know a little bit more, and that's got to be a good thing.
BTW: I thought of titling this entry "NAT world", but I decided that would be too cute and confusing.
My family computer died yesterday, which is to be expected, since it was a third-hand el cheapo computer anyway.
Monday morning, my wife told me that the computer "wanted her to add a hardware wizard". Somehow in dying, Windows had decided there was new hardware around, and had displayed the dialog titled "Add New Hardware Wizard". Funny how the things we geeks take for granted are subject to new interpretations when all of the geek culture is removed from them.
So I've got a computer on order from Dell. I was able to get one with the stuff I needed for $729, which is a good deal. The other inexpensive computers I looked at all seemed to be lacking in one respect or another. Andrew suggested Alienware, which do have very nice computers indeed (Max: "Wow! I'll save up my own money to get that computer!"). They may be price competitive for machines in their performance range, but I don't need a machine in that range, so Dell is the way to go.
There seem to be widely-held misconceptions about software standards. People treat them as if they were laws, or moral commandments, or guarantees of success. They're not. They're just shorthands. Read more of my thoughts on this, and Jeffrey Zeldman's role in it, in my latest article: Standards misconceptions.
Programmers are always looking for ways to see more code at once. Tristan has designed Proggy bitmap fonts just for programmers, putting a premium on legibility, though not necessarily on readability (more on this distinction here).
I'm still very pleased with Lucida Console 14-point (the smallest size with two-pixel stems). It doesn't fit tons of code on the screen, but it's oh so pleasant to the eyes!
Eric Lippert is a developer on the Visual Studio team at Microsoft. His blog is full of technical details of things like JScript, VBScript, COM, and BSTRs. Just the kind of deep arcane information that will either be fascinating trivia or life-saving know-how, depending on how deeply you work with these technologies.
He even has a write-up about COM threading models, which I may use someday if I need to understand the differences among them. Right now you have only to say "apartment threaded" to me, and I start getting cold shivers remembering bad experiences I had a few months back...
But looking at the stylesheet itself, it looks like they've fallen into a common pitfall: writing unusually verbose XSLT.
In a bid to be both helpful and sticky, most Windows software seems to install code to be run when Windows starts up. My laptop had about 25 different executables set to run at boot time. Spybot has a great "System Startup" panel that shows all of the startup entries, and lets you disable them individually.
Part of the information shown about each entry is a quick description of what it is, where it came from, why it got put there, and whether it can be safely disabled. Many of these entries are credited to Paul Collins' Startup List, which is one of those reference works only the web could have produced: obsessive, helpful, authoritative, and mind-bogglingly detailed. Its utility is limited to those times when you need to identify a mysterious bit of flora from your invisible Windows ecosystem, but when you need it, you really need it, and it delivers.
Using Spybot and Paul's list, I disabled more than half of my sneaky Windows startups. My machine boots ever so much faster, and I don't even have the "show me more" button on my system tray any more, because I only have icons there that I actually want to see. Bliss.
Martin Fowler discusses Technical Debt. Taking shortcuts in design or development is like borrowing from the future. You save time now, but will have to pay later. Eventually you'll have to put in extra effort to deal with your old hacks. This extra effort is the interest you pay on your technical debt. You can take time later to fix everything, which is analogous to paying down the principal on your technical debt. It costs real time now, but saves you interest payments in the future.
As with most interesting ideas about software engineering as a discipline, Ward Cunningham's apparently infinite wiki has a page about Technical Debt.
In a comment on my posting about Newsweek's autism test a few days ago, Laurent said,
Laurent is right, of course. That quiz was designed for regular people to take as an entertainment. Real diagnosis of autism is a much more nuanced procedure, but perhaps not as much more as you would think.
Some interesting recent items from the Geometry Junkyard:
¶ Circumference/Perimeter of an Ellipse: who knew there was no simple formula?
¶ MineSweeper3D: the classic game played on Archimedean solids.
¶ Fractals by Jos Leys: Escherian structures, repeated to infinity.
It's a full-featured text editor, but it hasn't succumbed to the temptation to become a full-fledged IDE. It has features I need (multiple files, spell checking, simple syntax coloring), and niceties I've missed (different font settings for each file, separate screen and printer fonts, multiple search results). It also has a knack for adding tiny things that make a big difference, somehow doing the right (or even unexpected but useful thing) when I don't expect it.
Just when you thought regular expressions were powerful and confusing enough, comes Reversing regular expressions. The idea is that if a match is too hard to make going forward through the string, then reverse the string first, apply a reversed regex to it, and finally reverse the resulting match. Wow.
Update (thanks to Simon, who shows Python for the technique): I forgot to mention that this technique is called "sexeger" ("regexes" backwards, get it?), and here's japhy's authoritative treatise on the subject.
I had thought that this debate was long over, but the other day I found myself arguing the benefits of throwing exceptions vs. returning status codes. Since I had to go through the whole thing, I've written them up. Maybe this will help put the argument to rest: Exceptions vs. status returns
OK, this isn't going to become a Rubik's Cube blog. It just happens that a few days after posting Friday's entry about Rubik's Cube fanatics, I happened upon two more links that were too authoritative to pass up:
I can see people are obsessed with speed solving. I've never cared for it, preferring elegance and fun over pure speed (but that's in keeping with the rest of my personality).
Another thing I've never understood is cube applets. Fiddling with an on-screen flattened cube or a 3D cube or (God forbid) a four-dimensional cube simply isn't the same as having one in your hands. Some people have remarkable persistence with them, but I don't see the point. The physical aspect of it is at least half the fun. I can't imagine solving one of these virtual cubes.
Newsweek has an Autism quotient test. Answer 50 questions to see where you land on the autism spectrum. I scored 23 (just a tad too high for the average category). My wife Sue scored 15 (average for women). My autistic son scored 43 (quite high).
Of course, this test is for typical people, to measure their slight differences in position on the scale. The irony is that some questions just won't even apply to severe autistics. For example, "I find it easy to remember phone numbers" is obviously trying to get at someone's attention to detail and facility with numbers. Answering "agree" to that should put you higher up the scale. But if a kid has never tried to memorize phone numbers, or has difficulty with it because of their limited language, how would they answer, and how would that affect their score?
Treemaps are a powerful data presentation technique that can simplify understanding huge volumes of information. For example, Sequoia is a disk mapping tool that can show you where your disk space is going. SmartMoney's Map of the Market shows the performance of the entire stock market. Now, The Hive Group uses treemaps to show us products from Amazon: Honeycomb/Amazon Shopping.
Honeycomb's treemaps are very slick, with user-selectable dimensions for grouping, color and size. I'm not sure if it's useful yet, but it is interesting.
The Toyota POD is a concept car if ever there was one. The whole thing is designed around communication between the car, its owner, and the world around it. For example: the car's exterior can express emotions. Happy, sad, tired, angry (look at the "eyelids" over the headlights):
Max says it's the coolest car ever. I think it's silly.
New optical illusions. Amazing.
A co-worker just pointed me to this great spyware removal tool: Spybot Search & Destroy. It's quite comprehensive, and found all sorts of gribbly things on my computers.
A side note: Written by a European, Spybot gives you a choice of languages when starting up. I was surprised to see a white flag with a red cross displayed next to "English". I'd always seen either the Stars and Stripes or the Union Jack used before. I thought it was a mistake. But Mooney's Flag Detective set me straight: it's the flag of England. The Union Jack is the flag of the United Kingdom. You learn something every day!
Being a geek of a certain age, I've spent a lot of time with a Rubik's Cube. In fact, I spent essentially the entire summer of 1980 twisting a cube. I still have a cube on my desk, and can still solve it. Doesn't matter. I've got nothing on the cube fanatics out there on the web:
Recently, I noticed two mentions of things I had linked to, and each mention said something like "I forget where I found this". One was on kryogenix.org, the other in a comment in Simon Willison's blog. I suspect that the authors had found them here.
Considering the web is fundamentally about links, and that surfing constantly takes us far afield, why don't our bookmarks help us more with this problem? Typically a bookmark is simply a URL and a title. Why can't a bookmark also include the chain of referrers (the history stack) that led up to it? Wouldn't that be valuable contextual information?
Someday when I'm independently wealthy and can spend my days in a smoking jacket writing the software I want to use, I'll write a bookmark manager that remembers not just the bookmarks but where they came from.
Or maybe the LazyWeb.org can help out...
I chose my hosting provider based largely on price. I got the least expensive plan that would serve my purposes. One thing I did not buy was true virtual hosting, which is serving more than one web site from the same machine. I can park as many domains as I want on my account, but their home URLs all served the same page. Until I wrote this PHP script.
To further push the envelope on new programming techniques, Hacknot gives us Purr Programming. This is a humorous piece, but I wouldn't be surprised if in fact programming with a cat did improve productivity. My experience in doing code reviews is that just having the developer describe what he's done will cause the developer to discover problems in his own code. In other words, often the reviewer doesn't have to do anything but say, "Tell me about this change", and then listen. A cat would serve that purpose well. It's worth a try.
BTW: Hacknot is "links, articles and news for disciplined developers". It's got some good stuff.
We have a nightly build machine at work, and every night it builds our product, which takes up a lot of disk space. As these builds accumulate, the disk runs lower and lower on space, until one night, there's not enough space for the nightly build and it fails. In the morning, someone notices, deletes some old builds, and starts the build again.
I got sick of this absurdity, and wrote makeroom.py to clean up the disk automatically.
Scott Hanselman has posted his Ultimate Developer and Power Users Tools List. It's very heavy on .NET stuff, but there's some good things in there even for us old-fashioned types. I found:
This is a classic web experience. I was investigating ways to speed up build times. I was reading about Electric Cloud, which builds a tool for distributing builds. Poking around, I looked at their management page. Turns out John Ousterhout is their CEO. I mentioned it to a co-worker, who hadn't heard of him, so I said "he's the guy that designed Tcl", and I pronounced it "tickle". "Is that the way that's pronounced?" he asked. So I looked it up, and found this useful reference: YOO-nicks pro-NUN-see-a-shun. Another productive day on the web.
A friend (and former boss) wrote to me asking for an estimate of my average productivity per month in terms of raw lines of source code. I complied (source code control systems are great for mining this sort of information), but also started thinking about this metric.
I create this blog as XML files, and produce the whole site with XSLT transforms. This makes for a less than compelling experience during content creation. That's why Bitflux Editor looks interesting: it's a WYSIWYG XML editor, implemented for Mozilla. There's just never enough time to do all the behind the scenes work I'd like to on this blog.
Interesting thoughts about how the craft of software should be taught: Apprenticeship in a Software Studio. I definitely agree about the apprenticeship part. I'm not sure I grok the studio part.
The Retail Alphabet Game is clever: you are presented with 26 letters snipped from corporate logos, and you try to identify the companies. Some are easy, and some are frustratingly familiar, yet hard to place. I got 16 out of 26 for both the second and third editions, and a poor 7 out of 26 for the first (too many of the letters are too generic).
Keigo Iizuka describes how to turn a laptop into a 3D display using cellophane. Sounds simple enough. How come we aren't doing this already?
This came up at the breakfast table: What's the deal with "ye olde" as a quaint way of saying "The old"? That wasn't a "y", it's a printer's compromise at trying to render a "thorn", an Old English letter that was used for "th" sounds. There was another, the "eth", as well. One was for voiced "th", the other for unvoiced.
As it happens, Iceland still uses thorns and eths, so they are available in Unicode, even appearing in the first code page: Thorn: Þ (Þ) thorn: þ (þ) Eth: Ð (Ð) eth: ð (ð).
Flying Pig has a large collection of whimsical animated paper models, some of which are free, like the Agreeable Sheep. They have a section called "Mechanisms", which unfortunately describes traditional mechanical engineering mechanisms, and not, as you would expect, paper engineering mechanisms.
The Political Graveyard describes itself as
I've been thinking all day about Paul Hill, the murderer of an abortion doctor who was executed this week. Basically what we have here is party A kills, party B retaliates by killing A, and party C retaliates by killing B. The thing that fascinates me in all of this is that many Americans agree that two out of three of those deaths were wrong, but they disagree about which two.
I mourn for all three. I have feelings about which of the three is the least of the evils, but they're still all evils.
Here's another take on the problem of version control: Monotone has a different perspective than most systems: there's no central repository, it's all distributed across the developers' trees; and there are no revision numbers, SHA1 fingerprints identify revisions. It feels like a P2P system rather than a client/server system.
It doesn't look like they're building for Windows, but it doesn't look like there's a reason they can't.
Processing is a "programming environment for exploring the electronic arts". It seems like an Actionscript-level software environment: focused on graphics and interaction, with event handlers written in a simple structured language. People seem to have built a lot of cool stuff with it, though the source code seems more math and array intensive than I would have thought.
Richard P. Gabriel has a proposal for a Master of Fine Arts in Software degree. He thinks the "software engineering" mindset is all wrong, and proposes a program to reverse that thinking. He says of the degree:
I love this idea. I think no detail is too small to be considered. I'd like to think that my small but growing collection of essays can count as annotations.
Underware is a type design studio with a fabulous web site. They cover how they make their fonts, the basics of type, an extensive list of references, and much more, all in a sleek design, and with a good friendly attitude. Their hand sketches of type in the making had me drooling.
One of the delights of having small children is that they make a great audience for simple tricks and old gags that older kids have either already seen or are too world-experienced to appreciate. Here's one such trick. All it takes is a carton of orange juice.
Get a carton of orange juice, one of those half-gallon waxed cardboard containers with a screw-on top. Make sure it is about three-quarters empty. Unscrew the cap and place it lightly on its hole. Hold the carton with your right hand, and give it a sharp squeeze. The cap will jump off the carton, sailing a good three feet if you do it right.
Now you are ready to amaze your small child. You tell him you can open the orange juice without even touching the cap. Ask the kid to count to three, and use your left hand to snap your fingers at just the right moment, pointing at the cap. Your right hand executes the cap-lifting squeeze. If you play up the role of the left hand enough, the child will be watching it, and won't notice the right hand at all. Suddenly you're Superman!
The trick won't mystify them for long, but even after they see through it, it's a fun trick to let them try themselves. Aren't kids great?