Paul Is A Nerd

Good thing I named it paulisageek.com, I’m no dork dweeb or nerd!

Advertisements

stdicon

From the idea of progrium I did a fun little hack last night.

(mimetype or file extension) -> icon == stdicon.com

In the vein of gravatar’s simple URLs, just add the file extension, or mimetype onto the path, and you will get a good icon representing it. There are more options for choosing your icon set, size, and default, but head over to the root page to find out more.

It’s open source, so fork and fix. And if you have any ideas for good icon sets, please post a comment or email me and I’ll get them into the system.

We won hack day!

Friday was my favorite quarterly event at Yahoo, hackday! It’s the internal version of the hacku event that I help with. I want to chronicle my experience since it was my favourite hackday to-date. I’m being overly vague about the project since it might actually get shipped.

This year, I had an idea mulling in my head, talked to a few people, shared it on the internal hacker list and got a ton of great buzz. I started the ball rolling with some editorial work and design. Then our SearchMonkey community manager, Evan Goer lept on the idea, and did a ton more of the editorial work. His enthusiasm was contagious.

When hackday finally came around, Evan was definitely onboard, but it was still a daunting task. He wanted to help in any way he could so I gave him a small coding task in PHP. Lo-and-behold he pulled it off with flying colors. I think we should get huge bonus points for a project manager coding on the project 🙂 He sat next to me at the start of hackday, and went out for dinner, and then CAME BACK to finish it up. What a trooper.

Right as I started to code, one of the SearchMonkey ops guys, Brett Proctor IMed me offering his services. He told me he can barely code and had to leave that night at 9pm, so I gave him some “store and retrieve” webservice to work on. He pulled it off amazingly, and again, we should get more bonus points for an operations guy building the whole backend 🙂

Prior to hackday, in the email exchange, the SearchMonkey UI guy (notice a trend here?) Micah Alpern suggested it to one of his designers, Kara Mccain. She’s the one that did the SearchMonkey logo, so I was elated to have her onboard. She cooked up some sexy designs for the project and then passed out from the exhaustion that the designs caused 🙂 She stopped by the hack room, and then left before Evan got there, so as far as the rest of the team was concerned, she was “remote” much like Brett.

While Brett was doing his work, he showed the project to Reid Burke who then obviously wanted in. The only non-SearchMonkey guy, but we won’t hold it against him. Reid came to the hack room after Evan left, and hung out with me until the wee hours of the morning. Reid came into the project with a self-contained piece so it was easier to integrate. By the time I left at 5:00 am, Reid’s part still wasn’t working, but I guess my threats to take him off the team worked, because when I came back at noon the next day, Reid’s part magically worked. 🙂

I’d like to note that there was a handful of people in the hack room that contributed in one way or another to the hack. Matt Claypotch made up a lot of great titles, had some witty banter all night and made us a pretty picture too! Philip Tellis was Mr. Knowledgable sitting in the corner. I would ask a question to the air, Matt would say something snarky, Reid would join in, and then when it simmered down, Philip would quietly answer the question wonderfully. Oh, and Eric Wu was hammering away on the designs for all the little things to make hackday work. Thanks guys, the hack room was great!

We were presenting as #48 out of 92. #46 was my other hack with Yury Lifshits, webnumbr.com. And then #47 was Reid’s other hack. So a big showing all in a row kind of worried me a bit. Right before I was going to present, Eric Wu called a break for pizza. So I went back, got my carb and sugar rush going, and then setup to be first after the break. It was kind of nice placement, since people actually were ready to pay attention. Not to mention I was wearing my wizard hacking hat, which helped the intrigue.

I started off pointing out Jerry Yang was on his 3rd beer, so that boded well for his coercibility. 10 seconds in, I realized I didn’t clear my cookies from all the testing I just did, so nothing was working. I mentioned that noone should pay attention to the man behind the curtain as I quickly “⌘,” -> clear cookies. The presentation went well with lots of laughs and clapping. Lots of people in the audience smiled at me and gave me high fives. It was good. Brett couldn’t get the live streaming working, so he tail -f‘ed the apache logs to see what I was showing 🙂

When the judges came back we were just sitting around after Havi Hoffman gave away some old shirts. I had been to many hack days before this and hadn’t won, so I was already over the emotionally crushing experience of not winning and didn’t care anymore. When Prabhakar Raghavan announced the most innovative entry going to webnumbr, Yury and I were elated! We skipped up and got our awesome bright orange t-shirts with pride. I was just so excited I didn’t pay attention to when Ash Patel gave away the prize for the most fun hack to us! Sadly Brett and Kara couldn’t be there, but Evan and Reid and I bounded up to get our shirts (I didn’t take a second). We got our picture taken as we were hugging and it was just a great experience.

I chatted for a while with everyone and then walked back with Yury and Evan, talking about the future of our stuff. I’m sure on Monday the joy will wear off and the reality of our real jobs will set in, but maybe, just maybe, we can start another small project like SearchMonkey and see where it goes.

So yes, hack day was awesome, and I hope this tradition spreads and thrives.

Online YAML parser

So, today I needed to verify some YAML was correct, and eyeball the JSON output. I couldn’t find a good tool online that did what I wanted, so I wrote my own in about an hour.

I give you the Online YAML Parser.

It takes in YAML and outputs JSON using pyYAML. Simple, but useful. Try some examples from the 1.2 spec, or paste in your own, and let me know of any bugs.

Only 1 word left on google voice, and its mine!


