[devlunch]

The Red Bull cans are starting to pile up here at the Smart.fm offices. We’d been pounding them down while pulling all-nighters in preparation for our big relaunch.

As any desperate college sophomore during midterms will tell you, things start to get weird around can 3 or 4. For us, its blurred vision, imagined 500 errors, visions of Barry Manilow — You know, the usual.

Last night, though, three bulls in, I made a huge mistake.

BOSS

Its name was BOSS: canned coffee served HOT from a vending machine (one of the perks of being in Japan). It tasted only of the heat sloshing inside its aluminum frame. It filled my heart with darkness.

The last thing I remember is coming-to hours later. TextMate was still open, but with the following text sitting unsaved as “Untitled 62”:


  • Tonight is your 10-year high school reunion, and you’ve decided to go at the last minute, after hearing rumors about your girlfriend from 9th grade being in town after breaking off her engagement with a prominent European industrialist. Dmitry something-or-other. After a poorly-informed scotch on the rocks, and an even more poorly-informed subsequent glass, you now find yourself in the back corner of the newly-renovated school gym, chatting it up with your old lab parter from junior year. And then you spot her, from across the dance floor: Beth Vanderhoof. Not having talked to her since that New Year’s party in 2003, you’re at a severe loss for conversational matter. You whip out your iPhone, launch the Smart.fm application, and open up a list of “Italian Phrases”. You casually walk up and greet her with your best Buona Notte. (So suave, so confident). She giggles and gets your name wrong. You smile awkwardly as she excuses herself.

  • Oh sh*t! You’re surrounded by ninjas! Looking to create a diversion, you bust out the Smart.fm iPhone app and go into your goal “Learn How to Evade Zombies, Ninjas, and Pirates”. You show them a picture of a smoke bomb and yell out “Smoke Bomb!” for some reason. It doesn’t work. Study harder next time, kid.

  • Sitting in a park on a beautiful day in April, you notice a herd of gazelle stampeding towards you, 400 meters off—and gaining. You calmly pack up your picnic lunch of a ham and cheese sandwich on a toasted garlic ciabatta roll with chips, and consult your trusty Smart.fm app. “Ah yes! Hip Hop Artists!”, you announce to yourself, “Surely this will come in handy.” Seconds into your study session, you’re promptly trampled by the charging animals. After months of rehabilitation, you take a hefty judgement from your suit with Municipal Parks Services and fly out to LA to cut your first rap album. “I knew this would come in handy”, you say to yourself, as T-Pain busts it out on the second verse. You go double platinum on the album. Pitchfork gives it a 6.7, citing “pedantic pop sensibilities” (whatever that means). Can’t win ‘em all.

  • Your dog somehow figures out how to speak Korean. At least you think he’s speaking Korean; it’s been ages since your college course in Asian studies, which if we’re going to be honest with ourselves, you only took to satisfy your humanities requirement. Anyway, little Gompers is there, belting out the occasional phrase. “아직도 너의 소리를 듣고!”, he barks. Smart.fm iPhone app in hand, you find a list of useful Korean phrases, playing the audio from your speakers. After going through a few formalities, Gompers grows bored, and trots off into the next room, where he pees on the cat’s bed.

In Summary


Available on the iPhone App Store

Happy Halloween! / ハピ ハロウイン!

Posted by: Mattt Thompson on: October 30, 2009

Spooooky Halloween Burger, complete with のり eyes and a Dorito™ smile

Halloween around Shibuya is, at times, redundant. With fashion as it is around here—big hair, glossy lips, and hipster nonchalance—everyday is like Halloween.

Halloween is the one day every year when everyone gets a chance to try on a new identity. A chance to explore another side of ourselves without the crushing fear of embarrassment or rejection. It’s the one day we collectively begin to understand that all of life is performative, that we’re always in costume. Just like the kids bopping around Shibuya.

Pictured above is the seasonal special of JayZ’s Burger, a joint not far from where a few of us live that we discovered last month. As far as we know, the restaurant has no official connection to the eponymous rapper. We’re not entirely convinced.

