Tuesday, November 30, 2010

Tuesday 29 November, 2010

SO CLOSE!!!

The first level of my game is almost completely full-proof!!! I spent another hour working on my game, adding the introduction and experimenting with arrays replacing the numerous variables found in my program. From this I learned two very interesting things...

First off, a big flaw in level one is that the user can avoid the circles simply by moving the square outside of the box and going around. Today, I modified the movement of the square in the Input.KeyDown so that the coordinates would only move if the coordinates were inside the box. The result was that the square would be stopped from exiting the box, however, if the user keeps the arrow key down, the square would force its way out of the box. Then, while I was experimenting with the arrays, I made the section of the code that controls the movement of the circles (up and down) comments and ran my program. To my complete astonishment, the square could not escape the box! The only flaw in this is that the circles weren't moving and when I uncommented the section of the code that controls the movement of the cirlces, the square can once again escape the box.

Another flaw that I haven't fixed yet is the situation involving the user hitting a circle and losing a life. I have an accumulator, which accumulates deaths and decrements the life counter, set at three, by one. Once the life counter reaches zero, then the screen is cleared and a big and fat game over sign appears on the screen. However, once the user loses a life, the level does not reset, instead, the square remains where it is, only with one less life. Therfore, one could simply rush through the level and kill two lives, yet still complete the level and have their lives reset for the next level.

Currently, I am restricting myself to working a single hour a day on my game so that I do not spend too much time on it and so that I don't get carried away with it.

Today in class, I completed Substrings Assignments 5, 6, and 7 with no problems. Tomorrow, I'll actually spend time working on the Substrings Assignment instead of modifying my game and helping other students understand the proper usage of arrays and Repetition Question 13! If I can go through tomorrow's period without any distractions, then all the Substrings Assignments will be finished, since Mr. Arkin mentioned that we do not need a documentation section in our Substrings Assignments.

That's all for today (once again!)!

Monday 29 November, 2010

SORRY!
Yesterday, before I could post, my dad forced me off the computer, because I had spent the whole night yesterday working on my "GAME!"

SO, for today, I'm posting right now about yesterday and later on in the day, I'll post about today!!!

