Remembering Steve

(Reposted from my original post)

Stevejobs

Dear Universe,

I remember when it all started, moving that turtle around on the screen in elementary school.

I remember programming Basic on an Apple ][.

I remember seeing Toy Story.

I remember my Dad giving me an iPod for Christmas.

I remember sitting in the audience listening to Steve give a eulogy for Mac OS Classic at WWDC.

I remember seeing him so incredibly excited to give a "small token" of appreciation at the Apple all-hands by giving everyone an iPod shuffle.

I remember seven years ago sitting in my office on the third floor of Apple's main campus when (ding!) an e-mail from Steve Jobs lands in my inbox.

I remember him beginning the e-mail simply with the word "Team".

I remember thinking this was a company-wide e-mail but it still had a very personal, human tone.

I remember seeing the words pancreatic cancer.

I remember falling prey to his reality distortion field, particularly his optimism about beating this thing.

Damn!

I really wish his reality was our reality...

This evening I stopped by the Apple campus to pay my respects and remember Steve. I was not alone.

The parking lot was packed. There was a vigil. A bench with flowers, candles, and an iPad with Steve's photo on display.

Silence. Sadness. Loss.

Steve, you touched our lives in so many personal, delightful, and emotional ways. Thanks for thinking different!

You will be missed!

Walter

Delayed gratification

A lot of great companies have lost their hunger for greatness.

From the NYTimes Sell Big or Die Fast:

When Microsoft released the Xbox 360 in 2005, there were widespread reliability issues and the console faced serious competition from the Nintendo Wii, yet the company stayed the course, and now the Xbox is one of the best-selling video game consoles of all time. That kind of tenacity seems to be in diminishing supply.

In other words, fewer and fewer take the Edison approach to success: perseverance.

Instead, a lot of once great companies are run by folks who want to skip the meal and eat dessert. They clearly never learned the value in resisting the marshmallow.

Printing nested tables in Lua

Sometimes it’s useful to be able to print out the entire contents of a Lua table. I’ve (re)written so many versions that I’ve lost count.

Here’s one version that’s pretty useful. It dumps out the contents in almost valid Lua:

Here’s how an example of how to use it and the output:

Interestingly, this almost serializes a table (assuming you don’t have functions or userdata as values). It’s late so I’m going to cop out and leave it as an exercise to the reader on how to make print2’s output truly valid, self-contained Lua code. (Hint #1: nested tables need to be constructed.)

Android Pain Points

Tumblr Founder David Karp recently said that Android “absolutely sucks to develop for.”

I don’t know his pain, but I can certainly identify with it. Lots of small things about Android are just plain frustrating like native debugger flakiness, simulators that don’t have support for OpenGL-ES 2.0, and a suffocating asset management system.

It reminds me of how Java felt over a decade ago. Back then, there used to be joke: one day Java’s going to be a great language — when it’s finally done. One day…

Now to be fair, Gingerbread (Android 2.3) is a big improvement, especially for NDK developers. But even with improvements, problems still seem to creep in that cause unnecessary developer pain.

Take this little gem for example:

In 2.3, there was a design decision that broke backward compatibility causing apps to crash in 2.3 even though they worked fine in 2.2. The decision involved the default behavior of BitmapFactory.decodeStream() and the amount of heap memory allocated to the VM. In 2.2, bitmaps were decoded as 16-bit and the VM had 24 MB of memory. In 2.3, the default doubled to 32-bit, yet the VM only had 32 MB of memory, instead of doubling to 48 MB (presumably to make the device hardware requirements less onerous).

As a result, your app risked hitting an out of memory exception unless you modified your code to override the default. In fact, it’s something several Corona developers have already encountered.

Now if you were lucky, you’d just ask a buddy on the Android engineering team (thanks Dan!) and they’d tell you what to do. I just have no idea how the unlucky ones cope.

A couple of must-have JavaScript functions in Lua

Recently, I had coffee with Josh Tynjala, a Flash/Flex guru who’s been playing around with Corona. He had a couple of gripes about commonly used functions in ECMAScript (the standard behind JavaScript and ActionScript) not being part of the Lua language.

They seemed like reasonable requests, so I decided to write them in Lua:

array.indexOf()

array.concat()

math.round()

You can run these in your browser by pasting these snippets into the Lua online demo followed by some test cases. For example, the math.round() code above will yield the following output:

If you’re a Corona user dying for these functions, you won’t have to wait months. I’ll be checking these into our code, so you should see them in our daily builds. Gotta love daily builds!

Technology for non-technologists

Mashable discusses a trend

that we’ve been seeing since we started Corona, citing the mobile development experience of Robert Nay, author of the #1 iOS app Bubble Ball.

He’s a pioneering user of the next generation of platform dependencies — innovations upon which further innovations can be built.

Eventually, you won’t need to have any technical knowledge in a world increasingly defined by technology.

Rather, the only thing you will need to have is an idea, and having good ones will be the only meaningful thing setting you apart from others. I like to think of it as the triumph of creativity over learned skill.

Couldn’t express the Corona SDK value proposition better myself!

You've gotta fight your way through

“Never give up, never surrender!”Galaxy Quest tagline

It’s remarkable how much, Ira Glass’s exposition on storytelling applies to doing a startup, or almost any worthy endeavor for that matter:

Nobody tells this to people who are beginners, I wish someone told me. All of us who do creative work, we get into it because we have good taste. But there is this gap. For the first couple years you make stuff, it’s just not that good. It’s trying to be good, it has potential, but it’s not. But your taste, the thing that got you into the game, is still killer. And your taste is why your work disappoints you.

A lot of people never get past this phase, they quit. Most people I know who do interesting, creative work went through years of this. We know our work doesn’t have this special thing that we want it to have. We all go through this. And if you are just starting out or you are still in this phase, you gotta know its normal and the most important thing you can do is do a lot of work…

It’s gonna take awhile. It’s normal to take awhile. You’ve just gotta fight your way through.

I can’t tell you how many late nights I spent coding on Corona only to realize that it was way past midnight, I’d gone down another architectural blind alley, and it’d take hours to context switch all the code/design considerations back in if I waited to continue the next morning. The only thing left to do was press on.

I wish someone had told me about all those long and lonely nights…

The Science of Truthiness

Ironically, how you present the information is more important than the information itself, as "The Science of Why We Don't Believe Science" explains:

Given the power of our prior beliefs to skew how we respond to new information, one thing is becoming clear: If you want someone to accept new evidence, make sure to present it to them in a context that doesn't trigger a defensive, emotional reaction.

Sad, but true.

On a lighter note, we now know there's a science to Stephen Colbert's humor — at least that's what my gut tells me: