Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Competition fuels obsession over Perl

by flyingmoose (Priest)
on Feb 19, 2004 at 14:17 UTC ( #330212=note: print w/replies, xml ) Need Help??

in reply to Competition fuels obsession over Perl

Having played in the ACM Collegiate International Programming Contest once in the late 90's, I believe the allowed languages were C++, Java, and maybe Fortran. No one ever used Fortran. Few of us new Perl at the time, but it would have been a tremendous edge.

Our team placed 30th in the region. There was like a 200 way tie for 30th. Yeah, that bad. The regional winning team, I think, solved 3 out of the 6. Do you want to know why? All of those languages are very bad at "glue". Well, ok, that, and our team really didn't study at all -- but that's another point. Good thing was, they had lots of free snickers bars and chips. Free food in college is like gold :)

Perl would have opened up a can of you-know-what on that contest. Half the time we spent doing things that Java or C++ was very poor at, like file I-O and parsing. I think we actually used C++ at the time, since Java was relatively new to us and we wanted to be able to build more complex (specialized) data structures without a lot of casting and so on. That contest was heavy on graph theory, recursion, map traversal, that sort of thing.

I'm an algorithms guy, and I naturally flow to whatever language I can quickly get at the algorithm without having to write a lot of code that isn't related to the problem space.

I'm still kicking myself for not getting question #1. Couldn't code up the intersection of three spheres correctly. Well, at least I've grown smarter over the years.

Anyhow, when you get into college, check out the ACM's ICPC if it's still around. Those programs will blow your head off. Join up with your local ACM or IEEE chapter if you can too -- great for job contacts and learning what the industry is up to.

  • Comment on Re: Competition fuels obsession over Perl

Replies are listed 'Best First'.
Re: Competition fuels obsession over Perl
by Abigail-II (Bishop) on Feb 19, 2004 at 14:55 UTC
    I've participated twice in the European ACM programming contest (finished one time near the bottom, the other time, we missed being send to the World finals because while we made the "cut" (I think the top 6 or top 8 were to be send), there were too many teams from the same country that finished before us), and those times, the only allowed language was Pascal.

    I've also organized regional contests in later years (writing most of the scoring software in AWK - but this was the first time a Perl book appeared on my desk). From what I remember from those times (late 80s, early 90s), the most important aspect in being succesful is terminal time management. You have 4 team members, 6 to 10 problems, and just one terminal. Another, very important, aspect is being able to handle the input border cases correctly. It's very frustrating to get your submission rejected time after time (with no reason or error message other than whether it compiled or not), only to find out the vague wording of the problem allowed for a different input format than you were programming for.

    It's a bit easy to say "well, if only we were allowed Perl, then we could have done all the problems with time to spare". That's like saying "if we could make use of a bicycle, we could do the marathon in world record time". A programming contest that allows for Perl to be used can be as hard as one that allows C or Pascal. You just have to adapt the problems. Parsing problems that are tricky to do right in C or Pascal might be easy in Perl. On the other hand, there's much to say for not allowing Perl. You want a contest to be 'all-round', so it should problems that might involve parsing, or searching for strings in a large set. Using tools that already have solved those problems is kind of pointless.


      I viewed the contest as an algorithmic challenge, not a language challenge. If it were a language challenge, yes, adaptation is crucial -- but, at least to me, Computer Science is about algorithms, not languages. It's important to know your memcpy() and your pointers, but that isn't what computer science is about, per se. Folks are supposed to be able to learn and use any language, and to use them well.

      I think you're right about Pascal though. It was Pascal, not Fortran. I had learned Pascal as my first non-BASIC language, though there is no real point of using a language that dogmatic without any decent library functions! Today remember "use crt;" and that's about all the Pascal I know at this point.

      The terminal access aspect really stunk. The way our teams were parititioned, I ended up drawing on the whiteboards more than anything, but we suffered at the terminal because other folks could not translate my ideas into code well. So, yes, there was a huge social/time-management aspect to it as well. It's hard working with people that don't work well with you ... a good life lesson, I suppose, if you are into that. (I'm not!)

      I kind of liked the impartial rejection messages though. "WRONG!" was all you ever got back from the judges ...

      While I agree "using tools that solved the problems already is kind of pointless", I don't see anythign wrong with attacking algorithmic problems with say, just the standard Perl installation (no CPAN).

      Though I wasn't ever involved, I particularly liked the race car problem at the ICFP: here. ... language essentially doesn't matter in the contest, thought does.

        While I agree "using tools that solved the problems already is kind of pointless", I don't see anythign wrong with attacking algorithmic problems with say, just the standard Perl installation
        It depends on what kind of algorithmic problems your problem is about. If it's a parsing problem, there's a gigantic difference between using Pascal and Perl. The former will force the programmer to make an algorithm. The latter only needs a few buttons to be pushed. If the problem asks for complex matrix manipulation, it's going to be a lot easier in APL than in C.

        If you want to focus on solving algorithms, you let everyone use the same language, or set of languages, and you pick reasonably 'bare-bone' languages, like Pascal and C. You don't pick Perl, Python, or APL.


Re: Re: Competition fuels obsession over Perl
by dragonchild (Archbishop) on Feb 19, 2004 at 16:51 UTC
    Heh. The last year I competed in the ACM, we had 4 students in the club, so there were two teams - three freshmen/sophomores on one and me (a third-semester senior) on the other. I placed 12th in my region. :-)

    What really annoyed me was that this was after I'd learned Perl and I had to go back to using C++. ICK!

    Of course, a few years before me, someone else from my school had his own scribe. He would write the problems out on paper and she would go type them in. (I think he solved 5 problems that year, 4 without errors.)

    We are the carpenters and bricklayers of the Information Age.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://330212]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2018-05-27 20:10 GMT
Find Nodes?
    Voting Booth?