Showing posts with label procedures. Show all posts
Showing posts with label procedures. Show all posts

Monday, December 13, 2010

In which Pearl suffers from embarrasment

Konbanwa, minna-sama.

I'm feeling tired and lethargic, as usual. I think I'm getting more and more irritable as the months progress; and by doing so, I'm annoying my friends, family and acquaintances/colleagues. Hopefully the Winter Break will allow me to recover. Only one more week! And the countdown to Winter Break begins...

Today we had our second programming test. There were a few people who were spazzing out because Mr. Arkin never told us when the exact date of said test was, only that it was (and I quote from the Daily Log) "On the week of 13 December". I actually found out second period, because my class (homeroom) was right next to the Lab in which I have ICS. Personally, I was more worried about other subjects like Science and English. (See, I have a lot of trouble with the former, and a huge essay is due this week for the latter.)

I thought that test itself was pretty easy. There were only two questions that I had difficulty with, and I had figured out one of them in due time. That one was the first question on the back, where you had to write what would be displayed on the run window. At one point, the code said something like this:

p := anchor
s := website

p (index (s, "s"))

I was incredibly confused, because I had focused directly on the second part of this...um...statement. I actually thought the correct output for this part of the statement was "4" (because 's' was the fourth letter of "s" [the string]). Then, when I went over it again, I realized that I had to put the fourth letter of "p" [the string], which was h. I'm glad I figured that out!

The other problem I had was with Question 3, which I'm positive I got wrong. I know a function is a subprogram that returns a value; and a procedure is a subprogram that performs a defined task. However... I'm not sure about when it is legal to call them.

Now... Mr. Arkin had told us that we cannot hand in our test in the last five minutes, so when he called out "five minutes left", I started to panic. But... no one else handed it in yet, so I assumed that I should get up and give it to Mr. Arkin. His response to my getting of the chair: "Sit". *cries tears of embarrassment*

*ahem* Yes, well, anyways! After the test, he gave us an introduction to graphics. I think it's in preparation for culminating... *spazzes out* I...really need that break.

That's all for today! Until tomorrow~!

Friday, December 10, 2010

In which we achieve our goal!

Konbanwa, minna-san~
I think I was still "drunk" from International Night this morning. Heh, not even. I was "drunk" the entire day. I'm going to sneak in a fangirl moment here and say "Oh my God, the Korean groups were so awesome!!!" (Y'know, I'd replace "awesome" with another word [that starts with "h" *wink*] but it's probably not a good idea to say that here.) Ha, now I have renewed respect for Asian boy bands. *cue fangirl squeal* The song's still stuck in my head: Again and again and again and again...

On the other hand, I'm exhausted. After I got home and ate dinner (yes, I get home almost right before dinnertime) I went to sleep. I woke up at 9:30 PM, mentally kicking myself for not writing my blog first. Then again, the minute I go on the computer I won't be able to get off of it for a while. So, yep, that's why I'm doing it now.

*cough cough* Anyways!
Today was the last day we had to review programming in our groups. As I mentioned in the blog title, I think we achieved our goal. My group went over all the Programming Concepts noted on the handout Mr. Arkin gave us quite a while ago. I made sure I understood everything there, and if there was anyone who needed something to be explained to them, I tried to help. (Hopefully they understood after my efforts!)

I love helping others. *smile* I want to be an elementary school teacher, so it's actually helping me prepare for the "challenge" as well.

On another note, I need to start preparing for exams and culminating. Over the break, I plan on taking all my binders home and creating study guides for each one of my subjects, especially Science. Hah... That's what made me "sober". Mr. Pourkhatai returned out Ecology tests today after school, and I got a...horrible mark that will undoubtedly bring down my average.

Dakedo...oyasumi, minna-san!

---

Translation: So...good night, everyone!

