January 14, 2003

Stop Motion Series 3

[Call me naive, but I think this web-specific project by artist David Crawford is quite compelling, partly because it's so simple, partly because it really does trouble the border between photography and motion pictures (aka "film" and "video") in a way that outdoes both of them on their own terms (kind of like a virus being a bit more effective at self-replicating than plants, animals or rocks, I guess, eh hem). I don't mean that these studies, or this method, would ever render photography or film obsolete, only that neither have been very successful on the web, and these studies contribute greatly to the idea of the web replacing the art gallery as a place for engaging pictorial art. This basic use of Flash technology and photography could become a new pictorial method for lots of artists in the future, with its own little cults and divergences of practice, like Warhol's films. Maybe not. I remember liking the earlier series better than this most recent one, but find out for yourself.]

www.turbulence.org/Works/sms3/

Posted by Brian Stefans at January 14, 2003 10:33 AM
Comments

Note first that favoriteNumbers type changed. Instead of our familiar int, we're now using int*. The asterisk here is an operator, which is often called the "star operator". You will remember that we also use an asterisk as a sign for multiplication. The positioning of the asterisk changes its meaning. This operator effectively means "this is a pointer". Here it says that favoriteNumber will be not an int but a pointer to an int. And instead of simply going on to say what we're putting in that int, we have to take an extra step and create the space, which is what does. This function takes an argument that specifies how much space you need and then returns a pointer to that space. We've passed it the result of another function, , which we pass int, a type. In reality, is a macro, but for now we don't have to care: all we need to know is that it tells us the size of whatever we gave it, in this case an int. So when is done, it gives us an address in the heap where we can put an integer. It is important to remember that the data is stored in the heap, while the address of that data is stored in a pointer on the stack.

Posted by: Cassandra at January 19, 2004 01:42 AM

This code should compile and run just fine, and you should see no changes in how the program works. So why did we do all of that?

Posted by: Rook at January 19, 2004 01:42 AM

But variables get one benefit people do not

Posted by: Dorothy at January 19, 2004 01:44 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: Bartholomew at January 19, 2004 01:46 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: Jocosa at January 19, 2004 01:46 AM