2012年11月6日星期二

challange...

It's been a busy week so I haven't got time to update my slog... This is the "make-up" slog. There are so many things I want to talk about... First the project, and then the tutorial exercises on chapter 15 conditionals...

First, the project is very annoying for me. The only thing I need is a clear mind and patience, patience, patience. There are many times I lost my patience and I couldn't spot the easiest and simplest error. I want to finish this project as soon as possible, because there are many things from other courses to do. But the more I think like this, the more impatient I became... I can only change my time policy by finishing as much as the first project first before going to the next one.Only focus on the present! haha.

The second thing I wanna talk about is the conditionals. It's a very intriguing topic for me. More and more I found computer is a language, and it has its dedicated, special logic... I have to follow this logic carefully, in other words, think like a computer! It sounds weird but this is the only way to better adapt to this system. I remember the tutorial exercise from last week, on conditional. The "reply" exercise was kind of tricky.. It asks me to develop a function which takes a string: Good morning/good afternoon/good evening, and reply several different phrases. I couldn't figure out the code: (string=? greeting "good morning"). I didn't know the meaning of "=?" . Then I asked my TA, she points out the string=? meaning if the string present in "greeting" equals (the same) with the string "good morning". If they are equal, the function will automatically produce "I need a coffee". This is very fun! And if all things are wrong in the function, the system will go down to the "else" condition. which means if all the conditions failed the function will produce something from "else" function...

I did not do this correctly on the quiz. Hopefully I could learn from this mistake! Condition is a very useful tactic I could use in the future.  

没有评论:

发表评论