Jessica Ledbetter

Programming challenges

I’ve been looking for ways to become a better developer. A coworker has done TopCoder and it sounded like a good idea. Basically, you are presented with a problem and you solve it as quickly as possible. After you submit, you can look at the other contestants’ solutions. Here are a few places that I’ve found where a developer can get coding practice.

TopCoder TopCoder screenshot of choosing a room
Languages: Java, C#, C++, and VB.NET
Example: Parse through input speeds and if there are more than 10% of the readings are outside of the range of acceptable speeds, then return that the radar detector is faulty.
How judged: You click submit and it automatically runs. Points are awarded based on the speed from viewing the problem to submission.
Note: Has levels of difficulty. Could advance and win prizes. Since you get to see how other people solved the problem, you might learn new ways of tackling the same problem. You can practice before actually competing by going into Practice Arena Rooms. They have different levels of difficulty ratings as well. If you’re not sure, I suggest going to the practice rooms and starting at a lower number.

Ubuntu – Beginner Programming Challenges
Languages: Any free language (Python, C++, Perl, C, Java, PHP, etc.)
Example: Print out 99 bottles of beer song
How judged: By hand and checks to make sure it works and doesn’t print extra information.
Note: Because someone is looking at this and your solution is posted to the thread, others can comment and help you become a better coder. For example, one person was told to use more meaningful variable names.

Languages: C, C++, Perl, Python, Java, etc. Says over 35+ languages but mostly saw C and C++.
Example: Someone can ask you for a certain amount of money. If the person can find a subset of the money you have that is how much the person asked for, then the person gets that money you have.
How judged: Done by computer. Should run within a certain time.
Note: Can see the successful solution submissions. Has the language listed so you can just look at ones for the lanauges you’re interested in. I saw a lot of C/C++.

Programming Praxis
Languages: All but saw some Haskell, Python, Ruby, Scheme, F#. If people didn’t label what language, I would have had a problem figuring out which one since there are so many.
Example: Find the smallest prime Fibonacci number greater than a given input number.
How judged: Not judged.
Note: Has levels of difficulty. They say the problems are supposed to take about an hour. There are no points. No winning. Just practice. You can see all solutions before you post your own. Sample solutions are in Scheme.

Project Euler
Languages: Python, Haskell, Java, C/C++, Ruby. Stats
Example: Add all the natural numbers below one thousand that are multiples of 3 or 5.
How judged: Is the output correct.
Note: The more people that have solved a problem, the easier it probably is. You put in the answer to the problem so you don’t get judged on your code or see other people’s submissions. [edit] You can see solutions on clojure-euler wikispace. Thanks, Michel!

Python Challenge [added: 11/1/2010]
Languages: Python (though I’ve been doing the first few in Java)
Example: Picture of a number and a hint (try to change the URL address.)
How judged: Not judged except that you advance to the next level in the “game.”
Note: If you need more hints than are on the page, there’s a forum. Also, once you finish the puzzle/riddle/challenge, you can see some solution code from the previous level.

Below are contests where you can’t see others’ submissions

Facebook Puzzles
Languages: C/C++, Erlang, Java, Haskell, Perl, Php, Python, Ruby, OCami. Has versions listed.
Example: Write a program that takes as input a single argument on the command line. This argument must be a file name, which contains a single positive integer. The program should read this file and obtain the integer within, and then output a sequence of strings based upon the number.
How judged: Submit the code to an email address at Facebook.
Note: Has difficulty levels. Since you’re submitting it, I didn’t see how you could see other solutions. But, you could get hired at Facebook so that’s neat. If you’re looking to get hired by doing puzzles, here’s another one at ITA Software.

Coding Bat
Languages: Java and Python
Example: Given an array of ints, return true if 6 appears as either the first or last element in the array. The array will be length 1 or more.
How Judged: You type the code into their window. Then it’ll compile and run it. Shows the test cases and whether or not the code passed them.
Note: Pretty easy problems. I didn’t see how you can see other solutions but you did get instant feedback on whether or not your solution passes the test cases.

Sphere Online Judge
Languages: C, C++, Java, Python, Ruby, etc.
Example: Rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits.
Note: Submit problem by pasting in solution or uploading file and it’s an online judge system so automatically grades the solution. After submitting, you then go to the status page to see the result.

Code Golf
Languages: Perl, PHP, Python, Ruby
Example: 99 Bottles of beer
How judged: Pass the test cases, then based on number of characters in the code. I wouldn’t code like that for real though. Can you imagine all the one character variable names? Ick! But, still, sounds fun.

8 Responses to Programming challenges

  1. I see a lot of interesting posts on your blog.
    You have to spend a lot of time writing, i know how
    to save you a lot of time, there is a tool
    that creates unique, google friendly posts in couple of seconds,
    just search in google – k2 unlimited content

  2. I read a lot of interesting posts here. Probably you spend a lot
    of time writing, i know how to save you a lot of work, there is an online tool that
    creates high quality, google friendly articles in minutes, just search in google
    - k2seotips unlimited content

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>