Swaroop C H

blog books about contact subscribe

Coding Problems for Homework

24 Nov 2009

"Coding Homework" is a small website that I have built to list small problems that one can work on, to learn how to use a new programming language. For example, small problems requiring to read from a file, or to use regular expressions, how to find duplicate files in a folder, and so on.

Note that the problems listed on the site is not for testing your algorithm skills, there are many sites for that already.

This list was inspired by repeated requests and suggestions from readers of A Byte of Python for homework problems at the end of each chapter to exercise the skills they have just learned. So I thought why not make it applicable to any language and multiple programming skill levels. And it's a good topic that can be collaboratively worked on with the programming community, à la Stack Overflow.

All the content will be licensed under Creative Commons Attribution-Share Alike 2.5 India License so that anybody can reuse this content, especially in classroom situations.

Coding Problems for Homework

I also had my own specific goals when implementing this side project:

  1. Solve the lack of "homework problems" for people to exercise their programming skills, especially in the context of learning a new programming language.
    • I am not trying to replace existing lists but rather focus on making the reader active (providing exercise problems) than letting him/her be passive (reading code listings).
  2. Learn how to do website layouts, specifically how to use YUI Grids CSS.
  3. Learn how to pick colors for website design; ColorCombos turned out to be useful.
  4. Learn to use Google App Engine.

It has been a fun side-project, spending a few hours here and there. It is very far from polished, but the basic functionality works. There is still more to do -- adding a search functionality, conforming to standard UI design patterns, caching for the rendered HTML (from Markdown), optimizing the housekeeping code, and so on.

This site itself is a good example on the kind of problems that beginners can work on, but they would not know what kind of problems they can solve and what level of expertise (beginner / intermediate / advanced) would be needed. That is where this list of problems can help.

I request you to spend 5 minutes of your creativity to add a few problems so that beginners and intermediate level folks will have interesting problems to test their learning of a new programming language. Thanks!

It might be helpful to you as well when you're going to play around with functional languages (Haskell, Erlang, etc.), funky new languages (Ioke), or new languages by big companies (Go).

Link: http://codinghomework.appspot.com

Comments

Pradeep says:

Very nice initiative. thanks for the site!

cruisemaniac says:

its a very nice initiative... For someone starting off at the bottomlines, it would prove to be very helpful.

Thanks and all the very best!

P.s.: a mobile version of ur blog would be awesome! Wp-mobile plugin?

Chao,
Cruisemaniac.

Tony Wiliams says:

Nice idea and a nice site but you have a minor problem.

If I browse by "Beginner" level when I hit "Next" I get the next 5 "Beginner problems but then when I hit "Next" I get a mix of all three levels.

// Tony

sashank says:

how about creating an environment for writing and executing the code then and there itself on the web ? and comparing solutions with others and rating the solutions too .

i know it would be bad for students who try to copy solutions from site , but bad students are always there :)

Eli says:

Swaroop this is a great idea - I've been thinking about something like this for a long time - especially when reading SO it's obvious such a thing is a must.

Hope it succeeds.

Dan says:

Wow, this is a really great idea. Nicely done!

Swaroop says:

@Pradeep Thanks!

@cruisemaniac Yep, that's the idea.
Also, I've had the WPtouch plugin installed since quite a while, but will look into WP-Mobile plugin.

@Tony Oops! Thanks for informing me. Will look into it. Update: Fixed.

@Sashank All that can be done but we need content first to make that possible.

@Eli @Dan Thanks, glad you like it. Please do spare some time and contribute a few homework ideas :)

Juho Vepsäläinen says:

Cool idea!

Is it going to be possible to post and discuss possible solutions (perhaps a bit like in Project Euler (http://projecteuler.net/)?

I think it might be worth considering to enable the users to set up collections of problems. Suppose you want to build a MP3 metadata editor. To do this you have to solve a couple of separate problems:
1. Figure out how to parse existing MP3 metadata (ie. http://codinghomework.appspot.com/problem/ag5jb2Rpbmdob21ld29ya3IUCxINQ29kaW5nUHJvYmxlbRiLJww Could you please clean up the urls? :) )
2. Figure out how to write MP3 metadata.
Optional: 3. Figure out how to visualize this (ie. at simplest level you might be dealing with command line based UI but perhaps it might be cool to implement graphical one too)

I am sure there are many other examples like this. Anyway thanks for cool initiative. Let's hope it's successful.

Neeldhara says:

Yo,

Just submitted a problem (although shamelessly stolen from the work I'm doing - but I felt like I had to add it because I implemented it in Python in under a hour and a half with just your book to go by, and starting from "Hello, World!").

It's of course, terribly boring, but it does give you some practice with the loops and bitwise operators. :) I'll try to find something slightly better soon (shouldn't be hard!).

Grand effort, kudos. Just the sort of thing I'd find very handy. :) I'm certainly watching out for how this evolves!

Cheers,
Neel

Ramjee says:

Excellent stuff. Will add my small contribution.

Vishal Naik says:

Swaroop, great idea. The site looks simple and elegant. Kudos! One request though: RSS feeds for the problems. That way, we can keep track of whats happening.

Parag Shah says:

Hi Swaroop,

Nice site. As you mentioned, there are a lot pf sites for algorithms, but something like this is just as necessary while learning/mastering any programming language.

Is it possible to allow tagging of problems and publishing an xml feed for the tags? I think it would be very helpful to people who want to track specific type of problems.

I have also recently created a website where I have organized various CS course videos in one place. It's very nice to see sites such as yours coming up.

--
Parag
http://www.adaptivelearningonline.net

Swaroop says:

@Juho The idea, currently, is only problems and not solutions, because the point of it is for the user to explore how to solve it in the idioms of the new language. If solutions is what is preferred, then perhaps "Programming Language Examples Alike Cookbook" project and Rosetta Code project are more appropriate.

Yes, the URLs will be cleaned up in future, just wanted to get it out :)

I'm holding off on doing anything advanced until we have a sufficient community-supported body of work, without which it would not be meaningful.

@Neeldhara Hehe, thanks for pitching in!

@aravindavk @Ramjee Thanks!

@Vishal Yep, RSS is a good idea, will add that in future.

Feedback

There's no comment box, but please do email me or tweet me your thoughts and criticisms, and I will publish the relevant ones here.