Hacker News new | comments | show | ask | jobs | submit login
Show HN: Codewars (codewars.com)
198 points by exolxe 1411 days ago | hide | past | web | favorite | 121 comments

Reading through some of the comments here I feel like you just posted a video series of running over cats in your SUV to Reddit.

Personally, I love it, I think its great, has a slick feel and experience to it. The site wasn't as responsive as you might hope but to be fair you are currently on the front page of HN so I am willing to let that slide.

Looks like a ton of hard work went into this and I think it comes across really well!

I'd second that. Great site! Not understanding the reported concerns regarding OAuth, usability, etc. Works for me.

Only problem I'm hitting is 500 errors, which I assume is because the server is getting smashed. Good problem to have!

Really appreciate the balanced perspective. We're a very small team and we're constantly improving, so it's great to hear supportive feedback.

And yea, we've gotten crazy traffic, so the 500s/speed are load issues that we just pushed a fix for.

Hi exolxe,

I'm working on an open-source framework for code challenge web apps, so I'm really happy to see such a website done right :-) !

Sent you a mail asking for some help, hope you'll find time to answer.

Good luck !

For the privacy-conscientious user, your site provides one of the worst experiences I've ever seen.

To get anything to work, I had to allow scripts from www.codewars.com, push.codewars.com, two CloudFlare domains, AND platform.twitter.com. While my usual process to get JS-heavy web apps to work is load scripts from the domain itself, plus any standard CDN domains (like CloudFlare), your site does not work without widgets.js from Twitter, which is pretty crazy.

You depend on three different CloudFlare subdomains - one of which serves a tracking script, on top of you trying to load tracking scripts from MixPanel, Google Analytics, Rollbar, Intercom, Twitter and Facebook. I only loaded what I had to, but I think it's safe to assume that you would have pushed more domains on to me had I loaded everything.

Edit: the complaints in the two paragraphs below are invalid (can't strikethrough on HN) - I mistook the authentication form as requesting my GitHub credentials, whereas the "GitHub" title is a link to GitHub's oauth page, and they also provide the option for creating a CodeWars account without linking your GitHub. The visual distinction between these two authentication mechanisms is near-invisible on my laptop's monitor. Anyway, according to guptaneil (below), they will still require you to create an account with them after linking your GitHub, so don't bother.

-Normally I would just dismiss such a privacy-flippant site as yours, but what pushed me to make a comment is that you prompted me to type in my GitHub password on your site, on a form with an action against your server. This is absolutely horrendous. You should only input your GitHub password on pages at, and send it to, servers at https://*.github.com. I can only feel sorry for all the users who have fallen for this. I feel worse for those users without NoScript, who have unknowingly typed their GitHub password into a tab with scripts from about 10 different companies running - do you trust all of them to not log your password? Even the analytics companies?-

-I've flagged this post, and for anyone who typed their GitHub credentials into this site, I'd recommend you reset your password.-

Sorry for the confusion on the signup Majika. We aren't asking for your Github credentials, but are offering a link to connect your Github account securely via oauth and Github.com (it’s optional). The fields for email/password are to set details for your new account on Codewars. If you accidentally entered your Github info there we can manually delete the account for you.

We do load quite a few 3rd party libraries, though only to make the user experience even better. All of these services are pretty standard and most of these should be familiar with many web developers. Intercom allows us to communicate in real-time with our users, Rollbar allows us to monitor client-side exceptions, mixpanel and google for analytics, twitter and facebook for social. You bring up a good point though that for users who wish to disable these, there are integration points within our code that would most likely cause errors to be thrown. We can certainly work on decoupling our code so that it silently ignores calls to these APIs.

Thanks for the response. I'm very happy to hear that you consider the hard-dependency on external scripts a problem, and that you are willing to accommodate users who prefer to control who their browser talks to.

Maybe you should go full rms and only access the web via email.

I can't believe this is the top comment.

Stop setting up this dichotomy. It's not all or nothing.

There are reasonable amounts of external javascript to load, and there are unreasonable amounts. Please study the difference.

The UI on their site is extremely unclear and I initially made the same assumption, but they're not asking for your GitHub password. They are asking you to enter in a password for their site to create an account. I still have no idea why it was necessary to link my GitHub account though, since I had to create a new codewars account anyway.

Oops. Thanks for that. I've edited my post. Turns out they accept a fake email address, so I just signed up with that.

Glad you were able to make the distinction, we are working on making Github's integration cleaner. The intention is to allow you to link your github account, so that you can use it for return access to Codewars. It's also meant to auto-populate your username/email and not require password - which we just realized is broken.

I didn't even get that far. My company's firewall blocked it altogether.

Was anyone else put off by the link github/enlist to continue after only two brainteasers? I felt like I was just starting to get really engaged in using the site and enjoying it, to only have a "paywall type obstacle" in the way and take away my good vibe feeling. Maybe rephrasing enlist to something like login to track your progress would be better?

Thanks for the feedback winslow - we didn't mean to dampen your vibe. The idea is as the challenges get harder we want to make sure you get ones you care about (interest area, difficulty) - that's a good idea on rephrasing it, we could make that more apparent and give more challenges before requiring signup.

Critique really helps us improve, we love hearing it, everyone should feel free to reach out: nathan@codewars.com

You sure it's not so you can email us every day to pester us into coming back to your site?

Well, they are programmers, I think they are more than conscious about how we (others too, but especially programmers) feel about that! Also, we can always pest them back with auto response filters[1] :-)

