AKMA's Random Thoughts

May 27, 2003

Aw, Shucks

Those of you who collect travel brochures will want to stake an early claim on this year’s Kennebec Valley tourism guide. Of course, this is always a hot item, but this year’s edition includes an advertisement for Old Fort Western, a stockade in Augusta, Maine.

And in that advertisement, on page 14, you might see an angelic blonde-haired rascal in eighteenth-century garb, brandishing an authentic quill pen over an authentic ledger book. And you would realize that you were holding a photograph of Josiah Adam, aged 8, at the Fort Western summer camp; a radiant young sprout, delighted at this opportunity to immerse himself in antique customs, and to be photographed so admirably by his grandfather. . . .

(It’s not in any of the online documents — not that I could see. More’s the pity.)

Posted by AKMA at May 27, 2003 11:46 PM | TrackBack
Comments

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: Anthony at January 13, 2004 11:39 AM

When a variable is finished with it's work, it does not go into retirement, and it is never mentioned again. Variables simply cease to exist, and the thirty-two bits of data that they held is released, so that some other variable may later use them.

Posted by: Noe at January 13, 2004 11:39 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: Isaac at January 13, 2004 11:39 AM