Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Code Exams Revisited

by Elgon (Curate)
on May 29, 2001 at 14:11 UTC ( #83870=perlmeditation: print w/ replies, xml ) Need Help??

A while back I posted a missive requesting help with code exams, not being a CS or IS major and was glad to receive much help and many useful suggestions. I thought I'd share without the results of my now vast experience ;-) and thank those who gave me such good advice.

  • Courtesy of perlmonks Guildenstern, arhuman and tinman I was told to know the syntax and get a 'feel' for the language.
  • mothra and r.joseph told me to get to grips with some of the algorithms I might be asked.
  • masem told me to seek the ancient wisdom distilled from past exam papers.

Much of what I was told, and indeed what I will relate below, applies to any exam but some, of course, is code-related.

  1. Know thy enemy, or more correctly know thy friend: Study the syntax of the language. Is it like C, Pascal or (perish the thought ;-) BASIC? Get a feel for control flow syntax and know the basic functions' syntax.
  2. Know the language and its capabilities: What is the purpose of the language and what are its origins? This will give you big clues above and beyong your lectures about what you may be asked. For example, my exam was on matlab so we were asked mostly mathematical questions, although some on finding strings and characters in sequences. Learn the most used functions off by heart.
  3. Practice, practice, practice: Get past papers from the same teacher, preferably with answers and corrections. This will teach you not only what questions will be asked by also what the teacher wants, which can turn a good grade into an excellent one.
  4. Remember the basic rules of programming: This one point is probably worth more than all of the points above combined, at least it was so for me as we were allowed a language reference. Comment your code for example; not with what you have done but why. This means that if you do screw up, you have at least demonstrated a knowledge of programming if not the particular language you are using.
  5. In homage to Douglas Adams, Don't Panic: If you think that there is something you cannot do, leave it and go on to something else. If there is something which is not clear, ask: There is no guarantee that there isn't a mistake in one of the questions and you may be doing everyone else a favour too. As an example, during our paper I had to find the union and intersection of a pair of sets: As a non-mathematician who hasn't done set theory for about 10 years this meant nothing to me, so I asked the teacher who explained the meaning to me (the exam was in French).

Othewise code exams are just like any other exam and all the usual rules apply: Sleep well the night before, read the question paper thoroughly etc... and all will be well.

Well, there. I've said as much as I can. At the end of the day I only code for fun really, at the moment anyway, and the exam was not too heavy (details below if anyone cares!) From me, to those about to code, I salute you!

Addendum: Exam paper details for completeness sake:

  1. Write a subroutine using recursion which returns the nth value of a series of Tchebytchev polynomials given a set of rules.(Actually much easier than it sounds.)
  2. Write a pair of subroutines, one which returns the union (a unique list of the values contained) of a pair of given sets stored in the variables a and b, and one which returns the intersection of the two sets (the common values).
  3. Write two routines: A subroutine which returns the number of times a string a contains the character 't' and a subroutine which returns the number of times a string contains a character passed to the subroutine as the variable, a.
  4. Write a subroutine which returns the number of times a subroutine contains any of the chracters passed in the array a occurs in a given string, b. Rewrite the subroutine to be case-insensitive.

Okay, very easy stuff and definitely par 3's in a game of perl golf (I'll admit I gave a perl one-liner for question 3 in the margin) but remember, this is for people who are not coders and have only had about 20 hours practical coding experience. It was also considerably easier than I though it would be as I was expecting something far more involuted.

And me, I got 80%. Matlab isn't really my cup of tea!

"Violence is the first resort of those faced with yet another BSOD."
--/me

Comment on Code Exams Revisited
Re: Code Exams Revisited
by mrmick (Curate) on May 29, 2001 at 16:31 UTC
    Thank you for sharing such a nice and enlightened view, Elgon . It's been a long time since I had to write any exams and this has brought back a few memories ( good and not-so-good ones) heheh.

    I especially like the "don't panic" bit. I think this is most important if you want to keep focused on the task at hand.

    ++ for you.

    Mick
      I'll have to remember that, when I retire from development and become a professor: put "Don't Panic!" at the top of the exam. Assuming anyone still reads HHGttG then...
Re: Code Exams Revisited
by Ducati (Beadle) on May 29, 2001 at 23:52 UTC

    After going through a full year of Assembly and Java courses at University this year your post really hit home.

    I think that one of the most valuable points you made is to document you code, even if it is a written exam. I can't count the number of time I have maintained good grades by doing this. It tells the marker that you might have forgot the syntax or part of the algorithm ... but you still know the theory and how you should implement it. Plus, A good prof will value this and be fair.

    One piece of advice that I would like to add is to study your assignments. Your profs/teachers give you assignments so that you can put the theory into practice. You spend numerous hours, thinking, designing, re-thinking and finally coding (Actually, you should spend more time thinking and designing then coding, but that is another discussion altogether !!). So there is no better place to study from. The first thing that I do when studying for a programming exam is:

    Redo all the assignments

    I have found that by doing this it helps refresh your brain in a few areas:

      1. Syntax: To remember the little details and tricks

      2. Coding Style: Is it what the prof likes/wants ??

      3. Types of Questions: What the prof likes or doesn't like to test and/or mark on.

      4. Key Topics: What did you do the most of snd/or what was worth the most.

    This has helped me to succeed thus far... I hope that it helps any of you who read this.

    Good luck to all !!

    Ducati

    ============================================

    "We rock the body to rock the party ... until the party rocks the body."

    De La Soul

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://83870]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-12-20 16:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (96 votes), past polls