
Learning versus Attitude - danw
http://pastie.org/273248
======
dissenter
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.

~~~
comatose_kid
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.

~~~
dissenter
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 ?

~~~
greyman
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?

------
thomasmallen
I couldn't get ten hours of sleep if I tried, even after a day of physical
labor. Six is a good haul on the average night for me.

~~~
dgabriel
I'm the opposite. I could easily sleep twelve hours a day, but life conspires
against me, so I get 7. I heartily endorse well-restedness for learning.

~~~
azharcs
12 hours is half a day(or night), if given a chance you would have slept half
of your life. ;)

