Tuesday, March 9, 2010

JavaBat gets Python support, now CodingBat

Wow, well there's a big new feature -- Python support! So now there's online python problems on the 'bat! This is something I've been thinking about for a long time, but it just took a lot of coding. I had to change the name of the site from JavaBat to CodingBat. The name JavaBat sounded silly and weird at first, but I grew fond of it with so much use. So I hope the name CodingBat will grow to make sense, although of course today it sounds a little funny.

There are not as many Python problems as Java problems as yet, but I'm adding them quickly. I wanted to cut the Python capability over to be live so I can see how it works before adding any more. I am, of course, very interested to hear bug reports given the large new features -- email me at nick.parlante@cs.stanford.edu

I had to make the front page look very different .. now it lists some Java sections on the left and some Python sections on the right. I hope this is not too confusing for people accustomed to the old all-Java look. You can get to the old all-Java page by clicking the Java link.

If you don't know Python, try it out for a few problems. You can start playing with the Python Warmup problems where the solutions are available to get a feel for the language. I wrote some basic Python help docs to help you get started.

Since the Python problems are so parallel to the Java problems, it might be an interesting way to learn Python .. since you can look at your own Java solution for a Java problem, and then work out how it goes in Python ...heh, your personal Rosetta stone.

14 comments:

  1. This looks great so far. One question: any reason why the sum() built-in function is not recognized? Which version of Python is this?

    Thanks, we've been needing a Python alternative to Javabat for some time now....

    ReplyDelete
  2. Sounds great! My computer sicence class has been using codingBat(at that time it was still javabat) to teach java concepts. I've always wanted to learn python, and this will give me the chance!

    ReplyDelete
  3. Solution code for front3 in Python can be greatly simplified using string multiplication to:
    return 3 * str[:3]

    ReplyDelete
  4. I like this feature, but the python implementation seems to be missing some of my favorite things about python. So far, I've noticed that the enumerate built-in is missing and that yield statements are not allowed. Granted, I was only using a yield statement to emulate the missing enumerate, but still...

    Other than that, very nice job.

    ReplyDelete
  5. When will codingbat be back up? I have only just discovered this site but I miss it already!

    ReplyDelete
  6. It appears as though reddit broke your site with a link in /r/programming...

    Do you have any intention of bringing it back live?

    ReplyDelete
  7. Hey Nick, hoping codingbat will come back soon.

    Ed

    ReplyDelete
  8. I'm so glad it's back. Thank you very much for this wonderful resource!

    ReplyDelete
  9. I like the idea of the python, especially the online compiler, but please, please print out the python error message. Python's got the most user-friendlly error messages ever and I absolutely love them. It would be a waste not to include them.

    ReplyDelete
  10. Nick Thank you so much for this site. I am very grateful to you.

    ReplyDelete
  11. I really like codingbat and have pushed a lot of friends who are trying to learn programming here but would it perhaps be possible to add more pythonesque solutions to the python problems?

    For instance solving the "every other letter" problem with a loop seems excessive when str[::2] is so much shorter and fits better with python idioms

    ReplyDelete
  12. I just found this site recently and I want to thank you so much for the Python activities. It has been a huge help to some of my struggling high school computer science students.

    Great work! It's much appreciated!

    ReplyDelete
  13. Never seen such a simple website. I will be spending my free time on this website(http://codingbat.com/) I really appreciate your work.

    ReplyDelete