Coderloop is the coder's gym

13 points by federicof ↗ HN
Hi everybody,

we're working on a community for developers where coders can practice their skills by solving programming puzzles. Coders can earn "skill points" (programming, knowledge of algorithms, etc) depending on the puzzles they solve and on how good their solution is. We currently support submissions in Java, C/C++, Perl, Python, Ruby, PHP, Fortran, Erlang, C#, Objective-C, LUA, Javascript, Scala, OCaml, Clojure and Common-Lisp.

You can check out the site at http://www.coderloop.com/

If you want to give it a try, I will appreciate any comment/feedback or suggestion you may have.

thanks!

- Federico Feroldi

46 comments

[ 3.3 ms ] story [ 89.2 ms ] thread
Very nice.

I'm not sure the ability to sort users by name is useful.

People may possibly be shy of showing how many times they've failed. projecteuler.net only displays the number of correct submissions for each user, and I'm personally very glad, as I can then try a variety of techniques without fear of losing "rating".

Of course, this may not be the way you wish to go, but I think many people would appreciate the option of hiding the number of failures.

In fact, if I may be pessimistic, I predict that if your website becomes popular, you will find people start opening multiple accounts in order to test solutions with one, and keep a perfect score with the other.

Thanks for the feedback, I didn't thought about that. :) We were thinking about two things: - public/private profiles - replacing the success/failures count with just a success rate
I still think that's missing the point. Publicly showing what percentage of a users submissions pass/fail is probably not desirable to the user. Keeping it private or using it for problem statistics is pretty cool, though.
I have a feeling I will get addicted to this.

Add more problems and you win me over.

Great thanks! Currently almost all the problems are algorithm based (you can solve them with any language). Since we have the ability to have language/framework specific puzzles we will soon implement more language/framework specific puzzles (i.e. java, ruby, rails, etc) to let you test your knowledge of a specific technology.

If you have any suggestion for kind of puzzles you would like to see please let us know :)

cheers

I just solved the first one. This will be fun.
It's "Lua", not "LUA". (It means "Moon" in Portuguese, same etymology as "Lunar".) Also, it seems a bit odd to be using problems from Project Euler. Looks great otherwise, though.

I'll try to suggest more problems once I have time to dig in - how about adding infrastructure so members can submit problems themselves?

Thanks, we needed a set of problems to start with and we've used some Euler problems as the basis even thought we slightly changed the problems to be more generic (the input is unknown) so that users are forced to write a generic solution.
Could you add a Prolog, too? GNU Prolog or SWI would be good.
Sure, we can add any language that have an open source compiler/interpreter. I've added Prolog to our backlog. Stay tuned!
I like that they integrate the project euler problems.. you can just reuse your solutions.
yes that's the idea, and you can compete with other people to create the most efficient solution. This is new because the purpose of project euler is only to create a correct solution...
How about a way to sort by puzzle difficulty (%pass out of total tries for example) so we can easily find the hard problems
Oh, and a forum so people can discuss solution approaches, programming techniques, ask questions, etc.. that would be great. Doesn't need to be anything groundbreaking, just a normal forum
The problem with this is that the most difficult puzzles usually have few submissions, so the ratio between pass/tries is not meaningful.

We've been thinking about asking the users to rate the difficulty level of the puzzles once they solve it.

You should also drop people on the hello world puzzle as soon as they sign up.

It helps to be able to see some examples and know where/what the guidelines are before you get started

Seems cool, I had to manually find my OpenID account link to be able to use it to login though.
Why do I need to register? For a website like yours I should be able to try whatever it is before I have to sign up for anything. User registration is a HUGE barrier to adoption that I don't think you can afford (or really need).

I like the idea, I wish TopCoder had a UI like this.

We're working on a way to submit code without the need to register. However the service want to be a community where developers compete against each other and earn points, that's why we ask them to create profile.

We try to lower the barrier as much as possible by not asking the users to create a brand new user/pass for coderloop.

Already addicted! The online code editor with the possibility of edit a just submitted solution for a fast fixing makes the different! Great job!
Great! Soon we will integrate everything in one single page so you don't have to leave the editor to get the feedback on your submission.
I was pretty excited to do some of this when I got home from work, but my preferred language (Python) is only supported in an ancient version (2.3.0).

I wasn't sure when this version was released so I decided to look it up, 2.3.0 dates back to 2003.

