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.