RSSAmplifier

Blog

Vincent Gable’s Blog

my weblog.

vgable.comRSS feed ↗10 posts

Latest posts

The Most Useful Objective-C Code I’ve Ever Written

Actually, it’s the most useful code I’ve extended; credit for the core idea goes to Dave Dribin with his Handy NSString Conversion Macro. LOG_EXPR(x) is a macro that prints out x, no matter what type x is, without having to worry about format-strings (and related crashes from eg. printing a C-string the same way as […]

My UIViewController Template

I haven’t formalized this as a proper Xcode template, but this is what’s in my PrototypeViewController.m file that I copy/paste over the UIViewController subclasses Xcode makes. @interface MyViewController () @end @implementation MyViewController - (void) releaseViewObjects; { if([[self superclass] instancesRespondToSelector:@selector(releaseViewObjects)]) [(id)super releaseViewObjects]; } -…

Sneaking Malware Into the App Store

It’s happened. An app that grossly violated Apple’s terms of service (by enabling free tethering) made it through Apple’s review process, onto the App Store, and into the #2 most-popular spot before being taken down. Although this app wasn’t malicious to users, it’s absolutely malicious to Apple’s agreements with AT&T and other phone-companies. It is […]

#define String

When I need a string-constant, I #define it, instead of doing the “right” thing and using an extern const NSString * variable. UPDATE 2010-07-20 Thanks to Elfred Pagen for pointing out that you should always put () around your macros. Wrong: #define A_STRING @"hello" instead use (), even when you don’t think you have to: […]

Facilitated Learning

We made a world populated with objects that reacted to what humans did, but they didn’t interact very strongly. Whereas that isn’t enough, pure discovery learning took us 100,000 years to get to science. So you actually need learning that’s facilitated. And if you can’t make 1,000 good teachers in a year to save yourself, […]

“Ok”

It’s a small thing, but it breeds deep suspicion. Mac OS dialogs always had “OK” buttons (capital O, capital K). Windows dialogs had “Ok” buttons (Capital O, lowercase k). “Ok” buttons in Mac/iOS software are a sign of a half-assed port, by someone who doesn’t really know the platform.

“I Have No Apology”

Q: Will you apologize for investors? A: Steve: We are apologizing to our customers. We want investors for the long haul. To those investors who bought the stock and are down $5, I have no apology. –Steve Jobs, taking questions at a press conference on antenna issues with the iPhone 4 design, July 16th, 2010. […]

NSDictionary Copies It’s Keys

An NSDictionary will retain it’s objects, and copy it’s keys. Here are some effects this has had on code I’ve worked on. Sometimes you get the same object you put in, sometimes not. Immutable objects are optimized to return themselves as a copy. (But with some exceptions!). So the following code: NSDictionary *d = [NSDictionary […]

Worthless on an Unimaginable Scale

There are other App Farms we know of…. One example is Brighthouse Labs with 4568 Apps, all virtually worthless. —Zee, writing for The Next Web I have a hard time wrapping my head around that number. Nearly five thousand “apps”. Near as I can tell, it’s a solid 2% of the whole App Store. With […]

Retina Ready

The iPhone 4’s ultra-sharp “Retina Display” really is a game changer. Until now, popular computer screens have been so low resolution, they could only display crude, low density, designs. It will take a few years for such high resolution screens to filter up into the personal computer space. But if you start writing an application […]