I’ve taken a few computer science classes now and in pretty much all of them, there has been some discussion of how memory works. Usually this means we’ve talked about function calls being used to build and shrink a stack somewhere in the nebulous area of “memory”, but that’s about the extent of what the classes I’ve taken so far have talked about. Today, though, I made a discovery on the matter as a result of working my way through my new book’s tutorial on C and assembly language. Essentially, what I learned today constituted a solidification of what I already understood in a general sense – the process by which functions cause the stack to change. Previously, I was able to explain the process in general terms (that the function is pushed onto the stack and popped off after execution), but with the help of the GNU debugger, I was able today to examine the actual memory addresses of the various pointers involved in the process. Basically, I understand it a lot better now, as I was able to see precisely the movement of data as the memory is allocated for a function call. This is a big revelation – it’s getting me more excited about assembly. If you use mac, install XCode from your original install disc, and if you use linux,
sudo apt-get install gcc gdb. Do hello world in C and disassemble it with GDB – if you’ve never done this before, you’ll be amazed. So deep!
Also, I successfully created the beginning of my first working WordPress theme today by adapting my static mockup to a locally installed version of WordPress. It’s actually an incredibly easy process, as they give you all the tools you could want to use wordpress as a basic CMS. This is all fun!
Just felt like sharing a bit of my nerdiness. That was the good part of my day. I don’t feel like talking about the bad part. It wasn’t that bad, but it was bad enough for me to call it “bad”.