Now then, the game I mentioned is a fairly simple game (it's flash too!). You might be familiar with an online flash game called "World's Hardest Game Ver. 1 and 2". Anyways, my game follows similar rules and objectives as the World's Hardest Game, in which the user, controlled by arrow keys, has to advance their token (a square) from one side of the screen to the other side. Sounds easy? Well, inbetween the screen are numerous blue circles which bounce up and down in a fixed position. If the square grazes a circle, then the user loses a life and has to start all over again. The circle moves at fast speeds, thus increasing the difficulty of the game. Currently, I have finished programming the code for one level, however, I still need to polish a few things, such as the screen-flickering (although I set the screen to graphics mode), the boundaries (so the user cannot "cheat" and avoid the squares by going outside the screen), and what happens when the user loses a life (instead of resetting the level, the user stays in the same position, only with one less life).

As you can see, my game still needs to be polished a LOT just so that the first level will function properly! I plan on finishing the first level before school is out, then working on new levels during the Christmas Break. Until then, I have to focus on my English Compare and Contrast Essay and my ICS Substrings Assignment and Programming Test.

Yesterday in class, I completed the first four Substrings Assignments with no difficulty whatsoever. After that, I continued to work on my game for the rest of the period. The Programming Test has been post-poned to next week (thank God!), however, I don`t really feel the need to panic about the Programming Test because up to this point, everything that we have learned has been really straight-forward (input, output, selection, and repetition). Just in case though, I`m going to review a little (around 15 minutes a day) for the remainder of this week to refresh and review everything, because I have a pretty good feeling that this Test will be a lot harder than the previous Test and that we will be given less time to complete the test (last time, we received almost two minutes for each mark), so maybe this time, the Test will be out of 50 and we will have 50 minutes to complete it, or...

...enough worrying. It does not matter what the test will be out of, because I know that if I`m prepared, then the Test will just be a big review of everything we have learned!

Until later on this day, that`s all for today!

Thursday, November 25, 2010

Thursday 25 November, 2010

it's 10:30 right now, so I'll keep this post short (I have swimming tomorrow)...

Sorry for not posting yesterday, but I swear that I did post, but somehow, I must have forgotten too...

Anyways, I feel...overjoyous (did I use the right emotion?) right now! My arrays finally work with no errors! Previously, I had finished everything, except for the fact that when I wanted to exit the loop with a zero, I kept on receiving the error "Error! No value for expression!" I thought that this meant that I had a wrong boolean expression somewhere, but my dad pointed out to me that in an array, all the elements in the array must be assignmed a value, or the array won't work. So in the initialization section, I initialized every array element to a zero by using a loop, and as I gathered each price, I substituted the previous value (0) with the new value the user was providing. It turned out that there were no errors (thanks Dad!) and that I learned something very important. Though my dad helped me, I still learned how to properly use arrays from now on, as you learn the most from your mistakes and that it is better for someone to help guide you through your problems than to spend two hours on the computer and a piece of paper trying to solve the problem...

It's getting late, and my homework is complete, so I think I'll call it a day...

Tuesday, November 23, 2010

Tuesday 23 November, 2010

Almost there...

Just another fifteen hours and the first-term report cards are due up at the plate! Who's excited, and who's worried? All I know is that I am eagerly anticipating the results of my first-term report card and that I am hoping for the best (of course!). Of course, whatever I receive reflects the hard-work that I have placed in my assignments, so once again, I hope to receive top-notch grades in certain subjects...

Anyways, back to ICS now (notice how I always go off-track at the beginning of my posts like yesterday)...

I was slightly disappointed in my mark for the Printer Assignment, but I actually know that I deserved that mark because of some extreme sloppiness! When I copied the link to validated HTML and CSS, I left out the closign tag for <p> and thus when the CSS validation was clicked, there was an error, resulting in my one point lose in the Validation Section (what a stupid mistake!). If I had paid a little more attention to my work, I would have discovered the error and I could have received a 15/16 (94%) instead of a 14/16 (88%), however, that's life, and you cannot live it without being disappointed and regretting your actions...

Moving on now...

Today, we spent the entire class working on the computers and finishing the notorious Repetition Assignment #12. I completed the assignment in class (once again) although I'm not sure how to display the price with the Receipt, so I'll figure that out later...

That's all for today!

Monday, November 22, 2010

Monday 22 November, 2010

YIKES!!!
Yesterday, I stayed up until 1 0'clock working on my Printing Assignment. The many reasons I have for that is that first of all, I had way too many extra-curricular and outside of school activities over the long weekend. On Friday, I had a doctor's appointment and went to see Harry Potter and the Deathly Hallows Part 1. In the evening, I had a 2 hour sketching class. I used up the remaining time that I had playing the piano and preparing for my final exam. Saturday, I had a dentist appointment (to clean my teeth) and a two hour chinese class after that. When I got home, it was 5 o'clock and I had to finish reading Shakespeare's play "As You Like It", which was assigned on Thursday and to be completed on Monday as well. In addition to 1 hour of piano, I had no free time on Saturday either to start my Assignment, so going into Sunday, I would have to complete a major Assignment in a short period of time...

Sunday was filled with more lesssons! A two hour theory class capped off the morning and by 1 o'clock, the only thing that I had accomplished was that I finished eating my lunch! Following my Theory, I spent another full hour by taking private clarinet classes, lasting from 1:30-2:30. Immediately following clarinet, I was driven to my Sunday Church Orchestra, which lasted for a couple of hours until 5:30. By the time I got home (after my little brother's 30 minute piano class), it was 6:30 and I still didn't start my Assignment yet! So from 7:30-12:30, I furiously worked on the Printer Assignment, and thus today, my sleep-deprived body did not accomplish anything...

In English, I dropped my nickel twenty times (lack of focus)! During ICS, I successfully completed Repetition Assignment Questions 9-11 modified and thus I have no homework for today, however I really need to rest my eyes, or else I might get glasses...

Thursday, November 18, 2010

Thursday 18 November, 2010

Today was a pretty sick day...

In gym, we had an full-period of basketball tournaments with a supply teacher!!! In English, we had another supply teacher and many students squandered the period by texting, yelling "PENIS!" (very, very wrong...), and annoying the teacher...

Anyways, back to ICS now...

Today, we spent the majority of the class working on our Repetition Assignments. In a few minutes, I had modified Question 8 to count positive even integers and display messages accordingly tothe integer's value...
I also finished Question 10, however, I still need to finish Repetition Assignment Questions 11 and 12, which will take tomorrow to complete...

We were also assigned an HTML Assignment; to compare printers' prices and find the most suitable printer based on each student's preferences... The Assignment seems like it will take a long time to finish, and it's due on Monday, so I'll spend the long-weekend finishing it...

Besides that, I have nothing else for the weekend, except that tomorrow, I'm going to watch the premiere of Harry Potter with my friends at the very first time too!

