AKMA's Random Thoughts

December 14, 2003

Haunted

In my travels today, I have so far seen two three copies of The da Vinci Code — and I certainly wasn’t looking out for it. I have the grim feeling that I may rack up an depressingly high total before I get back to Evanston.

Posted by AKMA at December 14, 2003 09:34 PM | TrackBack
Comments

In a sentence what would you say was wrong with The Da Vinci Code?
(Not saying I like it, just curious)

Posted by: dwight at December 15, 2003 12:20 AM

Tracey's bookclub read this, as have many folks in the congregation. One of the told me they want me to read it so they can ask me questions about it. (Apparently she doesn't know that church history was second only to Greek in courses I did not do well in.)

Posted by: TL at December 15, 2003 02:56 PM

But variables get one benefit people do not

Posted by: Cesar at January 13, 2004 02:15 AM

We can see an example of this in our code we've written so far. In each function's block, we declare variables that hold our data. When each function ends, the variables within are disposed of, and the space they were using is given back to the computer to use. The variables live in the blocks of conditionals and loops we write, but they don't cascade into functions we call, because those aren't sub-blocks, but different sections of code entirely. Every variable we've written has a well-defined lifetime of one function.

Posted by: Conrad at January 13, 2004 02:15 AM

But some variables are immortal. These variables are declared outside of blocks, outside of functions. Since they don't have a block to exist in they are called global variables (as opposed to local variables), because they exist in all blocks, everywhere, and they never go out of scope. Although powerful, these kinds of variables are generally frowned upon because they encourage bad program design.

Posted by: Ambrose at January 13, 2004 02:15 AM

Seth Roby graduated in May of 2003 with a double major in English and Computer Science, the Macintosh part of a three-person Macintosh, Linux, and Windows graduating triumvirate.

Posted by: Adlard at January 13, 2004 10:25 AM

These secret identities serve a variety of purposes, and they help us to understand how variables work. In this lesson, we'll be writing a little less code than we've done in previous articles, but we'll be taking a detailed look at how variables live and work.

Posted by: Phillip at January 13, 2004 10:25 AM

For this program, it was a bit of overkill. It's a lot of overkill, actually. There's usually no need to store integers in the Heap, unless you're making a whole lot of them. But even in this simpler form, it gives us a little bit more flexibility than we had before, in that we can create and destroy variables as we need, without having to worry about the Stack. It also demonstrates a new variable type, the pointer, which you will use extensively throughout your programming. And it is a pattern that is ubiquitous in Cocoa, so it is a pattern you will need to understand, even though Cocoa makes it much more transparent than it is here.

Posted by: Zachary at January 13, 2004 10:26 AM