So yes, the burger. This Jack-O-Lantern burger came with のり eyes, lettuce, tomato, and bacon, complete with a toothy Dorito™ grin. Defying modern physics, no less than a quart of some sort of pumpkin paste filled the space of a normal double quarter-pounder, smothering everything in its wake.

Not to break the gourmet spell, but I’ll admit that its most endearing features by its looks became its greatest detriment after biting in. Those のり eyes? One got stuck between my upper lip and teeth, and the other found its way to a very “blocking-my-windpipe” kind of location. And the pumpkin filling? I shudder at the memory.

In service to the overarching Halloween narrative, I learned a lot from this little guy. When we explore these other identities, these various paths and possibilities, we risk forgetting about what matters deep inside. The meat, if you will.

A painful, ¥1300 lesson, indeed.

(More food and development posts to follow)

A Farewell to Interns + An Aquarian Exposition

Posted by: Mattt Thompson on: August 14, 2009

A few weeks ago, in those non-earthquaking days of early August, smart.fm welcomed three pretty amazing interns to its ranks. You’ll remember Sophian from last week’s Potluck List Wednesday, and if you’re active in the user forums, you probably already know Liam and Kent.

Though it pains us to see them go, Liam and Kent left earlier this week, off to their respective academic institutions. (Lucky for us, Sophian will be staying here for a while—stay tuned for more great things from him!) Anyway, we wish them both the best in their upcoming fall semesters.

woodstock-banner

An Aquarian Exposition

Just as he was on his way out, Kent turned to me and handed me an e-mail. Yes—you read that correctly. He handed me an e-mail. No, not a printout—an actual message spelled out in electrons. I know, it sounds amazing, but he literally handed me a sequence of bits, much as a veteran quarterback masterfully laterals to the TE after faking the handoff on a 4th and Goal. Just like that…bam, it was there in front of me, on my desk. We get only the best and brightest here at smart.fm (hence the name), and certainly the supernatural ability to control the electrostatic force is qualification enough.

Where was I…

Ah yes, so Kent-san gives me this e-mail, and low-and-behold, it contained the following, very topical list:


Woodstock
Today’s Special List
Woodstock!

Woodstock was three-day music festival in upstate New York that began on August 15th 1969, forty years ago today. For many, Woodstock remains one of the defining experiences of 60’s hippie counterculture with it’s emphasis on peace, love, and music.

Join smart.fm in celebrating the 40th anniversary of this momentous occasion by studying all of the great musicians who lent their voices not only to Woodstock, but to an entire generation.


もう一度日本語

ウッドストック は1969年8月15日から18日までに行った音楽フェスティバルでした。ヒッピーカルチャーにとって大変大切なイベントでした。


Woodstock
今日のスペシャル一覧
ウッドストック!

Coke or Pepsi? Yahoo!

Posted by: Gee on: August 9, 2009

There was an interesting post this weekend at techcrunch about a search engine blind test up at blindsearch.fejus.com. Aside from the interesting point about the Google logo artificially increasing perceived quality in previous tests, Arrington notes that he consistently chooses Yahoo! as having the best results. Search is something that every web company needs to watch closely, and that’s no different here at smart.fm. In our case, we’ve consistently seen better results coming from Yahoo! and Bing, and strangely not Google. Note: our proxy for quality is not just how high smart.fm ranks =)

Here’s a quick test with our favorite navigational query, `smart.fm`:

smart.fm query

Guess Who?

Our root domain shows up first across all three searches, which is good. The left-most column then takes a trip ’round the world, hitting up Australia, Indonesia, and Romania along the way. Then we get back to smart.fm’s facebook page, and other relative results. The middle column seems to catch a good variety of smart.fm related sites. Our devlunch blog, our developers’ portal, and our 3rd party application gallery are all in the top results. Very useful for anyone looking to find out more about smart.fm! The last column gives arguably wider coverage, venturing to cover our snazzy intro video, @nov’s github repository, and a couple of third party blog posts talking about our service (good reads! lifehacker | adaptivepath). Less honed in on smart.fm, but still relevant content. Of the three, I felt the middle column was a clear winner.

On with the results:

