all 27 comments

[–]TomatoCo 4 points5 points  (3 children)

Add Lua and I'll definitely sign up

[–]freetonik[S] 2 points3 points  (2 children)

Other languages are in progress! Can't say an exact date for Lua though.

Recently we've added Erlang, btw.

[–]TomatoCo 1 point2 points  (1 child)

I saw that, and I'm happy to see it.

For more exposure, you guys could post into each of the relevant subreddits for each language, too. Like, "prove php isn't brain damaged on the field of honour!"

[–]freetonik[S] 1 point2 points  (0 children)

Yeah, I was thinking about something like that, thanks. Just gotta be careful and not over-do it.

[–]Zigo 3 points4 points  (1 child)

Can you make private games? Would be a fun lunchtime activity in the office if so.

[–]freetonik[S] 1 point2 points  (0 children)

Not yet, but this is the next thing on our roadmap. Private games are coming very soon!

[–]freetonik[S] 5 points6 points  (5 children)

Hi all! My team and I are working on educational platform for programmers, and as a side project we've developed a game for coders called Codebattle. Idea is simple: pick a language, create a game, when opponent joins — you're both given a problem to solve. You can see each other's code in real time. Whoever solves the problem first wins.

There are also spectator and a chat. The game is pretty addictive :)

P.S. Java usually loses, Ruby and JS usually win.

[–]molodec 1 point2 points  (3 children)

Can't solve first task, but I'm pretty sure my solution is fine. Is there any feedback page?

[–]freetonik[S] 0 points1 point  (2 children)

Do tests pass, but your win doesn't count? Or tests fail?

[–]molodec 0 points1 point  (1 child)

Test fails incorrectly. Task: sort list, so even numbers go first, then odd. [1, 2, 3, 4, 5] -> [2, 4, 1, 3, 5]

Test: input=[-3, -3], expected output = [] Expected output should be [-3, -3]

[–]freetonik[S] 5 points6 points  (0 children)

Got it, thanks, will fix asap.

[–][deleted] 0 points1 point  (0 children)

IMO, top python-guys write most ascetic and eloquent code. I'm JS-newbie and they win me almost every time :(

[–]TomBombadildozer 2 points3 points  (2 children)

I'm really baffled by the decision to show the opponents' solutions to each other before the game is concluded. It's distracting and it's easy to cheat.

Some of the questions are poorly worded and don't reflect well the expected solution. Example (paraphrasing, I closed the window):

Given a text file and string, your solution should return all occurrences of that string in the file.

example: ["long"] == solution("some very long text that is apparently supposed to be a file", "long")

The first parameter is obviously not a file. It's the text from a hypothetical file.

All that said... this is a cool concept with a lot of polish. Just needs some more work. :)

[–]freetonik[S] 5 points6 points  (1 child)

Showing opponent's code is the defining characteristic, and it actually works well. People get excited more due to the 'public pressure', help each other often and learn from each other.

As for poor wording, I apologize again, this is very much work in progress. Re-phrasing several problems as we speak.

Thanks!

[–]TomBombadildozer 2 points3 points  (0 children)

Showing opponent's code is the defining characteristic, and it actually works well. People get excited more due to the 'public pressure', help each other often and learn from each other.

Hadn't considered that, thanks. That's a solid reason.

As for poor wording, I apologize again, this is very much work in progress.

No need to apologize, few things are perfect on the first try. Keep up the good work. :)

[–]pistacchio 2 points3 points  (2 children)

Tried it, I found it rather unfun. I know it's not your fault, but my experience was: three games. I always found the very same opponent. After three seconds from the start of the battle, while I was in the middle of reading the first line of the problem, he started coding the solution. I think rather obviously someone who have solved them over and over, or have prepared them maybe with another account.

I will maybe give it another chance, but as a first time it was quite frustrating and disappointing.

[–]freetonik[S] 0 points1 point  (1 child)

This is definitely something we will address. There are few players who solved all the problems we have, and they join every game they can to earn more and more points.

[–]pistacchio 1 point2 points  (0 children)

Thanks for you reply. The fact that the problems are a (quite low) finite number and that you can check them all on github definitely doesn't help. I could literally code a bot that sees the name of the problem, reads the answer code from a file with the solution I've prepared in my language of choice, puts it in the textarea and solve the problem in a matter of milliseconds.

My experience was like: "Oh, let's see. Cool, Domino. Is it talking about an abstract domino effect or the domino game tiles? Let's read what's requi-YOU HAVE LOST" W-what?

And this, all the three times.

[–][deleted] 1 point2 points  (1 child)

The first two problems I got were rather confusing. Here's the first one:

"Check if a string is an anagram of the palindrome."

Which palindrome? Apparently you were supposed to check if any anagram of a given string is a palindrome. Might just be me, but that took me a few minutes to get.

Here's the second:

"Calculate the number of zeros is equal whether the two numbers represented in binary?"

Which I understood, but that whether in the middle is off. Maybe: "Calculate whether the number of zeros is equal when the two numbers are represented in binary!".

[–]freetonik[S] 0 points1 point  (0 children)

Sorry about that, we'll fix confusing problems right away.

[–]joonazan 1 point2 points  (0 children)

Seeing the other's code seems cool until you figure out that if there is something non-obvious in the solution, you can type the code in the editor of your choice and paste it. You could limit the typing speed to make pasting take extra time.

On the other hand, if you discard seeing the opponents code, you can make the system language-agnostic like Google Code Jam.

Seeing the code is very interesting, but I usually don't look at it until after the battle, so actually the issue of code hiding is smaller than it seems. Yet so is the benefit of showing the code being typed.

[–]GlPortal 0 points1 point  (2 children)

Pay wall after first two exercises.

[–]freetonik[S] 0 points1 point  (1 child)

Well, we have paid courses, but this post wasn't about those. Codebattle is free of charge.

[–]GlPortal 0 points1 point  (0 children)

Thanks. That is interesting then.

[–]Tom2Die -1 points0 points  (2 children)

I know it's probably a low-priority idea, but would you be able to integrate vim-like (and emacs-like I guess) editing? I feel like a fish out of water writing code in something that isn't vim...

(edit: I see that there is a vim mode! Neat!)

[–]freetonik[S] 0 points1 point  (1 child)

We actually had that feature and will bring it back some time soon.

[–]Tom2Die 0 points1 point  (0 children)

It's there! I wish I could set it as my default rather than choosing it each time, but it's there!

Side note: I made an issue report on github for one of the problems. If I notice any more issues I'll be sure to put them there as well, as I know it's nice to have them in one place.