I got a sneak peek at del.icio.us’s source code

January 19th, 2007 by Stefan Juhl

Making the right request at the right time can sometimes give interesting results. A good example is an hour ago when I got access to parts of del.icio.us’s source code.

It’s always exciting to get a sneak peek at source code of prominent websites. I’d love to share it with you but I’m rather sure that in very very short time I’d have Yahoo’s lawyers breathing down my neck. And that, I really don’t want to happen! I’m not going to keep all the fun to myself though. I’ll share some of the comments from it, since that shouldn’t hurt anyone.

First of, let me say that the source looks nice and structured. And I haven’t noticed any cursing in the comments..! Let’s get started… (some parts have been replaced with dashes just to be safe)

Is del.icio.us hacking work in progress due to doubt?

# FIXME - We’re not using ——— for personal search anymore. Is
# it safe to pull this code entirely?

# FIXME - If this assignment is taken, it overrides the common-tags
# processing in the above block. Can we avoid the previous work?

# FIXME - I don’t know why, but sometimes ——— is not
# configured by the time we get here! Loading ——— here is a
# cheap hack to get it defined. Thankfully this is one-time only.

It’s difficult to do stats on combined results..

# currently commented out as it’s a matter of pick your poison: sometimes
# remove elements of everyone’s results if they exist in user results and have
# the everyone stats be wrong (x-y of z) OR have duplicate results sometimes.

# lookup the user’s actual data instead of the aggregate data.
# since it is being looked up by ——— instead of by ———,
# it will find edited posts. deleted posts will not show up and will be
# hidden in the main result display. this breaks the stats readout
# unfortunately.

# else no real user data found, which means the post was
# returned by ——— but is not in the master, which means a
# deleted post that hasn’t been reindexed. not showing it in
# this way leads to disturbing page stats, but… no fix yet.

# rocco has modded the ——— to substantially overshoot the # of results
# asked for, this makes the stats returned much more accurate and stable.

(maybe “rocco” also worked on Google’s result count, but made the overshoot a bit too high ;-) )

Coded before deciding on a name, or ready for a name change?

What I’d consider being rather static content isn’t static at del.icio.us. One could actually suggest that they coded this either before deciding on a name, or maybe they’re just ready for a change of name. They don’t write ‘del.icio.us’ but instead they output the hostname. E.g.:

<%$HOSTNAME%> is a collection of favorites - yours and
everyone else’s. You can use <%$HOSTNAME%> to:

Well, that’s all I’m confident to share for now…

Disclaimer: I haven’t done anything out of the ordinary to access the source code mentioned. It was simply not parsed but just outputted in full by the server after performing a normal request. Also, I’m confident that I haven’t got access to anything that can hurt any party. And at last, I won’t share or publish the actual source code.

Share and Enjoy:

  • digg
  • del.icio.us
  • YahooMyWeb
  • Furl
  • Reddit
  • BlinkList
  • Spurl
  • NewsVine
  • blinkbits

Posted in Random Stuff |

12 Responses to “I got a sneak peek at del.icio.us’s source code”

  1. Ertugrul Karademir Says:

    It’s always exciting to see the “behind the scenes” work :) . Thanks for the post.

  2. Tudor Mateescu Says:

    Lucky? :)

  3. anty Says:

    So del.icio.us is using ASP right? I often laugh when I can download plain code from a site. But most of the time there is nothing of interest on these sites… Maybe I’m visiting the wrong sites at the wrong time?
    Anyhow, thanks for visiting my site, I’ll bookmark your RSS Feed for a while :)

  4. Stefan Juhl Says:

    No it’s not ASP. Perl I’d say but I’m not 100% sure since it’s not a language I’ve ever worked in.

  5. schnitzel Says:

    “Coded before deciding on a name, or ready for a name change?”

    Using variables like $HOSTNAME hostname is an indicator for good coding style.

    For me, it would rather be more interesting to know which query you have used or which cms they are using and if there is another page out there running the same cms…

    Maybe what you saw is only some page template’s code that happened to be displayed. This would be only a part of design logic not the business logic.

    However an interesting find anyway!

  6. static Says:

    I highly doubt they are using an off the shelf cms schnitzel. In fact, I guarantee it.

  7. Tim Says:

    This happened to me once also, the source is pretty clean, and I love the comments made by the developers.
    it’s 100% perl.

  8. Tim McCormack Says:

    Stefan, a number of sites use a variable so that the same code can run on the development, staging, and live servers.

  9. joseph Says:

    Neat to peek! As a coder it is fun to peer into the mindset even if only the second brain half that communicates to the voice in head in the type of comments.

  10. Stefan Juhl Says:

    Tim McCormack, yes I even do it myself sometimes. But some of the occurrences were inside the texts like on the about page.

  11. Tim McCormack Says:

    Heh, you’re right — the text of the About page is quite a different matter. :-)

  12. Sapos, culebras y código fuente | Emarts Says:

    […] Según Stefan Juhl (Que pudo fisgonear un poco el código fuente de del.icio.us), hay códigos fuente en el que no se encuentran ningún tipo de palabrota por más increíble que parezca. […]

Leave a Reply

Stefan Juhl