Hacker News new | ask | show | jobs
by dissenter 6480 days ago
Having just learned Cocoa, I can tell you that you are not stupid, the design of Cocoa is stupid.

Design patterns are stupid, hence baking them into a language is stupid. And Interface Builder is very stupid.

Fortunately Objective-C isn't as stupid as C++, so once you've covered most of what makes Apple's design stupid, you can trowel over the gaps in logic with cement and forget about them.

Most platform and language designs are stupid. Sometimes I think it's an emergent case of a desire to ensure job security. Other times I just think the designers were stupid.

Programmers, who supposedly like to question authority, have a really hard time questioning the sanctity of the platforms they work on. I think many would be surprised to learn that their platforms have serious design flaws. Of course you should initialize Function A first using unrelated Function B. How else would you do it?

Part of the reason designers make bad designs is because they have to respect a history of bad designs. People are used to XML. Consequently, it's used in plists.

The antidote for worrying about whether you are stupid is to identify and express why the design of something you're working with is stupid. The next step is to realize that, whatever it is, it's there, and you have to deal with it. That's work, and that's programming as it is today.

2 comments

Can you tell me why the design of Cocoa is stupid? I'm not disagreeing with you - going through the hoops required to play more than 5s of sound on the iPhone is a pretty crap way to spend an evening.

Interface Builder is flawed - but perhaps I haven't used it enough to appreciate its strengths.

Sure. Here's the execution tree necessary to "Hello World" in Cocoa---at least as given in the Apple tutorial I followed. It's possible to cut it down, but only after you've digested all of the material Apple lays in front of you.

  main()
  |
  -> UIApplicationMain()
    |
    -> Info.plist (Never referenced by name!)
       |
       -> MainWindow.xib (Interface Builder. Contains no code!)
          |
          -> HelloWorldAppDelegate .h/.m (Not clearly indicated)
            |
            -> didFinishLaunching()
              |
              -> IBOutlet UIWindow *window
              |
              -> *myViewController
              |
              -> ControllerView (IB Nib, needs dragged connection)
              |
              -> Etc.
              |
              -> HelloWorld ?
Ok, that was easy. Now, why design patterns in general are stupid? Do you mean that all|some|few of them are stupid, or that the very idea of having design patterns is stupid?
Gives you an itch to design a system that's not stupid, huh?

My favorite, least stupid GUI system is Adobe Flex. I only spent couple of days but felt very smart using it because I could get things done quickly.