

Reddit goes open source - the actual announcement from reddit.  - icey
http://blog.reddit.com/2008/06/reddit-goes-open-source.html

======
brandnewlow
I'm a US-based journalist with a team of young, hungry, underemployed
aggressive reporters at my disposal. Starting a new metro newspaper makes zero
sense today, but launching a voting site for a city and then backing it up
with a cadre of investigative reporters who would dig deeper into the stories
that made the front page is something I've dreamed of getting off the ground
for a while.

I was hoping Reddit's open code would give me the vehicle, but it's now clear
that's not the case unless I get a hacker on my team. Any takers?

Pligg sucks. Drupal will work but it's kind of a pain. I'd been anxiously
awaiting this announcement because I hoped the Reddit code would give us
something to work with.

However when I visit code.reddit.com, all I see is stuff I don't understand.
I'm no hacker, but I've developed Drupal and WP sites. However I don't know
the foggiest about Python, Subversion or any of the other things listed under
the dependencies. This is very disappointing. How do they expect their code to
be deployed when it requires a hacker to set it up?

If anyone on here is interested in getting involved in what I believe would be
a groundbreaking journalism effort, shoot me an e-mail at
methodista@lawnparty.net

Note: I have no funding at all. Simply a concept and the means to launch a
handful of trained journalists at news stories that merit more attention and
follow-up. With all the talk of "citizen journalism", surely this could be an
interesting way to tackle metro news, no?

~~~
mrkurt
If I were you, I'd start by creating a new sub-reddit for your city:
<http://www.reddit.com/reddits/create>

Couple that with a Wordpress or MovableType blog for your own content, and you
can at least get people working in the right direction.

~~~
brandnewlow
I've thought about that. However, I think branding and having a sense of
identity is very important, in fact, as this isn't a tech play, but a content
and community play, I think it'd be crucial, so being on reddit.com or
wordpress.com to me seems like we'd be shooting ourselves in the foot from the
get-go. I'd have to have to hack a Pligg install, but that's about what it's
come to at this point

~~~
ph0rque
Then use slinkset.com, customise it to your own tastes and with your own
domain. That's what I did with news.ezlearnz.com.

~~~
brandnewlow
What's the procedure like for "taking over" the domain. Cost? I don't see that
info on their site.

Update: Nevermind. Found it. I'll look into it.

------
fiaz
This is a great move. But it only makes sense after a community with momentum
is in full swing. The community experience is the driving force behind
reddit/digg/HN/mixx/slashdot/etc successes, not the technology.

~~~
xirium
> The community experience is the driving force behind
> reddit/digg/HN/mixx/slashdot/etc successes, not the technology.

Slashdot only went open source after they gained a lead with their own
instance of the code. Slashdot only went open source after increasing demand
from its community. Since going open source, Slashdot has subsequently gained
bug fixes and a much more scalable implementation at reduced cost. However, I
cannot name any other instances or derivatives of the code which are active -
not even Squishdot Zope clones.

So, if you've got a big archive of posts and a large number of active users
then open sourcing your code only entrenches your position by reducing costs.

~~~
narag
>However, I cannot name any other instances or derivatives of the code which
are active

In Spain we have <http://barrapunto.com> much smaller but also using
slashcode. IIRC there are also two more instances, one of them in Portugal.

Barrapunto added its own features for a long time, but they weren't
incorporated to main branch, and after serious scalability and trolling
problems arose, they reverted to regular slashcode.

~~~
xirium
> after serious scalability and trolling problems arose, they reverted to
> regular slashcode.

That's very pertinent because reddit haven't released code to reduce spam:

From the article: There are a few portions of the code that we're keeping to
ourselves, mostly related to anti-cheating/spam protection.

Anyone deploying their own instance of the reddit code will have to develop
their own protection against spam, trolling and rigged voting.

