2

I'm studying computer science at a technical college. In some courses we perform live coding exams, i.e. we download the code and have a certain amount of time to solve the exam, then we have to push the code to the server where it is graded. (No internet access allowed)

I'm already doing all the exercises twice, some of them even three times. I generally perform very bad on these although I can solve the exercises reasonably well. Also after the exam is over I usually see the solution within minutes. However the time constraint gives me like tunnel vision, which leads to silly mistakes, which leads to non-functional code which gives a bad grade. (no points if test-cases do not succeed)

What strategies are recommended given the circumstances described?

2 Answers 2

5

Do practice timed tests using conditions as similar to the exam as possible. Ideally use the same platform that you use in the course. But you can find similar platforms to the one you are describing online, such as HackerRank and LeetCode, which also have banks of questions on different topics at different levels of difficulty you can use for practice.

Usually, these kinds of platforms have an ability to test your code on user-specified input or pre-made examples. Always test your code as you write it, especially in these kinds of exams. Test your code every time you add a new logical feature. The test can be as simple as feeding in a simple set of input and adding print strings to check you are getting the output you expect at every step -- just something you can do quickly to check yourself as you work. When you have a complete solution to a question, make sure your code runs on simple tests and gives correct results. When it does, then try thinking of edge cases, and if you're being graded on efficiency, try making a huge example test set. You should be able to generate test data quickly (if not, practice it). You also should practice thinking of good test cases -- simple ones that test correctness on "sane and small" input, and more complicated ones that can find edge cases and are large.

Learn techniques to calm yourself down in the exam room. Make sure you eat and sleep well before the exam. Don't cram -- study and practice in advance, and use the time before the exam to calm your mind. Take deep breaths. If you find yourself scrambling during the exam, take a moment to center yourself. Imagine yourself being in the comfortable place where you take your practice tests. Try to break your task into smaller, manageable sub-tasks that you can test, and build your way up to a solution, rather than trying to solve everything at once. Don't be smart. Be systematic.

1
  • Thanks for the tipp about time constrain..I think this could help Nov 8, 2021 at 18:01
2

The number of mistakes are infinite, in the statistical sense, but not for an individual. Most likely, your mistakes will always be of the same family of mistakes.

Remember your errors, because you know you can solve the excersises. Focus on having a subset of templates that you know by heart (i.e. a function with a vector in input and a string as output) and build on these small blocks your solution.

As per the answer from Andrew, at the exam you have to be systematic (and b-or-i-n-g), don't try to be smart.

2
  • I think Andrew's comment on the time constraint really is my no1 priority...I usually don't stress while coding because it leads to bad code quality.But I think I should practice speed coding even if it is only for the sake of exams Nov 9, 2021 at 10:18
  • @Rubus I agree with not stressing out, but I am quite skeptical about the "bad code" part: the first code is always bad. But it must be working code, and it will be working if it is a subdivison of big tasks in small tasks. It can even be working, but not giving the correct solution. Not so important. Errors are easier to find in small tasks, rather than in a monolith. Complete all the small tasks, which means having all small tasks working correctly, then you can spend the left time in doing a good code (with some bad parts).
    – EarlGrey
    Nov 9, 2021 at 11:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .