Saturday, March 13, 2010

Applying StumbleUpon to code.

While I don't know any of the specifics behind StumbleUpon's recommendation and rating systems, I've observed a large number of up-trends and down-trends of StumbleUpon referral traffic while watching Rosetta Code's analytics. Based on my observations of how traffic flow works, I suspect the same system could be adapted to random-walking code bases.

Why would you want to random-walk a code base? I can think of a couple reasons. First, you're bored, stuck or stalled, and you need a distraction from the function you're working on. Second, perhaps you need to familiarize yourself with the code base a bit better better by randomly jumping around to different files, classes and functions.

Here are a few ways to identify a place in code, thinking strictly from a C++ perspective. (Other languages have their own ideal ways of thinking about code at a component level):
* File::Line
* Class
* Function

At a slightly broader perspective (from a Visual Studio perspective. Other development environments have their own terminology):
* Project
* Solution

Getting meta:
* Bug report
* Bug comment

Of course, a line in a file probably exists in association with a class, and with a function. So you would likely have an implicit relationship there. A class or function is likely to have a relationship with a project and solution (or several, if the file it exists in is shared among multiple projects). So there are more implicit relationships. A bug report may have some association with one of the other location identifiers. More implicit relationships.

So that's the content side of things. What about the user side of things?

StumbleUpon is Yet Another Social Network. You have contacts whose likes and dislikes affect where their recommendation algorithm sends you, and your likes and dislikes affect their browsing experience.

While the "social networking is going to solve all your business problems" fad went away with the dot-com bust, there's still some value in positional association. Let's say you've got a project development team of four people, and they all tend to work on the same product or product component. Or maybe you've got a company with thirty developers, and they're all working on the same gigantic codebase. That's akin to StumbleUpon's contacts.

While they're random-walking through their codebase, the developers' individual interests and disinterests would draw each others' attention to various parts of the code base, not as something to direct their focus on, but as something to let their brains passively absorb and toy with while they're taking a step back from the draining problem they're already focused on.

Anyway, just a thought.

--
:wq

No comments:

Post a Comment