April 1, 2012
MarkBernstein.org
 
Follow me on Twitter

Day 5

Day 5

Settled yesterday’s “where do we put the controls” question for now by opting for a top bar and sticking with painfully standard controls.

A lot of logic had wandered into the AppDelegate for lack of a good home. Most of this was refactored to a new SSPTextViewController, which also now manages the Browse Links popover. Some new classes might help encapsulate some of the uglier Cocoa objects, things like moving between C strings, C++ std::string, CFStringRef and NSString.

Mac OS X Lion replaces Cocoa memory management, which was a bear, with automatic reference counting (ARC), which is a big win. But ARC is no panacea. In principle, most of the time it “just works” and programmers can pretend that all objects will get magically collected. In practice, the exceptions are close enough to the surface that it seems like you really need to know what you’re doing, and what ARC is doing, to get things right. As with the old memory management style, I can’t imagine how casual or novice programmers cope with this. Hell: I’m having quite a time with _bridge_retained and its friends myself!

Day 5

Good and long day of programming, punctuated by Storyspace authors who are already urging ever-earlier deadlines and some conference-review headaches. Full-screen works, controls work, menus work.

Status:25 classes, 17 tests.

To reward myself for hard work, knocked off early for 10PM showing of The Hunger Games.