Theocacao
Leopard
Design Element
Comment on "Intro to Memory and Arrays in C"
by Pete — Mar 25
In regards to Rico's comments:

Get your own blog. I'm sorry. I see your point, but you're being hypervigilant. Let me provide my perspective.

I started programming in LOGO, then with OneClick, tried to learn C, failed, then learned ActionScript 1, 2 and 3, along with some PHP and MySQL. I am an advanced user of ActionScript now after 9 years in Flash / Flex.

I recently had a client that insisted on gobs of video embedded in a single file (72 to be exact) and my SWF compile times were MASSIVE. At one point, I tipped the scale by adding a single vector rectangle to my symbol library. From that point on, Flash crashed on export, and Flex would mutilate the visual assets.

I later found, after much research, that the problem was that, because Flash uses the Java runtime on the host machine, it's subject to Java's memory situation as well. So what was happening was all my behemoth assets were causing a stack overflow in the JRE. After an obscure trip through the land of "modify your JRE settings with a custom hidden XML file", Flash resumed compiling the library without a hitch.

SO... it's erroneous and a disservice to say that understanding the stack and global data storage are irrelevant to C (i'm using my own vernacular just to peeve a particular individual, because by the time you're programming in C, you'd have to be a clod to not get it when someone explains these things as clearly as Scott does). I guess you're going to say that understanding how data is stored with memory addresses is irrelevant too... because I spent DAYS many years ago wondering why in the hell the CodeWarrior was taking two ints, 2 and 2, and adding them together to get 80 million and something. Why? Because I was adding the addresses, not the values.

If you're programming C, you don't need to know assembly, but you damn well better know what it is, and you damn well better know some crazy $#!+ about memory management, because this stuff is NOT simple, and it IS obscure, and you DO need every iota and perspective possible to benefit and learn. I am finally really learning C and C++ as well as Objective C / C++ to make iPhone games, and I LOVE IT. Though my first attempt at C failed, I can definitely say I am a vastly better ActionScripter because I retained some CS knowledge from learning C.

Robust debugging is something every developer needs to be able to do, and you seldom have an assembly expert on hand to help you out with C. And if you did, and you asked them for help, they'd probably hit you with a big fat RTFM re: stacks and automatic storage and dynamic storage and C standards and OOP and GC and a whack-em stick the size of Rico's ego.

BTW: Box2D on the iPhone / iPod-Touch is... nerd crack. So much fun.

Cheers.
-Pete
Back to "Intro to Memory and Arrays in C"
Design Element

Copyright © Scott Stevenson 2004-2015