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.

Last, This, Next

As I was folding a week’s subset of my embarrassingly large collection of printed t-shirts, I reflected momentarily on the history of my pixelated Minnesota t-shirt. I bought that t-shirt last summer and wore it each time I went to the Minnesota State Fair last year, as my symbol of “Minnesota pride”.

Then I started thinking about sharing this story, and about referring to the Minnesota State Fair that took place in 2013 as the “last” Minnesota State Fair, and how the one that will take place “this” year, in 2014, is “this” State Fair, and so on.

Frequently conversations between SLP and me have resulted in confusion based on the different possible interpretations of “last”, “this” and “next” when referring to days, weeks, months, years or events. I tend to use “this” when I’m referring to any unit of time that occurs within the same larger unit of time, whether before or after the current one, although I may be likely to omit “this”.

For example, today is Thursday. The Super Bowl (or, if you prefer, the Suberb Owl) is happening in 3 days. It’s happening “this Sunday”. But what if today was (or is it “were”? I never get that right, either) already “Superb Owl Sunday” and I was (“were”?) talking about the 5K race I’m running in 7 days later? “This” Saturday seems a bit far off in that case. But “next” Saturday doesn’t feel right to me either. Or does it? Is it better for “next” Saturday to refer to a day that’s 6 days away, or 13?

As for my confusion with SLP, the fact that she lived her life on the September-to-June academic calendar for much longer than I did only exacerbated the situation. I’ve always been a stickler (to the point of ridiculousness) for precision in dates. The first day out of school isn’t the beginning of summer; the solstice is. The first day back in school isn’t the beginning of fall; the equinox is. And the first day back in school in late August or early September most definitely is not the beginning of the new year. (Although yes, Rosh Hashanah usually does occur in September so depending on the calendar you use, there’s an argument to be made.)

Ironically, it was only after SLP stopped organizing her life around the academic year that I embraced calling any of the days in early-to-mid June when our kids are out of school (but which are still technically in spring) “summer”, but I will never give up the idea that “this year” refers to the 4-digit number starting with a “2″ that comes at the end of the current date. “This year,” to me, means January 1 to December 31. Period.

But what do I mean when I say “this winter”? Sure, winter technically only starts about 10 days before the new year, so it’s almost entirely in 2014. But let’s be honest. In Minnesota, “winter” usually starts in early December, or sometimes as early as October. By my logic, “winter” in Minnesota begins on whatever day snow falls and doesn’t melt away. We had a few light snows in November, but “this winter” began on December 2, 2013.

My point is: language is fuzzy. Assigning vague labels like “last”, “this” and “next” to our days and events relies on a great deal of tacit agreement between ourselves over meaning. This particular quirk of our language has been causing me trouble since I was a kid. Back then I had a lot of time, sitting around bored in school (which I didn’t even realize was the case until much later in life), to ponder and obsess over and get annoyed by things like this. I was trying to create in my mind a world of precision and clarity that didn’t, and couldn’t, exist. Our minds don’t work that way, the world doesn’t work that way, and language, a product of our minds used to help us understand and communicate with each other about the world, necessarily can’t work that way.

I didn’t understand that then, and I only barely do now. Each of us carries around an entire universe in our mind. It’s built on a foundation laid by our genes and constructed around our experiences — and our interpretations of those experiences. Our language can only achieve an approximation of a fraction of that universe, and we have to rely on the assumption that our own version of the language we use is a close enough approximation of the same things in our own mental universe as the language, and the mental universe it represents, of the others around us.

It’s a wonder we can communicate at all.

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.

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”:

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.

Top 5 Albums of 2013

I’ve given it a lot of thought. OK, I’ve given it some thought. OK, I’m actually just making it up as I go. Whatever the case, here are my picks for the best, or at least my favorite, albums of 2013.

5. Phoenix — Bankrupt!
I really got into Phoenix right after Wolfgang Amadeus Phoenix came out in 2009 and had thoroughly explored their back catalog while eagerly waiting… And waiting… And waaaaaaaaiiiiiting for the follow-up. Was it worth it? Absolutely. I wouldn’t say the album is a masterpiece; it leaves me wanting something. But it’s still fantastic, with some truly amazing musical moments and some compelling lyrics that reflect on the band’s struggles with its newfound fame… you know, when they got so big that even people like me knew about them.

4. Midlake — Antiphon
Remember what I said about a band being big enough that even I known about them? That probably goes double for Midlake, a band I just learned about last weekend, when the title track of this album played on The Current as I was driving to IKEA to buy a couch. (I wish I were making this up.) Two things immediately drew me in about Midlake: the incessantly burbling drums, and the amazing harmonic detours in the second half of the song.

As soon as I parked the car I went on iTunes on my phone and bought the whole album, which I then listened to twice through while assembling the couch. It’s all great, with several sections (especially those with acoustic guitar and flute) reminding me of Trespass-era Genesis. Except without the preposterous lyrics about anthropomorphized wolves. I’d probably rate this album higher, but I haven’t known it long enough to see how well it holds up.

3. Lusine — The Waiting Room
If the ranking criteria on this list were solely based on how many times I’ve listened to an album, this would undoubtedly take the top spot. I’ve had it on heavy rotation while I work over the past few months, because its low-key grooves are just right to keep me going without being too distracting. Which is not to say it’s background music. I’d describe it as a more listenable (i.e. less weird) Boards of Canada.

2. The Darcys — Warring
There’s only been one album this year that I’ve anticipated more than Phoenix’s Bankrupt! and that’s Warring by The Darcys. The Darcys are one of the few bands that I’ve ever heard that I think might make it big that I’ve known about and gotten into before that happened. I hope it happens for them, in the right way, because they’re really great.

Or to put it another way, they’re my second favorite Canadian band of all time.

I first learned about The Darcys because their second album, last year’s AJA, was something that could have come off as a cheesy stunt. Does that name sound familiar? That’s because it’s also the title of what is arguably Steely Dan’s best album, from 1977. The stunt? This is Steely Dan’s 1977 album, reinterpreted in its entirety in Darcys style. Which is to say, much darker. There is a bleak beauty in The Darcys’ vision that in some ways better suits the desperation in the album’s lyrics than Steely Dan’s original too-smooth-for-its-own-good style. (And I say that as a huge, unabashed Steely Dan fan.)

Anyway… The Darcys released both their self-titled debut and AJA for free on their website, which definitely helped build their audience and the anticipation for Warring, which is all original material, and is utterly fantastic. Unlike Midlake’s album, it didn’t blow me away on first listen, but it only took two or three repeats before the brilliance of the album unfolded and revealed itself. You really need to hear the album in its entirety, but if you only have the patience to check out one song, I’d recommend “Horses Fell.”

1. Nine Inch Nails — Hesitation Marks
There was some criticism for Trent Reznor’s decision to work with a major label for Hesitation Marks and even more for his blunt response to anyone who might complain about it. But that can’t change the fact that it’s a pretty brilliant album.

I was never much of a Nine Inch Nails fan in the earlier, noisier days. There was just too much adolescent angst in the lyrics, and, well, just too much noise. But that all changed for me when Year Zero was released, and I have since been absolutely blown away by the genius soundtrack work Reznor and Atticus Ross did for The Social Network and The Girl with the Dragon Tattoo, enough so that I actually pre-ordered this album on CD as soon as I knew it was coming.

I saw Nine Inch Nails in concert for the first time this fall on the opening night of their current tour. It was definitely the most intense concert I have ever experienced, and quite possibly the best. The music translated amazingly well to a live setting, and the light show and energy in the performance were like nothing I could even have imagined.

For the concert experience, as much as the music itself, I have to give this album my top ranking for the year. It’s definitely left the biggest impression on me of anything I’ve encountered in the past twelve months.

And while we’re at it…

Although I would never elect any of it to my top 5 list, I actually recorded a ridiculous amount of original music this year, beginning with the January release of 8-Bit Time Machine, my semi-autobiographical sci-fi rock opera. (Yes, seriously.) That one was actually recorded in late 2012, but I followed it up with The Picture of Dorian Mode, composed and recorded entirely on my iPad over a single weekend in February. Then in April, when winter refused to go away, I recorded an EP called Soundtrack for an Endless Winter. In July I finally upgraded to Logic Pro and learned the ropes by recording another EP, cleverly (or maybe not) titled Amateur Logic. I followed that with the year’s biggest project, Falling, in September. For three weeks I sketched out at least one new song idea every day, and when I had nearly two dozen sketches, I refined the best of them into what I think may be my best work to date. (And this doesn’t even touch on the monthly “Figures” EPs I cranked out for the first half of the year.)

Top 5 Albums of 2013: The Contenders

Yeah, I’m still doing this. So let’s go!

Here are the new albums I’ve added to my collection in 2013, and are therefore contenders for this year’s list…

another cultural landslide — last days last days
Atoms for Peace — Amok
Boards of Canada — Tomorrow’s Harvest
Caroline Smith — Half About Being a Woman
The Darcys — Warring
David Bowie — The Next Day
Disappears — Era
Joe Satriani — Unstoppable Momentum
Justin Timberlake — The 20/20 Experience (1 and 2)
Lusine — The Waiting Room
MGMT — MGMT
Midlake — Antiphon
Nine Inch Nails — Hesitation Marks
Nitemoves — Themes
Phoenix — Bankrupt!
Steven Wilson — The Raven That Refused to Sing (And Other Stories)
Toro y Moi — Anything in Return
Washed Out — Paracosm

Honestly… I’ve heard some really great new music this year, although my range of styles has narrowed in considerably on “chillwave” electronic music and surrounding genres. And while not completely homogenous, almost all of the artists are men, and almost all of them are white. I regret this, but it is what it is. And what it is, is, the music I listened to a lot this year, which is a reflection of me.

My heart isn’t quite in this whole process as much as it has been in years past. (Also, I just don’t have time.) So let’s cut to the chase. My top 5 albums are in bold above. But in what order? That will come in the next post.