Compensation

Yesterday I was about ready to give up studying CS (except I couldn’t think of any alternative, particularly at my age). Today I feel an awful lot better.

Because in comparison to yesterday’s nightmare, the exam in machine-oriented programming was a breeze. Well, maybe not quite. But after my near failure in the second test during the term I had studied so much for this course that I felt really well-prepared, and rightly so. And quite unlike programming, where we got a nasty surprise twice in a row, the exams in this course are entirely predictable. In fact, they have been nearly identical in setup for many years, with only minor parts varying. There is always a section with basics like converting decimal to binary to hex and vice versa,  doing binary addition and subtraction, and some bit-manipulation in assembly. Just needs practice. Then one section where you have to do a memory map for a given assembly data section (watch out for alignment, little endian / big endian conversion (byte swapping) etc.) and then give the register configuration and condition code (flag) settings after each of a series of assembly language commands. Again practice, though binary subtraction of 32-bit integers is quite error-prone. Then you have to write a assembly language subroutine. Part four is C syntax (make a for loop with continue and break into a while loop without them, that kind of thing), and finally there is a section on pointers in C.

None of this is particularly demanding, and with some practice it’s quite manageable in the time alloted for the exam. Granted, it all has the potential for making more casual mistakes in every single petty assigment than it’s worth in terms of points. For instance, a “subs r2, r1” command means you have to determine the binary two’s complement of an 32 bit integer, add it to another such integer, keep track of the carry and overflow flag, then convert it back to hex. A lot of potential for tiny errors for just 2 points. And the professors tend to encourage us to be very thorough by slipping in small hidden pitfalls, which is easy on the bits and bytes level. The assembly language subroutine aside, nothing is on the conceptual level, so that points would be given more for the overall design than for getting every arcane petty detail exactly right. As you may recall, that’s why I had dreaded this exam almost as much as those nasty small tests during the term.

But in the end it was very relaxed. Unexpectedly, we got 100 minutes to complete the exam instead of the usual 90, and one large assignment simply disappeared because the professor in preparing the exam handout from from his original concept had deleted the questions together with his answers. So there was plenty of time. I did everything thoroughly in the first try, then had half an hour left in the end to doublecheck, but in spite of some very odd byte combinations in my registers I found only a small mistake. Even the assembly language subroutine, something on which I had decided to pass if pressed for time, gave me no real problems. In earlier exams it often had a poor cost/benefit ratio, like writing a full page of arcane commands, including hand-crafting while or even for loops, for typically 12 out of 100 points total. This time it was 25 points out of likely just around 80 (after the disappeared assignment), and the routine was entirely sequential (calculate a first-degree polynomial), so it was well worth doing, and no particular effort either. In fact the only questions that ever bothered me even a little bit concerned some C syntax details in the style of “assign this string to that field, and how would it look like if the field were defined as a pointer instead”. I may have gotten that one wrong, but it’s unlikely to make a big difference.

I went out of the room with the certainty of having passed, and the reasonable hope for a good grade. In fact, an A is not entirely out of the question, considering that the professor usually gives it for around 90% of the total available points. Of course, you never know.

But the really big deal today is that this exam gave me back confidence and self-respect. For most of the summer term I have had this predominant feeling of being either downright stupid or at least exceedingly slow on the uptake, and yesterday’s exam, as I said, nearly made me give up all hope. I half expected to fail abysmally in the other exams as well. Now instead I view what happened yesterday as telling a lot about the exam and very little about my abilities as a Java programmer, let alone as a computer science student in general. Now, indeed, let the other exams come!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s