That's it for today!

Tuesday, November 16, 2010

Tuesday, 16 November, 2010

oops...

that's all i can say...

Somehow, yesterday, I misread the student number, although I checked it twice, and to my dismay (which was expected), my average is actually a 92 and not a 98 (laugh here!)...Yesterday, I asked someone to check my mark at lunch because I had a club and I gave him my student number and he told me it was a 98 (?). Anyways, during Period B, I checked it myself and I was CERTAIN that 98 was adjacent to my student number (310-302-203), although I DEFINITELY misread that...

Anyways, enough with the marks. 92 is already high enough for me but I will continue to work hard to achieve an even higher score...

Today in class, Mr. Arkin collected our best Repetition Assignments as of yet. Sadly, I left Question 13 at home (thinking that we would not need it) and thus I could only hand in Question 4. I originally had docummentation templates in my Input and Selection Assignments, however, Mr. Arkin stated that we would not need documentation templates from now on during a Quiz, so I stopped using them. Now, I'll have to copy paste the template into each of my Repetition Assignment Questions (which will not take long). Questions 6 and 7 were assigned today, but I already completed them so all I have to do is print them out (along with Question 13). Mr. Arkin corrected my Repetition Question 4 by advising me to leave more blank spaces between major sections, adding more comments for loops and if ladders for an explanation, and cutting out some magic values...

I have revised all my Repetition Assignment Questions (that I have finished) and for tomorrow, I'll attempt to hand in Question 13, but I'll prepare Question 6 and 7 too...

That's all for today!

Monday, November 15, 2010

Monday 15 November, 2010

Whew...

I am EXTREMELY RELIEVED and SATISFIED with my ICS mid-term mark!!! Surprisingly, I earned a 98 (?) although I'm not sure where that came from exactly... I expected to get an 87 or 88 because that was my raw average (84 and 91) yet somehow I received 10% more...
When I saw my mark, I thought that maybe the mark was assigned to the wrong student number or it was a typo, however, after discussing with my friends, I realized that everyone (my friends to be exact) received a bump in their marks...but whatever the case, I'm definitely not going to argue my mark anyhow...

