Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Australia Education Programming

Good Language Choice For School Programming Test? 407

An anonymous reader writes "The Australian Informatics Olympiad programming test is being run in a couple of months. I'm an experienced programmer and I'm thinking of volunteering to tutor interested kids at my children's school to get them ready. There will be children of all levels in the group, from those that can't write 'hello world' in any language, to somewhat experienced programmers. For those starting from scratch, I'm wondering what language to teach them to code in. Accepted languages are C, C++, Pascal, Java, PHP, Python and Visual Basic. I'm leaning towards Python, because it is a powerful language with a simple syntax. However, the test has a run-time CPU seconds limit, so using an interpreted language like Python could put the students at a disadvantage compared to using C. Is it better to teach them something in 2 months that they're likely to be able to code in but possibly run foul of the CPU time limit, or struggle to teach them to code in a more complicated syntax like C/C++ which would however give them the best chance of having a fast solution?"
This discussion has been archived. No new comments can be posted.

Good Language Choice For School Programming Test?

Comments Filter:
  • by DoofusOfDeath ( 636671 ) on Sunday March 14, 2010 @09:06PM (#31476670)

    You don't want a test that favors kids who have studied that particular language in the past. I suggest the Turing-complete language LaTeX. It's the only way to be sure.

  • OK C could be a computationally fast solution, but I'd go for Python anyway. Why? Mainly this: How many new C programmers (i.e. less than 1 or 2 years experience) can write programs without obscure memory leak/access problems? How much time have slashdotters wasted looking for elusive segfaults in C code? I know I've wasted hours, days, chasing buffer overruns in school assignments. Or worse are the ones you don't see; they only trigger on the examiner's machine..
    • Re: (Score:3, Interesting)

      by mdf356 ( 774923 )

      In a programming contest memory leaks and such are meaningless. In fact, algorithmic complexity is also nearly meaningless. O(n^3) solutions that you can code in 5 minutes win over the O(n lg n) solution that takes an hour to code up.

      • by betterunixthanunix ( 980855 ) on Sunday March 14, 2010 @09:19PM (#31476804)
        That is not universally true, at least not in the college level contests I participated in as an undergrad. They used to test with very large inputs, to deliberately throw off solutions that leaked memory (they set a ulimit before running the code) or inefficient solutions (except in cases where they gave us NP complete problems)...
      • In a programming contest memory leaks and such are meaningless.

        Correct. Spitting out the right answer in a reasonable time is the only thing which is important.

        In fact, algorithmic complexity is also nearly meaningless. O(n^3) solutions that you can code in 5 minutes win over the O(n lg n) solution that takes an hour to code up.

        Correct for your example (meh, polynomial, that's good enough) but not for the questions they'll be asking in the test. It typically won't be a choice between O(n^3) and O(n log n), more like a choice between O(n^4) and O(n^n). And then they'll give you examples with n=3 and n=4, and their test case will have n=17.

    • by mkiwi ( 585287 )
      I don't know too many novice (fresh off the boat) C programmers who ever need to worry about memory leak or access problems that wouldn't exist in any other strongly typed language. That's something an intermediate or advanced person does. More powerful features are for people who know the language better. C is simple if you stick to basics.
  • by davidwr ( 791652 )

    English, Vulcan, or whatever the local human language is. Or just give everyone a translation device.

    Oh, you mean the language for the programs. My bad, I thought you meant for the instructions and problem description, sorry.

    But seriously....

    Your first line is to see what eligible language the students mostly know already or what is taught in that school or school system and go with it.

    Barring that, go with whatever is commonly used in most university college freshman programming classes. It may not give

  • by Jason Pollock ( 45537 ) on Sunday March 14, 2010 @09:08PM (#31476694) Homepage

    I'm guessing that the CPU limits are generous and are more about filtering out bad algorithms than bad languages.

    For example, someone using stooge sort instead of quicksort...

    While the language used would increase the budget, the algorithms used will very quickly swamp any language gains.

    When I did programming contests, they were more bound on thought (how quickly you can come up with an algorithm) and then implementation time. Rarely did compute time come into it.

    • Re: (Score:2, Insightful)

      by Anonymous Coward

      I agree. Some problems in programming competitions could be solved with a simple exhaustive algorithm. The main point of the CPU time limit is to make people use better and more creative algorithms, i.e. if you solve it correctly CPU time shouldn't be an issue in any language.

    • Right, the OP says that Python is an accepted language, so it's only sensible to assume that this isn't a sneaky trap set by the Ruby Mafia intending to disqualify testers for using it.

      The Navy research showed Python is a good language for learning OOP and if programming contests today are anything like what they were when I was in ACSL, boy would having a scripting language be handy. I wonder how anybody could compete in c (but perhaps that's a built-in test - picking the right language for the job is an important skill).

    • Re: (Score:3, Interesting)

      Some algorithms are better suited for some languages or paradigms than others. Quicksort, for example, relies on mutability to be efficient. A language like Haskell, where the list to be sorted would be recreated a bunch of times, would not be well suited. Even with the same algorithm, it would run slower. Sometimes the language dictates the algorithm that would be best to use, or what data structures make sense. That said, I think I would have to recommend, of the languages listed, Python because of its ge
    • While the language used would increase the budget, the algorithms used will very quickly swamp any language gains.

      I get so tired of hearing this nonsense go unchallenged. If, for a given task, there is a fastest known algorithm, it's almost always going to run much faster in a compiled language than an interpreted language, period. The idea that one can simply change algorithms to get better performance only applies when a better algorithm is known, and even then, it's still highly likely to run faster in a compiled language.

      The exceptions are largely those cases where the bulk of the computation utilizes a highly opti

  • Psyco (Score:4, Informative)

    by headkase ( 533448 ) on Sunday March 14, 2010 @09:08PM (#31476696)
    For Python, can they use: Psyco [sourceforge.net] as a library? That would help being practically a Just In Time compiler. It's x86 architectures only but that should be what they're running. As a side point I find it irritating that a language that is designed to be friendly and powerful is disadvantaged by counting CPU cycles: especially since in the real world those are plentiful compared to the scarce resources available for the hard work of debugging. And in Python if the CPU is your constraint - which it isn't in most programs - then you write that little bit of CPU code in C or C++ and call that one part from Python. This keeps the rest of the program easy to debug and portable.
    • Python doesn't have a built-in JIT?? What's with all the Perl hate, then?

      • by EvanED ( 569694 )

        Personally, my dislike for Perl has almost nothing to do with the runtime environment and more to do with the mindset that causes someone to think this [ozonehouse.com] is a good idea.

        • Re: (Score:3, Insightful)

          by dougmc ( 70836 )
          Of course, that's for perl 6 -- which hasn't been released, and it's hard to tell when or if it'll ever be released.

          Personally, I think a lot of the perl hate comes from the perl users getting stuff solved fast and (often) ugly, when the perl haters spend far more time creating their (often) far prettier solutions. If the programs need to be written quickly, I'd say perl would be the language to use (except that it's not permitted, of course.) If the programs need to execute quickly, C -- but it'll ta

      • by gd2shoe ( 747932 )

        Python people don't (generally) claim Perl is slow. Their objection is the language itself.

        (I liked my brief exposure to Perl, but it is a tough language to learn and retain.)

  • by EEBaum ( 520514 ) on Sunday March 14, 2010 @09:12PM (#31476728) Homepage
    Having competed in a handful of collegiate programming contests about 10 years ago, the CPU time limit was never even a passing concern. Granted, we were coding in C++, but even in Python, any solution that hits the CPU limit on these contests is quite likely an unnecessarily complex algorithm. I always considered the CPU limit to be a safeguard against programs with infinite loops or REALLY slow solutions, so that the teams wouldn't claim "no, really, it works!" and drag the contest on for hours insisting that the right answer will reveal itself shortly. If your solution works, but has complexity of O(n!), I'd have a hard time calling it acceptable.

    If one of our entries was rejected due to exceeding the CPU limit, it was always due to a problem in our logic that the sample data hadn't triggered, but that the actual test data had.
    • Re: (Score:2, Insightful)

      by Zillidot ( 2794 )

      I have competed in both the informatics olympiads and the ACM collegiate programming contests, and in my experience there was a much greater emphasis on algorithms in the informatics olympiad. Whether your algorithm was O(n^3) or O(n^4) did make a difference to the results.

      That said, the choice of programming language only adds a constant factor to the runtime, so your point still stands.

  • Really

    If they hit it, they're doing it wrong or you have the next Rain Man meets Linus Torvalds in your class.

    But if you're worried, I'd say go with Java (what I would say really is go with C# but since you can't do it)

    But python is fine so don't worry.

  • Pascal (Score:2, Interesting)

    by jadrian ( 1150317 )

    I would go with Pascal. And if not, Java.

    Pascal has a is very simple and clear syntax and semantics. It has strong and static typing, making many errors very easy to catch at compile time. The case for Java is similar but the syntax and semantics are a bit more complicated.

    C is terrible to teach, they'll have to deal with pointers all the time. Reading something from input? Pointers. Passing by reference? Pointers. Strings? Pointers. Sure you may omit that those are pointers but the segmentation faults will

    • C is terrible to teach, they'll have to deal with pointers all the time. Reading something from input? Pointers. Passing by reference? Pointers. Strings? Pointers. Sure you may omit that those are pointers but the segmentation faults will show up for regular reality checks. Same for C++. Python means working with dynamic typing. PHP dynamic and weak typing. Don't get me started on Visual Basic.

      VB.Net* has the advantages you've listed for Pascal and Java, and it solves all the problems you listed for other

      • Don't use VB anything unless you hate these kids. I haven't used VB.Net but if it bears any resemblance to VBA and VBScript whatsoever stay far away.
  • Go With Your Gut (Score:5, Insightful)

    by Bob(TM) ( 104510 ) on Sunday March 14, 2010 @09:19PM (#31476806)

    Unless these kids already have a programming proficiency, go with your gut.

    The exercise is as much about allowing them to test the programming waters as it is about them winning. If you are starting with a blank slate, that means you need to create an environment that is intriguing. If YOU think Python is the thing, you'll be passionate ... and that is a lot of what makes a good coach/tutor in an olympiad.

    Further, I think you could do a lot worse than Python. It is really a great language and is popping up in a lot of disciplines as the scripting tool of choice. It will perform well and has great characteristics that make it well suited for someone learning the ropes. Plus, the language is modern enough to be relevant should they desire to pursue IT further.

    I would stay away from C/C++. In the hands of novices in a timed activity, I would wager it would be more trouble than it's worth.

  • by Frequency Domain ( 601421 ) on Sunday March 14, 2010 @09:22PM (#31476830)
    Any CPU limits should be generous enough to accommodate correct solutions in any of the permissible languages.
  • by gweihir ( 88907 ) on Sunday March 14, 2010 @09:24PM (#31476854)

    C, C++ and Java are not an option. They all need years to master and have numerous non-obvious pitfalls. Pascal is pretty limitad and definitly a historic design. PHP is obscure in palaces. Visual Basic still is a bad joke, confined to just one platform and wioth numerous design problems.

    On the other hand Python is fine, with the only thing to master the indention. Not on the list, but Ruby would also be nice. And for a minimalistic, yet powerful language, loot at (again not on the list) Lua.

    • Re: (Score:3, Insightful)

      by Samah ( 729132 )

      And for a minimalistic, yet powerful language, loot at (again not on the list) Lua.

      You beat me to it. Lua is ridiculously easy to pick up and will give the students a chance to worry about actual algorithms and lateral thinking rather than jumping straight into OOP. For the uninitiated: Lua does not natively support a polymorphic OO environment but it is very easily implemented with metatables.

      Disclaimer: I'm a Lua fanboy. :)

    • C, C++ and Java are not an option. They all need years to master and have numerous non-obvious pitfalls. Pascal is pretty limitad and definitly a historic design. PHP is obscure in palaces. Visual Basic still is a bad joke, confined to just one platform and wioth numerous design problems.

      On the other hand Python is fine, with the only thing to master the indention. Not on the list, but Ruby would also be nice. And for a minimalistic, yet powerful language, loot at (again not on the list) Lua.

      So I've gotten from this post that PHP is fine as long as you're not coding in palaces and Lua contains other programming languages if you loot it.

    • by dunkelfalke ( 91624 ) on Monday March 15, 2010 @04:09AM (#31479056)

      Pray tell me how a modern Pascal dialect (as used by Free Pascal Compiler for example) is "limitad".

  • Ask them (Score:3, Interesting)

    by igotmybfg ( 525391 ) on Sunday March 14, 2010 @09:30PM (#31476908) Homepage
    Explain the situation to your students; give them the options available with pros and cons for each; and let them decide for themselves.
  • by collywally ( 1223456 ) on Sunday March 14, 2010 @09:41PM (#31477012)

    I tried teaching my self some Python a while back and found it very easy. The only experience that I had before in any computer language is MEL (Maya Embedded Language). I bought a book called Game Programming (Publiser: Wiley, ISBN 978-0-470-06822-9) and over my two week Christmas break I was able to build a nice little top down shooter with programmer graphics.

    It uses the pyGame library for most of the heavy hitting (like writing to the screen and the like) but it also introduced me to Objects and Classes as well as how to think in small steps to help break down what I was trying to do.

    I always suggest this book to artists that I meet who wants to get into scripting. And most of them who have borrowed it end up buying it for themselves when thay have to give back my book.

  • Probably Java (Bleh) (Score:2, Interesting)

    by pookemon ( 909195 )
    When I first read the list I thought "Pascal". The reasons are that it's a structured language, it is very easy to use and it's able to teach extremely useful concepts like linked lists, recursive algo's etc.

    However... It's nigh on useless these days to have "Pascal" on your CV (I'm sure both the Pascal developers out there will disagree - Yes I'm looking at you Delphi devs...)

    I did C, Pascal and COBOL at UNI and since then I have spent some 15 years writing VB (3->.Net), C, C++, C# etc. In the la
  • No Perl ? (Score:2, Insightful)

    by Anonymous Coward

    Probably because there would already by a module that solves the problem.

  • by javabandit ( 464204 ) on Sunday March 14, 2010 @09:47PM (#31477068)

    Brainfuck.

  • The FAQ says the International competition offers fewer options, "Note that at the IOI only C, C++ and Pascal are permitted." If you're only considering the AOI, Python seems likes the most efficient, portable approach.
  • Perl !! (Score:4, Insightful)

    by QX-Mat ( 460729 ) on Sunday March 14, 2010 @09:53PM (#31477114)

    Perl is very simple to learn (check out "Robert's Perl Tutorial"). Perl allows the programmer to do what he wants - regardless of the style. There's even English.pm. Perl has many upsides ie: it's a powerful parser and indispensable toolkit... and highly embeddable. If there was ever a seed language to learn, it's Perl.

    There's also the fact that Perl programmers are real unix men - and let's face it, you'd rather have real unix graduates than Ruby fannies?

    • Re:Perl !! (Score:4, Insightful)

      by LodCrappo ( 705968 ) on Sunday March 14, 2010 @11:26PM (#31477752)

      I'm a big fan of Perl myself but I wouldn't recommend it for new programmers. The phrase "enough rope to hang yourself" doesn't begin to describe it. It's also probably a bad choice in this scenario because it isn't on the list of accepted languages, although if you were decently skilled I'm sure you could write one liner to translate your perl source into any one of the accepted list.

      • Re: (Score:3, Funny)

        although if you were decently skilled I'm sure you could write one liner to translate your perl source into any one of the accepted list

        Not necessary, just do this:

        #!/usr/bin/python
        import os
        lulz = os.system('perl myprogram.pl')


        Look, it's in Python! :)

  • Python or Java (Score:4, Insightful)

    by M. Baranczak ( 726671 ) on Sunday March 14, 2010 @10:00PM (#31477170)

    I assume you want something that'll give the kids an advantage in the competition, and be useful if they want to start programming seriously.

    Pascal - it was nice back when Reagan was in the White House and Michael Jackson still had his nose, but it's obsolete.

    PHP is for writing dynamic web pages. It's good at what it does, but it isn't really a general-purpose language.

    C and C++ are faster than interpreted languages. That is, sometimes they're slightly faster. And they're almost always harder to write in.

    VB? Go fuck yourself.

    So that leaves Java and Python.

    • by FyRE666 ( 263011 ) *

      I'm interested in hearing your theory on why PHP is not a general-purpose language. Especially since it's capable of being used for web, command-line and GUI applications. As for C/C++ sometimes being slightly faster, well there's a reason any application requiring high performance is written in these languages - they're often more than a little faster. I shudder to think how MW2 would run if written in Python...

      Aside from this, Java or C++ would get my vote - bigger potential employment market.

  • I'm a proponent of teaching C/C++. If you know those, you can learn Python, Java and PHP. Visual Basic is not a consideration nowadays.

    Regardless of language, teach proper logic. A good coder in any language will have a better run time than a bad coder in any language.

    As a person in a place to teach, I truly urge you to teach logic before syntax. Logic before language. It's very important.

  • I read over quite a few already and find it funny people are saying things like python are the easiest of the bunch to learn. Command line easiest? really?

    As much as I don't like MS, their VB is by far the easiest of the bunch to learn. And you won't have any speed issues at all to deal with, it executes extremely fast. It's an event-driven language also which makes it easier to compartmentalize things and avoid confusion for new users. Debugging in C can be a nightmare. VB does a great deal to force

    • If the only goal is to get these kids doing well in the contest, I agree that VB might have some merit, although there are IDEs for other languages that provide similar tools.

      However, if the instructor also intends to give these kids skill with something they could actually use later in life, VB seems a poor choice compared to almost all of the others (Pascal being an obvious exception).

      • by v1 ( 525388 )

        However, if the instructor also intends to give these kids skill with something they could actually use later in life, VB seems a poor choice compared to almost all of the others

        You would be amazed at how many big titles are written in VB (windows) and RB (macintosh). Heck, our store's POS system [xsilva.com] is written in RB. (though they don't advertise it as such!) It's out there, all over the place. It just has a bad rep on being a kiddy language and so the publishers don't tend to brag it up.

        My hobbies tend to

  • + Serious real world scalable language used in both business and science
    + Freely available on a wide variety of hardware -> gives access to any child with any kind of computer
    + Learn OO from day 1
    + Java collections give students access to data structures and algorithms without having to get bogged down in writing them at a low level
    - Never learn to implement those low level data structures in algorithms (but don't forget you have just 2 months!)
    - Slower than C
    - Not as close to the hardware as C

    Overall a

  • Teach the kids Scheme! Seriously, it's a better transition from pure math to programming. (http://www.teach-scheme.org/)
  • by Kaz Kylheku ( 1484 ) on Sunday March 14, 2010 @11:15PM (#31477678) Homepage

    The difference between C++ and Python isn't simply that C++ has a more complicated syntax.

    In C++, the kids will have to wrestle with the static type system and the lack of automated memory management. (Problems that can be partially overcome with a lot of "greenspunning" that requires significant C++ experience).

    The number one factor in performance is the choice of algorithms. A Python program with good algorithms will beat a C++ program which uses poor algorithms, or which does stupid things like copy aggregate objects in order to avoid memory management difficulties.

    It's sad that the list of languages includes only immature dynamic languages du jour like Python and excludes mature dynamic languages that have good compilers. Bad education!

    • Re: (Score:3, Funny)

      by Just Some Guy ( 3352 )

      It's sad that the list of languages includes only immature dynamic languages du jour like Python

      I think you meant "du last two decades", as Python's first release was in 1991 [wikipedia.org]. What qualifies as "mature" in your opinion? Is it OK to start using ALGOL yet?

  • What is it that you're programming that can't be done with scratch [mit.edu] ?
  • by sydneyfong ( 410107 ) on Sunday March 14, 2010 @11:45PM (#31477878) Homepage Journal

    I've participated in local and regional Informatics Olympiads, and went to the IOI once. I was involved in training local students a few years ago, so I know quite a bit of the ins and outs of these competitions.

    All the languages have pros and cons, but PHP and VB obviously aren't suitable (if only for their encouragement of crappy coding practices). Java offers little advantage over C/C++, and it forces OOP onto you so it adds an unnecessary layer of complexity for the students.

    The "industry standard" of competitive programming is C++, since it offers near-C speed with the power of various algorithms (eg. sort) and data structures ( maps, sets, priority queues ). Those who intend to take the competition seriously should be using C++ as their primary language. But then judging from your requirements the vast majority of your students won't fall into this category, so I wouldn't recommend C++, at least not at this stage.

    Python generally is a good first language for its simplicity and power. There are a few problems with using python for competitive programming though. First, speed can become a problem for *some* contests, which have rather tight runtime constraints. The contests that cater for a wide range of languages are usually better in this respect, but a lot out there are primarily C/C++/Pascal/Java. Secondly, the fact that python supports a range of built in advanced data structures and algorithms means that you may lose the chance to teach them how to implement the basic stuff, eg. using a binary search tree to implement a map (typing `` mymap = {}; mymap[foo] = bar; '' is surely easier than implementing a BST yourself). You might ask why learn to reinvent the wheel when most modern languages provide these features, but these data structures and algorithms is the core of informatics olympiads, and one needs to learn from the basics. That being said, if the timeframe is just 2 months, I think teaching python might be most rewarding for the students.

    C and Pascal are basically on the same league. C is a bit more "archaic" than Pascal in terms of the way it does things, but feature-wise they are roughly equivalent. The languages are simple, fast, and bare bones enough to force the user to implement the basic stuff. In the long term they are good languages for teaching data structures and algorithms, but require a bit of patience on the part of the student since you need to know quite a bit before you can do anything "flashy" with them.

    My experience with most average students is that they usually struggle to form precise ideas on what to tell the program to do, and then when they do have rough ideas they then fail to write a syntactically correct program, and if they really do write a syntactically correct program the program usually fails on correctness for most inputs, or simply do the wrong thing. Running time shouldn't be a concern before the students actually get a correct program, and my experience is, unless you have really really bright students, most of them probably won't be able to come close to writing a correct program within competition constraints, so don't worry too much about running time.

    In short, I recommend python, but in the long term you might want to think about using C/Pascal. And if you restrain yourself to a subset of C++, it might work too.

  • by O('_')O_Bush ( 1162487 ) on Sunday March 14, 2010 @11:55PM (#31477954)
    Even though I do 99% of my work in Java, C/C++, VB, or shell scripts, the few times that I have written in Python, it was an absolute pleasure.

    The libraries that I used kicked Java/C++ library asses, to the extend that what was going to be a "short" 500 line program in Java dealing with parsing images, turned into an 80 line program in Python.

    The best part is, it was extremely easy to debug as I wrote, since just about any line I dropped into the source file, I could check with the interpreter.

    It also only took half an hour to pick up from other OOP languages.

    I <3 Python
  • Teach them C++ (Score:3, Informative)

    by AlgorithMan ( 937244 ) on Monday March 15, 2010 @05:13AM (#31479408) Homepage
    teach them C++, because
    • Most software (iirc 80% or so) today is written in C or C++
    • C++ is the mandatory language for nearly all well paid programming jobs
    • C++ makes it easy to learn Java (but not vice versa), which is also popular with employers
    • C is C++ for masochists. C++ has everything C has, but not vice versa
    • forget turbo pascal! that's an educational language, which is hardly used in the real world (esp. because of the lack of object orientation)
    • google dijkstras comment on BASIC
    • Python is OK, but not so widely used AND it's an interpreter language (automatic deduction of points)
    • I wouldn't use PHP, since it makes it hard to execute (you need to run a webserver with PHP support and browse to it) and PHP will be dead as soon as the http & html+js+css+flash+AJAX+... mess is cleaned up...
    • Re:Teach them C++ (Score:4, Informative)

      by dunkelfalke ( 91624 ) on Monday March 15, 2010 @08:24AM (#31480510)

      forget turbo pascal! that's an educational language, which is hardly used in the real world (esp. because of the lack of object orientation)

      How does it feel living at least 22 years behind the rest of the world? I am asking because Turbo Pascal supports OOP for that long.

  • It's just me (Score:4, Interesting)

    by Exitar ( 809068 ) on Monday March 15, 2010 @05:37AM (#31479536)

    or teaching a language to non programmers children and sending them to Informatics Olympiad after two months is pretending too much?
    In addition to the language, you must first teach them very basic concepts like variables, loops, recursion...
    As soon as they start to digest them and write their first "Hello World"... BANG! You send them to Informatics Olympiad!

  • by Antique Geekmeister ( 740220 ) on Monday March 15, 2010 @07:28AM (#31480186)

    There is an incredible performance penalty for most object oriented code written by beginners: they aren't taught to avoid the layers of abstraction that eat away at your performance, and they often hide incredible errors behind layers of abstraction that make debugging a nightmare.

    Python seems a good compromise: as a scripted language, it's quite portable. It has good text processing, there's a large base of small examples to teach students with, and it doesn't suffer from that horrid mass of badly written, interdependendent, unstable and unnecessary utilities known as CPAN that clutters a lot of Perl programming.

  • by ThePhilips ( 752041 ) on Monday March 15, 2010 @07:57AM (#31480376) Homepage Journal

    However, the test has a run-time CPU seconds limit, so using an interpreted language like Python could put the students at a disadvantage compared to using C.

    In my experience time limits are there to prevent students using primitive algorithms (the ones with exponential asymptotic performance).

    N.B. I would have recommended Perl instead - but I'd refrain :)

    Python should be and is in fact fast enough for most tasks. Taking algorithms into account, C gives only marginal advantage: bubble sort would suck even if you'd write it in assembler.

    P.S. If that is still concern, one can allow interpreted languages to have e.g. twice more time compared to compiled languages.

"No matter where you go, there you are..." -- Buckaroo Banzai

Working...