[1]: A Croatian (I'm Croatian, too) website made me submit my email for a Web purchase, but they started sending newsletters they have no unsubscribtion mechanism, and they send the newsletter from <newsletter id>-newsletter@..., which I could filter and send to spam (which I also do) , but instead, I forward the email back to them and also send a reply that I'd like to stop receiving these emails. Ironically, they asked me on a few occasions to stop emailing them, I simply respond with the same reply they sent me when I asked to be unsubscribe: "It's automatic, there's nothing I can do about it." There's always a way to fuck with those who try to fuck with you. :-)

Sounds sort of like a quine e-mail.

Very sure... we promise we won't pester you. We send a weekly newsletter with challenges, but you can opt-out if it doesn't interest you.

Of course, I know you didn't mean to dampen the vibe. I really love the site and the love idea as it got my brain thinking which is why I was really bummed to see a forced login. Obviously you want to track progress, difficulty, and customize per user which is understandable and smart. I could be an outlier to the enlist statement/requirement so please grab other data points on this subject ;)

Keep up the good work on it!

Thanks Winslow - glad to hear you love the site!

We want to make sure to keep the intrigue and flow going. So we're seriously thinking about how we can open more challenges while balancing it with a customized experience, great advice. Appreciate the help.

A bit more feedback:

In chrome 32.0.1700.77, clicking join did nothing, it only scrolled to the top of the page.

Also, I'd love to see a quick video introduction. I like the concept.

Same here. Some points:

- Navigation feels weird.

- The main call to action should be "Try Codewars" instead of "Join Codewars" so it'd feel like "no compromise just try it", also it'd be clearer that you can actually try it out before signing up. I agree that the teaser should be longer than the 2 small exercises.

- The webcam in the monitor kinda creeps me out and draws my attention away from the important stuff.

Good point on the text - we'll make an update... The landing page navigation?

The webcam comment had me laughing for a few minutes. Never really noticed, but it's an easy fix.

Yep the landing page navigation, I actually didn't notice there was more to it than the landing page. I felt kinda lost in the landing page cause there's no much else than the "Join us" thing. I'm a programmer, my eyes have been trained to ignore marketing copy and search for code examples and documentation.

Thanks - glad you like the concept. A video intro is a cool idea, we'll look into it.

The join button just isn't clear enough, when it scrolls up it's just taking you to the challenges on the monitor, since you signup through there.

Thanks, a couple people here also seem confused by the join button, perhaps take it to a sign-up form, or change the join button text to be a little more descriptive of what you want the user to accomplish.

I also had issues creating an account.

That's unfortunate - just shoot me an email and we'll hook you up: nathan@codewars.com

I just finished the Javascript and JQuery course at codecademy.com three weeks ago and since then I take challenges at coderbyte.com to continue learning.

So I was very interested in your site and signed up. Here are some of my first observations and comparisons:

- codecademy.com lists lots of males and females from young to old, from different countries with all kind of professions on their Success Stories pages. I felt very welcome their site. The name of your site and the constant use of the word Kata indicate to me that your audience are young males. As a woman in my thirties I don't feel I fit on your site. It seems a bit to aggressive to me.

- The second Javascript problem description was not very good. The second problem basically says "Something is wrong - correct it". I like clearer instructions like "write a function to reverse a string".

- Compared to codecademy.com the site took longer to check my code.

- I have no problem giving my e-mail address to anybody that provides a service I want to try. I like to get the onboarding mails from codecademy.com and think they should send out more because they are motivating. So I think that it is good that you are asking for my e-mail address and I hope you make good use of it by sending me interesting stuff. If not, I just filter you with a click.

I'm going to spend some time on your site. If you want further feedback, just send me a message.

Just curious, why does the word kata turn you off because you are female?

As someone who has studied martial arts for five years, there have been plenty of female students and the vast majority of the people I study with are well into their 30s.

I don't think the word "kata" by itself is masculine or aggressive but the site is called codeWARs, and they call signing up "enlisting" so ..

So they better change their entire branding!

Seriously? You never noticed that the martial arts world is male dominated in a way that many women find off-putting? Sure, some women are okay with it, but that doesn't mean all women are (or should be).

Thanks for the feedback Sandrae, it's helpful to hear your perspective.

We have a lot of female users on Codewars and want to make sure everyone feels welcome. The term "Kata" are what we call our challenges, it just means "form" in Japanese - it's used in calligraphy and martial arts to describe a way to practice a pattern to excellence. As for our name, it does hint at competition, though is meant as a metaphorical war on mediocrity and the status quo.

Performance-wise our site isn't going to be as fast since we run the code on our own servers (opposed to in your browser), which has lot's of advantages for better challenges/more versatility, but makes speed a little more of an issue.

I hope you do give the site a shot, and if you have any more feedback please email me: nathan@codewars.com

Yeah, the word "war" hints at competition but it literally means violent conflict. I know of no association between "war" and a metaphor for self improvement. You should make that clearer if that is what you're going for. However, with "war", "kata" and "enlist" it seems pretty obvious you were going for a martial arts/warrior theme. It's kind of patronising to pretend that theme isn't there just because someone doesn't like it.

Just curious and trying to understand, but what about the word kata is masculine?

I'd like to know this as well. I know many female karate practitioners and not a single one ever proposed changing the traditional Japanese nomenclature because she didn't feel "welcome" or felt "excluded" or even "offended" by it.

Here's the official explanation of what the word means:

Kata (型 or 形 literally: "form") is a Japanese word describing detailed choreographed patterns of movements practised either solo or in pairs.

The site is called CodeWars, not CodeDances or CodeCaligraphy. Kata here is clearly associated with martial arts. Martial arts and war tend to be popular with men and less popular with women. Is that really a contentious point? Do you want a market survey to back that up? Or have you actually been to a karate class and opened your eyes? I trained kung fu for six years and have gone to taster sessions and occasional classes in karate, savate, jui jitsu, escrima, tai chi and aikido. Martial arts is more popular with men than with women. Everyone knows this except you, apparently.

Also, you put "welcome", "excluded" and "offended" in quotation marks. Sandrae did not say any of those words. Whoever you were quoting isn't really relevant to this discussion.

I think it's because we associate kata specifically with _martial_ arts in Western usage. The meaning takes on a militant tone when that context is the starting point.

I speak Japanese and 形 is just a normal word to me. I don't see it as militant at all. In fact, I find it offensive that someone is so culturally self-centered and solipsistic as to demand changes to language using a perfectly neutral word simply because they can't see past cultural/language differences. I guarantee you that if you brought up this issue with a Japanese person (from Japan), they'd have no idea what you're talking about - literally.

Stop demanding the whole world adjusts to you and your solipsistic ways and try to be more tolerant of cultural differences and diversity. If I was the creator of the website, I'd probably have told the OP to fuck off because I don't want shit-stirrers and culturally insensitive people on my website.

Well, but you are now saying, "ignore the past 60-odd years of appropriation of the culture, and buy into this new appropriation! It's all different! We're marketing authenticity now!"

This site's theme uses the gravity of the old "Oriental mystique" trope to seem a little more impressive - to make programming practice sound "exotic" or "badass". What the fuck does a ukiyo-e image have to do with programming? No Japanese site would choose this theme, in the same way that you have observed that no Japanese person would think of 形 as a militant word. The Western equivalent would be to plaster a Dutch Golden Age painting onto the background and substitute Dutch words like "drillen" and "uitoefening" for "kata". It would be ridiculous and nobody would take it seriously.

The problem is, we already have fine English words for what is being done: "exercise" and "practice". "kata" remains associated with McDojos that want to impress you - it's not a borrowed word that has entered everyday use. And we've grown into accepting that it exists in that context over time. But its usage can still be considered not just offensive but colonial, in any Western context. It's an outright theft of culture.

Sounds like you're the one who is "offended".

Kata is a choreography of martial arts movements. Often these movements involve an aggressor or a theoretical aggressor.

Also, after all the site is called Code Wars, perhaps she was influenced by that as well.

Do you think that Kata denotes "site full of young males" because you typically only hear males saying it? It's meaning is gender neutral.

I'll admit that until signing up for a martial arts class which had women in it, I'd only heard men use the word Kata.

How could they make the site less aggressive?

I can't recommend Codewars highly enough as a way to sharpen your skills. It's like a slightly more verbose, prettier Project Euler.

They currently support CoffeeScript, Javascript, and Ruby, but are working on supporting a ton more. Definitely worth investigating.

This is awesome Steven - appreciate the support!

No! You may not have my email address after two woefully simple problems! I don't need you sending me emails every day, "You forgot to come to Codewars.com in the last 2 hours, why aren't you spending your entire life on this site?!"

Same here, I has just stopped when it became too personal without reason. Why do you want me to login?

I doubt anyone, not even LinkedIn, would market their site that aggressively.

it's called hyperbole

It's all good - we may open it beyond members eventually. The main reason for email right now is to foster a quality community... Just so you know we have strict no-emails-every-2-hours policy.

Cool idea. The Ruby code takes a long time to evaluate - even though I passed the first two challenges without any issues, this would frustrate me if I were a beginner. Why not use a Ruby REPL? Looks like you're evaluating the code server side.

Thanks and good catch. We do execute the code submissions on our own servers, partially so that we can prevent cheating and make sure all solutions are legit (the solutions list users see after finishing each challenge provides some of the site's greatest value)... though second is because we plan to eventually support full environments (challenges that utilize libraries, frameworks, etc.).

The speed issue is optimization on our part, we boosted the servers so it should be a lot quicker now

You could make a first evaluation on the client so that the user gets quick feedback whether his solution is right. To validate that the user didn't cheat, you can make a second evaluation (server sided). The user shouldn't be forced to wait for the server sided evaluation. Instead he should be able to solve the next task immediately.

But nevertheless: Great idea with a lot of potential! Maybe you can give more detailed compile errors, if the user wrote incorrect code.

If you do implement this, you can also avoid validating every submission server-side. It should be enough to check a random sample. If you suspect someone, you can start checking them more aggressively.

If you want to get serious, there's actually a lot of research into cheating prevention :)

Same deal with JavaScript - there is a significant lag between when I hit submit and see if the submission was correct. It seems like it would be trivial to get JS to run in the browser, but maybe I'm overlooking some caveat to eval that the creators foresaw.

This is a very fun way to learn and get better. It's still in a very active development stage, so things go up-and-down regularly (which sucks when you want to get your fix), but it's mostly been awesome while I've used it the last few months or so.

If you do try it out, one of the best parts is adding your own "kata" — basically the games or tests. You will learn a lot by writing them (the community is very active in helping users improve description text and test cases). And there's nothing like seeing someone come in and absolutely blast your best effort out of the water with something even more amazing.

The site looks great! I only have one comment: it'd be nice to get an idea of which solution is the most efficient, and it'd be REALLY nice to be able to sort solutions by speed.

Awesome suggestion, that's actually one of our next features - stay tuned!

The dashboard UI is pretty confusing, I switched to Chrome because I thought it was broken in Firefox, and in Chrome the "preview" (now I know it is a preview) has shadow on the bottom. It wasn't at all clear to me that clicking 'Train' would start the exercise with that preview. Otherwise, massive kudos, I hope you upgrade to CodeMirror 4 with multiple cursors and improve the CoffeeScript highlighting (I really feel Ace is more ready for what you're doing). All the best!

This feels like the Codecademy for programming gangsters.

The name is pretty similar to CodeCombat (http://www.codecombat.com) and I'm not clear on how this site is better than Codeacademy (http://www.codecademy.com/). There are already a bunch of programming koans/katas available on the internet.

"The reason Google seemed a bad idea was that there were already lots of search engines and there didn't seem to be room for another." - Paul Graham

"It already exists" is a terrible reason not to do something

The difference is that Google had a clear unique value proposition that was to provide search results (and only search results) back extremely quickly and were highly relevant when they other players were focused on creating "web portals" and did not focus attention on search.

With CodeCombat and Codeacademy there UVP is very obvious (make learning to code a game and teach to code online resp.) and had not previously been done. With this site I don't understand what the UVP is (social programming challenges?) that hasn't been already by something like TopCoder, Sphere Online Judge, etc.

"Achieve mastery through challenge" is the tagline. The idea here is to push yourself to solve problems you may have not attempted before, and to learn from others by seeing how they solved theirs. I've have personally learned a lot from seeing how other people solve problems, I even learned a lot from creative uses of solving "Hello World" which was a bit of a surprise.

In short: Codecademy is meant for those who want to learn programming. Codewars is for existing programmers who want to get better at programming.

can't wait for Clojure support

http://www.4clojure.com/ is available in meantime. Actually its what I used to learn it.

Glad to hear it, it's in the works - we're just deciding the order to launch them, so the voting feedback on next languages really helps us

I'd also like to see Clojure or ClojureScript support. It would bring me back a lot more often.

I was pretty taken by this site, I did the teasers, signed up, selected my skills and interests but then when I wanted to continue I started getting 500 errors. I had to leave quick so I didn't try to find a way around but I would have had some fun if it wasn't because of that. Haven't managed to actually use the site.

We got hit with pretty heavy traffic, the load was causing the 500s and we've pushed a fix for it - it's ready to go, so come back and check it out!

Great idea -- interested to hear more about how you're handing all the syntaxes, a combination of JVM and other things?

Couple of bits of feedback

- Server was unreachable when I tried to submit an answer, and the submit button was then permanently disabled - Not sure if my sign-in with Github was successful, it just shows login still - Now getting 'The code does not execute properly. Try to figure out why.' and there is no code in the box to enter

This is really cool-- but I get so many "Submission timed out" errors that I can't even do a problem...

Just wondering about how you are doing or going to do your sandboxing for languages like c, c++, etc. If you are running arbitrary code from the user on the server, it could be risky I would imagine, so I am wondering what steps you take to make sure the user won't do anything nasty?

I would be pretty interested in this as well. I imagine that they only have a loose idea at this point, if at all. If the list of "coming soon languages" is any indication of priority, c and c++ are at the bottom of the pack.

Great questions guys - we use locked-down language sandboxes on our own servers right now (github.com/codewars) for JS and Ruby. Then we're developing a Docker/LXC based server sandbox that will allow us to safely run each code submission in any language in its own container... Another OSS option out there is: http://eval.so/

Also take a look at ZeroVM: http://zerovm.org/

I would love to sign up, but when I click to create an account, I get redirected to the home page.

You have to sign up through the homepage. It could be more clear.

+1 - This one caught me off guard for a second. You have to complete the two challenges on the home page before it'll let you sign up.

The sign in we have there is just for current users. To sign up just take the challenges on the homepage - Good luck!

I see. It was very confusing to click "Sign In" then click "Don't have an account? Enlist Now." and be redirected to the home page. Looks cool though, thanks.

Edit: I now see the intended flow, but there was no indication that I had to complete the first 2 levels to be able to sign up.

Saw you guys demo at a meet-up at Carbon5 almost a year ago, cool to see your progress since then. I actually use the site regularly, nice work, especially with the way your hide the spoilers so you can't just cheat if you get stuck.

No way, this brings back some good memories. Glad you're using it regularly!

I love it! I'm a self-taught programmer, mostly working alone on my own projects. This is a great way to expand my knowledge and have fun at the same time. I particularly like seeing the other solutions after I've come up with my own.

Thank you!

I ran into some bugs when testing, such as: http://imgur.com/B0VVnmn

The test will pass but I can't submit it, because the test doesn't pass. Meh.

That test doesn't pass for me in Chrome console.

I think it's because your isNaN check shortcircuits the other checks as you're checking if the array element is NaN. Is that what you meant to do?

Also when you recursively call `numbers(args)` your `[].slice` will put your array inside another array.

FYI none of the buttons seem to be working on the homepage in Firefox OS X. On Safari the formatting on the homepage is all off. Pretty cool nonetheless, I plan on trying this out more later today!

Sorry to hear that - we've done testing on Firefox/Safari and haven't gotten that, though definitely want to fix it up... Good luck getting into it later, and if you could help us debug just shoot me an email nathan@codewars.com. Thanks!

I like the concept, but I don't see how I can currently compete with other coders on these problems. If I could pair up with a friend and do these challenges I would enjoy it more.

I voted for Haskell to be included and plan on joining when it's added :)

Edit: Though, it's not beyond the realm of possibility I'll give in and sign-up once there is python support.

Those were my two votes as well. The site looks like a ton of fun, can't wait for try it.

This is awesome! You should seriously add PHP. Our community is probably the largest and has many inexperienced programmers who would really benefit from Codewars.

Is there a way to go back to Katas that I've started working on, but haven't completed? (Or is that something I shouldn't be doing?)

Right now we save all your progress on the kata, though you need to find it again by searching/list view... We're pushing a "favorites" list soon that will allow you to earmark them for later.


I didn't expect much but ended up pretty impressed by the site. It's beautifully designed and the flow is very natural. Lots of kudos!

Is the scoring only based on time-taken and LOC? The top script that I looked at was more like code-golf. Is that the aim?

The scoring is based on upvotes from other users. This often does translate to the "top answers" being dubious one-liners.

To start upvotes from the community was the best way to do it - though soon enough we'll be benchmarking solutions so you can order them by execution time.

Very cool, one of those sites you can very easily spend a 1/2 hour on without realizing it...

Awesome. Can't wait till more languages become available.

github sign in doesn't actually seem to sign me in.

Yeah, I was confused about this too. They hook up your github then...don't even use it?


Indeed, I'd be all over this if it had Python support currently.

It's our next one - we're getting close to launching it, if you drop your email in the voting, we'll make sure to let you know!

Already done!

I'm having fun with this. Thanks for sharing.

Big plus for making tab work in editor

once I link to my github, why do I need to select a username, password and email to enlist?

Yea right now it's not a full github sign-in, but allows us to let you auto-signin when you return. We still need to other info to create the account.

why though? you've verified me via github. should simplify the process.

R isn't in the roadmap?

GitHub Sign In is a plus

We'll make that more clear - right now the Github Sign In is for current members, the signup is after the two challenges on the homepage

However, did not work when pressing Sign In and going through that process. I came back to homepage with no difference.

It only worked once I went through the few questions on the homepage, and then it was a single click to connect my GitHub account. Finally, logged in now.

Outstanding user experience throughout the account setup, I will continue playing with this as it's quite enjoyable so far. Thanks for sharing.

#edit it's kind of sad (and telling) to see the complexity and cleverness in the higher ranked solutions.

#edit2 rampant regex solutions, nested returns, oh my.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact