Hacker News new | past | comments | ask | show | jobs | submit login
UseTheSource: a place for beautiful code (jgc.org)
108 points by jgrahamc on July 1, 2010 | hide | past | favorite | 20 comments



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.


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.


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.


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.


Perhaps it would be good to have a page on UseTheSource that explicitly links to those directories.


I dig it. More signal, less noise.

I read hacker news, techstartu.ps, and proggit for the unknown unknowns, the things that may be useful that I wouldn't think to search for. Add UseTheSource to that list.

For the known unknowns (language, type, author, etc), I'll Google/DDG/SO it.

That's not to say that tagging wouldn't be useful on UseTheSource, though.


I'm capturing language deliberately. If this takes off a bit I'll add viewing by language.


I agree. Particularly the timelines of news makes a system where older stories slowly fade away useful. I guess it depends on whether useTheSource is supposed to be a "coding news" where you find great stuff accidentally (like hacker news), or whether it's a place to search for an elegant solution to a problem that bugs you (i.e. StackOverflow for pros).

Either one would be great.


Indeed, I was expecting something very different, not a one-man version of programming reddit '07.

(But then I thought the book Beautiful Code was over-rated, so what do I know).



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...

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.


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!


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!




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.


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.


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...

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-...


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


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).




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: