
Of Gravatars and Robohashes - LiveTheDream
http://www.codingthewheel.com/internet/of-gravatars-and-robohashes
======
e1ven
That is really cool! ;)

I didn't realize that this was a use-case anyone was interested in, but it
sort of makes sense. I've added a parameter you can pass to RH.org to deal
with the gravatar pull on my side, so you don't have to.

This adds a bit of serverload, since I need to make a bunch of requests, but
it's not THAT bad.

<http://robohash.org/colin@sq7.org?gravatar=yes>

If you pass gravatar=yes, it will make a pull to the gravatar URL for that
address. If something exists there that isn't the default, it will issue a 301
over to the site.

Otherwise, it will return the robohash you requested. It also passes the size
param over to Gravatar, just to be nice ;)

~~~
grok1fy
Gravatar uses hashes for privacy so the email addresses themselves do not have
to be transmitted.

To maintain email privacy, you could use a straight pass-through when using
Gravatar. In this case, your URL could look like:

[http://robohash.org/620050a4db5104bae758cd75171d64ca?gravata...](http://robohash.org/620050a4db5104bae758cd75171d64ca?gravatar=yes)

~~~
e1ven
Good idea!

I've added this.

Try -
[http://robohash.org/620050a4db5104bae758cd75171d64ca?gravata...](http://robohash.org/620050a4db5104bae758cd75171d64ca?gravatar=hashed)

------
unfletch
Nice work, but the "they look like they were drawn by programmers" comment
makes me think you missed the point of Gravatar's specific default avatars.

They're intentionally ugly. The theory is that an ugly default avatar makes
the user more likely to upload their own image.

~~~
codingthebeach
Interesting point. Wavatars are Shamus Young's original work.[1] Identicons[2]
and monsterids[3] are Scott Sherill-Mix's work. I don't think those guys were
shooting for "ugly", but I agree an ugly or nondescript avatar could
incentivize users to upload a custom one. And that may have played into
Gravatar's decision to support these avatar types.

[1] <http://www.shamusyoung.com/twentysidedtale/?p=1462>

[2] <http://scott.sherrillmix.com/blog/blogger/wp_identicon/>

[3] <http://scott.sherrillmix.com/blog/blogger/wp_monsterid/>

~~~
grok1fy
Minor correction: Identicons were created by Don Park who open sourced a Java
implementation. Scott adapted it for WordPress and gives credit to Don credit
for the idea in your link[2]:

"A couple weeks ago I made a WordPress plugin to generate unique monsters for
each commenter. Don Park came up with the original idea for representing users
with geometric shapes. Since I already had the framework in place I thought
I’d make a WordPress plugin for the original geometric Identicons."

------
bigethan
yikes, Gravatar has an open redirect.

[http://www.gravatar.com/avatar/8ca7425c8ada807b9bf6934f10d59...](http://www.gravatar.com/avatar/8ca7425c8ada807b9bf6934f10d59fa.jpg?&d=http%3A%2F%2Fnews.ycombinator.com)

It's a fun trick, but it should't be possible.

~~~
grok1fy
Gravatar is designed that way so you can use any default image.

The technique is described in the Gravatar docs under "Default Image."

<http://en.gravatar.com/site/implement/images/>

~~~
bigethan
Ah. But I'd expect think that they'd limit it to only images, or do some sorta
safety checking. I recognize the performance concerns, but it's too easy to
add a malware redirect onto their trusted url.

------
erikig
Very nice, I was planning to implement a similar thing with for 'anonymous'
ip-based human readable usernames to identify users without forcing them to
create profiles.

An excellent bonus - my robohash looks exactly like Bender from Futurama :^)

~~~
anoopks
How will you handle thousands of users behind a corporate firewall?

------
nirvana
I'm curious how many variations robohash uses. It seems either you've got a
very wide variety of custom graphics elements, or only a few elements and have
to draw a very wide number of images to fit in them.

Each two digits of hex is 255, and I count 16 pairs, but can think of only 8
elements in the photos (eyes, ears, nose, mouth, head, body, arms,
background).

If it's those 8 elements and they're derived from four digits in the hash,
then you need 65,535 or so different ears.

I'm guessing the solution to this is to reduce the hash further... so you get
more repetition where two texts produce the same robot, but apparently they've
not made it too bad.

How far did robohash reduce it? Or how far should one reduce it? How many
images does a robohash art set have?

~~~
e1ven
It depends on which set you use.

There are three sets-

The default set has 10 base colors, 10 base faces, 10 Bodies, 10 Eyes, 10
Accessories, 10 Mouths.

There are then 2 sets of 10 backgrounds.

So 3(10^6) _(2_ 10) ~= 60,000,000