P.S. For anyone that's interested, there's a Japanese boy band called NewS (also, NEWS, News) that's actually good. Sorry, I used to hate boy bands in general because they sang about...fickle concepts. Like love. (Dear God, I must sound morbid now.) But yeah, they sang for the seventh One Piece movie. It's called "Sayaendo". The translation's cute.

Thursday, December 9, 2010

In which we review programming in groups

Kon'ichiwa, minna-san~!
Tonight was International Night, so Zarin-dono and I stayed at Maryvale library (at Parkway Mall) until around 5:30, when we walked back [to school]. (God, it was cold!)
Anyways, the entire show (concert?) was amazing! I'm so glad I decided to go. *smile*

Last night, Zarin-dono and I went through the Skills Inventory, briefly going over certain aspects of it and taking note of the concepts we didn't understand.

Anyways, yesterday I mentioned that we got into groups to help each other catch up/fully understand programming, right? We continued doing that today!

It was sort of funny, because I had no idea that there were two kinds of loops. When Mr. Arkin and Zelin tried to explain it to me, I got even more confused, and was like "ne?" *cue cute head tilt*
But eventually I understood! And when I did, I felt extremely stupid.

I think that my group made good progress today! We're going to continue doing that tomorrow. By Monday, I'm sure my group and I will be "Level  4" Computer Science students!

Wednesday, December 8, 2010

In which we learn about procedures

Konbanwa, minna-san!
I...get obsessed with different series very easily. Sometimes my love for a certain series dies out. (For example, I used to adore Hot Gimmick, but now it's...meh. It's not like I don't love it anymore (I mean - who can resist Ryoki-sama? *wink/fangirl squeal*), but it's just not as important to me.) But at other times, I will continue to love that series forever and ever... Like Inuyasha. I started watching it, what, six...years ago? I still adore it. And FullMetal Alchemist, which I started watching at around the same time. Of course, I absolutely cannot forget Detective Conan/Case Closed~! I'm a huge mystery/detective fan, so I love this one. Right now, I love Durarara!! It has a really unique/amazing/epic/addictive storyline and even more unique/amazing/epic/addictive characters. I don't want to stop loving it...


From left: Izaya Orihara, Anri Sonohara, Mikado Ryuugamine, Masomi Kida, Shinra Kishitani, Shizuo Heiwajima. The figure in the moon is Celty Sturlson, a dullhan.
Durarara!! (c) Ryohgo Narita
 Ah, but these are simply the ramblings of a crazy fangirl/writer. To get back on topic...

According to my Programming Glossary, a procedure is a subprogram that performs a defined task. It is very similar to a function. However, a procedure does not have a result (because it's not returning a value) and it can have zero or more arguments. An example of a procedure with zero arguments looks like this:

procedure sayHello
     put "Hello!"
end sayHello

sayHello

This code outputs "Hello!"
However, you can "upgrade" it, using an argument. This code will output "Hello, Shizu-chan!"

procedure greetUser (greeting : string, userName : string)
     put greeting + ", " + userName + "!"
end greetUser

greetUser ("Hello", "Shizu-chan")

Simple, ne? *smile*
Of course, if this was Izaya-kun speaking, Shizu-chan would say: "Get out of Ikebukuro!!!"
D'awws, we love you, Shizu-chan~

You can also ask the user to give you the greeting and name. However, then you must make greeting and userName variables (within the procedure, if that makes sense).

procedure greetUser (var greeting : string, var userName : string)
     put greeting + ", " + userName + "!"
end greetUser

var greeting : string
var userName : string

put "Greeting? " ..
get greeting : *

put "Name? " ..
get userName

greetUser (greeting, userName)

Got it? *smiles again*

Well, I hope that explanation was plausible. I'm generally horrible at explanations (and you wonder how I'll ever become a teacher).

Anyways, after we were taught how to create a procedure, we evaluated ourselves on our understanding of programming. Then we got into groups based on our evaluation. By Friday, Mr. Arkin wants us to fully understand all the concepts of programming! With a bit of work, I'm sure we can do it~!

Ganbatte, minna-san~!