BBQ

One of the side-effects of BBQing some meat is a great deal of strongly aromatic smoke. If you’re manning (or just near) the grill, this tends to soak into you; as a result, you trail a cloud of BBQ scent for the rest of the day.

I suppose you can divide the world into those who consider this a problem, and those who consider it a bonus.

Posted in Jack Handy | Comments Off

Math

Saw this article on Slashdot today, and found it interesting. It’s a longish cri de coeur about the state of mathematical education, and about the widespread misunderstanding of what math is. (Short version: Math is primarily an art form, like music or painting, with incidental practical applications. Real mathematical activity concerns the derivation of new results, not the application of known formulas. It cannot be learned without being done, and should be done early, not reserved for grad school.) Worth a look. Similar remarks might apply to other disciplines.

Posted in Jack Handy | Comments Off

UIPickerView (resizing)

One of the prettiest built-in views on the iPhone is the UIPickerView, which presents a slot-machine-like list of options. Unfortunately, this view isn’t particularly easy to use, as its default presentation takes up quite a bit of screen real-estate, and it’s not obvious how to resize it. Today, I’d like to talk about how to tame this view.

Continue reading

Posted in iPhone | Comments Off

Recommended: The Periodic Table

The Periodic Table of Science Fiction, that is. If you’re curious, while I wouldn’t say that Vanadium is my favorite, it is the one I remember the best some 7 years after reading its entry for the first time.

Vanadium is an essential element in the diets of chickens.

Posted in Jack Handy | Comments Off

Accountancy!

It’s fun to charter an accountant,
And sail the wide accountan-cy.
To find, explore the funds offshore,
And skirt the shoals of bankruptcy.
It can be manly in insurance.
We’ll up your premium semi-anually.
It’s all tax-deductible,
We’re fairly incorruptible.
We’re sailing on the wide accountan-cy.

Continue reading

Posted in Jack Handy | Comments Off

Best Intentions

I recently ordered a copy of Dale Carnegie’s “How to Win Friends and Influence People”, for an upcoming Book Club project. Taking Paul Graham’s advice, I ordered a pre-1960’s copy – specifically, a 1938 edition. Being a used book, it turned out to carry some interesting mementos of it’s former owner, including a reminder that it’s not always easy to follow through on one’s plans.

Continue reading

Posted in Jack Handy | Comments Off

No, it isn’t

Envelope

Posted in Jack Handy | Comments Off

Deep Copying

Yesterday, we discussed loading a (mutable) plist from disk. To review: there are built-in Cocoa functions that load plists, but they return immutable data structures. (Happily, Core Foundation functions exist that can create mutable plists from XML files.) Suppose you wanted to create mutable structures from the immutable ones returned by the Cocoa functions? The built-in mutableCopy functions only do shallow copies, so you’d have write a little code. To which we now turn.

Continue reading

Posted in iPhone | Comments Off

Mutable Plists

Property Lists, or plists, are collections of strings, numbers, booleans, dates, base64 data, arrays, and dictionaries (associative arrays). They are a standardized, flexible data structure used (among other places) throughout Mac OS X. Plists are stored as XML files on disk, and Cocoa provides several methods to load them into memory. Unfortunately, the most common methods return immutable plists, which can be inconvenient to convert to mutable data structures. Today, I want to present a quick-and-dirty way to way to load plists as mutable structures.

Continue reading

Posted in iPhone | Comments Off

viewWillAppear

Some posts are of general interest, some are more narrow in their focus. This is a small post, on a specific question, to which I don’t even have all the answers. But if you’re working with Cocoa on the iPhone, and having problems with viewWillAppear (or anything else in the view*[Aa]ppear family), have I got a post for you.

Continue reading

Posted in iPhone | Comments Off