~~~
Hexstream
I thought security by obscurity was wrong in _all_ cases :(

------
jimbokun
Anyone find any clever ideas, designs, idioms in the code yet?

I'm not interested in starting a reddit clone, but am interested in reading
interesting code. The one file I glanced through was readable,
straightforward, and concise, the hallmarks of good Python style. That's a
very good thing, but I'm wondering if they've done anything especially clever,
or implemented anything generally applicable beyond the realm of discussion
sites.

Not that they should. Clear, concise, readable, simple code that builds on
existing, open code wherever possible is a wonderful recipe for success. But
I'm still interested in whether they went beyond that anywhere.

~~~
cousin_it
Skimming the code now. Looks clean and DRY, maybe a bit define-happy.
Definitely better than I'd have written it.

~~~
schtog
It was writeen in LISP first so a lot of defs make sense if just porting the
code.

What's wrong with a lot of defs anyway?

~~~
cousin_it
Nothing wrong, it's a matter of taste. To me there are two kinds of code:
"worker code" that does actual work, and "managerial code" that passes the
buck. Lots of managerial code, deep call stacks, short extracted methods that
are used only once etc. are heavy smells to me.

Not saying this is the case with the reddit codebase!

------
edb
This is neat. I always thought a hosted reddit/HN solution would be a good
startup idea. Imagine a site where I could start my own reddit/HN type space
with a unique url. I could then control who comes in (be it co-workers or
friends) and have a place where we could all privately share links and start
discussions. Great for companies, project groups, families, friends, etc...

I know I won't have time to build this, but I think somebody should.

~~~
kirubakaran
_> a place where we could all privately share links and start discussions._

<http://slinkset.com/>

~~~
mattmaroon
Also, corank.com

~~~
edb
excellent. So no, don't make what I say.

------
KirinDave
Weirdly, they've refused to consider moving their source to github (1) citing
that they want to "stay in control of their code." So for now their code is
stuck with very weak community interaction. Even gitorious would have been a
better choice than trac.

It's disappointing and puzzling.

1\. [http://groups.google.com/group/reddit-
dev/browse_thread/thre...](http://groups.google.com/group/reddit-
dev/browse_thread/thread/82b3608b7c351106)

~~~
mileszs
Someone has, however, set up a GitHub mirror of the Reddit code. It's not
official, but at least it's there. I understood their position, which could be
boiled down to "Seriously, we don't have the time right this minute." As with
anything that is new, it _would_ take time to understand what GitHub is, and
what it does, if you had never looked into it before.

A lot of people are saying, "Oh, but it's so easy." The Reddit boys' point is
that it may be easy, but it still takes greater than 0 time and effort. They
either can't or do not want to, dedicate more than zero time and effort at
this time. Their prerogative.

~~~
KirinDave
mileszs, what's more disappointing is that they did it the wrong way from the
start. I fully understand the decision to wait awhile if you've got an
established project and you want to slowly move it over. But the reddit guys
didn't, and it's pretty clear they did basically no git homework before
proceeding with this.

That would be bad enough on its own, but then they handled the response really
poorly. This "we don't have time" response was the sane cap on the mouth of a
bottle of crazy agitated mailing list messages from a different maintainer
saying strange things. It's pretty likely they never even considered it before
someone mentioned it.

------
arthurk
Line 298 in r2/r2/config/middleware.py:

#god this shit is disorganized and confusing

------
icey
Or, if you just want the code:

<http://code.reddit.com/>

------
ken
I'd be more interested to see the old Lisp implementation.

------
k7lim
big boost to the pylons community.

good pylons code to learn from, written by smart dudes, working at a large
scale.

hats off to reddit!

~~~
rubymaverick
might want to read the code before saying its "good" pylons code.

------
bprater
Really curious what the algorithm looks like that moves stories up-and-down
the page.

Anyone taken the time to unravel the great mystery behind it?

~~~
bprater
Woot! found the answer on a reddit thread. Copied and pasted from a commenter:

    
    
      def hot(ups, downs, date):
      s = score(ups, downs)
      order = log(max(abs(s), 1), 10)
      sign = 1 if s > 0 else -1 if s < 0 else 0
      seconds = epoch_seconds(date) - 1134028003
      return round(order + sign * seconds / 45000, 7)
    

"score" is just (upvotes - downvotes). This is then log normalised.

"seconds" is the number of seconds that have elapsed since around 1.46am on
8th Dec 2005.

"sign" just ensures a positive value.

45000 seconds is 12.5 hours. I don't understand.... that looks like hotness
increases the older the story is. I know brackets aren't needed but they help
readability!"

~~~
mrkurt
There's a PGSQL "hot" function as well:
<http://code.reddit.com/browser/sql/functions.sql>

------
noodle
pretty cool

wonder how long it will take for the flood of clones. i can see it now:

"now that they're open source, i can build that reddit clone for elite tech
and startup news that i've always wanted to build"

~~~
icey
I think there will be an initial flood of clones, but only maybe 3 or 4 semi-
successful ones. Remember how everyone said there would be a billion Slashdots
when Slashcode was open sourced?

~~~
petercooper
I concur. Several years ago I wrote a "clone" of MetaFilter (which was quite
popular at the time) called FreeFilter. A bunch of *Filter sites sprung up
with only a few actually "sticking." I don't believe any continue to exist now
though.

------
dejb
>There are a few portions of the code that we're keeping to ourselves, mostly
related to anti-cheating/spam protection.

I can understand why they want to keep these hidden but on the other hand
these would be some of the juiciest bits. Oh well. I hope one day people can
come up with an algorithms that doesn't rely on 'security by obscurity' to
deal with spam/cheating - I know I've tried.

------
tlrobinson
Perhaps pg releasing the source to Hacker News was a trial run for Reddit? Or
the Reddit guys were inspired by it?

------
maien
Look at this link <a
href="[http://www.kolbrenerusa.com/blog/index.php/2007/12/04/50-top...](http://www.kolbrenerusa.com/blog/index.php/2007/12/04/50-top-
niche-social-media-sites-and-their-power-accounts/)"> 50 Top Niche Social
Media Sites, and Their Power Accounts </a>

there are plenty of niche clones

------
iamelgringo
Thanks, guys. Really nice job.

------
ahold
such simple site ... so many technologies it uses. this can happen only to
python :)

------
kashif
Will twitter follow suit?

