Exams are here again!

I have exams from December 2 and preparations are in full swing! (OK OK, they are not!)

This afternoon, I was studying a pretty long example of linked list related code. At first, I went through all the code and then tried to understand it all.

But then, I had a thought.

And now, I have a full cheating plan.

Interested?

Let’s analyze some things first.

Programmers Have A Strange Habit

They do not like to read other’s code.

Being a programmer myself, I have noticed it many times. I can help others solve their code problems but in most of the cases, I help unwillingly because there’s always this small part in me that wants to ask them to rewrite whole code!

In fact, according to Joel Spolsky, there’s a fundamental law of programming:

It’s harder to read code than to write it.

Read more about this habit of programmers in Things You Should Never Do. It’s an excellent piece by Joel.

Now, teachers who teach us are programmers! So, they’ll not check the code that well. And in case they are not programmers…..

Teachers Are Not Always Programmers

No disrespect intended to anyone but many times, teachers are not programmers. Especially in India where teaching is viewed as last profession.

And if your teacher is not a programmer, the job is easier!

A non programmer is never ever going to analyze all code. In best case, syntax will be checked. (Wish I had remembered this in first semester in my C exam, where I forgot to add & before each and every scanf! :( )

Programs Run On Computers…..

Not papers!

And we write our exams on paper.

So, teacher has two options:

  1. Check syntax only.
  2. Run every program on their computer.

In case you are thinking about the second case, read on…..

Teachers Are Paid To Check Answer Sheets

Ta da!

At least in India, teachers are paid to check answer sheets and not for checking codes! So, teacher will not run your code, they will just see if you have written everything.

Now that we know that memorizing codes won’t help, here’s how to save you some hard work during exams:

1. Do Not Leave Coding Questions

Worst thing you can do with a coding question is leaving it. Do not leave answer blank. Write something relevant. Write anything. You will get something at very least!

2. Add Algorithm/Flow Charts or Both

Since code won’t be checked fully, teacher will look for key points. Right?

Do not let teacher go to programming part. Write algorithm or flow chart so that teacher knows that you know how to solve the problem and hope teacher does not check the code.

3. /* Comment, Comment, Comment */

Do not write just code, include comments too! This will make code a bit clear (if it is correct, that is!)

These tips will surely help you score better in programming exams. Let me know how it goes.

Disclaimer: One last thing, this is just an experiment! I’ll try these things this time. However, this may or may not work. Try at own risk.