smart.fm query

Yahoo!

Yahoo! it is. If you’ve got your own site, or have been making the rounds with Yahoo!, Bing, and Google lately, what are your qualitative impressions?

東京のCoffee – Chapter 1: Bar Del Sole

Posted by: Mattt Thompson on: August 6, 2009

Bar Del Sole Intro

Bitter is often the divide between coffee-drinkers and tea-drinkers. As if an entire life philosophy could be laced throughout the sometimes-hot / sometimes-iced liquid in flavorful, contemplative veins.

But in the offices of Cerego Japan, the rinds have settled and the leaves have fallen. Our passions have been all but extinguished. A cold war had made stale our ambitions, allowing us to settle for the pernicious convenience of vending machines.

At this, my friend and colleague, Gee, said “Enough. Let us drink coffee.”
And so we did. And we never looked back.

Our Virgil through the Tokyo café scene is a New York Times article. Within it lies caffeinated gems of our fresh-brewed salvation. 4 tiny operations: strewn across the greater metropolitan area—Hiroo, Roppongi, Akasaka, and Ginza.

Armed with our Suica™ Cards and an appetite for espresso, we set off on our journey.


Bar Del Sole

Our first leg took us to nearby Roppongi Hills, in search of a particular Italian bistro. Three blocks from the Hibiya Line station and we’re wandering a quiet street lined with buildings of vaguely Moorish influence. A quick GPS check on Gee’s iPhone and we find the place—Bar Del Sole.

Writing this now from the air-conditioned offices of smart.fm, I have until now been remiss in omitting one very prescient detail at the time of our journey: it was hot. It was a sticky, swampy heat. It was the kind of heat one might describe with alliteration. Certainly not coffee-drinking weather. But yet we pressed on—for coffee lovers everywhere.

Anyway, we get inside and are immediately treated to the cool embrace of an array of caned ceiling fans and ambient bossa nova. We were seated and handed the menu; we had little need of it, though, as we sought to emulate our news-clipping guide. I ordered the macchiato and Gee the cappuccino. The waitress smiled, took our menus and relayed our orders to the barista.

5 minutes later, we were greeted by this jovial character:

via Bar Del Sole

"Cat"-uccino

“Cat-uccino” the waitress quipped. The barista at the counter blushed and smiled with a small bow in acknowledgement. I immediately whipped out my trusty 40D and started snapping away.

If I might break the 4th wall for just a moment: We are nearing the culmination of any piece of food journalism—the money shot of sorts. Through no more than literary coercion of a captive imagination, the writer is tasked with re-creating the phenomenological experience. Meditating on the experience is akin to the sort of dialog between Bishop Berkley and Bertrand Russell on the matter of subjective idealism. But I digress…

So here it goes:

Il Macchiato – Though dwarfed by its feline compatriot in size, it more than made up for itself in its complexity and richness. Lifting the tiny cup to my mouth, I watched as layers of milk and espresso interacted with each other at various phases and temperatures—each layer revealing its secrets in chalky cross-sections. The first sip was a sort of moment of decision. My mouth was first awash with the heat of the thick concoction, but this heat was subsumed by a bitter and then dark flavor. The second sip added further complexity, as the flavors turned more colorful—the bitter richness replaced with a faint earthy, vanilla cast.

Il Cappuccino – [note: this section of the post is authored by Gee] The cappuccino at Bar Del Sole exhibited a characteristic that I find all too often with cappuccinos I’ve had around the world: it was about 10° too cold. I’ve never quite gotten to the bottom of this, but perhaps it’s a result of the arduous multi-step process including the making of the espresso itself, the steaming of the milk, and in this case, the elaborate design of the ねこ graphic. There are many things I can appreciate lukewarm-bordering-on-cold (pizza and beer come to mind), but coffee really isn’t one of them. The presentation was fantastic and the taste of the coffee was actually great, but next time I’ll head for the macchiato.


Fulfilled, we exited into the summer heat, off to new adventures and culinary possibilities. Next stop: Ginza.

To Be Continued…

Potluck List Wednesday: “Hello Kitty” Edition

Posted by: bensaou on: August 5, 2009

Another Wednesday and even I know it’s time for another Potluck List. Yes, I have started working here at Cerego a week ago and this is my very first post on [devlunch]. Let me thank mattt for giving me this opportunity and let me introduce myself: my name is Sophian and it has been four long years since I’ve been back to Tokyo. I am quite familiar with Japan, but the first thing that struck me as I returned to the land of the Rising Sun is how everything is so … kawaii!

HelloKittyRedWine1

This Week’s Theme: Kawaii!!

Love them or Hate them? It’s a Hit or Miss

Indeed, this “kawaii” term is all too familiar to us gaijin japanophiles and fellow nihonjins as it uniquely defines japanese popular culture. From Pikachu to Domo-kun and Keroppi, these cute little branded characters have been huge marketing successes and believe me when I say that one too many articles have been written about this critter-generated marketing strategy phenomenon; just think about Hello Kitty and her world-wide invasion!

Thus, it seems quite fitting for me to honor this culture of kawaii today by inviting you all to think about as many of these little creatures as you can, even if you can’t quite pinpoint what animal or monster they’re meant to represent (let’s face it, if Goofy is a dog, well then what in Sanrio’s name is Pluto!).

They appear as stuffed puppets in commercials, anime, video games, t-shirts, key-chains, toasters, electric guitars, airplanes and even wine (being half-French, half-Japanese, I don’t know if I should succomb to Hello Kitty’s cute pink ribbon or if I should turn a cold shoulder to the sight of such despicable treatment of fine products… sacrébleu!).

I hope that in this quest, we can ultimately find the answer to the existential question behind these mascots: What is their purpose here on this planet apart from stealing our money … and being kawaii?

Kawaii! This Week’s Potluck List
☆☆ Kawaii! ☆☆

Potluck List Wednesday: “Mad Men” Edition

Posted by: Mattt Thompson on: July 30, 2009

For the last couple of weeks, [devlunch] has been host to a feature we have endearingly called “Potluck List Wednesday”. Just like it’s delicious real-world equivalent, these are an opportunity for everyone to bring something to the table in the open lists of the week, such as Internet Memes and Horror Movie Clichés.

This time around, I’m proud to have Potluck Lists cross-posted between both the main site blog and [devlunch]. After all, with a potLuck, more people can only mean more delicious variety!

hello-im-a-mac

Where’s the Beef?

Hello, I’m a Mattt.

The theme this week is “Famous Advertisements”. From the heyday of advertising in the 1960’s to the viral campaigns of today, marketers have expertly crafted messages that are nearly impossible to get out of your head.

“Good to the last drop”, “Breakfast of Champions”, “Melts in your mouth, not in your hands”, “Is it live, or is it Memorex?”

Unless these were before your time, there’s a good chance your craving some combination of coffee, cereals, candy and a cassette tapes. Wait, that sounds dangerous…

Anyway, you’re probably thinking a few of your favorites already, so why not head over and add it to our list! With such a diversity of countries and cultures represented on smart.fm, I can’t wait to see the kind of ads that really stuck in Germany or Japan, for instance.

So let your fingers do the walking, and get N or get out! All Your Base Are Belong To Us! A mind is a terrible thing to waste. Be all that you can be. It’s so easy a caveman can do it. Just do it!

Maxell Ad This Week’s Potluck List
Famous Advertisements

Six Things Your Mom Never Told You About Debugging Javascript

Posted by: andrewplummer on: July 29, 2009

One of the most exciting days we’ve had all year came a few weeks ago after a routine deploy, when someone opened up the site in IE to find that nothing worked. Such is Javascript. A simple syntax error in the code can, under the right circumstances, cascade down and break all other Javascript in its path. In our case this included the popup scripts that launch our apps.

A few of us spent a couple hours trying to track the problem down to no avail. It didn’t help that most of us don’t run Windows in the first place, but even after getting set up, the error messages are less than informative. In the end, it turned out to be one character that brought our whole site down:

error

