AKMA's Random Thoughts

June 28, 2003

Does This Bus Stop at Rome?

Evidently Google knows something I don’t. Using Aaron’s AdSense tester, I found out that Google would paste advertisements oriented strongly toward Roman Catholics, enticing clickers to educational institutions (for obvious reasons) and to religious orders.

For the record, that’s Anglo-Catholic, and Margaret would have a conniption fit if she thought I was anywhere near Rome. She gets stern when I so much as joke about it.

Now, of course, having been explicit about this association, Google will think me all the more appropriate a site for their Rome-oriented theological ads. I went ahead and mentioned these topics ’cause I don’t mind that much, but I avoid several topics that show up frequently in my referrer logs (involving a well-known spokesman for generalized mythological spirituality and his unfavorable outlook toward Judaism, and the New Yorker author who made a fuss about him) since I don’t particularly care to emphasize that single post). I got some unusual search-engine attention when I quoted a line from the B-52’s “Rock Lobster”

Good night, and have a pleasant tomorrow. . . .

Posted by AKMA at June 28, 2003 11:30 PM | TrackBack
Comments

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: Newton at January 13, 2004 03:18 AM

This will allow us to use a few functions we didn't have access to before. These lines are still a mystery for now, but we'll explain them soon. Now we'll start working within the main function, where favoriteNumber is declared and used. The first thing we need to do is change how we declare the variable. Instead of

Posted by: Charles at January 13, 2004 03:18 AM

Inside each stack frame is a slew of useful information. It tells the computer what code is currently executing, where to go next, where to go in the case a return statement is found, and a whole lot of other things that are incredible useful to the computer, but not very useful to you most of the time. One of the things that is useful to you is the part of the frame that keeps track of all the variables you're using. So the first place for a variable to live is on the Stack. This is a very nice place to live, in that all the creation and destruction of space is handled for you as Stack Frames are created and destroyed. You seldom have to worry about making space for the variables on the stack. The only problem is that the variables here only live as long as the stack frame does, which is to say the length of the function those variables are declared in. This is often a fine situation, but when you need to store information for longer than a single function, you are instantly out of luck.

Posted by: Rawsone at January 13, 2004 03:18 AM

When Batman went home at the end of a night spent fighting crime, he put on a suit and tie and became Bruce Wayne. When Clark Kent saw a news story getting too hot, a phone booth hid his change into Superman. When you're programming, all the variables you juggle around are doing similar tricks as they present one face to you and a totally different one to the machine.

Posted by: Griffith at January 13, 2004 12:08 PM

This back and forth is an important concept to understand in C programming, especially on the Mac's RISC architecture. Almost every variable you work with can be represented in 32 bits of memory: thirty-two 1s and 0s define the data that a simple variable can hold. There are exceptions, like on the new 64-bit G5s and in the 128-bit world of AltiVec

Posted by: Prospero at January 13, 2004 12:08 PM

The Stack is just what it sounds like: a tower of things that starts at the bottom and builds upward as it goes. In our case, the things in the stack are called "Stack Frames" or just "frames". We start with one stack frame at the very bottom, and we build up from there.

Posted by: Prospero at January 13, 2004 12:08 PM