I recently got an invitation to google voice and have been trying to come up with a good number. I tried all the first 10 digits of physics constants and every single 10 letter word in the ubuntu /usr/share/dict/words. Out of all of that, there was ONLY 1 that was available.

So I give you my new phone number (which is very easy to memorize, hehe) :

(MEM) ORI-ZING

(636) 674-9464

The 2 other leading candidates were :

(209) 782-7526 (209) PTA-RJAN

(707) 728-5468 (707) PAU-LIN8 (thanks ultramegaman)

Is it too much to ask for the number (314) 159-2653, (299) 792-4580, or (137) 035-9990? What is a geek to do…

Here is the source of my script:

If it can help anyone, here is the list of the first 10 digits of all of the physics constants on that site which are known to 10 digits or greater :

2997924580
1054571628
1256637061
8854187817
3767303134
1602176487
2417989454
7297352537
1370359996
2067833667
7748091700
1290640377
2581280755
1758820150
2426310217
2817940289
0665245855
3636947519
2002319304
6582106848
6582275971
2802495364
1097373156
5291772085
1660538782
3990312682
0119626564
5485799094
1602176487
1660538782
1672621637
1321409844
1410606662
5585694713
1674927211
1319590895
2002331841
0433073465
0857438230
1074553298
3243410198

What is "git"

I was just compiling git and found this at the top of the README file :

"git" can mean anything, depending on your mood.

 - random three-letter combination that is pronounceable, and not
   actually used by any common UNIX command.  The fact that it is a
   mispronunciation of "get" may or may not be relevant.
 - stupid. contemptible and despicable. simple. Take your pick from the
   dictionary of slang.
 - "global information tracker": you're in a good mood, and it actually
   works for you. Angels sing, and a light suddenly fills the room.
 - "goddamn idiotic truckload of sh*t": when it breaks

Finally, I know how to swear correctly when git isn’t working!

Posted in geek, git, readme. 1 Comment »

Equivalent OpenIDs

I’ve been having a big dilemma whenever I use an openid. Which do I pick from the 8 that could be me? Talking to Joseph Smarr at the Mozilla labs meetup we stumbled upon a solution. rel-me.

I should register on any site with an openid that supports at least 1 rel-me link. Most sites where you can set your “homepage” will add the attribute rel=”me” on the link. That basically says that “I am also over there”. If you can only link to one homepage, just make sure that from that homepage you can link out to other things you own on the internet. If you can put multiple rel=”me” links, then just list everything you own. I link to my friendfeed.com/ptarjan which has rel=”me” links to all my other “stuff”.

Then when I log into any openid provider they should check the social graph to see if the openid I just used is equivalent to any other one. Google made a simple API to query the graph. This has one problem in that they crawl the graph recursivly on outbound links. Meaning they are trying to start at a webpage and find other things from there. That doesn’t stop me from saying that twitter.com/cnn is me. For identity you want to crawl the graph backwards. Similar as to how PageRank only trusts inbound links.

I made a YQL execute file (raw code) that will compute which URIs trust a given URI.

For example, if I log in with


http://paulisageek.com

then the website that I logged in to should make the YQL call


USE 'http://paulisageek.com/yql-tables/socialgraph/socialgraph.trustsme.xml'; SELECT * FROM socialgraph.trustsme WHERE q='http://paulisageek.com'

which returns something like

<query>
    <results>
        <result>
            <trustsme>http://www.paulisageek.com/</trustsme>
            <trustsme>http://www.linkedin.com/pub/dir/paul/tarjan</trustsme>
            <trustsme>http://stackoverflow.com/users/90025/ptarjan</trustsme>
            <trustsme>http://www.mybloglog.com/buzz/members/ptarjan/</trustsme>
            <trustsme>http://digg.com/users/paralax/</trustsme>
            <trustsme>http://www.google.com/profiles/114701835473476527933</trustsme>
            <trustsme>http://www.flickr.com/photos/ptarjan/</trustsme>
            <trustsme>http://www.linkedin.com/in/paultarjan</trustsme>
            <trustsme>http://twitter.com/ptarjan</trustsme>
            <trustsme>http://github.com/ptarjan</trustsme>
            <trustsme>http://www.hulu.com/profiles/ptarjan</trustsme>
            <trustsme>http://stackoverflow.com/users/90025/paul-tarjan</trustsme>
            <trustsme>http://friendfeed.com/ptarjan</trustsme>
            <trustsme>http://www.google.com/profiles/ptarjan</trustsme>
            <trustsme>http://www.flickr.com/photos/78332988@N00/</trustsme>
            <trustsme>sgn://twitter.com/?pk=14757201</trustsme>
        </result>
    </results>
</query>

and then walk down that list starting at the top, looking at all their user accounts to see if any matches. The first match is the account they should be logged into.

Every one of these trust relationships is explicitly put there by the user by a link with rel="me" so it can be trusted just as much as the original openid provider. For example, if there is a link on http://twitter.com/ptarjan with rel="me" to http://paulisageek.com, my twitter account is giving permission to paulisageek to modify any account it owns. If my twitter account were to be hacked to point to another place with rel="me", that is equivalent to the openid login for that URI to be hacked as well. All sites that I am aware of use the same credentials to edit the rel="me" link as for the openid identity login. With this assumption, the trust relationship is valid.

In conclusion, every site that is using openid, should check inbound rel="me" links to the openid URI. Using the socialgraph API I created a helper REST API that can be used to take any URI and find other URIs that trust it.