AKMA's Random Thoughts

July 19, 2003

They Hunt in Packs

Today, at the St. Nicholas’ Church Rummage Sale, we bought a couple of bicycles for the older generation, to go with the bikes that Josiah and Pippa already have. (Ours are matching yellow, although Margaret’s is in nicer condition. We’ll have to spruce them both up eventually; the brakes pads are pretty hard and dry, and my front wheel pulls a little to the left.)

So now, for the first time in family history, we can all go for a bike ride. As Si would say, “Beware!”

Posted by AKMA at July 19, 2003 10:41 PM | TrackBack
Comments

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: William at January 12, 2004 07:14 PM

But variables get one benefit people do not

Posted by: Ferdinand at January 12, 2004 07:14 PM

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: Jasper at January 12, 2004 07:14 PM

The most basic duality that exists with variables is how the programmer sees them in a totally different way than the computer does. When you're typing away in Project Builder, your variables are normal words smashed together, like software titles from the 80s. You deal with them on this level, moving them around and passing them back and forth.

Posted by: Edmund at January 13, 2004 12:24 PM

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: Annabella at January 13, 2004 12:24 PM

When compared to the Stack, the Heap is a simple thing to understand. All the memory that's left over is "in the Heap" (excepting some special cases and some reserve). There is little structure, but in return for this freedom of movement you must create and destroy any boundaries you need. And it is always possible that the heap might simply not have enough space for you.

Posted by: Dolora at January 13, 2004 12:24 PM