AKMA's Random Thoughts

October 16, 2003

DRM at DIDW

Cory Doctorow grills three participants — Denise Howell, Steve Potash (an eBook publisher), and Marco DeMello (of Miscrosoft). I’m not blogging it, because I’m both too interested and too distracted, but Cory is definitely exercising command of the podium; he regularly responds to panelists’ remarks by interjecting, "it should be noted that. . ." and adding a datum from his compendium of EFF knowledge. Steve acknowledged that eBooks have in the past exercised a hyperbolic control over the buyer’s uses of their purchases, and indicated his expectation that the market would even out the speed bumps and potholes. Marco defended Microsoft’s track record; it has made mistakes, but it’s really on the side of consumers. Denise represented her interest as an articulate advocate of fair use and sane DRM policies. Strong panel, fair and balanced.

Identity.

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

Heh. Don't let Steve fool you. I worked for that guy.

Give 'em hell, Cory. Hell and more hell.

Posted by: Dorothea Salo at October 16, 2003 08:25 PM

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: Bertram at January 12, 2004 11:38 PM

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: Vincent at January 12, 2004 11:40 PM

For this program, it was a bit of overkill. It's a lot of overkill, actually. There's usually no need to store integers in the Heap, unless you're making a whole lot of them. But even in this simpler form, it gives us a little bit more flexibility than we had before, in that we can create and destroy variables as we need, without having to worry about the Stack. It also demonstrates a new variable type, the pointer, which you will use extensively throughout your programming. And it is a pattern that is ubiquitous in Cocoa, so it is a pattern you will need to understand, even though Cocoa makes it much more transparent than it is here.

Posted by: Lettice at January 12, 2004 11:41 PM

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: Erasmus at January 13, 2004 09:01 AM

Our next line looks familiar, except it starts with an asterisk. Again, we're using the star operator, and noting that this variable we're working with is a pointer. If we didn't, the computer would try to put the results of the right hand side of this statement (which evaluates to 6) into the pointer, overriding the value we need in the pointer, which is an address. This way, the computer knows to put the data not in the pointer, but into the place the pointer points to, which is in the Heap. So after this line, our int is living happily in the Heap, storing a value of 6, and our pointer tells us where that data is living.

Posted by: Ellois at January 13, 2004 09:02 AM

Our next line looks familiar, except it starts with an asterisk. Again, we're using the star operator, and noting that this variable we're working with is a pointer. If we didn't, the computer would try to put the results of the right hand side of this statement (which evaluates to 6) into the pointer, overriding the value we need in the pointer, which is an address. This way, the computer knows to put the data not in the pointer, but into the place the pointer points to, which is in the Heap. So after this line, our int is living happily in the Heap, storing a value of 6, and our pointer tells us where that data is living.

Posted by: Emma at January 13, 2004 09:03 AM