Hi, sorry for that! What is the most common version used currently?
Python 2.7 is the newest 2.x release, so it's what I imagine most people who haven't taken the plunge to Python 3 would be using.
Thanks, I've added the upgrade to our backlog, stay tuned!
Yes, this. I was happily coding and kept failing the (very) simple "Shazoo" challenge because either 2.3 or your interpreter doesn't understand the "if __name__ == '__main__'" logic for Python portability. I'm ashamed to say that it took three tries before I just took that out and submitted a program that, while inferior, passed.
I'm sorry for that, we're going to add support for 2.7 very soon!
Upon further reflection, it may be that you're loading the code dynamically or something (and not just running it as a command line application) or something that caused the __main__ not to trigger.

Once I understood the constraint, I was fine. It's a neat little app, and for somebody who's never had an actual job as a programmer, some of these exercises I feel are things that I should at least know the pattern.

I'm digging it.

Thanks! The code is executed by an "host" script with a system call, not sure if this breaks the __main__ function in python. We will look into that issue. :)
you could ask the users for the shortest correct solution in any available language this will show the relative power of each language and the flexibility of the user to seek for the best tools
interesting idea, how will you measure the "length"? just how many characters the source code is made of? we could make a competition out of it...
I guess so. But maybe the use of the standard library could be allowed
Meh, this has the same problem the acm online judge has, and the sphere judge and so on and so on. Which is also why I will stop usign this after a single attempt.

The issue is that it is impossible to debug these programs. I just submitted a solution. It failed. I get no input that failed, I get no message why it failed. While I can guess further inputs in this simple case (missles), for more complicated problems, this becomes simply impossible. Especially for more involved puzzles where subtle differences in problem definitions dictate the difference between a perfectly fine and a horribly wrong solution.

Sorry, but pretty much every coding kata site failes on this, and you did not manage to get this one (for me) crucial, make-or-break feature working.

Hi, I understand your point. The problem with the feedback is that if we tell you for which inputs we're testing your solution, you could develop an optimized version of the solution for those special case, or worse you could precompute the solutions and just write a solution as a long if-then-else sequence. The purpose of the challenge is instead twofold: being able to understand the problem specs and being able two produce a generic solution that must work in an environment that you don't control (because that, at the very end, is what happens to the programs you write... They're going to be executed with inputs that aren't under your control and that you couldn't know in advance).
In theory, I agree with you.

In practice, I have spent an entire week during a universitary course with various problems from such problem site and eventually learned that the problem descriptios were different in a subtle way or certain edge cases were not considered or the test suites were flat out wrong. (This was particularly amusing, because they had added wrong test cases after certain solutions were accepted beforehand. Thus, It was clearly visible that the problem was solveable, because there were programs accepted).

Also I don't entirely agree with the argument that my program has to work in an unknown environment with unknown controls. In such a situation, I would at least get a logfile to see what was going wrong. Without that, debugging anything non-trivial is just not worth it without getting paid for it.

Ok but here the point is not about technology, it's very easy for us to give you access to the output of your program (in fact if you use a compiled language, and the compilation phase breaks, we show you the log). The point is that any kind of feedback that I give you access to that is generated from the input we send you to you program, will give you the chance to produce a solution that i not generic, because you know the input in advance, you can precompute the solution and just "print" it. You can object that we should generate the inputs randomly and on the fly. That can be definitely done for the very trivial problems (like reverse a string or a sequence) but will be impractical for more difficult problems that have very few input data sets that lead to a "meaningful" result.

Anyway, we're open to suggestions on how to improve the process. :)

Well you have a correct solver to the problem. Couldn't you just randomly generate an input, push it through the certified solver and supply me with the input-output-pair?

For one, even if this is the actual test input you use, I will not know it.

For two, it might not contain the trigger for my errors, but if I can get enough such samples, I should eventually get a sample which contains the problematic input.

For three, from what I see, the problems should be possible to generate randomly, especially if the certified solver rejects malformed input. E.g. for the missle problem, throw together N numbers and look what happens until the certified solver outputs a proper solution.

In theory it can be done, but it would be very expensive in terms of computational power. Anyway, you raised a very good point that we will keep in mind for the near future. Thanks indeed for your feedback and the nice discussion.
I see this concern. I thought a bit more about this during the day. The computational power required could be reduced if you stored the generated inputs and present them to the user if he requests additional help.

Given this, this system could be extended using a rating-system by users ("Click here if this input helped you solve the issue"). This would overall result in a bunch of inputs being generated (basically whenever someone needs a new input), and some edge case inputs will overall bubble to the top, because they are rated helpful more often than others.

Anyway, I'm happy to help. Good luck :)

Cool, this one is a very good idea actually, a user generated database of test cases for each puzzle! I'm putting it in our backlog, thank you very much!