I am a jack of all trades. Excepting those trades I do not like. I am a web developer of simple, reliable solutions to problems.

Thoughts On Steve Jobs

Like most, I was shocked at the passing of Steve Jobs last evening. I believe there is something in all of us that wants to believe that genius and resources will spare us death. But I doesn’t. He is dead, but what a remarkable legacy he has left behind.

It occurs to me that the greatest tribute to Jobs is his work on the iPhone. In four years he revolutionized the way we think about, use, and what we expect from smartphones.

In 2007, the smartphone industry was a horror show of ugly, slow hardware with archaic input. Each phone seemed to have a larger keyboard, antenna, and battery. This was progress. Then came the first iPhone. Critics scoffed at it. No one would want a touch screen only device. It was too expensive. You couldn’t multitask. It didn’t had GPS or 3G. It was laughably expensive. It would fail miserably.

In 2008, the iPhone 3G was too slow. The screen too small. Too low resolution. Android was going to win because it was open.

2009 brought the too minorly improved 3GS. Apple was poised to be left behind, their massive lead would be quickly absorbed.

Then came the iPhone 4. Within a year of its release, my dad bought one. So did 4 of my non-techie friends. Most people I know that don’t have one, no longer say they never will get one. Android has grown, but the iPhone continues to dominate and define the technology.

I scoffed with the scoffers until 2009. Since then, I have converted from full Windows to full Mac. I bought an iPad. Great products create their own demand.

So that’s Steve’s legacy to me. In four years, he made the smartphone a household device. In four years he took a device from a toy for fanatics and nerds, to a cultural phenomenon. And all around the world, salesmen are pitching the competitions’ products as “Just like an iPhone.”

My friend Jeremy noted it should be called the iPhone 4Steve. I think he has a point. There’s no greater tribute to him than his last revolution.

Clif

Sent from my iPad

Imagick and WP-Minify

This morning I attempted to migrate a fully working script from our test site to our production site.  To my dismay, it stopped working on our production site.

The script used Imagick to composite two images together on the fly.  It used WordPress for database connectivity by including wp-load.php.

Strangely,  Firefox reported the image to be corrupt.  I downloaded the image being generated and ran Imagick’s “identify” command against it via SSH.   The tool reported the file had “two SOI markers” and “extraneous bytes before marker”.  Exciting stuff.

After wracking my brain and starting the process of opening a StackOverflow post,  a thought occurred to me:  What if the problem is coming from WordPress.  I threw together a quick proof of concept using Imagick and tested it.  Worked fine.  I then included wp-load.php at the beginning…corrupt image again.

At this point, I knew the problem was most likely a plugin. I realized that the only plugin difference between our test and production site was a plugin called WP-Minify that handles JS/CSS/HTML minification.  I tried disabling it and magically the script worked again.

Unwilling to sacrifice the advantages of WP-Minify, I looked through the code.  It turns out you can pass in wp-minify-off=1 as a URL parameter to any page to prevent it from processing.  A very easy solution.

So there you go. That’s my story.   If ImageMagick / Imagick is outputting a corrupt JPEG, and you are using WP-Minify,  now you know how to solve it.