
UseTheSource: a place for beautiful code - jgrahamc
http://blog.jgc.org/2010/07/usethesource-sort-of-hacker-news-thats.html
======
axod
I know it's "hip" these days to use a vote up/vote down news/reddit type
system, but sometimes I just wish a site was laid out more like a flat forum
or directory.

This is definitely one of those times.

I'd much rather see things organized - by language, by type, by author. But
_never_ by (upvotes/date submitted)

Great idea though.

~~~
ellyagg
I disagree. There are already many, many places to search for code and sites
where code fragments are organized in that fashion. Here, each code submitter
is making a claim that their submission is an example of beautiful code. User
voting is an efficient way to vet those claims a bit.

UseTheSource strikes me as filling what is currently a void: How to be
introduced to cool code and listen to people discuss it.

~~~
JoachimSchipper
I disagree with that: there are, indeed, many places that claim to house great
code; indeed, these do not all house great code; indeed, user voting may (
_may_!) help; but that does not mean that rating by (votes/time since
submission) is useful - it's not a _news_ site, after all, and showcasing some
classics is at least as useful as showcasing the newest Rails trick or
somesuch.

~~~
ellyagg
Actually, it _is_ useful, because everyone is going to the same page, so the
community's attention is focused on a few items at a time. This is what
enables conversations to happen. If instead you just have a catalog of code,
the community's attention is dispersed throughout the site. That's fine if the
site has the popularity of, say, YouTube, but that's not the case here.
There's extremely limited attentional resources, and they need to be focused.

Just as with reddit or hacker news, if I haven't seen some piece of code, it's
new to me, so it's news. There's no reason to apply some traditional standard
of news and then say code submissions don't fit it. I read reddit or hacker
news because like-minded people canvas the web and collect awesome links.
Often it's "news" but often it's not. This is a case where most items may not
be news, but the hacker news UI is still useful.

------
Natsu
The copymove implementation you put forward is very nice code, but it's pretty
slow for larger images unless you've changed it recently. Dr. Krawetz wrote a
blog post about how to speed it up here:

[http://www.hackerfactor.com/blog/index.php?/archives/2009/08...](http://www.hackerfactor.com/blog/index.php?/archives/2009/08.html)

That site also has a tool that allows one to estimate the quality level the
JPEG was last saved at, as well as a lot of good information for anyone else
interested in image analysis.

------
haasted
I have often laughed at the stories on "The Daily WTF", and afterwards thought
that it would be nice to have an "inverse" site, which highlights really great
code. This looks like a great contender for that role!

~~~
singular
It's wonderful to have, as you describe, an "inverse" Daily WTF (Daily FTW
maybe? :-); so often I am left feeling utterly depressed by stuff on Daily WTF
and have been literally unable to read it because of that - the price of
caring about this stuff. It will be nice to experience entirely the opposite
effect!

We should celebrate the wonderful, lovely experience of coming across (or
infinitely more so, creating) elegant solutions, as well as bemoaning the ugly
stuff; it's especially important for up-and-coming programmers to realise that
it's not all terrible out there, despite what some nay-sayers might like to
tell you!

~~~
inerte
Idea here: <http://news.ycombinator.com/item?id=1383705>

Implementation here: <http://readmycode.org/>

------
IgorPartola
Heh: <http://lovelyco.de/>

~~~
albertzeyer
This looks much more what I had in mind when I read the topic. It's a bit sad
that it hasn't really get that much attention.

~~~
IgorPartola
I created it mostly to find beautiful code, not because I have a whole library
of it. Because of that I couldn't really seed it properly. If you have
anything to contribute, please do.

~~~
albertzeyer
Well, sometimes I stumble upon code which I really think is very nice.
Sometimes I'm also a bit proud of my own code when I read it a few
months/years later but I'm not sure if that is maybe too biased (and also I'm
not sure if I could point out any specific examples right now -- but I will
keep your site in mind).

I also remember some talk on the Chaos Communication Congress about
interesting code examples. That was both about _very_ crazy hacks (mostly like
'don't do it at home' but still insightful) and also some very nice examples.
I'll see if I can find that talk. (Or maybe someone remembers it?)

Edit: I think it was this one:
[http://events.ccc.de/congress/2004/fahrplan/files/363-litera...](http://events.ccc.de/congress/2004/fahrplan/files/363-literarisches-
code-quartett-slides.pdf)

Edit: Not sure if that was it. At least I don't see the nice examples there.
:) And I miss some crazy examples I kept in mind.

Edit: Similar talk, one year later:
[http://events.ccc.de/congress/2005/fahrplan/attachments/704-...](http://events.ccc.de/congress/2005/fahrplan/attachments/704-slides_lcq2005.pdf)

~~~
IgorPartola
Thank you for the links. These look like loads of fun.

------
angstrom
What I think people really could use is a site where special consideration to
the implementation is given so that the code can be located more by a drill
down. You still need to give special consideration suited to your own specific
needs and the characteristics of the data you're dealing with. Being able to
sift through the problems and then how to solve them in specific languages
(assuming it is even a problem for the language).