Today, I spent a whole hour completing and perfecting Repetition Assignment 13 so that there are no flaws and that the program is fool-proof no matter what the user inputs. I also completed Repetition Assignments 3, 4, 5, 6, 7, and 8 and for the rest of tonight (posting at 8 o'clock), I'm going to focus on my extra-curriculars (piano and drawing)...

Tomorrow's a late start day, so I won't come to school early again (like last time)...

Friday, November 12, 2010

Friday, 12 November, 2010

Today was yet another "relaxed" school day, which are hard and rare to come by so I'll enjoy it while it lasts...

Anyway, today, we started a new sub-unit, repetition. We learned about loops and their general structure, in which I have already learned previously and the importance of the placement of the exit when in a loop. Infinite loops do not have an exit when and thus the loop never ends. For homework, we have to program 4 codes (2 codes for the first 2 questions of Repetition and 2 codes for modified question 2 and modified class question).

I finished the first 2 Questions in Repetition, but now I have to make modified codes of Question 2 and a sample from class...

This weekend will not be as easy as today was, so luckily, I don't really have much homework from any of my classes...

Thursday, November 11, 2010

Thursday 11 November, 2010

On this gloomy Remembrance Day, I received the most satisfying (and second) ICS test score yet (an 88% or 22/24). I thought that I would do worse, but in the end, I did a lot better than I thought (I always get higher marks when I think that I did bad e.g. English Poetry Test). Talk about no self-confidence (self-confidence always kills my tests with careless mistakes)...

The ironic thing about Question 7 was that I thought of using an accumulator with 5 minutes left (not enough time to fix the error) and created my own code version of Question 7, which exactly matches with Mr. Arkin's example that was shown today!

Anyways, today, I have to get my test signed and that's about it. Now my ICS average is (I think) 81% (Superpower Autobiography was a 74%) so at least my grade is an A (-). My other subjects should bring my mark up (95% average in English and 90s in Phys. Ed and Music :). Anyways, all I have to say is...

YES I CAN!!!

Wednesday, November 10, 2010

Wednesday, 10 November, 2010

SHOOT!!!

Today, we had our first programming test and I DID NOT do well...

For Question 7, I used if and elsif instead of accumulators (which I figured to use after the test was over...) so for Question 7, my code is a full page long (sorry). So much for keeping it simple. A big mistake I made was putting greater than or equal to. I realized my mistake, but did not have enough time to finish it, as Mr Arkin said that we had to stop and hand the papers in...It does however execute properly, so it shouldn't be that big of a deal, but I'm definitely sure that I lost 2-3 marks there.

To fix Question 7 and make it more simple, I created this program which executes the same as Question 7, only it's much simpler and 0 is not counted as positive...

% declaration section
var integer1 : int
var integer2 : int
var integer3 : int
var sum : int
% initialization section
sum := 0
% input section
put "Three integers: " ..
get integer1, integer2, integer3
% processing section
if integer1 > 0 then
    sum := sum + integer1
end if
if integer2 > 0 then
    sum := sum + integer2
end if
if integer3 > 0 then
    sum := sum + integer3
end if
% output section
put "Sum: ", sum

For Question 3, I wasn't sure if both my answers were different (they were related in that the datatypes were incorrect, one in the code and one by the user of the program) so I might lose some marks there. That Question was out of 3, so I probably received 2 marks for my poor effort (ran out of time).

For Question 4, the standard "get" usage was get following a prompt and that sometimes, the ": *" option is used to accept all tokens. For the optional usage, the user is prompted to submit several data at the same time, each delimited by blank spaces. I'm pretty sure that the ": *" option is the optional usage of get, so I might have gotten that Question wrong and lose another mark...

I think the test was out of 20, so my prediction is that I scored a 15-16 ish on the test, which isn't going to help my subpar mark...

Tuesday, November 9, 2010

Tuesday, 9 November, 2010

study, study, study...

Tomorrow, we have our first programming test, in which I hope to ace (not likely but still possible) to boost my mediocre mark substantially. I understand everything that we have learnt, but I'm pretty sure that there will be something on the test that I'll goof up on. The gap that seperates a perfect score from 99% is larger than the gap between 90% and 99% and I hope to fill those gaps in...

Anyways...
I finished the program at school in which counts the marks and finds the mean for each...
For the remainder of tonight, I will study hard (like yesterday) and hope to survive tomorrow's test...

Monday, November 8, 2010

Monday 8, November, 2010

Today was a rather easy day, excluding the swimming practice in the morning. I don't think that I'll return on Wednesday, as I am not a hard-core swimmer (just someone who is waiting to turn 16 to become a lifeguard)...

Back to ICS...

Today, we presented our posters. Mr. Arkin missed us by accident and thus we (Mounir, Ragulan, and I)presented last. Everyone before us had stated a lot of similar aspects and features of the program, but no one mentioned string delimiters and output field widths and a couple other little things...
After, I went outside with a couple of other students and we stuck the posters onto the wall. Now that I think about it, I should have made our poster neater and more attractive...

On Wednesday, we have our first programming test, which I think will be a piece of cake (hopefully) but you never know what could be tested, so I am still going to review my programming glossary for proper definitions of programming terms. I also need to continue to desk-check, because it will most likely be on both this test, and the final exam (I think).

Until Wednesday, I'll have to study very hard because I have a poetry reciting test (similar to speech arts) on that day as well...

Friday, November 5, 2010

Friday 5 November, 2010

Today, we learned the proper format for Canadian dates, so my posts will now include the Canadian format for dates instead of the American format...
Also, I have to update my notebook...
We'll probably have a notebook check on Monday, so I'm going to update my notebook and table of contents...
Today, we finished the Code Analysis. My group (mostly myself) found lots of features and stats for the code and filled the whole "poster" up with cursive. I also copied the poster into my notebook.
That's all for today...

oh yeah!!!
I'm posting at 5 now because my piano lessons were moved to once every two weeks, so Fridays are slightly more relaxing...

Thursday, November 4, 2010

Thursday November 4th, 2010

its getting cold outside, and I'm still wearing shorts...

Anyways, today we worked in groups of 4, however, my group consisted of only three students and thus it took a longer time to find all the features of the code. I had no problems tracing the execution of the code and desk-checking. Afterwards, we used markers to fill up our big sheet of paper. Of course, we did not finish, but we're close to doing so! For homework, we have to desk-check and trace the execution of our 3 most sophisticated codes, so I'm going to trace the execution of Input Assignment #4, Selection Assignment #8 and #12...

That's all for today!

Wednesday, November 3, 2010

Wednesday November 11th, 2010

Today was "Take your kids to work" day and thus I did not go to school today, however I am still posting my experience at my mom's work place...
I was originally going to go with my dad, however, he asked his boss and he said that "kids" were not allowed to enter their building because it was "dangerous (lamination and manufacturing chips)."

Anyways...
My mom is an engineer technician. Her job involves reviewing the designs of products (printed circuit boards, hence the company's name "Data Circuits") and making them more manufacturable. She decides the process flow and more than often edits the designs of the circuit boards at home...
Today, I sat in her office for about half an hour, watching her work. About five minutes in, I met her boss, a native of Chile. He entered my mom's office and asked a bunch of questions about me, even though he knew that I was coming today. He then placed a stack of paper on her desk and said that there was an error with the last product and that the client was not satisfied with the finished product. My mom explained that the people who handed her the designs of the product said to keep it at 2cm so she left it at 2cm. It turned out that the client had wanted the circuit board at 2cm but then changed it to 2mm. The blueprint and steps of the designs were not modified, so 2 cm were kept. My mom's boss realized that the other people were to blame and left, before shortly returning and placing another stack of papers on her desk and saying that this was their next product and that she better not make any mistakes with a wink.

Afterwards, my mom gave me a tour of the manufacturing "room". The atmosphere reeked and smelled like...chemicals (go figure). The room was as big as Victoria Park CI's double gym! Large tanks of steaming, dull-coloured liquids with corrosive and flammable signs on them surrounded us. I stared into one of the tanks. There were 4 dividers with each section of the tank a different coloured liquid. Machinery on top moved circuit boards that were dipped into one section into another. The sight of the liquid made me feel sick as the stench was undescribable. In a way, it didn't smell bad like someone's gas or garbage, but the smell, along with the reminding thought of corrosive and flammable chemicals made my head feel dizzy. In fact, after a couple of minutes inside, when I took a breath, I coughed and it did not feel like a normal cough either...

My mom showed me a couple more rooms in which the circuit boards were prepared to be dipped into the tanks and where they were compressed and finishing touches were made and then we exited the manufacturing side of the building. We returned to my mom's office, where she began to review the next product's design and I was bored, so I hopped onto the adjacent computer and began to play chess with the computer (on the chess team and I was sharpening my skills for tomorrow's meeting). I used the Sicillian Dragon and the Halloween Gambit, watched a few chess videos, listened to some rock and classical songs, and soon enough, the lunch break came. My mom's colleagues were celebrating Diwali and thus there was, in a sense, an all-you-can-eat-Indian-delicacies. At that time (12 o'clock), I wasn't hungry, so I thanked the people there, took nothing to eat, and took the TTC home. When I got home, it was 2 o'clock because my mom's work place was in Markham and thus it took a long time and an extra fare to get home.

Once I got home, I finished my ATM outline with my own modifications. Instead of adding a "label: " in case the menu_choice did not match any of the above labels, I added a loop at the beginnin, when I prompted the user for his/her menu choice so that if the choice was not between 1 and 6 inclusive, then the question would be looped and repeated until the boolean expression menu_choice >= 1 and menu_choice <= 6 was true.
I made similar adjustments with my other label numbers, though my biggest adjustment was placing the processing section outside the loops of each question so that the savings/chequing_balacne would not increase/decrease with each invalid withdrawal or transfer.

That's about it for today...
I'm pretty sure that that was my longest post, as it took 20 minutes to compose!!!

Tuesday, November 2, 2010

Tuesday November 11th, 2010

Today, I was so focused on getting to school before ICS started at 8:45 and not being late that I completely forgot that today was a late start day!!! I rode my bike to school (9k) at arrived at 8:30. There was no one else at the schoolyard and I realized that today was a late start day. Feeling like an idiot, I camped inside the hallway, studying for my English Test and completing the Metro Crossword and Sudoku (I had 90 minutes to do so).

Back to ICS now...
Today, we learnt about a new type of selection statement, case statements. I had previewed the Selection Assignments II before, so I knew about what we were talking about and discussing. There were a couple of new keywords (case, label, of) that were mentioned. We were also assigned the ATM "assignment" in which we have to program, using an ATM code outline, a functioning ATM (Automated Teller Machine). I completed the assignment in class, however, now I have to guard my code against negative withdrawals, which I have just finished working on.

Tomorrow is "Take your kids to work day" and thus I will not be going to school, which means no ICS or English homework for...TWO WHOLE DAYS!!!

Monday, November 1, 2010

Monday November 1st, 2010

Today, we didn't really do anything in class except go through the Selection Assignments. I had no problems with them, except that I printed question 8 twice instead of question 8 and question 9 when I was printing my codes...
I have finished the first five Repetition Assignments and tonight, I will review the Selection II under the programming program control...