top | item 6372466

How Apple hides new functionality in iOS: isYoMamaWearsCombatBootsActive

200 points| doh | 12 years ago |github.com | reply

115 comments

order
[+] cpeterso|12 years ago|reply
BeOS had is_computer_on() and is_computer_on_fire() APIs:

  int32 is_computer_on(void)

  Returns 1 if the computer is on. If the computer isn't on, the value returned
  by this function is undefined.

  double is_computer_on_fire(void)

  Returns the temperature of the motherboard if the computer is currently on
  fire. If the computer isn't on fire, the function returns some other value. 
http://www.tycomsystems.com/beos/bebook/the%20kernel%20kit/s...
[+] kenrikm|12 years ago|reply
Another Good one from Objective C:

2012-08-31 00:26:19.773 App[1676:907] * -[__NSCFCalendar components:fromDate:toDate:options:]: fromDate cannot be nil

I mean really, what do you think that operation is supposed to mean with a nil fromDate?

An exception has been avoided for now.

A few of these errors are going to be reported with this complaint, then further violations will simply silently do whatever random thing results from the nil.

Here is the backtrace where this occurred this time (some frames may be missing due to compiler optimizations):

[+] undoware|12 years ago|reply
Without getting into the IT-sexism-blah-blah, 'your mother wears combat boots' isn't just a folksy turn of phrase: it's a fifties-era impugnment of lesbianism. So unless you want to sound a lot more Republican than you were probably intending, you should probably stop wondering why you don't have more female friends, coworkers, and partners. And by the way, a foot in the mouth is so gay.
[+] austinl|12 years ago|reply
Here's another easter egg - it's a sarcastic warning if you try to perform date operations on a nil date:

" -[__NSCFCalendar components:fromDate:]: date cannot be nil

I mean really, what do you think that operation is supposed to mean with a nil date?

An exception has been avoided for now.

A few of these errors are going to be reported with this complaint, then further violations will simply silently do whatever random thing results from the nil. Here is the backtrace where this occurred this time (some frames may be missing due to compiler optimizations):"

Source: http://stackoverflow.com/questions/12505833/what-kind-of-sar...

[+] simias|12 years ago|reply
I don't understand, what does this function do? Is it a reference to something? Or just a simple easter egg?
[+] oleganza|12 years ago|reply
Apple ships iOS beta builds before announcing new hardware. They obviously don't want to leak information about new functionality like HDR support too early. So they use a special string "YoMamaWears..." meaning of which is known only to people in the appropriate team. Then, when iPhone 5s is finally released, they easily find-and-replace the obfuscated methods with proper identifiers.
[+] Aqua_Geek|12 years ago|reply
They’re masking new features with ”creative” variable/method names.
[+] InclinedPlane|12 years ago|reply
It's a feature flag, but it's one that user's don't have easy access to. Pretty much every big software company does this, because it's a very effective way of testing new code. I know MS, Amazon, and Google all have tooling designed to facilitate just this sort of thing.

Let's say you've rewritten core parts of some system, but you've also added new features that didn't exist before. Often times such changes are inextricably bound together. On the one hand you may want some users to test out the new code to make sure it works correctly, but on the other hand the new features you've added may not be fully "baked" so you want to restrict their use. That's where secret feature flags come in.

[+] stigi|12 years ago|reply

  - (BOOL)yoMamaWearsCombatBootsAutomaticallyWhenAvailable;
priceless!
[+] ultimoo|12 years ago|reply
I wonder whether Apple will decide to change their strategy of aggressively guarding upcoming products before they are launched, under Cook's leadership.

I was following a couple of 'rumor' blogs prior to the iPhone launches earlier this week and I believe they had managed to 'leak' and publish details on the iPhone 5C and 5S pretty spot on.

EDIT: rather than referring to the variable names in the OP, I'm referring to the more overarching strategy of guarding the features of their to-be-launched products.

[+] easyfrag|12 years ago|reply
I doubt it, that's more of a cultural thing instilled by Jobs, it's sort of entrenched as the "Apple way" of doing things. Big Cultural changes in an org typically come about when things are going badly.

The leaking is going to be hard to stop because Apple largely outsources its manufacturing and is now closely watched (compared to pre-ipod and iphone days). It's hard to enforce secrecy along the entire process when the process is run by third parties and spread around the world.