So no problem right? Just look at the error message and correct the offending line. But tracking it down in the code proved to be devilishly difficult, and in the end caused our users hours of frustration. It all has to do with the way that IE chooses to handle Javascript errors. Fortunately, I took away a ton of good information, including some about how Javascript works in general. So, with perfect hindsight I offer it so that others may not be doomed to walk the same path:

1. Trailing commas in object literals (hashes) are syntax errors.

An example of this:

var hash = {
  foo: 'bar',
}

Is invalid in IE because of the trailing comma, while other browsers will allow it. Keep an eye out for these. Seriously.

2. Javascript Reserved Words Can’t be Used as Hash Keys

For example:

var hash = {
  new: 'bar'

}

The keyword “new” here will cause an error in IE. To prevent this, use strings instead for your hashes, like this:

var hash = {
  'new': 'bar'
}

3. Syntax errors prevent that block of code from being executed.

Javascript begins by evaluating a block of code for syntax errors. If it finds any, it will consider that block to be invalid, and skip to the next one. Here, each “block” is a <script> tag. This could be an external file, or in-page JS. It will move on to the next <script> block as if nothing has happened and NONE of the code will be executed, either before or after the error.

4. Other errors will cause only the remainder of the block to be skipped.

Once a block of code is evaluated and determined not to have syntax errors, it will immediately begin executing the code inside. If any errors occur during this process, execution will halt, and the remainder of that block will be skipped. However, any code already executed (variable and function definitions, etc) will remain.

5. In IE, The last error that occurred will be reported after all other code has executed.

Despite the fact that any errors (both syntax errors and otherwise) will fail and skip a given block of code, the errors themselves won’t be reported until the last block of code has been run. To get a better idea of how this works, let’s look at this flow a little more closely.

Let’s say you have three blocks of code. The first contains a syntax error, the second a different error, and the third is OK. IE will handle this code in the following way:

  1. First block evaluated.
  2. Syntax error is found. Error is noted and the block is skipped.
  3. Second block is evaluated.
  4. No syntax errors are found, so block is executed.
  5. Continues up to the error, which immediately halts execution and skips the block. Error is noted.
  6. Code has no errors, so it is immediately executed.
  7. Error noted in the SECOND block is now finally reported.

6. Error reporting is just dead wrong.

First of all, no matter where your script exists (external or inline), the error will always be reported as part of the page itself. This means that you won’t see “Line 3: script.js”, but instead “Line 3: page.html”, despite the fact that the error is in the JS file! Nevertheless, the line number given will be relative to the file itself, so “line 3″ will be the actual line 3 of the external file.

In addition, the line numbers themselves are messed up in ways I can’t even properly analyze. If I were to wager a guess, it seems almost as if the files were put through the parser, then newlines are “inferred” from where they should occur in context. And, as a final twist of irony, it seems that CRLF line breaks are evaluated twice in IE, despite being the Windows standard! That means that if you’ve been writing your HTML in a windows based editor, your Javascript error reported on line 20 is actually on line 10. Enjoy!

object_expected

So, now the stage is set for total disaster, and hours of wasted energy. Let’s watch how the game plays out, shall we?

IE begins evaluating the Javascript in my page. The first script blocks at the top contain libraries for use by the rest of the page, so it starts loading those first. It hits the first few scripts, and so far no problems. However, a few lines down, it hits some code of mine that contains a trailing comma in a hash, which triggers a syntax error. IE makes a note of the error, skips the block, and moves on. The next few blocks are error-free, so they get evaluated immediately. So far, as we expected. But wait! Now a script block later in the page calls a function contained in the block that had the syntax error. That block was skipped earlier, so now the function doesn’t exist! Now THAT block errors out, and the rest of the Javascript is skipped. Now, depending on how many different blocks call that same code throughout the page, other blocks may error, expecting the code that was inside where the original syntax error occurred. Or worse, other errors may occur expecting code inside the block where the SECOND error, caused by the first error, occurred, causing a chain reaction of biblical proportions! Our original error (remember it was just a single comma!), now has us stumbling down the entire page, only to come rolling out at the other end clutching in our hands something totally useless – the LAST error message that occurred.

Having fun yet? Now let’s step it up a notch.

