Sunday, June 15, 2008

Just A Random Update...

Lately I’ve been going through the ebook “Becoming an Xcoder”. Its meant to be an introductory course that teaches you the basics of Cocoa and objective-c to prepare you to handle the documentation of Apple’s and others. I’m pretty much enjoying it – the lessons aren’t too hard and they do a good job at teaching the main concepts in a way in which I can get the whole picture. I want to see if I can get started coding really simple things by the middle or end of next week. So far I’m at chapter 3 but I think that chapter 4 is when they’re really get into showing messages on screen and whatnot.

As for the ELP project, last time I checked I heard that my partner was having issues getting Gecko to work properly with the cocoa browser library. That's no good, but after looking around, I think that WebKit might be a good enough alternative to reach the goal that we’re after.

And now, as a added bonus, I have a friend of mine who is really interested in programming for the mac and the iPhone. I think I’m going to help him out with that aim as well. After watching the keynote and all, I’m almost as hyped up as he is. Plus, it would just be fun all around merely to be able to wet my feet a little, gaining as much experience as I can.

I really do think that all of this is going to work. As I look around, I'm surprised by how many connections to people who are interested in all of this that I have. Later in the week I'm trying to make plans to contact a friend of one of my uncles who just so happens to be into Mac development. I'm hoping that he can give me a few pointers or any other sort of information.

There we go, a nice and small update. I can’t believe that I’m actually making headway with all of this. I’m quite proud of myself.


  1. Before asking for "pointers", you might want to read chapter 11. ;-)

  2. lol. I just got that. Good one, but I think that chapter just confused me to no end.

    Thanks for the laugh, I needed that.

  3. Pointers have in the past played the role of filtering out people who aren't serious about studying computer science at universities, so it's normal if you're a bit confused. Since Java doesn't have pointers, and most intro CS courses are now in Java I'm not sure that's still the case.

    Objective-C seems to borrow some ideas which worked well in Java (such as garbage collection), but it's still based on the C model of computing where computer memory is basically a giant array of bytes.

    A pointer is just an index into that array. So if you have int x = 100; and if &x is 2048, that means that starting at the 2048th byte there's a block of bytes reserved for x, and we know the value of those bytes, when interpreted together as a signed int, is 100.

    It's kind of like having a giant array called memory, and x is at memory[2048].

    And if y = &x, then y is 2048. *y is equivalent to memory[y], which is equivalent to memory[2048] which is equivalent to x.

    Pointers are needed in C because each function call has its own little patch of memory for all its variables, including the arguments. So when you call foo(x) the value 100 is copied from memory[2048] into the function call's own memory space (FYI, it's called a "stack frame"). However, if you call foo(&x), then 2048, rather than 100 is copied into foo's memory space, and if foo is expecting a pointer rather than a value, then foo can now change the value of x because it knows to access memory[2048].

    I hope some of this makes sense. Don't be intimidated if some of it didn't.