Thursday, February 21, 2013

Objection!

It totally makes sense.  The moment I figured out how to create and use a full-functioned class (in Java), I switched to a completely different language with different syntax and different paradigms.  Objective-C, which uses messaging instead of methods, meaning late binding and dynamic typing and all that.

Plus, you know, Processing is a stripped-down version of Java and constructs code that runs on the Java Virtual Machine.  I'm learning Objective-C within the framework of Cocoa and the Apple environment.  Which means I'm exposed to a lot more of the code behind the window than I am writing a Processing PApplet.

And I have yet to get to "Hello World."  Oh, sure; I can create a program that compiles, that has a window and buttons, and the buttons and other elements interact with each other.  But I haven't quite grasped the methods to pass messages to a custom class -- even as much as I've managed to both create a class and instance it in ways that didn't throw up a compiler error.

I'm working through a tutorial right now.  One of my habits is when I'm using example code, whether it is a sample or a full tutorial, is that I will re-name every variable.  This makes it a lot easier to learn which are actual variable (or otherwise user-assigned) names, and which are inviolate software functions.  I also change around other things, for the same reason.

I have to say, though, XCode is a big step up in programming environment.  The Processing and Arduino "sketchbooks" will color code core functions, and highlight matching brackets.  XCode goes quite a bit further with throwing up contextual menu suggestions and auto-fill boxes.  And there is a lot of drag-and-drop functionality, especially around interface design; you literally control-drag an interface item in order to insert the proper messaging code into your text.

I'm still going to be very happy when I finally make a button that can do something.  Happy enough that I may take a break from programming!

No comments:

Post a Comment