37 ms·
Inspired by HN: ReadMyCode.org - Idea to reality in 24 hours
Yesterday I was inspired by this comment: http://news.ycombinator.com/item?id=1383705
After reading it I immediately got to work fleshing out the concept and I now have a minimal version live! It includes GitHub (Gist) integration as well as many community-oriented features...
The url is: http://readmycode.org
Now I need community feedback! What other features would you like to see? What feels rough right now? Design input is appreciated too, as I'm not 100% happy with it now.
Many thanks to everyone on HN for making this possible!
- aarongough 16y agoClickable link: http://readmycode.org/ http://readmycode.org/ Or if the DNS hasn't propagated for you yet: http://readmycode.heroku.com/ http://readmycode.heroku.com/
- marcamillion 16y agoHey aarongough, I am doing a podcast about various ideas/projects/stuff that HN members are working on. Interested in being on one of the episodes? I put up the first episode and am pivoting based on the feedback I got from the HN community: http://news.ycombinator.com/item?id=1379942 http://news.ycombinator.com/item?id=1379942 If you are interested, email me: marc {at} ideatin {dot} com
- aarongough 16y agoHey Marc, Definitely! That sounds like it would be fun! I'll send you an email as well so we can discuss this further. -Aaron
- itjitj 16y ago-Michael Scott
- marcamillion 16y ago??
- latortuga 16y agoThere seems to be some kind of bug with the voting though it could be intentional. I upvoted one link and then subsequently downvoted it (I suppose this could be because you are allowed two votes per item?) and then could not click up or down. Cool app for 24 hours!
- aarongough 16y agoHey! Thanks for your input! The upvote/downvote is intentional (it lets you change your mind, or cancel out an accidental mis-vote). That being said the behavior has surprised a few people... I'll do some research and find out what people think it should be...
- Hovertruck 16y agoI would implement reddit's system, where you can click an arrow to upvote/downvote, if you click it again it undoes that, and if you click the other arrow it switches your vote.
- aarongough 16y agoOne of my friends suggested the same thing actually. The issue is mainly that because the votes are anonymous the both the up and downvotes are counte, unlike reddit where a user can have either but not both. I'll have a play around with it and see what comes out...
- s-phi-nl 16y agoCould you put up a link to an explanation of what the website is all about? You already have that in the comment you linked to. I wish RefactorMyCode would do this, too.
- aarongough 16y agoSure! I was thinking about this earlier... A message that only shows if you haven't visited the site before. I'll put that on the to-do list!
- adbge 16y agoSome kind of tag feature would be neat. Say I wanted to read just Haskell code, I could click a link which would filter out everything that wasn't Haskell oriented. This is a really cool idea, though.
- aarongough 16y agoThanks! I have the back-end already setup for categorization by language, I just have to write the controller for it. A tagging system sounds interesting though: ie: looking for all code tagged 'server' across all the languages... I'll see what I can do!
- jonpaul 16y agoVery cool. Why didn't you use Disqus for commenting though?
- aarongough 16y agoThanks! I was considering using Disqus, but I prefer to have as much control as possible over the content of the site, so using Disqus goes against that. I realize that to an extent using GitHub goes against that too, but all of the source files are kept on my server as well so I can always change how everything is displayed if need be...
- abossy 16y agoPosting a bunch of code by esteemed coders that I normally wouldn't stumble across myself would be cool. For example, some cool Peter Norvig's code snippets, pieces of Quake II, etc. I would normally have to hunt these down but your site can provide a consolidated home for interesting code.
- aarongough 16y agoThat's exactly what I plan to do... Anything that is open-source and allows distribution like that will be posted. Unfortunately I can't do it all myself hint :-p If you think of anything else that should be up there then let me know!
- raptrex 16y agoput the source of readmycode up so we can see more examples :P
- aarongough 16y agoI just put up the fast inverse square root algorithm from quake II! That one is fun!
- aarongough 16y agoI just realized I totally mis-read your comment! I will look at open-sourcing parts of the application (parts of it are already open-source in fact!) but I'm not sure I want to release the whole thing! The parts that are already open source are here: http://github.com/aarongough/ http://github.com/aarongough/ At the moment it's only really the comment system that is open source...
- famfam 16y agoIt's funny, when I come to a page with a bunch of links and up/down arrows, I think 'oh god, here comes another site full of crap links and the arrows mean "we're not even going to attempt to sort this out for you"' I encourage you to consider innovating here rather than copying. PS: I don't think I get that effect on HN because the buttons are so small and I don't have a down button yet. :)
- aarongough 16y agoThe problem with going any other route is you either end up with very bad automatically sorted results, or I have to do a lot of work. When it comes down to it it's quite likely that what I think is good code won't match up with what everyone else thinks... Hence letting the wisdom of the crowd sort it all out.
- benofsky 16y agoI think you should allow per-line comments like in Github, so someone could go through and explain what's going on, or ask questions about particular lines, etc. Great idea though!
- aarongough 16y agoGood idea, it would probably be pretty complex to implement though. I'll have a look into it, definitely keep it in mind.
- detst 16y agoOne possibility: parse "#n" in comments and highlight the line when clicked.
- NathanKP 16y agoI think that one feature that is needed is the ability to edit submissions. I added one of my pieces of code and then realized that I had accidentally introduced a bug while reformatting the code for adding to the site.
- aarongough 16y agoI agree with that. I'll look into how it can be done while still allowing anonymous submissions!
- ihodes 16y agoA cookie that expires after x minutes?
- aarongough 16y agoThat was pretty much what I was thinking as well. Say an hour or so before it expires...
- swolchok 16y agoDon't forget to expire it server-side. It's not hard to save a cookie before expiration.
- jonah 16y agoNice! It'd be good to know the license(s) the code is made available under. That way we'd be able to re-use it in our projects.
- aarongough 16y agoAgreed. I'll work out what the best way is to do that and add it to the site.
- fuzzythinker 16y agoLooks great! language filtering url would be a nice addition.
- zbanks 16y agoI think it'd be really cool if you posted the site's code in various snippets on the site. The whole meta-/self-ref thing might be too awesome for your site to handle. Other than that, looks pretty decent. It would be nice if you could linkify URLs in both code comments, and comment responses. I like how you use github to host the code. That's a great way to build off existing infrastructure to download/share/render code. I'm not totally sure how gists work -- are they editable, and can they be synced with a normal git repo? If so, this is really powerful.
- aarongough 16y agoI actually will be doing that! I had a request before for the voting code, and I'm going to post it up on the website later on tonight! Turning links into Gists in the comments is a good idea! I'll add that to my to-do list! GitHub is great! The Gists are not directly editable because they are created without user credentials but they are real git repositories which means that you can fork them/clone them/etc... The SSH/git urls are shown on the Gist pages (you can get there by clicking the Gist filename in the bottom right of each Gist)
- awolf 16y agoI've tried twice to submit something. It's not appearing in "Newest Code" or anywhere else. I'm attempting to use an existing gist. Perhaps that's the problem? http://gist.github.com/417955 http://gist.github.com/417955
- aarongough 16y agoAre you getting an error message of any kind?
- awolf 16y agoNo. No confirmation, no error message. It just goes back to the Popular Code page.
- aarongough 16y agoHmm.. Sounds like an form auto-filler might be filling the field that I use to detect bots. I'll have a look into it...
- awolf 16y agoWorked fine in Firefox. Just not in Mac Safari 4.0.5.
- modeless 16y agoWhen you submit an item it should start out upvoted by you; otherwise if you don't realize you can upvote your own submission you start at 0 instead of 1.
- tjr 16y agoDon't know where the problem is, but there seems to be no code listings on the site right now. I saw three code posts a few hours ago... ?? EDIT: Now I see two posts, but neither is one of the three that I saw earlier. EDIT 2: And now one of those two posts is gone.
- techiferous 16y agoAnd the votes are all wrong. The most popular code used to have 15 votes, now the most popular has 2 and many items have negative votes for no good reason.
- deleted 16y ago[deleted]
- steveklabnik 16y agoMaybe I'm just a bit paranoid, but it did get submitted to Reddit. I smell trolls.
- aarongough 16y agoUnfortunately you are right.. someone is actively griefing the site at the moment. It's my own fault for assuming that only being able to identify users with cookies would be ok. I'm working on a solution now.
- zach 16y agoIt's okay, it's just what happens -- you fix it, you move on. I hope we're not at the place where anyone would judge you so harshly on a site you constructed in 24 hours!
- tjr 16y agoTo be clear, I intended to help, not to judge! I think the site is awesome. I should aspire to make something so nice in 24 hours.
- mlLK 16y agoI've been thinking about implementing something similar except with the opposite sort of sentiment that this project, application, program was poorly optimized, bug-ridden, and could use some improvement. Easiest way I can describe is take all that crap on all those code snippet sites out there + all the basic features from DCVS + some experienced developers/programmers with some time to kill + somebody that knows what they've written is crap yet functional and is looking for some suggestions. I got the idea from the simple fact that there are still plenty of people out there writing sub-par code who could never dream of pushing something serious they've written to github or bitbucket. The goal I had in mind was to a create sort of preliminary sandbox for users to push projects/snippets anonymously to a place where others could criticize, make fun of, and explain to them why their code fails. I'm sure the concept could easily attract programmers trolling other programmers, but that's also part of the fun since the community your pushing it for know their code was crap to begin with. A couple more comparisons I couldn't resist: a DCVS for 4chan or extending pastebin to the point that it has an API and a user community who prefer logging and learning from their failures by contributing to this repository.
- aarongough 16y agoAs an update: someone is actively griefing the site right now. Possibly a script kiddie I pissed of a little earlier by foiling an XSS attack they were trying. I'm working on a fix and hopefully it'll be pushed out before morning...
- abecedarius 16y agoWhat a great project -- I want to shake your hand for making that in a day. There was a similar site once, slickorslack.com, around long enough to show up some biases in the ratings. Most obviously, short cryptic snippets got lots of undeserved love: you could see this because code with great ratings didn't even work. Like, a broken but even shorter version of the Haskell pseudo-quicksort we've all seen handily beat out the good version. I tested this bias by fixing some other broken or poor submissions, with usually similar results. You can kind of see the same pattern on the new site where the 1/sqrt(x) approximation currently rules -- how many upvoters understand how it works? I'm not sure what to do about this, if anything. Make it easy to run the code? Would help, but does nothing about judging things cool because you don't understand them at all. Deliberately post broken code to keep people on their toes? Eh. This love for the obscure didn't extend all the way to IOCCC obfuscation -- the sweet spot seemed to be dense code apparently written for someone much smarter than you. So I'm tempted to strip out helpful doc comments, even 1- or 2-liners, for the ratings. There was a heavy Ruby bias -- dunno if we'll see any equivalent here. Since slickorslack was an anonymous hotornot-style shootout, there's an opportunity for new biases now, like positive feedback on the visible ratings, or submitter reputation. I'd like to be able to blind that info until I've judged for myself. Maybe view in either reading mode, without vote arrows, or judgment mode, without metadata until you've judged? I think I'd like to be able to fork submissions and offer supposed improvements.
- aarongough 16y agoThanks! You make some interesting points... I think bias is unavoidable in these things. All I can try to do is steer the website in the direction I think is right and let the users take over the rest! Forking a submission would currently have to be done by forking the Gist and re-submitting a new item. GitHub currently doesn't have a way to fork Gists via their API.
- mistermann 16y agoWow, awesome so far! Just a few ideas: Add a column for "Description" or "Why this code is important/interesting) Functional Area(s): <math>, <statistics>, <sorting>, etc (rather than just language), ie: method to do: <xxx> Category:<Statistics> , etc. (could get complictaed, but there may be a way to sort it out) Related to that, an interesting idea (I've seen this elsewhere) is have well-known algorithm <x>, and then have people submit implementations in different languages (and I supose people could upvote the best implementation per language). For example, there are many different common algorithms known to the world of CS that have been around for years, it would be nice to have a hub where one could go to find these, and be able to see implementations of said algorithm in your language of choice. You might want to implement a bookmark system and advanced search so people could tag things they want to read later, and advanced search would allow to search title, within description, only tagged, etc etc A lot of what you should be doing for a site like this is the same thing stackoverflow has done, yet, it is distinctly different, and useful. This could turn out to be a really great website! Stackoverflow has kind of explicitly avoided getting really deep down into the source code level, but I think there would be a really huge demand for such a thing if it was done properly, and nice work for 1 day!! I hope you run with it, I think it's a really great idea that will work, if you put enough work into it!!
- techiferous 16y agoBy the way, there is a typo in the comment email you send out: "To see the original threaded_comment and all it's comments:" "it's" should be "its".
- larryrubin 16y agoNice work. I like the simplicity of the UI- very clean. One piece of metadata that might be useful would be the code's degree of difficulty (beginner, intermediate, advanced).
- Pistos2 16y agoI recommend adding an About page which describes the site. Either that, or add something to the landing page. Some sort of quick way to provide feedback would be good, too. What mechanism exactly is up to you: blatant mailto link; JS-based feedback popup; third-party (UserVoice, etc.); mailing list; link to this HN thread; ...