Showing posts from October, 2007

links for 2007-11-01

OpenSocial to Help With Cross Application Permissions?

Hopefully with Google's OpenSocial API launching Thursday, I'll finally be able to tell Flickr, "Just let anyone that is my friend on Facebook, or in my GMail address book, to view my photos."

I'm tired of telling people, "Sure, you can view my photos. Just create an account at Yahoo, then login to Flickr, then let me know your username." I already know these people somehow, and that relationship is somewhere on the web (probably in my address book) so why can't I tell Flickr to use that?

The idea of a portable set of relationships which enable cross site permissions is really, really important to the scalability of the web. Our data is spread out, it's in a web. Let's use it on the web!

Sorting By Multiple Conditions in Ruby

I recently had to sort by multiple conditions in Ruby, and had a hard time coming up with the Ruby way to do this. The Ruby Docs didn't have what I was looking for, either.

Thankfully, #ruby-lang was very helpful (and confirmed that the docs were lacking here).

Let's say you want to sort this array of arrays:

a = [[1,2,3],[1,0,2],[2,3,2]]

and you want to sort by both the 0 and 1 indexes of the inner arrays.

You can write this:

a.sort_by{|e| [e[0],e[1]]}

You will get this:


The sort_by method is used when it's costly to do the comparison itself (for instance, if you need to sort File objects, which are costly to create during a normal call to sort).

sort_by creates another enumeration of keys, one for every element in your array to be sorted. In the above example, we are relying on the fact that Array implements the <&eq;> method. So we are creating a new array which contains the multiple elements corresponding to our multiple conditions.

Note tha…

links for 2007-10-30

Facebook FOAF Generator
Generate a FOAF file from your Facebook profile and friends. A step in the right direction. Now I need Flickr and my other services to understand FOAF and I can finally control access to all my info from one file.
(tags: foaffacebooksemanticweb)

Turns your bitmapped images into vector images.
(tags: graphics)

Radar Networks Ties It All Up With Twine

Radar Networks has come out of stealth to announce Twine, their "revolutionary new way to share, organize, and find information."

I've been waiting for these guys to release their application for a long time. Of course I just signed up to be a beta tester.

links for 2007-10-19

The Ultimate Rock, Paper, Scissors Chart
I need to get practicing.
(tags: humor)

links for 2007-10-15

Automatic Java Class Reloading

I just saw JavaRebel from, which promises to "reload changes to Java classes on-the-fly without redeploy or restart including new methods and fields. It is a generic solution that works for standalone Java applications as well as application servers."

This is the dream within a dream for Java development. One of the main reasons I moved to Ruby on Rails for web development is due to the much faster development cycle of Change then Test. Back in my Java days, it was Change, Compile, Wait 5 minutes to deploy, Bounce the server, then Test.

If JavaRebel can do what it says (and I haven't tried it) then all you Java developers out there might suddenly get a lot more productive. If you've used this tool, drop me a comment.


A lot of gems in Software Is Hard, some choice examples:

The Ninety-Ninety Rule : "The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time."


Rosenberg's Law: Software is easy to make, except when you want it to do something new.


Alan Kay, the father of Smalltalk: "Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves."


Weinberg's Second Law: "If builders built houses the way programmers built programs, the first woodpecker to come along would destroy civilization."