AKMA's Random Thoughts

October 16, 2003

Busy Afternoon Away from Sessions

From lunch to now, I’ve been busy at various ends that didn’t appear on the published agenda. I had a long lunch listening to Elliot and Jamie, talking with Elliot about ways that Blogware might extend sideways to accommodate and encourage grassroots growth of DigID.

Then I spent a good long break outdoors (gasp!) talking with Chris Locke.

Then I had an exciting conversation with Simon Grice about Midentity. He was on The Best Panel last night, but admirably refrained from using the panel as a hustings for pitching his product. Instead, he grabbed my elbow as I sucked electrons out of a (rare) electrical outlet in the atrium while swilling Diet Coke and nibbling a peanut butter cookie the size of a small county.

Simon showed me the simple Midentity user interface, for which they’re building Windows and Java clients; it’s a fascinating vision! As he demonstrated the convenience of interoperating with email, phone, and text-messaging clients, I saw the tremendous possibilities for congregational online communities (and didn’t hesitate to bend poor Simon’s ear about those possibilities). What he showed me suggests that Midentity may be onto something, and I asked him to keep me up-to-date with development of the topic — something I hardly ever do.

Did I say Identity?

Posted by AKMA at October 16, 2003 06:51 PM | TrackBack
Comments

A variable leads a simple life, full of activity but quite short (measured in nanoseconds, usually). It all begins when the program finds a variable declaration, and a variable is born into the world of the executing program. There are two possible places where the variable might live, but we will venture into that a little later.

Posted by: Julius at January 13, 2004 02:34 AM

Let's take a moment to reexamine that. What we've done here is create two variables. The first variable is in the Heap, and we're storing data in it. That's the obvious one. But the second variable is a pointer to the first one, and it exists on the Stack. This variable is the one that's really called favoriteNumber, and it's the one we're working with. It is important to remember that there are now two parts to our simple variable, one of which exists in each world. This kind of division is common is C, but omnipresent in Cocoa. When you start making objects, Cocoa makes them all in the Heap because the Stack isn't big enough to hold them. In Cocoa, you deal with objects through pointers everywhere and are actually forbidden from dealing with them directly.

Posted by: Effemia at January 13, 2004 02:34 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: Lucretia at January 13, 2004 02:35 AM

Being able to understand that basic idea opens up a vast amount of power that can be used and abused, and we're going to look at a few of the better ways to deal with it in this article.

Posted by: Bertram at January 13, 2004 08:58 AM

Earlier I mentioned that variables can live in two different places. We're going to examine these two places one at a time, and we're going to start on the more familiar ground, which is called the Stack. Understanding the stack helps us understand the way programs run, and also helps us understand scope a little better.

Posted by: Griffith at January 13, 2004 08:59 AM

This is another function provided for dealing with the heap. After you've created some space in the Heap, it's yours until you let go of it. When your program is done using it, you have to explicitly tell the computer that you don't need it anymore or the computer will save it for your future use (or until your program quits, when it knows you won't be needing the memory anymore). The call to simply tells the computer that you had this space, but you're done and the memory can be freed for use by something else later on.

Posted by: Edwin at January 13, 2004 09:00 AM