The Outside Scoop: Thoughts on Android Wear and a possible iWatch

The big news in tech today is Google’s announcement of Android Wear, a version of their Android OS specifically optimized for “wearables” like watches.

The tech media is erupting with ridiculously titled blog posts that refer to this as Google’s “answer” to the iWatch, a product that Apple has not announced, nor even acknowledged working on.

Surprisingly, for the first time I actually found one of these wearables mildly interesting, the Moto 360. But I am still skeptical of wearables in general, smart watches in particular, and especially the idea that Apple is working on one. But I’ve learned from my past mistakes, when I was convinced Apple was neither working on a smartphone in late 2006 nor a tablet in late 2009. So, in my world at least, my adamant belief that Apple is not developing a watch should probably be my biggest clue that they are.

So where is Apple’s “iWatch”? Aren’t all of these competitors eating Apple’s lunch (before it’s even cooked)? Perhaps. But consider this:

Remember the original iPod. It came into a market that already existed (but sucked), and delivered a radically superior user experience, and was a huge hit. Remember the iPhone. Once again, it came into a market that already existed (but sucked) and totally revolutionized it.

The thing is… a smart watch market doesn’t really exist (or didn’t when rumors of an “iWatch” first started to circulate). It almost seems like Apple got the wheels of the rumor mill turning deliberately, to goad their competition into creating the market, thinking they were beating Apple to the punch but in fact creating the exact environment of suck Apple needs to release a product into.

What’s that close paren doing after my video embed in WordPress?

Working on a new client site that has a lot of YouTube video embeds, I was alarmed this morning to find a stray close paren ) character in all of the posts right after the videos.

Knowing I had recently been tampering with the embed_handler_html and embed_oembed_html filters in the site theme, I figured it was something I had created. So I set about debugging my code but couldn’t get anywhere.

I decided to see if it was in fact a new problem in WordPress itself, by setting up a test post on this site with a YouTube video embed (this, of course). Sure enough, even on my unadulterated theme, the stray close paren appears.

Look at it!!!I mean, just look at it!!!

Anyway, I hope/assume this will get fixed in the WordPress core soon, but in the meantime if you are running into this problem and want a quick fix, and you’re not afraid of editing the functions.php file in your theme, have a go at this little addition that will strip out the offending punctuation:

function embed_fix_stray_parens($content) {
    return str_replace('</iframe>)','</iframe>',$content);
}
add_filter('the_content','embed_fix_stray_parens');

Update #1: I went to submit a bug report to the WordPress development team and found my report was a duplicate of this one. If I understand correctly, the close paren is actually being delivered by YouTube itself, not WordPress, via the oEmbed request. Isn’t the Internet fun?

Update #2: This really is YouTube’s problem… it even shows up in the embed code you get on their own site:

Screen Shot 2014-03-12 at 11.00.12 AM

This issue is also showing up on StackOverflow now, including a more efficient temporary workaround for WordPress sites than my own hasty solution.

A few thoughts on the holiday/winter ads by Apple and Samsung

I’ve been tweeting a bit today about Apple’s iPhone ad that is getting some attention this holiday season, along with a new one from Samsung. But I have some comments that are a bit more than 140 characters long, that I’d like to share here.

I first heard about the Samsung ad via Daring Fireball‘s link to it on YouTube. Check it out below.

https://www.youtube.com/watch?v=T8nJKWJTsUg

I’ll admit to finding the hapless iPhone owner on the chairlift a bit funny. I’m a sucker for cheap laughs like a guy dropping his expensive phone (and later his skis too) from a chairlift. But almost immediately the “Geared up” Samsung owner is creepy. Stalker creepy. He’s supposed to come off like he’s got “the moves” or something (which is creepy enough anyway), but he doesn’t seem suave so much as dripping with white privilege. He can just make the woman next to him on the chairlift give him her phone number because… why not?

The next scene is what really bothers me: he takes a bunch of photos and video of her on the ski slope, without her permission or knowledge. Because… why not? And when he goes up to her at the bottom of the hill to show off his efforts, she’s not creeped out (or is she… maybe… just a little?) because… he’s a handsome white dude who’s all “Geared up” so of course it’s OK.

Of course it’s really not OK. In so many ways, it’s not OK. If this guy were a real person, I’d have plenty more to say about him, but he’s not. He’s an actor, playing a role, attempting to sell a product made by Samsung. So let’s talk about Samsung’s advertising efforts and how sexist they are. Fortunately for me Anjin Anhut already did (in more general terms, but this Samsung ad certainly fits the bill) in a great blog post on Saturday that I encourage you to read.

Let’s contrast the Samsung ad with Apple’s ad, entitled “Misunderstood”:

http://www.youtube.com/watch?v=ImlmVqH_5HM

I have seen this ad at least 5 times now and every time I tear up. Do I feel that my emotions have been manipulated? Of course. This is a commercial. That a commercial would make me tear up… of course my emotions are being manipulated. But that doesn’t necessarily make it a bad thing.

Apple’s ad connects on an emotional level, because that’s where we are with this technology today. Both Apple’s and Samsung’s devices can do so many of the same things, and fill the same needs and desires in their users’ lives, that it’s really down to how we as the users of these products connect with them on an emotional level. That’s really what Samsung’s ad is trying to do, I think. It shows off more specific technologies than Apple’s ad does, but ultimately it’s connecting with its audience on an emotional level as well. But the audience, and the emotions, couldn’t be more different.

There is nothing sexist or creepy about Apple’s ad. It delivers an image we’re all used to seeing these days: the tech-loving teenager, apparently tuning out the people around them and the meaningful experiences they should be engaging in. But the teenager is misunderstood—he’s not tuning out. He’s capturing fleeting, magical moments in his family’s life and he’s creating… putting those moments together into an artifact the family members will be able to connect with long after the holidays end. It’s a commercial that can resonate with just about anyone. It surprises and delights, and it shows us how using an Apple product can help enrich the experiences that matter to us. (It is an ad, after all.)

The Samsung ad? Well, first of all, the ad is targeted at a very specific demographic. It’s an ad for dudes. Want to impress and seduce that hottie next to you on the chairlift? Samsung has just the tech to help you make that happen. Frankly I’m surprised they didn’t license Daft Punk’s “Get Lucky” just to underscore the message.

On one hand I find it kind of surprising that any company would think they could get away with running an ad like this today, but the fact is, it’s not surprising at all. This kind of advertising obviously works. It may alienate a huge potential audience but as Anjin Anhut’s blog post describes, it has identified a target audience and is more effective within that audience.

The problem with that strategy though is that the more you target an audience, the smaller it becomes. It may be a subset of the population that is far more likely to buy your product than the average, but you become increasingly confined to that narrow slice of the pie. Unless of course you run different and contradictory campaigns simultaneously (which happens all the time). But still, ultimately, you’re eventually going to reach a saturation point with that target market. Then what? You can retreat to a broader message, but how much damage have you done (not just to your business, but to the community) by that point? And was it really necessary in the first place?

Say what you will about Apple’s advertising, but I don’t think I’ve ever seen anything sexist, racist, or otherwise exclusionary—except of Windows users.

How to install Windows 8 on a MacBook Air

No longwinded backstory in this post. I’m just posting this here so I can remember it if I ever have to install again, since I seem to keep forgetting.

If you’re trying to install Windows 8 (or Windows 7) on a MacBook Air, and you boot to the Windows CD (from a SuperDrive, of course), you may find that when you try to select the BOOTCAMP partition, you get an error stating that Windows can’t be installed on this drive, because it’s in GPT format, and you need to have an NTFS partition.

Well, it doesn’t matter if you have that partition formatted as NTFS or not. The error is happening because of the way you booted up!

Quit the installer, and restart, holding down the Option key. Then when the disk selection comes up, don’t select the Windows installer, select EFI Boot instead. That’s it!

WordPress tip: A simple way to search all post types

I love WordPress, but its huge designer/developer community and extensible structure have made it possible to over-engineer a solution to just about every problem. And then under-document that solution.

Case in point: today I needed to add the ability to search across custom post types, along with pages. But by default search only searches posts. (That is, the “post” post type. Are you with me?)

This isn’t a new problem, even to me, although very few of the sites I build have (or need) internal search. It’s just not that useful on a site that doesn’t have hundreds of pages or posts, and most of the sites I build don’t.

In the few times in the past when I needed to be able to search across other post types, or other content like taxonomy data, I’ve relied on the Search Everything plugin. And judging by the fact that (as of today) it’s been downloaded 555,309 times, clearly I am not alone.

It’s a pretty good plugin, as plugins go. But it can be overkill, especially if all you need is the ability to search other post types.

And that’s where we run into the real, multifaceted problem with WordPress for developers: 1) there’s a plugin (no, make that dozens of plugins) for just about every obscure task, and 2) there are also several ways to go about building your own custom solution, especially if you’re building your own theme, but 3) the documentation is all over the place, and none of it is comprehensive.

Granted, by offering a targeted solution to a very specific problem in this blog post, I’m contributing to that documentation fragmentation, but whaddayagonnado.

There’s a fourth (and probably even more important) facet as well: plugins are developed independently by countless individuals (of varying degrees of skill), and it’s impossible for anyone to test them all for interoperability. The more plugins you install — especially if they’re excessively complex for the problem you’re intending to solve — the greater the chance you’ll introduce an incompatibility that will break your site. So it’s in your best interest to try to keep things as simple as possible. (And to err on the side of installing fewer plugins.)

tl;dr

If I understand correctly, every parameter in WP_Query can be passed in the query string, which means you can add corresponding input fields into searchform.php in your theme to modify the search functionality.

OK, now that was too simple (and abstract). Give me an example I can work with.

Here’s a one-line solution to get WordPress to search all of your post types (even custom post types), not just “post”-type posts. Add this into the form in searchform.php:

<input type="hidden" name="post_type" value="any" />

Guess what… you can also specify multiple specific types of posts using PHP’s method of using square brackets in your input name to pass in data as an array, like this:

<input type="hidden" name="post_type[]" value="foo" />
<input type="hidden" name="post_type[]" value="bar" />
<input type="hidden" name="post_type[]" value="baz" />

A caveat: I tried the above with page as one of the values and it didn’t work; it showed my custom post types, but not “page”-type posts. I suspect it’s because that’s one of the predefined type parameters that make the query behave slightly differently. So this solution isn’t perfect, but using any as the value will work: it gets “post”, “page” and your custom post types.

My goal was to have a simple search form that would just search all post types, so I made this a hidden field, but you could make it radio buttons, checkboxes or a select menu if you wanted to let the user pick, and this just scratches the surface of what you can do to customize your search form to leverage the capabilities of WP_Query.