I just found the site http://www.topcoder.com. It is a site where you compete with other programmers on increasingly difficult problems. So far I've only entered the practice rooms, but the problems in the practice rooms are kicking my butt. There are 84 practice rooms with three problems each, and they aren't "print hello world" type problems. The lowest level I opened required me to use regular expressions and a good knowledge of the String class.
I discovered that about a year ago. It's very off-putting when a greenhorn challenges and takes all your points away. It's a very good site to learn new techniques, shorter obfuscated algorithms but doesn't teach you to be a good developer necessarily. I found some of the good scoring coder's use loopholes in the design of the language to cut corners in order to cut code quickly. In production, their code they will fail someday ,IMHO. For the sake of competing it's very good. Ummmm! I didn't get further than the first practice room but with a bit of practise...... regards [ October 25, 2003: Message edited by: HS Thomas ]
Timothy Chen Allen
Joined: Mar 16, 2003
Yeah, I figured out that a player could obfuscate his code to make things harder for his competitors. But if you go to the site just to do the problems and don't worry much about the points, they are excellent problems. In the first two, I had to brush up on: 1) Regular Expressions 2) String class functions 3) ArrayList use I also had to consider (and finally reject) a solution which would have used tail recursion (it was unnecessary and used a lot ore memory than necessary). Skills that are legitimate which the site has required of me have been: 1) Knowledge of features of Java which I haven't used much 2) Syntax proficiency (being able to produce good syntax without looking at the manual is very helpful) 3) Quickly coming up with a reasonable algorithm on demand. Maybe it's not perfect, and it's a sure but that you'll get trounced by some 15 year old with an encyclopedic knowledge of Java syntax, but it's still a good source of problems.
Purposely obfuscating your code in Topcoder is a rule violation, and people who are any good won't even think for a moment about obfuscating. When you remove all variable names and comments even moderately simple programs can seem more complicated (you have to deduce loop invarients, figure out which variables are for what, etc.). I found some of the good scoring coder's use loopholes in the design of the language to cut corners in order to cut code quickly. In production, their code they will fail someday ,IMHO.
Keep in mind that the "reds" got where they are by knowing both systems programming and algorithm design in and out. Most are actually normal developers and they know how to design secure, stable, maintainable software -- really! But contest programming is another world entirely. If there are many other people solving the same problem as you, taking "shortcuts" is the only way to beat them for time. Martin Fowler might say that sometimes you should wear your "coding hat" and sometimes you should wear your "refactoring hat." There's also a "contest programming" hat. [ October 26, 2003: Message edited by: David Weitzman ]
Joined: May 15, 2002
Tim, You have some very valid points. Last year when I visited the site all things Java were in a flux anyway.
David, They have a professional arm to their site that delivers components ( I think you have to be a top competitor to be accepted to do the bits of work ) and the specs looked very professional and were tested by the best in the competition rooms. I guess you are right, then. regards