[+] breakall|12 years ago|reply
I wondered the same thing, especially after Phil Schiller's comment: "a few of you probably saw some shots on the Web...and that's cool!"
[+] Zecc|12 years ago|reply
Also isYoMamaWearsFancyGlassesDetectionEnabled
[+] jheriko|12 years ago|reply
if you ever investigate the call stacks when there is a crash in their stuff from wrong parameters you can find all kinds of weird names. I'm still wondering what the purple coloured port is :)
[+] plainOldText|12 years ago|reply
The method's name is actually "isYoMamaWearsCombatBootsSupported". That being said, it's nice to see developers at big companies having fun.
[+] rabino|12 years ago|reply
Fancy Glasses = iPhone5S Combat Boots = iPhone5C ???
[+] protomyth|12 years ago|reply
Must be a tradition, the old Newton had some interesting names for functions in its API dealing with horses.
[+] CrankyPants|12 years ago|reply
Well, that Myriam dude's going to be upset.
[+] mukundmr|12 years ago|reply
I think it is a nice way to do it. :)
[+] grbalaffa|12 years ago|reply
Yo Mama thinks it's a nice way to do it, too!
[+] DominikR|12 years ago|reply
I definitely love those kind of easter eggs.

There are also similar methods in the Android SDK:

UserManager.isUserAGoat() link: http://developer.android.com/reference/android/os/UserManage...

Log.wtf() link: http://developer.android.com/reference/android/util/Log.html..., java.lang.Throwable)

AdapterViewFlipper.fyiWillBeAdvancedByHostKThx() link: http://developer.android.com/reference/android/widget/Adapte...

[+] danabramov|12 years ago|reply
There is also WTF in WebKit source.

It stands for Web Template Framework, but it's funny it appears all the time in crash reports:

http://google.com/search?q=wtf+webkit+crash

For example:

    Thread 2 name:  WebThread
    Thread 2 Crashed:
    0   JavaScriptCore                  0x32a97d46 WTF::StringImpl::hash() const + 42
    1   JavaScriptCore                  0x32a97c6a WTF::HashTable<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor<WTF::StringImpl*>, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >::lookupForWriting(WTF::StringImpl* const&) + 18
    2   JavaScriptCore                  0x32a9b028 std::pair<WTF::HashTableIterator<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor<WTF::StringImpl*>, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >, bool> WTF::HashTable<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor<WTF::StringImpl*>, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >::add<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityHashTranslator<WTF::StringImpl*, WTF::StringImpl*, WTF::StringHash> >(WTF::StringImpl* const&, WTF::StringImpl* const&) + 448
    3   JavaScriptCore                  0x32a9ae30 WTF::AtomicString::addSlowCase(WTF::StringImpl*) + 96
    4   WebCore                         0x31bade0c WebCore::AtomicHTMLToken::initializeAttributes(WTF::Vector<WebCore::HTMLToken::Attribute, 10ul> const&) + 232
[+] nwh|12 years ago|reply
There's been balmy little bits of stuff like this all the way through OSX and iOS for ages, though maybe not quite as flippant.

Every Mac has the kernel extension "Dont Steal Mac OS X.kext" for example, which loads into RAM a short poem.

    There once was was a user that whined 
    his existing OS was so blind, 
    he'd do better to pirate 
    an OS that ran great 
    but found his hardware declined. 
    Please don't steal Mac OS! 
    Really, that's way uncool.
[+] saurik|12 years ago|reply
These are not the same, as these are left in production. The code names in the iOS binaries were later replaced by their real functionality as it no longer needed to be secret.
[+] downandout|12 years ago|reply
I love how wtf, in Androidland, stands for "What a Terrible Failure"
[+] frank_boyd|12 years ago|reply
I'd be interested to see the "easter eggs" that drain the battery within 12 hours.
[+] andyhmltn|12 years ago|reply
12 hours is a good battery life is it not? Admittedly, the iOS7 BETAs have cut my own down to the point where I have to make sure my phone is on 100% before a 4-5 hour night out so I know I'll have battery to use it by the end of the night.

Although I suspect that'll be fixed post-beta

[+] unknown|12 years ago|reply

[deleted]

[+] GoldfishCRM|12 years ago|reply
Dont care. It puts a smile on my face and some developers and smiling developers are a good thing.