Thursday, 18 September 2008

Yes! Trials have ended!

It's Merdeka!! Yay! But wait, hold on, it's not merdeka for me yet... Tomorrow's my dentist appointment! What to do?? I'm panicking already! What's he gonna do? Cut my gum and do something to dig out that wisdom tooth??? Gosh, I sure hope I won't have high tolerance to Novacaine. Or else the scalpel will be my worst enemy. I wonder if he's gonna administer laughing gas during the operation? I doubt it but it sounds cool. It's a type of anesthetics as well.

Then, there's 1 more month till the doomsday for all Form 3's! Oh no! My BM!! Once I finish BM for PMR, I'll jump for joy!! BM's my nightmare now.

Oh and here's some screen caps of my Objective Paper Reader in action!

Firstly, this is the program on the paper:

For now, the only parts that can be read by my application is the answers part, the ABCD part. Looks complicated? Well, no actually. Fine fine, yes. This is just a very simple program. It has 1 instruction. The instruction is the first line of the program "1 A D". I made AD as the command for showing a message box on the screen. Then the lines following line 1 would be the message to show on the screen. Each letter of the text uses 2 lines of code. Let's take an example: The first letter, J. This letter is defined by line 2 and 3, "2 B" and "3 A C". The application uses this as a binary number. So, 2 B and 3 A C becomes 01001010. The first 4 digits in the binary number is from the first line, then the other 4 is from the second line. Since in the first line, only B is shaded, this gives 0100, and the same applies for the second line. Whatever is shaded is a one. After that, the application changes 01001010 to a base-10 number, or a decimal number, the kind of number we use everyday. I'm not going to go through, in detail, how to convert from different bases of numbers, if you wanna know, go google it.

So, 01001010 = 2+8+64 = 74
Right, how can a number like 74 define a character? There's a list of characters call the ASCII (American Standard Code for Information Interchange). You can see all the characters ranging from 0 to 255 over here: ASCII Table. Just look for the Decimal Number 74, that will give you the letter J!

Anyway, after scanning the objective paper into the computer, just load it through the application:


Then, it'll automatically run the program:


I know, my application isn't really that user-friendly-looking. It's just for me to use, anyway. No one else's gonna use my application.

Wondering how I translated "J S Mason is really Ong Bee Lee!" into ABCD language? See the textbox and the "To ABCD" button up there? I just type my text in there and it'll crank it out, in ABCD!

This application is heavily flawed by the way. How? There's no error checking in it. So, if there's anything wrong with the program you shaded into the paper, it might cause problems to the application. And, if the dimensions of the scanned image is not right, it'll cause inaccurate reading.

0 comments: