Tuesday 4 December 2012

November 28th

This is the last class.

The quiz was about using recursion to create shapes (koch.)


(It's better to explain with a picture.)

By the way, (koch 0) is just a horizontal line.

(koch 1) takes the line, the same line rotated 60 degrees counter-clockwise, the same line rotated 60 degrees clockwise and the same line again. 

(koch 2) does the same thing, but instead of the same horizontal line, it uses koch 1. 

Spiral took a vertical line and turned it towards the centre depending on the number that is entered as a variable. For example, (spiral 3) would have a vertical line and it turned towards the centre 3 times.

Palindrome basically took a word and mirrored it. For example, (palindrome "silly") would get me "sillyllis."



November 21th

This quiz was on depth, harvest and flatten.

It makes much more sense to think of the "trees" as tree diagrams.

Basically, a tree contains branches and each "branch" has two "leaves" (one on the left and one on the right) that store information.

Depth is basically how long a tree is (measured in the number of "branches.") For example, if a tree has 3 branches, depth would output 3.

Harvest will display all the information in a tree in order. It does not take into account the number of leaves in the tree at all.

Flatten basically "flattens" the tree and outputs all the information (from leaves AND branches) in order.

-

The lecture was about personal information and the results of the "broken telephone" experiment from last week. I have a facebook page, a twitter and a blog. I'm not bothered by exposing my name, age and birthday on the internet, but I would obviously never give out any really important information like my bank PIN or my passwords.

November 14th

This week was the second term test.

This time, I wrote my notes on a pad and studied the tutorials. Since most of the actual work I do is programming on DrRacket, I focused more on the lectures. My only real problem with the test was the part with the "trade-offs" for faster computers. I blanked out and forgot about Neumann's bottleneck theory. I was also really struggling with how computers multi-tasked. I just assumed it was related to input, output and memory storage.

-

The lecture this week was on the effects technology had on society and he did a little "broken telephone" experiment. We were given several similar sounding words and we had to repeat them. I found this very amusing. I found it funny how people said words that were not even one of the four (gapped, apt, tapped and capped) original words.

November 7th

The quiz was about posn (x and y.)

I found the part where you had to figure out if a coordinate was above the diagonal line.
Basically, to do that, you would us this code:


(define (above-diagonal point)
  (> (posn-x point) (posn-y point)))

A diagonal line would mean that x=y. If the x coordinate was greater than y, then that would mean that the point is above the diagonal.

I also found the part where you multiply or divide the x and y values.

-


Today's lecture was on networks and recursion.

Ring topology:

Basically, it's a network where computers are connected to exactly two nodes - forming a "ring." A "token"  of information is then passed around the network.

Star topology:

It is a network where computers are all connected to one server. Server might be overwhelmed or break.

For example, there are 5 users in total (plus the server.) If user #1 wanted to send information to user #3, the server would transfer the information to user #3 without letting users #2, #4 and #5 see it.

Bus topology:

It's a network where multiple users are linked together on one connection. If one computer were to break/disconnect, the network will still run. If more than one user plans to send information at the same time, there would be a pause that would allow information to be transferred one-by-one.




Tuesday 13 November 2012

October 31st

Happy Halloween! ~

This week's quiz was on operations and conditions. I was used to substrings way back when I was programming in JAVA.

The "last-half" function is what stumped me. This function is supposed to show the last half of a word. The problem is the definition of "half." If a word had an odd number of letters, I had to decide if I should round up or round down the number of letters

(ex. "bunny" -> "bun" /  "bu")

It was a relatively easy quiz, although the conditions part of the tutorial was really odd.

For example, a function had to determine if two words were "greater" than each other. At first, I thought it was determined by the number of characters a string had, but I was wrong. It was actually based on alphabetical order. By that logic, "b" is greater than "a."

(This also got me thinking that this logic would be useful later for organizing words in alphabetical order.)

-

The lecture focused more on operating systems, algorithms and encryption.

I remembered how characters (such as "H" and "#") have numerical "value" (ASCII code.)

October 24th

This week's quiz was based on a tutorial on animations. It was probably one of the hardest quizzes I ever took. When I program at home, I can take as much time as I want. When I'm taking a 10-minute quiz, it just puts so much pressure on me than it should. My brain may just make some dumb mistakes that I would not have made if I was working on it at home.

-

This week, the lectures were about Moore's Law and storage. I was used to storing data on CDs when I was a kid, but I lost most of them by now. I use USB drives now because they're portable and they're much easier than using a disc. It also allows me to safely store my data in case my laptop or my PC crash. I also have an external hard drive to store my writings and other files ever since I started university.



October 17th

This week's quiz involved a timer function that works with each "tick."

While I was studying for this quiz, I tried to understand what was going on when the "barracuda" was moving. After analyzing the code, I found that a new white "rectangle" was being created every tick. The program was set to create a new rectangle beside the barracuda which would push the barracuda to the right. I tried doing the same thing, but I used above instead. This made a new (invisible) rectangle on top of the barracuda, thus giving it the illusion of moving vertically.

Big-was also a new thing for this quiz. I thought it acted as a "loop" like in JAVA programming. The big-bang function was meant to loop everything in the program in general while adding more "ticks." In a sense, there was no real difference between this and a do...while loop in JAVA with a counter.

-

The lecture went more into algorithms (the demonstration with the phone book was amusing.)

-

The following Friday, we were supposed to hand-in our plan for the wikipedia project. I already planned mine out:

1. I would link the "Mami Soup" page to another page since it was an orphan article.

2. I would add more citation to the "LCD projector" article.

3. I will ask questions about improving the "Chobits" page and ask for permission to update information.