about | help | home | prefs | create account
CodingBat code practice

About CodingBat

CodingBat is a free site of live coding problems to build coding skill in Java and Python (example problem). CodingBat is a project by Nick Parlante, a computer science lecturer at Stanford.

Going through many practice problem is a great way to solidify your understanding of how the code should work. CodingBat problems work great as homework, or for self-study practice, or in a lab, or as live lecture examples. The CodingBat problems are designed to have low overhead: short problem statements (like an exam), nothing to install, immediate feedback in the browser, and there's lots of them to build up those skills. The idea for CodingBat came from my experience teaching CS at Stanford combined with seeing how student's used unit-tests in more advanced courses, and crystalized when I saw an Owen Astrachan demo of a unit-testing thing he uses with his Duke students.

CodingBat Design Idea - Coding in the Large and Small

Every big programming problem has a lot of little programming problems in it. The little programming problems have elements we see again and again -- string and list manipulation, loops, a little logic.

Working with students in office hours, I see what a big advantage it is for students who are practiced and quick with these little bits of code. Skill with the little code allows students to concentrate on the larger parts of the problem. Or put another other way, someone who struggles with the loops, logic, etc. does not have time for the big picture.

CodingBat is all about building and practicing little code problems. The number of problems in each area is pretty large, so you can repeat and solidify your code skill in that area.

Coding Practice

If you want to build skill in running, what do you do? You run. To build skill in code, write code. Ok, that's pretty obvious, but with this site, I'm trying to create an environment where people can concentrate on the coding with nothing else to get in the way. With all the surrounding structure taken care of, you can get a lot of coding practice done in just an hour or two. I'm conscious that the problems do not have realistic stories to motivate what's going on. Instead, they are stripped down to have short problem descriptions with as little ambiguity as I can manage. Of course programming problems with realistic stories are a very important part of CS, but I leave those for larger take-home assignments. CodingBat is just about lots of little problems to provide opportunity to practice.

I also like the way you can get immediate, positive feedback. It's a simple mechanism, and yet I find it satisfying to try to finish enough check marks to get that gold star!

Right now, the problems are the sort you would see in a first or second Computer Science course. Click on a problem, type some code into the method body, hit the Go button, and work it from there until you get the green check mark.

The name of the server is CodingBat, based on the Greek word "bat" meaning "this domain was available". You can always get back to it from my Stanford home page.


If you have any thoughts or suggestions feel free to email me at nick.parlante@cs.stanford.edu

Site uptime monitoring by SiteUptime.com