|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Is your subway system a platform? Does it have an API? Funny thought perhaps, or maybe only in the Bay Area -- but our subway system -- BART, has an API. And it's kind of fun. I spent a couple of hours today hacking together an application, it's not all that useful, but one of these days something else will get an API that plugs in nicely and something interesting will happen. Here are the docs for the BART API. And the docs for the real-time ETA feed. And the ETA feed itself. Clearly it's a straight dump of the database of the BART trains that are running right now, and the time of their expected arrival at the various stations on the network. I wrote an app that loads the XML into a database on my server once a minute, it's quite quick -- and then it looks for trains that are arriving right now, and sends a tweet saying something like: "The train to Richmond is arriving at the Downtown Berkeley BART station." This would generate far too many tweets to be humane, no one in their right mind would want to follow a user that was announcing the arrivals of every train in every station on the BART network, which isn't even that big a network. You can imagine what a PITA that app would be for a subway system like NY or London. Not cool. So instead I had it only report on trains arriving from any direction at the three Berkeley BART stations, Ashby, Downtown and North Berkeley. That's a manageable number of tweets. And that suggested a name for the feed: BerkeleyBart. Which sounds like something from a cowboy cartoon or a Henry Fonda western starring Jimmy Stewart and Raquel Welch with Buddy Hackett as the kooky sidekick. Okay enough of that. It's a cute little thing, nothing earth-shaking, but I wonder if it's correct. Next time I'm at a Berkeley BART station I'll check it out and see if it correctly calls the arrivals of trains. Also it seems like just the thing Scoble will like. He's into trains and Twitter and really strange things. I've also set it up so it works with FriendFeed. Intelligence and creativity are great, highly valued by our civilization, and so is vision; and when we think of vision, we usually think of far-reaching vision, but... The hardest stuff to see is often the stuff in front of your nose, in plain sight. Your eyes gloss over it, seeing only what you expect to see. So when you look at the world, you see a reflection of what's inside yourself. The world could change, but the change goes unperceived. Or flipped around, something about you changed, and you think (incorrectly) that the whole world changed. Programmers, as I've said many times, learn this over and over. We can't bury our mistakes, unlike other vocations. If you want to move on you have to figure out what's wrong. And almost always the mistake is one of your perception. Your eye glosses over the code and you see what you expect, even though what you actually typed is different. You can't move on until your vision improves. I love puzzles that reveal this. I love Don's Amazing Puzzle, first shown to me by Don Brown, a programmer in Iowa. You try to count the F's in a sentence. It's just an ordinary sentence, swear to god there's no trick. But when I tried it, I got the wrong count. I repeated it over and over, still got the wrong answer. I swore it must be a semantic game, that the answer was zero or Tuesday or something stupid like that, so I wrote a script to count the F's and the script got it right! Oy. Two people I knew at the time got the correct answer right away, one of them was a professional editor, and had developed a technique for doing this kind of review. Knowing that the human mind glosses over surprises, he reads sentences backwards. Ahh! When you break the routine your filters can't engage. I've noticed another trick that doesn't make me more intelligent or creative, rather it increases my awareness, and the net effect is that I am more creative and smarter. When I'm out for a walk, waiting for a light to change, I watch my feet when I step off the curb. I always step off with my right foot. So I try instead to step off with my left foot. It requires some serious work to do this. But I find that I'm more aware as I walk if I do. Another one, I could stare at a piece of code and swear the machine wasn't processing it correctly, but I know that's not the correct answer. Instead, I get up, refill my water glass, or walk around the block, or write a short post, and come back, then all of a sudden the bug pops out at me. Taking a break, taking your eyes out of context and bringing them back also improves your vision. Anyway, back to my busy day! PS: If you like this story, you'll probably like the story about the kids in a circle and the heads and the feet. |
Dave Winer, 53, pioneered the development of weblogs, syndication (RSS), podcasting, outlining, and web content management software; former contributing editor at Wired Magazine, research fellow at Harvard Law School, entrepreneur, and investor in web media companies. A native New Yorker, he received a Master's in Computer Science from the University of Wisconsin, a Bachelor's in Mathematics from Tulane University and currently lives in Berkeley, California. "The protoblogger." - NY Times.
"The father of modern-day content distribution." - PC World.
One of BusinessWeek's 25 Most Influential People on the Web. "Helped popularize blogging, podcasting and RSS." - Time.
"The father of blogging and RSS." - BBC.
"RSS was born in 1997 out of the confluence of Dave Winer's 'Really Simple Syndication' technology, used to push out blog updates, and Netscape's 'Rich Site Summary', which allowed users to create custom Netscape home pages with regularly updated data flows." - Tim O'Reilly.
My most recent trivia on Twitter. On This Day In: 2007 2006 2005 2004 2003 2002 2001 2000 1999 1998 1997. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
© Copyright 1997-2008 Dave Winer. Previous / Next |