Saturday, June 28, 2008

Subjective-C

Reading through primers for Objective-C, I'm struck by the use of new names for existing concepts. For example:
A protocol declares methods that can be implemented by any class. Protocols are not classes themselves. They simply define an interface that other objects are responsible for implementing. When you implement the methods of a protocol in one of your classes, your class is said to
conform to that protocol.
Interesting, so a protocol is just an interface that other objects implement. In other parts of the world, we call such an interface an interface.
A class in Objective-C can declare two types of methods: instance methods and class methods. An instance method is a method whose execution is scoped to a particular instance of the class. In other words, before you call an instance method, you must first create an instance of the class. Class methods, by comparison, do not require you to create an instance, but more on that later.
So instead of declaring methods static, we now have somewhat less expressive notations of "-" for instance methods and "+" for class methods. Class methods are different than static methods, Apple tells me, but why do we have to resort to "+"?
When you want to call a method, you do so by "messaging” the corresponding object. The message in this case is the method signature, along with the parameter information the method needs. All messages you send to an object are dispatched dynamically, thus facilitating the polymorphism behavior of Objective-C classes. In other words, if a subclass defines a method with the same signature as one of its parent classes, the subclass receives the message first and can opt to forward the message (or not) to its parent.
So the "message" you send (with quotes) is equivalent to calling a method (without quotes). Also, what part of polymorphic inheritance isn't already part of other OOPLs, like Java?

Final gripe that may just be a n00b question: If the "messaging" syntax is represented by [object :parameter], how do you do method chaining?
[[[object method1:parameter1] method2:parameter2] method3:parameter3]?
That looks ugly.

Still wondering why we need another language to program on a different platform but maybe I'll change my mind once I delve deeper. For now, Apple seems to be continuing to do its thang of making a big deal out of existing concepts. XCode does "Data Tips". Great. What other decent IDE doesn't?

Wednesday, June 18, 2008

Sado-MAso

So earlier today somebody made a reference to a post on this blog and it was terrifying. I got over it with some meds I got from that happy Asian dude down at the corner of Main and Abel. Anyway, since I risk boring all of three of you with this stuff, I figure it's just your bad luck that you're reading this post.

I'm once again a total pansy as far as running is concerned since I haven't run for about 3 years now. I've been bed ridden with a debilitating illness and my muscles have atrophied to the point of needing crazy people from Zion to stick needles in me while Laurence Fishburne gets all philosophical on mine ass. But progress is being made, even if in the passive voice! Last week I did a "run" of 3 miles at 10:00/mile and I felt like an asthmatic smoker with one lung and half a leg. This Sunday I managed 5 miles at 9:40 feeling like a normal person with normal lungs and completely average legs. Today I felt like King Kong on crack because I ran until my diaphragm wanted to punch my guts in. Awesome!

Mile 1: 3/4 - 2% - @10:00 | 1/4 - 6% - @11:30
Mile 2: 3/4 - 2% - @10:00 | 1/4 - 7% - @ 12:00
Mile 3: 1/4 - 0% - @10:00 | 1/4 - 1% - @ 10:00 | 1/4 - 2% - @10 | 1/4 - 8% - @12:30
Mile 4: 1/4 - 0% - @10:00 | 1/4 - 1% - @ 10:00 | 1/4 - 2% - @10 | 1/4 - 9% - @13:00
Mile 5: 0%, accelerated steadily from 10:00 down to 7:20.

So, not exactly an impressive workout but also pretty good given that I'm paralyzed from the waist down. At least I'm not some crazy ultra-marathon runner gunning for the Leadville.

Sunday, June 15, 2008

Per Se...

...is, among many things, a highly rated restaurant by Thomas Keller in New York.

It is also Latin for "of itself" or "by itself" or "with reference to itself".

There is no such thing as "per say", except as a homophonic yet mistaken spelling of "per se".

Friday, February 29, 2008

Defining you

So, the Providence Place Mall thinks I'm defined by toilets and urinals. Bastards.

Sunday, February 17, 2008

7 instead of 20

What's going on? Was supposed to run 20 but could barely jog/walk/limp/crawl 7 miles today, out of breath the entire time keeping up an average pace that was probably slowe than 12:00/mile. And my knees still hurt. And I was out of breath again doing a little cleaning in the bathroom. Not a good follow up to the 1:50 half and it looks like I might have to cancel the napa. Suck! I must be hosting an alien parasite...

Saturday, February 09, 2008

Oh hair!

Snowing at ORD and my flight's supposed to be on time. I'm skeptical yet hopeful.

Word of the day: whorenament. Discuss.

Friday, February 08, 2008

You Don't Get It

Due to some corrupting influences from certain rogues at my place of work, I've been running a lot more recently. Scratch that. I've been on an honest-to-Zoroaster training program for the Napa Valley Marathon in March, once again courting black toe, ITBS, and plantar fasciitis. Yet I really do enjoy running immensely, those biomechanically ominous terms notwithstanding. My last Marathon had me at about 10:45 minutes per mile and I just recently ran a half marathon at 8:20 minutes per mile. That's definitely progress in the right direction.

Given that I continue to run though, it would seem obvious that I enjoy running. It's not like somebody is blackmailing me into running. My son isn't in danger of being pooped on by wild boars in the Siberian woods if I don't run and even if he were, I would more likely question that I had a son at all because last time I checked no offspring had sprung from my loins. So I must like running. That seems to be a simple, reasonable, logically sound deduction.

It is also the one basic truth that is continuously questioned. Kind of stupidly. No, that's too strong of a word but let me explain with a dialogue:

Somebody: Why do you run?
Me: Because I think it's fun!
Somebody: But it doesn't seem like it's fun to me.
Me: Perhaps not, but it's fun to me.
Somebody: Yeah, but why do you do it, it's not fun!
Me: But...it IS fun to me...
Somebody: I don't believe running is fun! Explain to me why you would do something that is not fun, ignoring your own views. Also, I'm right, you're wrong. Now justify why you're right.
Me: *runs*

It's not that I look down upon people who don't run. Being a couch potato or playing the saxophone are perfectly wonderful alternatives to running. It's not my place to judge. But you can't adopt the premise that running is painful and not fun and then ask me to justify myself. It would be like asking me why I enjoy being Asian because doesn't it suck to be Chinese? Or why do I enjoy playing the piano when it is so boring compared to OMGHALO3ROXORZ!!1!!eleventyone!?! on the XBoxDegreesInACircle?

Next time somebody asks me that question I should just give in. I am a masochist. I enjoy pain. My favorite activity on Saturdays is to be sodomized by butch dominatrices in leather while listening to the Mozart Requiem being played in D Major. While running.