I just got an email (via the faculty-wide spam network) about the ACM International Collegiate Programming Contest (ICP) or more precisely about SWERC 08. For a few moments I thought “hey, this might be fun”. A second later I read something like
“Languages allowed: C, C++, Java or Pascal”
Yay it’s 1995 again!!!
Pascal? Didn’t Pascal die like more than a decade ago?
C++ and Java are so 90’s… where are the cool languages? Python? Ruby? Heck even Erlang and Haskell?
Considering the “retro” theme, I would’ve was expecting Lisp and Fortran to be in there. (Not (that I have anything against (lisp))).
So basically the point of the contest is seeing how well you do with a handicap? Kinda like the Olympic 100m with a broken leg (or 2 if you’re using C)?
Sounds very interesting but I rather go cut myself with the portuguese tokio hotel fans (via Tiago Farrajota)…








March 25, 2008 at 7:56 pm
I participated, three times. The language is irrelevant. The type of problems there have little input parsing and output formatting. The juice is in the processing algorithms.
The point of the contest is to compete in the design of efficient algorithms for a given problem. You’d code almost equally in C as in Python/Ruby/[name your procedural language here].
You can’t use libraries, so no difference there. Most problems’ memory needs can be statically allocated at the beginning of the program, so no difference there. Problems are small enough that OO is not an advantage. Syntax is a bit different, but the most you can complain is that functional languages are not represented.
Try solving a few problem sets against the online judge at uva.es and you’ll quickly understand my point.
March 25, 2008 at 9:38 pm
Thanks for the info.
Language is _not_ “irrelevant”. It’s a lot easier to implement an algorithm in Python than it is in C, C++ or Java. Syntax matters for algorithms more than for anything else.
And if it didn’t matter why would languages be restricted to just those 3 ( I’m not bothering counting Pascal X-D )?
I’ll try a few problems sometime in the (not so) near future
March 26, 2008 at 12:35 pm
You sir, are clueless.
The kind of algorithms to implement in this kind of contest have nothing to gain from the hip bullshit language of the week. Why? It’s usually simple array or list element manipulation and plain math.
What you need for these is a brain, not a fancy pansy language.
March 26, 2008 at 12:46 pm
Actually, you’re the clueless one. There has been research into implementing algorithms in different languages.
Check the references at http://lrei.files.wordpress.com/2008/02/a_look_at_dynamic_languages-draft.pdf for a starting point if you want to look into it.
And OMFG of all the examples… list manipulation is precisely the sort of thing that Python does SO MUCH BETTER than C,C++ or even Java.
And ffs I’m not saying you can’t do it in C or wtv, heck it can be done in Assembly just as well, but the syntax in Python for doing it is much cleaner and nicer and it does make it easier as well as faster.
Again, if language doesn’t matter, allow all languages to be used (or at least a vast amount of them).
March 26, 2008 at 1:51 pm
First off, I agree that Pascal should already have died an honourable death.
As for the contest, it isn’t just about implementing algorithms, it’s about solving problems and implement the algorithms efficiently.
The solutions are checked by an automated judge program that feeds your program the problem input (usually large or tricky input cases) and compares your output with the correct solution.
The input run is time limited to ward against programs that don’t terminate and to guarantee that your solution is efficient, so by using a slow language your program isn’t likely to pass, even if it’s correct. In this contest, even using Java is a handicap.
This is something I totally agree on. Most college students today are used to advanced but bloated and slow scripting languages, which are great for problems with relaxed time constrains or high latency, (like web apps or high level data processing and tool control), but are useless to problems were performance and small code size are essential like embedded systems and realtime computer graphics.
One thing is to have a powerful tool, another thing is to know when to use it. When your task is implementing algorithms efficiently with a very limited time budget then C or C++ are the tools for it, and it’s not 1995 anymore…
March 26, 2008 at 2:58 pm
@Pedro I see. I thought that by “efficiency” it was meant something like algorithmic complexity (using the big O notation). And that obviously, it was done by human judges.
Honestly I find that disappointing. And If anything, college students learn almost nothing save for System Programming Languages (like C and Java) when they should be learning more powerful language. Recent steps to move from C\C++ to Java are positive but a far cry from going to more useful languages like Python and Ruby.
Learning concepts is the hard part, moving from language to language is usually easy (but tricky when moving from imperative to functional and vice versa).
Optimize algorithms, not code. And algorithms are language neutral (except in the case described above).
Moving an algorithm from Python to C is trivial and it’s something that’s done (frequently) when you need performance in Python - you convert it to C and wrap it in. So algorithm performance is definitively not an issue.
And out of all the stuff out there, only a small percentage actually needs out of the ordinary performance anyway.