Wednesday, December 21, 2005

3 Step Plan

Something I made last night for an upcoming party that wasn't used so I'll put it here for other Roy Lichtenstein fans to enjoy.

Of course in this blogger theme it doesn't quite work.

Tuesday, December 13, 2005


What are the advantages of laying out text in columns? Are there any? I'm trying to think of some but I'm drawing a blank. I find it annoying having to move my focus down a line every 5 words, and then have to scroll up the entire page every time I get to the bottom of the first column (<12" screen). Then why are columns so prevalent in papers? I need to know.

Update: Found this link to answer some of my questions: The findings agree with my preference since I'm a slow reader.

MarsEdit and Meetro

Testing out MarsEdit some more. I guess after NetNewsWire was acquired, they made MarsEdit free? It sure beats going through blogger.

Also wanted to help out the people over at Meetro. Here's the low down:
Meetro has now launched its Mac private alpha and is looking for people to participate. We plan on distributing it to the first few hundred people that email us at So reserve your spot now! Also, please include the city/state you reside in as well when contacting us.

Meetro is a location-aware IM client, compatible with the major protocols. I can't say much more since I haven't installed the alpha yet.

Also, woah.

Monday, December 05, 2005


I've been biking a lot lately, out of necessity. Getting to school is a 5.5 mile ride, so I must average ~65 miles a week? Until Brendan pointed it out, I didn't I know that practically all of my commute is through the most expensive ZIP code in the country: 94027 (Atherton). It would be easier to tell if these driveways weren't 100 yards long with gated entrances :) Another cool part (and probably related) is crossing Sand Hill Rd, home of the venture capitalists that pump out 40% of that kind of funding in the US. I think that's the number I heard.

Sunday, November 20, 2005


On Fridays I have a seminar called People, Computers, and Design. Last Friday I got to see a presentation by Blake Ross and Asa Dotzler on what sets the Firefox project apart from other open source projects when it comes to thinking about users. Blake is an excellent speaker and their slides were good examples of what slides should be. They would almost deserve a mention on Presentation Zen.

I've come to realize how many great people I've had the chance to see or even meet in a couple of months on campus. A brief list of notables:
  • Terry Winograd, Larry Page's old advisor (and now my advisor)

  • Brian Behlendorf, once president of the Apache Software Foundation

  • Mark Zuckerberg, producer of the Facebook

  • Dan "Monzy" Maynes-Aminzade, "So much drama in the PhD" rapper

  • Dan Gillmor, author of We the Media

  • Jonathan Schwartz, president of Sun

  • Don Knuth

  • Sergey Brin and Larry Page

  • Mark Benioff, CEO of
And the list goes on.

Friday, November 11, 2005

Google Search Keys

I updated the greasemonkey script to play nicely with other scripts that register keypress event listeners on the document. Guillermo pointed out to me that it was breaking the Qwikify script. Quirksmode had a nice entry on the topic.

Tuesday, November 08, 2005

Chuck Dynamite

My roommate had already seen this so this is probably not new to anyone but funny anyway. Chuck Dynamite

Also, I wish I was daring enough to toss my camera. And way can't I use a URL like: ?

Monday, November 07, 2005


Today, I compiled a piece of code with an error on line 1337. It wasn't very elite.

Thursday, October 20, 2005


Flickr Photo

What can Flock do for me?

Monday, October 10, 2005


I was hoping one day to write about this stuff because I would've created it. Somebody else had the same idea I did: overlaying vector graphics on Google Maps. I'll just strike it off my idealog and go back to occupying my time with reading about cool stuff instead of doing it myself :/

Tuesday, September 27, 2005

Day 2

I don't know if this applies universally, but if you ever fire up Pine to check your email, and all your messages disappear from your other IMAP client, try issuing the respool-email command from the terminal you opened Pine in. Scary.

Last year, in my technical writing class, I had to write up a mock proposal to some person/organization. I happened to address mine to Brian Behlendorf because of his involvement with the Apache Software Foundation. My proposal had something to do with the Apache web server. Anyway, today, I sat in front of him as he gave a talk on software as a service. Cool. Another random note is that Mark Zuckerberg of fame is strolling around campus recruiting people. The newspaper ran an article on him and how his company is providing substantial salaries to students who leave school and go work for him instead. They're doing pretty well I guess.

In class, we were given examples of logical reasoning patterns. One of the basic ones is that if x is greater than y, and y is greater than z, then x must be greater than z. Except it doesn't always work out in the English language due to its ambiguities. The example was if bad sex is better than nothing, and nothing is better than good sex, then bad sex must be better than good sex.

Sunday, September 25, 2005


The CS department loves Google. I think the company came up at least 10 times during the "Welcome to Stanford" presentation.

One of the questions asked was who traveled the farthest to get here? "India" says one student (many others could've said the same thing). "Okay, is anyone from somewhere farther?" asks the professor. "Pakistan" says another student. Pwned.

I met a guy from University of Washington. He got his BS in EE and explained that at UW, the CS and EE departments are basically the same. He presumed it was the same at Stanford because he saw EE professor teaching CS courses. So he applied to the CS department only to find out that the departments are very much not the same. Now, he doesn't know what to specialize in since nothing deals directly with hardware. I think it's pretty cool he still got accepted.

It was an enjoyable day, apart from the time wasted by students asking questions that had either been covered in the presentation or already been asked before!

By the weekend I'd met enough people to start hanging out with some of them. I've still met more Swedes than Americans: 4 vs 2. Other than that there are plenty of Indian, Chinese, and French students. We've been hanging out at the on-campus bar which is fortunately rather good because there's not much else around the campus area that we've found yet.

This weekend we

  • Got an early buzz going thanks to Google (again) putting in a couple of hundred dollars towards beer, bread, cheese, salmon, and other snacks. Somebody forgot to buy the wine. It's a weekly thing so maybe next time.

  • Watched the women's volleyball game. Great atmosphere. A+++

  • Watched the men's soccer game. Not quite as cool.

  • Grabbed a free dinner at some freshman event. They introduced the fall sports teams and taught us some of the cheers they use. They're supposed to reflect the "intellectualism" here. You have "traverse the field, traverse the field... increase the aggregate yardage" or "pursue them, pursue them... make them relinquish the ball." Or Shannon's favorite: "hit them with the axe, hit them with the axe. where? in the neck, in the neck, the neck, the neck, etc."

  • Assembled the road bikes and used them to get to campus for a change. Shaves a lot of time off the commute when you actually have gears to use. I normally ride a fixed gear.

  • Played some killer 4v4 beach volleyball. At NCSU if I'd ever done that, I'd have girls laying out all around me. At Stanford, the girls lay out in front of the bookstore.

  • Cooled off in the pools at the Avery Aquatic Center.

Next weekend: football and problem sets?

Tuesday, September 20, 2005


Originally uploaded by martin.davidsson.
I came out of the bank and saw this in the sky. Must've been what Mr. Searls blogged about because it's been raining fairly heavily this afternoon.

Monday, September 19, 2005

Presentation styles

I watched some of Dick Hardt's keynote at the 2005 OSCON. It's hard to not pay attention to this style of presentation--for me at least. Sort of reminded me of one of the last presentation Lawrence Lessig did. They both happened to take place at OSCON. I'll have to try to go one year.

Dashboard Sleep Widget

I like to listen to stuff when I go to bed. The stuff is usually played from my laptop. The problem is that I don't want the laptop to play music all night. Nor do I want it to cut off before the audio is done playing in case I happen to be listening to a Spanarna episode. Now there's a Dashboard widget to meet my needs. I'll call it Sleeper Snooze for now. Somebody pointed out that there's already a "Sleeper" widget on

You might find it more useful for other things such as putting the computer to sleep after your 37 minute download complets and you're already out the door.

Anyway, some links that came in handy while doing this for the first time:
Dashboard Programming Guide (everything from style guidelines to javascript callbacks)
Debugging Dashboard Widgets (especially if you have to use an Objective-C cocoa plugin)

The (X) to close the widget positions itself offset from the corner.
Implement buttons using the -apple-dashboard-region controls.

Source also available at

Wednesday, September 14, 2005

Tuesday, September 13, 2005


Mom: Eddie?
Eddie: Mom! We are on high alert here. I almost killed you right there! You do not even realize.
Mom: Okay, nevermind.
It loses something in writing but if it makes me laugh after I have to get up on six (!) hours of sleep, it's funny. America West in short: 43 min early, Airbus plane, good movie (Mr. and Mrs. Smith). The drawbacks were that you had to rent headphones and buy breakfast. Being early wasn't all that great. It extended my layover and my luggage was flown to San Jose with an earlier flight so when I arrived at my final destination I thought they'd lost my luggage.

On the topic of quotes, I overheard this on the TTA bus in a discussion about doing away with daylight saving(s) time:
We can't get rid of it because..... the VCRs automatically switch their time over. That would be so confusing.
If you're looking for a large luggage piece, I'd recommend this one from Atlantic. I've only used it once so the only thing I can't speak for is durability but the rating on that link can. I also saw a crew member with an Atlantic bag which must say something.

I bought my $5 Caltrain ticket with a $20 bill. I got $15 of change in coins. Luckily it was in one dollar coins but it's still pretty weird. Also fortunate is that the busses accept the coins so now it's pretty handy to have the coins for fare instead of having to mess with feeding bills into the machine. It cost $6.50 to get from SJC to the major road outside of our townhouse which is about 25 miles. Not bad.

Thursday, September 08, 2005


There are at least 150 wireless hotspots on TTA's 302 bus route between Cary and NCSU. Made me wonder if there is a Google Maps / Wifi location mashup. Of course there is: gWifi. It's pretty lacking, however. If I happened to have a GPS device hooked up to my laptop on the bus this morning, I should be able to upload the resulting log of captured signals and coordinates for others to benefit from.

Wednesday, September 07, 2005

Prediction Markets

I want to see this but for songs instead.

Apple Cider Vinegar

My mom drinks this stuff, for whatever reason. I think it's supposed to be a wonder drug within the world of alternative medicine. It was sitting out on the counter today when I got home, so I had a glass. Bad move. It's awful. Now you try it.

Friday, September 02, 2005


CSS3 has a lot of crazy selectors, like E:nth-child(n) meaning an E element, the n-th child of its parent. I need something simple/basic like E < F meaning an E element parent of an F element, and I need it in CSS2.

Wednesday, August 31, 2005

I have a blender here

...but it's not mine. I know Tommy brought a blender over earlier this summer to make milkshakes, but I thought he got it back. Is anyone missing a blender?

There's some Swedish text on the apple PowerBook and iBook power adapters. "The device should connect to a grounded outlet." I guess Sweden is the only country where all outlets aren't grounded? I was trying to see if, electronically, the power adapters are the same. They aren't.

Moment of Zen?

Sunday, August 28, 2005

Facebook vCards II

This Greasemonkey script will place a link in the top left corner under the "Poke Him/Her!" link of a facebook profile page called "Get the vCard". The link will prompt you to save a document (opening with Address Book doesn't work for me). Unfortunately I don't know how to control the file name so you'll have to add the .vcf extension or the address book won't accept it. Also unfortunate is the fact that the address book doesn't recognize URI's for photo values. Supports name, birthday, screenname, phone, mobile, and website. E-mail is notably missing because it's hard to do OCR in JavaScript :) This is sloppy, rough, and contains OS X-only extensions but should be faster than manually adding contacts if you happen to be using Firefox on a Mac.

Another update: script is updated to include photos. Unfortunately, it relies on an external service, and I've been told that photos don't show up in Microsoft Outlook.

And again:

I’m an engineer at facebook and I’m writing to ask if you would be willing to take down the link to your facebook vCards utility (located at Even if your intended use of such a script is noble, we’re starting to see larger numbers of scrapers who are taking scripts like yours and modifying them to less legitimate goals. In any case, the undertaking you describe on your site is (and has always been) against our terms of service. We'd obviously like to resolve this without getting the lawyers involved if possible, so please let me know as soon as you've taken the script down so that our legal department doesn't get all fired up about this.

One more:
Lately I've been getting at least one random IM/email per day from a person asking about this script. It's getting tedious mailing it out. Facebook, clearly people want this feature. Give it to us. Until then, the rest of you can download the grasemonkey script.

Update IV:
Neil M. sent me an updated version of the script back in April, which I'm just now getting around to uploading. Pretty lousy on my part, but you can find his update at the same link as above.

Saturday, August 27, 2005

Facebook vCards

Have any OS X users seen new entries popping up in their address book from I have a couple of entries that I know I didn't enter myself, and I know they're from thefacebook because the homepage field of the contact is set to that person's facebook profile page. Not all of "my friends" on the site have entries in my address book though. I can't find any kind of export link on the site. I've even asked support and they haven't gotten back to me. What's the deal?

I haven't been keeping up with people's information so it would be useful to have this kind of functionality. Maybe greasemonkey can help me out.

Conference Calling

Seen over on the MAKE blog:

HOW TO conference call with Google Talk
Open up a copy of google talk on all computers with which you wish to conference. After one copy is opened make a new shortcut for google talk but at the end of it add /nomutex. If you installed it to the default folder then your shortcut should read "C:\Program Files\Google\Google Talk\googletalk.exe" /nomutex. Open 2 instances of the software on every user's computer. After this start a chain: User 1 should connect on one instance to user 2. User 2 will connect on his second instance to user 3. User 3 will connect using his second instance back to user 1. With this chain everyone is connected to everyone. Or install Skype.

Tuesday, August 23, 2005

Hitting the high notes

At Mojo's, because people have discovered half-off sushi is the thing to do on Tuesday nights:

Adam: You know how they say a thousand monkeys can't create a Shakespeare? Well, there's also a theory that given enough resources, you can randomly generate, say, Hamlet. So a guy tested it. He wrote a program. It wrote Hamlet in four days.

Me: Really? That's incredible. I mean, consider the number of possibilities.

David: Yeah, like: "Look! We got it! Oh wait... That's a 'k'."


If you're publishing an atom feed but Safari only shows the title with a big "No Articles" make sure that you don't have the xmlns attribute in the root <feed> tag, no matter what the specification says :(

Sunday, August 21, 2005

Ryan returned from Ireland the other day and retol...

Ryan returned from Ireland the other day and retold some excellent stories, as always. The coolest topic was the game of Hurling. I looked up some movie clips to learn more. I think I've seen it on TV before but didn't know it was called Hurling. The second movie has some cool clips of "free taking." The county of Cork supposedly has one of the better teams in the country--Jordan, you should check it out.

I found one of my sister's books lying around the house: ttyl. I wish it had search-inside-the-book because it's pretty funny. The whole book is a series of IM conversations, and the pages are basically screenshots of chat windows.

Tommy threw another sweet party last night in honor of Arun's birthday/departure. Good bye and good luck Arun. You need to send out a copy of the video Josh put together, unless it's mostly serious people giving sentimental and personal goodbyes.

Thursday, August 18, 2005

Hope, cure, future

Anyone interested in seeing the Jimmy V Celebrity Golf Classic with me? Sunday, August 28 in Cary. The list of celebrities isn't stunning but the parents are out of town so we have a couple of tickets that aren't being used.

Sunday, August 14, 2005


Stanford is pretty. Silicon Valley was made for biking. The weather is consistent.

And they have teh market.

The next couple of years should be a good time.

Monday, August 08, 2005

Baby Name Voyager

People who read Freakonomics (and people who didn't, I guess) might appreciate the Baby Name Voyager. Just heard about from a recorded conference session so it must be fairly old but perhaps some will find it novel.

Saturday, July 30, 2005

Garage Opener

Garage Opener
Originally uploaded by martin.davidsson.
Testing Flickr blog integration.

In the 6 years of living here (on and off), I hadn't noticed how poorly the garage opener design was. Why limit it to two columns instead of using the familiar layout of a mobile phone. There is plenty of available width. It must take me twice as long to punch in the PIN as it would on my phone. I'll just have to do it often enough to train the muscle memory.

Friday, July 29, 2005


Finished my first book ever: A Short History of Nearly Everything. Everything here means astrology, geology, physics, chemistry, taxonomy, zoology, etc. Thanks to [info]amienowheels for letting [info]songchilde borrow it.

Does anyone need a car? How about a 2004 Silver Toyota Corolla. Less than 30,000 miles. Say $12,000. Strike now and I'll throw in the auxiliary input adapter, i.e. you can listen to your MP3 player through the car stereo!

Does anyone have an apartment in the Palo Alto area? 3BR... ~$2000/mo. Need to move in by mid-September.

I always wondered what the 'FT' in MSFT (Microsoft's stock symbol) stood for. I mean MS must be MicroSoft... so what's FT? I recently became the last person to figure out that it must be MicroSoFT.

Anyone ever heard of SkillFusion? Just curious, and if so, what do you know about it?

Occasionally, NetNewsWire will "stick" on certain posts. When I advance to the next unread post, the title changes, but the entry body displays the content of the previous post. After about 20 seconds the body will update to display the correct information. Lazyweb? (as if I have that luxury)

I'm tired.

Monday, July 18, 2005


NetNewsWire needs to be able to display posts in chronological order, the reverse of arrival order. And if it is able to do so, I need to know how. It also needs the prefetching functionality of the Google Accelerator, for when I use it offline. Most of the more interesting posts include a link to some other document that I can't retrieve.

I got an e-mail from a guy about a mobile social network. He got my e-mail through some site that tracks community wireless groups. I [re-]started such a group after noticing there wasn't anything in the RDU area when I was interning at a company that dealt with setting up wireless networks. All the group ever entailed was a mailing list and I don't think anyone has posted on it in a while so I'll post the note here instead.

My team has created a project called Meetro that is a location based community building software of sort. You could also call it a social network. It works completely off of wifi networks, so we're looking to work
together with as many of the community projects out there to spread the word.

I fulfilled his request because of the latest news item on the page:

We've launched! Three cheers to the entire team for their herculean+ effort. We're off to get shitfaced. See you cats in the morning.

Wednesday, July 13, 2005


If you ever want a laptop with excellent wireless antennas, get an HP/Compaq. My dad has an HP; mom has a Compaq. They blow away the 12" Apple PowerBook (from 2003) with an Airport Extreme. Despite the addition of two wireless networks in the neighborhood from last summer, I can't get a consistent connection from inside... even with the aluminum foil. Looks like it'll be another summer of trading mosquito bites for bandwidth. Also, dad switched cellphones with me until his mobile gets unlocked, so there goes the Flickr activity.

Tuesday, July 05, 2005


Just to drive home my point about Continental...

  1. The agent at the gate had promised us that our flight had been rescheduled and arranged. Nothing else to do. I call to confirm the day after and the agent had in fact done nothing at all.

  2. After one hour in the air the pilot announces they're having some rudder difficulties and decides to turn around, just to be in the safe side. The return and switching of planes delays us another 5 hours, in addition to the 3 days we'd already been set back.

Either way, check Flickr for some low-res pics or for some better--but less frequently updated--photos.

Thursday, June 30, 2005

Work hard. Fly right.

Next on the list of people needed to started an epidemic is the Maven. I was reading about Mavens as Melanie and I were sitting at the gate waiting to fly to Newark and then on to Sweden.

Mavens are incredibly well-informed about markets and very helpful in assisting others in their purchases. I know a guy who watches automobile prices like a hawk and makes a nice profit on just buying and selling cars. He'll buy a BMW/Porsche/SAAB/whatever when he spots a good price, drive it for a few months, and then turn around and sell it for a profit.

After a few chapters we board the plane but soon the pilot says "Don't throw anything at me but we've been delayed by four hours." The flight was eventually cancelled due to inclement weather at Newark. They can't do anything about that, but the way they handled the situation was far from graceful. I'll pretend to be a maven by spreading my advice to use another airline when you fly. Fly SAS, or NWA, or any airline that uses Airbuses.

Saturday, June 25, 2005

Beach weekend

We're down in Wilmington for the weekend. Others will have better write-ups in their livejournals so I won't try to compete, but I will say that Tommy's house is very hospitable.

I began reading Malcolm Gladwell's Tipping Point on the way down. I got as far as the chapter about connectors. Connectors are people who bring other people together. In the chapter he describes an extraordinary connector who goes to great lengths to keep up with all of his acquaintances... sending out birthday cards and trying to get in touch with friends from his childhood. Reminded me of my attempt I described in my last post, but I don't really have any of the other qualitifes of a connector. For an example, Gladwell had a sort of quiz he would use to quickly identify such people. He had a list of 250 last names, randomly drawn from the Manhattan phone book. He would ask the person to go through the list and count the number of people he/she was acquainted with that had a last name in the list. If the count exceeded say 50, the person was most likely a connector. I don't think I counted more than a dozen.

My dad just emailed me an MP3 recording of a voice mail that my physician's office left me at home. Another cool feature of VOIP I guess. I logged onto their website to confirm my appointment and I find out that I can view the lab results of my blood tests. Also cool. I don't know which surprises me more: seeing these features come around or the fact that it hasn't happened earlier. With Internet reaching 75% penetration in US homes, maybe we're approaching a tipping point in the market of bringing household activities online :)

Friday, June 17, 2005

Skriv gärna namn och e-mail adress!

I just returned from a party thrown by Matt. Thanks again Matt. He thinks my blog is dorky which is hard to deny. I guess I just don't use it to speak my mind about things other than what I deal with on a daily basis. This post will be a little different, but I'm staying true to the dorkiness by blogging on a Friday night.

I met a lot of nice people, two of which I share a mutual friend with. 1) Both I and "Leeway" (I don't know how to spell is name but that's what it sounds like) know Chethan. They know each other through ultimate at Cornell. I got to know Chethan through Americana at NCSU. 2) Both I and Simon know TJ. They know each other from being students at Georgia Tech. I met TJ at IBM earlier this year. The small world phenomenon never gets old. Surprisingly, the one person at the party who expressed an interest in social networks came off as the most socially inept person there. Reminds me of Dr. Doyle speaking about Marvin Minsky and how he noticed that students would always be most interested in the aspects of AI that they didn't handle very well themselves in real life. Clumsy students who fumbled around were interested machine vision, for an example. Minsky was always worried about the students who said they were interested in general intelligence.

I'll close on another random note. Eight years ago I got confirmed through the Swedish church. It took place over 3 weeks in the summer before high school started. At the end of the three weeks, I asked people to write down their email address in my bible that I just happened to come across. If I can get just one response, that would be neat.

Tuesday, June 14, 2005

Fixing web applications

Informative read. There are at least two items mentioned that I now need to address with our web application at work. Speaking of which, before that link popped up in my RSS reader, I was trying to figure out why our web application would call the homepage twice for one page load in the browser. Turns out <link rel="home" href="..." /> was causing it. I don't know why but both Safari and Firefox were causing the associated Struts action to execute twice. Fetching the page with wget, however, resulted in the expected behavior.

Another page had a more severe problem. It would hit the homepage 8 or more times for every load. I traced down the cause of this problem to a simple JavaScript statement that preloads an image. It just hit me. The images no longer exist and so multiple 404s must've been firing (the 404 pages happen to share the homepage's Struts action). I'll leave in the strikethrough text for my co-worker(s) to laugh/scowl at.

Random note: if you google for rel link="home", the web application I'm talking about shows up as the third result. Odd.

Sunday, June 12, 2005

OJB to Hibernate 3 Migration

I've spent far too long on this already so I'll make this brief but still try to help others out who want to go through the same process.

To convert your repository_user.xml file to a hibernate mapping file, try using this stylesheet. It's not completely automatic. I still had to add inverse="true" attributes in a few places were we're using bi-directional associations (see section 2.3.6 of the Hibernate Reference Documentation).

I also needed to tweak a few proxy attributes because we're using Castor XML which turned out to make things much more difficult. Hibernate uses CGlib for what it calls proxy generation. The problem is that it changes the class signature of the original class it's proxying for. When the modified classes get sent to Castor it complains about illegal/invalid characters because the class name is now suffixed with $$EnhancerByCGLIB$$. I had to patch the Castor source with a hack. Still looking for a long term solution.

Before all that mess I spent some time trying to figure out why Hibernate wasn't reading my JNDI datasource resource. It complained about an empty driver setting and a null URL. For those issues, refer to this helpful forum thread. Not the solution I was hoping for but it works.


I'm posting the change I made to Castor in response to a comment but it's pretty embarrassing :) These lines went below line 1293 of org.exolab.castor.xml.Marshaller in version (notice the second if condition):

if (!containerField) {
//-- Make sure qName is not null
if (qName == null) {
//-- hopefully this never happens, but if it does, it means
//-- we have a bug in our naming logic
String err = "Error in deriving name for type: " +
_class.getName() + ", please report bug to: " +
throw new IllegalStateException(err);
if( qName.indexOf("$$-enhancer-by-cGLIB$$") != -1 ) {
handler.startElement(qName, atts);

Lovely solution, right? Hope it helps you, Michael.

Thursday, June 09, 2005

Greasemonkey scripts for Greasemonkey scripts

It turns out that you can in fact modify a document that contains nothing but a javascript file. So if you set the @include directive to *user.js and do something like

var href = "" + getDataUri( document.documentElement.innerHTML ); document.documentElement.appendChild( aLinkUsingThatHref )

, you'd be ready to redistribute your own scripts. It even seems to work for Platypus generated scripts, despite the fact that the URL isn't in the form scriptname.user.js.

Sunday, June 05, 2005

Grandmothers Skyping

There was a link on the Skype Journal to a post about somebody's grandmother using Skype to communicate. I have to brag a little about my own grandmother. She's been Skyping for almost a year now, and sometimes she even initiates the call! OMG.

Saturday, June 04, 2005


I read a lot of other feeds out there. I at least skim all of the entries. I'm able to because the feed reader stores state and doesn't lose it between restarts. Many posts link to either other people's blog entries or web pages in general. I click the link and a new tab opens in my browser and remains there until I read it. For whatever reason, I rarely read it directly but queue it up for later instead. This becomes problematic when the browser crashes or I'm forced to restart the browser and it's been so long since I opened up the tabs that I don't care about losing them. Except that I do. I need a system to queue up tabs like this. I need a bookmarklet that forwards the page to a service that re-publishes the page to RSS and places it in a feed that I subscribe to so that I eventually will read it. Because then I'll be sure to revisit the topic as I make my way through unread items in my reader. The reader (NetNewsWire lite) is able to display HTML so maybe I can get away with escaping the entire page's content and serving that up in RSS.

Thursday, June 02, 2005

Notebooks on night stands

My dad (XFN link!) once told me to always keep a notebook by my bed for times like these. I've tried going to bed but random thoughts are keeping me up so I'll jot them down on my notebook. My notebook just happens to connect me to the Internet.

I was experimenting with data URIs a few weeks back and learned you could create separate documents on the fly. My experiment created an inline OPML XML file based on a blogroll-like listing that you could save and import in your favorite reader. I thought it could lead to cooler things, like create a bittorrent of larger downloads where the site didn't already make them available. Tracking and seeding this file was still necessary, however, which put an end to those plans. Now that there's a trackerless version of BitTorrent, maybe this is possible?


I haven't seen this anywhere other than on the O'Reilly Radar so I'll give it some more visibility (thanks to my awesome Google PageRank): Platypus.

Creating scripts for Greasemonkey was pretty simple, but now it's ridiculous. When this gets out there's going to be an explosion in the number of scripts. I activate the extension, click around one the screen a little, and suddenly I have a customized page (within reason). In some ways, the whole web just became a portal.

Now we just need an easier/integrated way to share these scripts with the world. I wonder if you can write a greasemonkey script that modifies another greasemonkey script to insert a link. Ideally, the link would submit the title, description, and target pages of the script (pulled from the standard comments) along with the script itself to the repository of scripts.

Oh! And then... (this is like the 3rd edit of this post), we need an easier way to discover greasemonkey scripts that people have published. I need something to alert me when there's a greasemonkey script available for the current page I'm on--similar to the RSS auto-discovery feature.

And then... we'll do it all over again for Trixie.

Tuesday, May 31, 2005

I want to...

...hang out with these guys. Stay tuned for rasturme+gmaps remixing.

Friday, May 27, 2005

Hiding or Disabling Menu Items

Another user interface debate came up at work today. Do we hide links when they're not available or do we show them but deactivate the link? A quick google search returned a link to the brilliant Raymond Chen's entry on the matter. Doesn't answer the question but provides some guidelines. I remember reading a Slashdot headline of an interview with an ex-Apple guy who touched on the same question. I couldn't find the link, but I want to say it was with Jef Raskin.

Wednesday, May 25, 2005

Extreme JavaScript

During my internship at IBM this spring, I met a certain person who I found very interesting. He was bright, funny, worked on some really cool technologies, and gave great presentations. I had a hard time agreeing with him on one point. He liked to gripe about the lack of features in web applications... arguing that users would prefer rich applications on the desktop. He was sort of biased since his work would benefit in the case that this preference was dominant across all users since he worked on a plugin for Ecilpse that produced Java applications.

I just watched another screencast by Jon Udell that showed a very impressive use of JavaScript in the browser. The company essentially build an IDE in the browser. The IDE was capable of doing most of the features I saw demoed by this certain IBMer. I wish I could go back and show him this kind of web application.

Sunday, May 22, 2005

Less Clicks

Continuing my experimentation with bluetooth communication between the laptop and phone, I just installed Romeo. It's an application very similar to Salling Clicker (from what I hear) except it's free. It does what I was interested in doing, which is adding AppleScript hooks to proximity actions. Whenever I come in range, the laptop runs the script I talked about in my last posting, meaning one less click for me. Now I just need to figure out how to run an application (Nokia Collector) in the background.

Thursday, May 19, 2005


I'm using a new phone that happens to have a camera. For my next phone purchase I was considering getting a camera phone so I'm playing with this camera to see how much I'd actually use one. Pictures kept on the phone are only so useful--displaying a contact's picture when they call or what not. What I really want is to share the pictures with others in Flickr. I can email pictures, one by one, from the cellphone but this is tedious and expensive on my plan. I began playing with the new Automator application in Mac OS X Tiger. My experience was not pleasant. The UI is far from snappy and my end result didn't work. The workflow produces the expected results when run from within Automator but not when saved as a plug-in or application. Instead, AppleScript did the trick. The script below will open Nokia Collector (works with my SonyEricsson), grab my latest pictures over Bluetooth, browse the folder of downloaded images looking for JPG images with a certain name (that my phone uses), and email those images as attachments.

on run
tell application "Nokia Collector"
delay 30
end tell
set photosFolder to "OCL PB3:Users:mhdavids:Library:Application Support:Nokia Collector:Library:00-0e-07-1e-04-d9"
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:"title", content:"description" & return & return}
tell newMessage
set sender to ""
make new to recipient at end of to recipients with properties {address:""}
tell content
set photos to list folder photosFolder without invisibles
repeat with i from 1 to (count of photos)
set strFile to ((photosFolder & ":" & item i of photos) as string) as alias
set recFileInfo to info for strFile
if (not folder of recFileInfo) then
set strFileName to name of recFileInfo
if ((strFileName contains "Moblog") and (strFileName contains "jpg")) then
make new attachment with properties {file name:strFile}
end if
end if
end repeat
end tell
end tell
send newMessage
end tell
end run

It's pretty rough but it gets the job done.

Monday, May 16, 2005

Cleaning Keyboards

We get cans of compressed gas dusters at work.

Alex: Sweet, I need this.

Alex begins dusting off the keyboard.

Jordan: What are you doing? That doesn't sound good. There's liquid coming out.
Alex: I know what I'm doing. I use these at home all the time.

Alex proceeds to shake the can and turn it upside down to get a better angle under the keys and sprays each row down the line.

Jordan: I just don't know. Isn't that stuff flammable? Like, maybe turn off your laptop first.

Alex picks up the can and actually reads the label.

Alex: "Use short quick blasts. Do not shake, or tilt or turn can updside down before or during use. Turn off all equipment before using.... EXTREMELY FLAMMABLE."

He couldn't have done things more wrong even if he tried.

Tuesday, May 10, 2005

Prepping the Disk for Tiger

I installed Mac OS X Tiger today... once I got the harddrive repaired. It wasn't repairable by the Disk Utility tool that comes with the installer so to increase the visibility of the page that helped me out I'll blog about it.

I was getting two different kinds of errors. First was the Overlapped Extent Allocation error. Chris Anderson has wrote a section called Manually fix Overlapped Extent Allocation Errors without Diskwarrior over on The Mac Help Desk that took care of it. Then there was the Invalid volume free block count error. It turns out that the first command mentioned by Chris fixes this one (fsck -fy).

Friday, May 06, 2005

LiveJournal OPML

Data: URIs are pretty cool. I'm playing with the idea of adding files to a website on the fly, beyond simple icons. Fortunately Simon Willison did most of the hard work by implementing the wonderful data: URI kitchen in JavaScript.

For my test run, I generated OPML files for a LiveJournal users's list of friends. Most of my friends have blogs hosted on LiveJournal. I wouldn't read them at all until I found out you can stream their through RSS. So then I'd read Melanie's. Now I have them all imported to NetNewsWire using this greasemonkey script. Right now, it does not distinguish between people, communities, and feeds but I don't mind unsubscribing items as much as I mind manually subscribing to one feed at a time.

Now that I know it works, I can think of much cooler applications of this combination.

Update: Greasemonkey script has been updated to support LiveJournal's new URL scheme. Yeah I'm a few months behind on this one. Thanks to Scott for pointing it out to me.

Thursday, May 05, 2005


I'm not so sure about the XHTML Friends Network but others seem to be. I came across a greasemonkey script that displays these relationships that are hidden in the rel attribute of a link. The display, however, became very obtrusive when viewing pages with long blogrolls that used the XFN notation. In some cases it took up half of the screen. So I modified this script as well to insert a little [XFN] icon (thanks to the data: URI kitchen) by each link that contains the rel attribute and shows the relationships when you hover over the icon. Like BASF, I didn't make the script... I made the script better. Or so I'd like to think.

Google Accessibility

I'm annoyed whenever my hands have to leave the keyboard to use the mouse, especially when I'm on a laptop, which is most of the time these days. I think I remember a project within Google Labs that enabled you to navigate using your keyboard. I don't see it anymore but even if it was there, it's still not part of the main site so I probably wouldn't use it. Fortunately, we're seeing more and more recombinant interfaces. One such exable is the Firefox extension Greasemonkey which gives users the ability to alter web pages. One of the scripts I use is one that numbers all Google search results and when you type the number your browser loads the corresponding result. Unfortunately, it only worked for non-double digit results. I've modified the original script by Adam Langley for those of you who sometimes venture past the 10th search result.


Nyligen så har jag funderat en del på vad jag igentligen vill göra inom datateknik. Jag vet definitift vad jag inte vill syssla med: teoretisk datateknik och dom lägre nivåerna som operativ system och data arkitektur. Jag förstår att sådant är viktigt men jag vill hellre leka med applikationer som vanligt folk ser och använder. I alla fall, jag har hört lite om sociala gränssnitt (genom Clay Shirky, Joel Spolsky, m.m.) vilket man kan tänka sig. Det ligger väl inom "human-computer interaction" men fokserar på metoder som gör det enkelt för människor att kommunicera med varandra, inte bara med datorn. Därför så spanar jag in Terry Winograd just nu, och verksamheten han driver. Vad det än blir så hoppas jag skaffa en utbildning i något som kan hjälpa mig att jobba med företag som Sixapart, Google, Technorati, JotSpot, elller starta eget.

Java Mail and Google Search API

On one of the projects I'm involved with, we use Java Mail for sending e-mail and the Google search API for indexing our pages. These seemingly unrelated components are in fact connected.

For the longest time we were seeing javax.mail.NoSuchProviderException: No provider for smtp type exceptions. My searches told me that this was most likely because of either a mis-match between my mail.jar and activation.jar files or that I had duplicates of either. I was positive neither was the case. Finally, I removed the JAR files and the code still compiled. We must have had a duplicate after all. After putting together a Perl script to search all the JARs on my classpath, I found that the google-api.jar was in fact the culprit. It includes both the mail and activiation frameworks. So for anyone else who happens to come across this same problem and then subsequently comes across this page (i.e. nobody), now you know what to do.


Jag läste just Doc Searls Getting Flat, Part 2. Själva handlingen är interessant men kommentaren kring Microsofts kultur påminnde mig om en annan artikel jag läste alldeles nyligen. Tyvärr kommer jag inte ihåg länken men den utlyste Microsoft som ett företag där akademiska meriter betyder allt. Det hela får mig att tänka på hur viktigt det är med "corporate culture." Jag jobbade på IBM för tolv veckor från Januari till Aprill. Det var en hyffsat bra erfarenhet. Dels för att jag jobbade mest med studenter som mig själv och dels för att dom gav oss mycket frihet i vad vi skapade. Under hela tiden så uppmande dom en att komma tillbaka till företaget och jobba heltid när man var klar med studierna. Tyvärr så vet jag inte om jag tänker göra det. Om det blir av så skulle det vara med de fåtal interessante personer som jag träffade personer som jobbade med spännande projekt. Annars, på det stora hela så känndes kulturen inte så kul och det är en tur jag helst slipper.

Jag tror att kulturen spelade störst roll när jag valde mellan skolor. Stanford ska visst var väldigt lungt och slappt på sitt sätt. Men samtidigt så är skolan omcirklat av ett område som är bland det hetaste när det kommer till vad jag sysslar med. Jag ser fram imot att vara bland otroligt duktiga människor och att kunna lära från dom. Larry Page från Google (och från Stanford) höll ett tal vid utgången på University of Michigan (en skola jag valde bort). Han sa något som jag har trott sedan jag blev intagen och accepterade Stanfords inbjudan. Han sa att han trodde att skolan hade begått ett stort mistag när dom tog in honom och när han kom dit så skulle han bli hemskickad på en buss. Nu blev det ju inte riktigt så men vi får se vad som händer med mig.