In addition to this puzzling state of affairs, what REALLY threw me off was our asset packager. In production we bundle up the Javascript so that it is a single Javascript file, a common practice to limit http connections for the end user. However, when working in development mode, every Javascript file comes in separately as, you guessed it, a separate block. Ironically (or perhaps tragically), although my code, complete with it’s offending comma, was being included in the Javascript code base, it wasn’t being used anywhere throughout the site! This meant that on my development machine, where each Javascript file is separated, my code came in as a separate block, caused an error, but died peacefully on its own with no dependencies to worry about. However, on production where all the Javascript is bundled, it was taking out 90% of the code base with it, as that solitary syntax error caused the entire bundled package to be skipped, and the end result was a completely unintelligible error complaining that something didn’t exist that clearly should have.

At the time, I thought something screwy was going on with the asset packager, and began there. But every time I tried to reshuffle the code to try to pinpoint the error, a completely different error was thrown, as my little comma resulted in the wanton destruction of differently sized chunks of code that the rest of the site depended on. What’s more, every page would error out slightly differently, as different dependencies were being executed in different places. Nothing made sense anymore. Eventually the possibilities were narrowed down, and I found the comma and removed it, with absolutely no confidence that it would work. But it did.

facehugger

The Bottom Line

With my perfect 20-20 hindsight, I now realize that the problem boils down to two incorrect assumptions that were feeding off each other, one about Javascript itself, and the other about IE.

First, I was assuming that all Javascript is executed as a giant block. It’s not. Points 3 and 4 above are not IE specific. Each script tag is like its own environment, and an error in one block will not prevent scripts from being executed in the other.

Second, I was assuming that IE was reporting the FIRST error that occurred. This seems natural enough considering the first assumption – if a script errors, it’s now finished and what I’m left with is the point of failure. This is in fact NOT the case, however. IE is simply running through each block blindly, reporting errors as it goes along. Without an error console (which IE natively doesn’t have), all you get is the most recent error. Effectively, IE isn’t showing you the first (and hence most relevant) error that happens, it’s showing you the last.

The Solution

The first thing to remember is simply not to trust errors in IE. They’re not showing you what you want to see. However, you can MAKE them show you what you want by turning on debugging, which will raise every error as it happens. One of the best debuggers comes bundled with MS Office, and is talked about on quite a few other sites. Five minutes or so spent installing this could have saved me hours of wild goose chasing.

There are also ways to catch these kinds of errors outside IE, by running your code through JS Lint, or turning on “Strict Warnings” in Firebug, although you may get more information than you need.

In any case, although it’s painful, hopefully now being aware of WHY IE acts the way it does on errors will help deal with more emergencies in the future.

Kirk’s Lunch 05: Kirk’s Favorite iPhone Apps

Posted by: devlunch on: July 28, 2009

This week, Kirk talks Twitter apps, Rotzy, Paper Toss, and other ways the iPhone has changed his life. By the way, get ready for the iPhone to change your life in a month or so when we release our own smart.fm iPhone app.

Until then: enjoy!

Kirk’s Lunch 04: Free

Posted by: Gee on: July 23, 2009

I am entirely and utterly against the idea that Chris Anderson is wrong.

This week’s installment of Kirk’s Lunch addresses the recent controversy around Chris Anderson’s latest book, Free.  Kirk thoroughly agrees with the points Anderson makes, stressing that ‘digital is different’, and that when things go from ‘atoms to bits’, existing business models must adapt and cannot adhere to analogies from the physical world.

I’m still working my way through the book but so far it looks quite promising, and it’s bound to get people thinking about what types of new business models will emerge, specifically around digital content and services.  An important point to take note of is that in almost all cases, free really boils down to re-routing or re-distributing the cost of the experience.  Children under 5 often get into buffets free of charge, but in reality that cost is typically accounted for in the cost of an adult’s admission.  Similarly I enjoy free search on Google, but what’s funding the whole experience is the advertising inventory that Google is selling alongside its service.  It’s not really about free; it’s about working within the confines of society and technology to find a model that works.

Enough of me!  Here’s what Kirk has to say: