Quixotic Quest Update: January

I guess if I had made it a new year’s resolution that I should clue you into how well I have kept up in my quest to read at least 3 books a month. I read 2.5 books last month.

The Life of Pi by Yann Martel. Finally finished a book that has been sitting on my nightstand for over a year. The first part was boring and a chore to get through as compared with the later half. I guess that’s why it took me so long to get involved in it. The second half, while he’s on the life raft was extremely interesting. It had me devouring page after page. But then, the coda. What a shock. It ruined the book for me. I just spent a few days breezing through the book enjoying it, and to throw that change up to explain it all just was dismaying. C+

Harry Potter and the Order of the Phoenix by J.K. Rowling. I read this while it snowed outside. For twelve hours, I was loving it, and still had not finished it. What a tome! What a story! The best Potter book so far, and it makes me contemplate pre-ordering the next one. A-

The Emerging Democratic Majority by Ruy Texeiria and John Judis. Disappointing and depressing. Disappointing because it is a tough read. Depressing because I think their premise is way off base. Look at this past presidential elections. I am only partway through so this is a preliminary grade. B-

TextWrangler language modules

Speaking of smalltalk programming. I am using BBEdit’s younger, punky brother TextWrangler. I miss color coding. It seems you should be able to write a language module that gives me all the yummy goodness of syntax highlighting. I hoped that someone already has done one, but since I didn’t find an easy installation of smalltalk on Mac OS X, then I figured that there isn’t a big Mac smalltalk development community. Admittedly, I haven’t looked hard enough, but being lazy enough I hope to find something on these internets.

Any help, please, would be much appreciated.

Smalltalk is an interpreted language!

Well started my assignments for the OOP class. It’s a simple introductory to smalltalk programming. I have to create a derived class from another provided by the professor. When I “compiled” the file, and passed it to the smalltalk interpreter, I encountered a problem! Smalltalk did not like me using my instantiated object:

” My Main! “
| sa |

sa := SavingsAccount new initialize: 50.
sa postInterest: 0.05 .
sa inspect
!

>./gst ~/Documents/grad_school/ooProgramming722/dev/savingsAccount.st
“Scavenging… 15% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”
“Scavenging… 0% reclaimed, done”

Not so good, hunh? I am sure you smalltalk gurus already see my problem. Besides running smalltalk as a program and not installing it wherever make install puts it. Hint for all you non-programmers: interpreted languages are read from start to finish at the time the program is run.

See it yet? My SavingsAccount is derived from another class Account. (Am I using the correct smalltalk terminology?) I am passing only the savingsAccount file to the interpreter, and I am missing it’s parent. How will smalltalk know what the parent class looks like? Smalltalk was able to interpret the object in this file by just creating instances of a generic object to take place of the SavingsAccount’s super class. I guess it doesn’t like garbage collecting in this scenario. I must read the oop.h file to understand why but for now passing the parent class on the CLI does the trick.

Compiling GNU smalltalk on a OS X

This is just for references, if anyone ever searches for compiling smalltalk on OS X in google. I was compiling the latest stable release, 2.1.9.

When compiling GNU smalltalk on Mac OS X, and you run into errors with poll.h, my suggestion is to comment the block of code which #includes sys/poll.h. You’ll find that the compilation will go more smoothly with the definitions in poll.h (the fake out section) rather than the definitions in sys/poll.h. In fact if you read, sys/poll.h it recommends you not #including it. Perhaps this is a bug and should be submitted to the maintainer of GNU smalltalk.

CS 622 Assignment 1

CS 622
Assignment 1

2.1
Each of these layer models is a real world example of the three layer network model.

In the first example model, the physical connection is the telephone line. The lowest layer on both the receiving and sending ends is the telephone. The telephone acts as the network access layer. It allows the receiving and sending ends access to the telephone line, and it also establishes the communication link between the two ends. The second layer up acts as the transport layer on both the sending and receiving sides. This layer in the transmitter is the host which acts as the mediator between the guest who wants to order the pizza and the telephone. The host provides access to the telephone. On the receiving end is the order clerk whois the itermediary at the pizza parlor. The clerk answers the phone and takes the order. At the top layers resides the application layer. In this example the sender’s “application” is the guest who provides the data, pizza order and the receiver’s “application” is the pizza cook who assembles the pizza pie.

In the second example model, the physical connection is the road. The network acces layer is exemplified by the delivery van. It allows the pizza being delivered a reliable means to the use the road. The transport layer is where the order clerk finalizes the pizza order and gives it to the person who will deliver the pizza in the delivery van. On the receiving end, the host pays for the pizza, which the guest as the application layer on the receiving end will eat. On the transmitting side, the cook acts as the application layer and prepares the pizza, which will be handed off to the clerk to package for delivery.

2.4
The two blue armies don’t have a reliable way to communicate their attack plan, because they are unsure if their messengers get through to each commander. If their messaging protocol relied on the acknowledgement of a message, then either the message or the acknowledgement could be lost. They could add to the protocol an acknowledgement to the acknowledgement, but then each message sent still is not garaunteed to reach its destination. The armies could introduce redundancy into their protocol. They could send two or more messengers to send or acknowledge a message, and only rely on reception of one message or acknowledgement to attack, but this is a waste of resources and could still lead to a lost messenger. The two armies could introduce a timeout to there protocol scheme by waiting a certain time for the acknowledgements before proceeding or terminating the attack.

Oscar Nominees 2005

They were released this morning so here they are. How many best pictures have you seen? I have count two so far, Sideways and The Aviator.

IMDb bottom 100

Pete over at APCB, the initials to the best named blog, ever, lists the movies he’s seen that are in IMDb’s bottom 100. I’ll do the same, but I find it a little bit unfair to try to match a professional blow by blow.

Speed 2: Cruise Control
Superman IV: The Quest for Peace
Bats — And I found this one interstingly hilarious.
Iron Eagle II
Jaws 3D — They used the 3D gimmick as an excuse to send a shark at you.
Tarzan, the Ape man
Jaws, The Revenge — Must be a shark thing.
Hercules, in New York — Saw during a bout of insomnia. Who knew that Arnie with a dubbed vocals could be so funny? Why not his own?

As you can see, I like watching quality films! Although, honestly, I have partially seen plenty of the others on the list, but these are the ones I actually sat through.