Apple Cocoa Cavil

I’m going to try to sound more like Andy Rooney ((I include this link because I think this already marginal reference will become incomprehensible in ten years.)) up here on this blog. Also, how about I indicate when the boooring technical notes begin and end with technical and interesting.

This is one of my favorite xkcd comics. It really speaks to my experience. Usually I can pull away before I’ve finished registering for comments. Sometimes I’m halfway through a closely reasoned argument when I realize how perfectly pointless and non-personal-goal-advancing my actions are. Then, in the worst case scenario, there I am mixing it up with the other comment-warriors. Here’s me windmilling my way through a post about dolphin killing on Japanprobe. This used to be the url for a pitched brawl in which I interjected a few uninformed comments. Etcetera.

Anyway, I thought I’d write this post at a more meta level to dissuade myself from commenting elsewhere. So here goes (technical):

Have you ever noticed that Objective-C is really, really weird? Like, they just took all the C- and C++- style conventions and changed them? Me too. And on top of that it’s compiled and you do memory management and the engineers make APIs that have objects called NSCamelCasedFactoryMethodObjectFacilitator ((Yeah, I’ve got their number all right.)). Okay, so then someone makes a script-y dynamic thing for managing the Objective-C stuff, good idea. And when designing this scripting interface they make the following language syntax design decisions:

Finally, the instruction separator is a dot, like in English sentences:
myString := ‘hello’.

The following example shows how to send a message to an object:
myString class

See, this is funny, because it’s completely different from every other programming language (( Actually, these are pretty interesting design decisions. The := assignment syntax is wack, but probably necessary for named arguments or something. The dot on the end is okay, but you’re moving the OO-messaging operator into the generally useless semicolon position. By using the space for messaging, you’re now saying “subject verbs(args)” instead of “subject.verb object, args” (in Ruby you can omit the parens for a function). )). That is all.

Umm, but there is a somewhat interesting take-away. Both Apple and Microsoft have designed really sucky APIs (in terms of intuitability rather than functionality) , compared to which GTK is fairly sane (it gets a bit clunky when dealing with “GtkIter” operations). But the MacOS developers follow Apple’s improvements of this API, cooing over the increased simplicity afforded by the new NSMakesYourToastRegistry. It’s the same with new C#/ Windows API developments. So (this is actually the interesting part) the lesson is that when people work within a “closed” development system, they lose their sense about good and bad design! ((So I sort of believe that. Mainly I’m bitter because I can’t get some code to work on MacOS.))

Here’s the idea. Closed development systems don’t get good feedback and don’t have good change mechanisms, so even very good engineers (probably Apple’s are some of the best) end up working in the dark a little. It gets all culty, because there’s an elect that makes the design decisions and a laity that passively learns the new scripture. And everyone’s straining so hard to understand what the design class hath laid down that they’re no longer perceiving the design objectively. And proprietary lock-in helps, because it leads to fatalism (“what can I do, switch to Windows?”). There are all these weird little island communities where the natives are effectively locked-in to a platform because they’ve already invested the energy to understand its weird design. This isn’t even necessarily a proprietary vs. opensource thing. There are strange over-designed opensource projects that aren’t particularly open because of this class division (and most opensource projects rely on only 1-3 main contributors, it seems). All I’m saying is that bad APIs / development languages happen when designers aren’t being influenced in the right way by the end-user developers, and I’m speculating that this has to do with particular attitudes and processes associated with proprietary code and also a kind of design elitism. I mean, doesn’t Objective-C code (as code) suck?

Example

An instance of obsessive behavior: trying out various WordPress themes, tweaking the CSS to look right, making sure the code highlighting is the same color as my gvim theme. Perhaps for hours. This by way of giving myself permission to stop.

Update

My life continues apace. At the moment, I’m looking for a job for the summer and onward (( I will learn the formal rule for when to use onward vs. onwards. )) , hopes fairly high. Going to Hawaii on Tuesday (( Because I am wealthy and carefree. )).

Trends:

  • obsessive behavior
  • competence?
  • health?

An example of the first is the playing of this game. Probably I get in at least one game a day, usually more. A game will usually last an hour, but some games go much longer. Also, my computer is supposed to prevent me from typing/mousing for more than hour, and I will click to bypass its 3 minute break message for hours on end. You read me? Sometimes, say at periods like this when I’m trying to get on to the next thing, I “invest” my mind in the internet, just as during the semester I invested it in academic philosophy. That is, I try to catchup with the flow of information, trends, etc., at least in the domains I care about (mostly opensource software and some world affairs). What really happens is that my hands start hurting and I lose my attention span.

My sense of the second comes from a sudden improvement in my ability to “see” code. I made this portfolio site to show potential employers. It’s in PHP, which I don’t really know, but it’s logic, so I can hack out something like that with a little investigation of the syntax and standard libraries. I’ve also been writing a userspace driver for a usb device (the famous AgileLamp USB Lava Lamp!), which has been a really mysterious, frustrating process where I’ve ended up experimenting with several language bindings for the woefully under-documented libusb library. I ended up falling back to the original C library itself, and found that it’s no more or less understandable as logic than Ruby or Python (although as human-readable code C sucks). So it’s a sense of, if it’s code then it’s hackable. During the spring semester I got this way with writing philosophy papers, since these papers are all supposedly supposed to be publishable. I can take apart a topic and discuss it in a learned fashion for 15+ pages (( Which points to how silly “philosophy” is as a discrete academic domain. So just say this: all knowledge-endeavor is in the domain of philosophy, but not all endeavors are sufficiently philosophically reflective. This means: there shouldn’t be any philosophy grads, but other disciplines should be required to be much deeper about what they’re doing, e.g., law. )). I’d like to get this way with electronics and maybe languages (( I know my best years for this are behind me. sniff )).

By the last I only mean that I really enjoy riding around town on my bike. I have a route to school and can get to a couple interesting neighborhoods from my home. By health I do not mean not eating Jalapeno Cheetoses. Also, Amy and I found a very cheap pizza place that delivers, called Maximum Flavor. Their flavor truly cannot be surpassed. Attempts have been made, and all have failed, with tragic, often fatal, results. Pretty good pizza.

Anyways (( I will learn the formal rule for when to use anyway vs. anyways. )), I’ll try to write here more, generally on more limited, technical topics, because “I’m just not that disclosive” (( As Joe is wont to say about himself )). Look at the timestamp on this post and you’ll get a sense of where I’m at, psychophysically. My wrists hurt and my eyes are burning/droopy.