Ryan Snyder

Jul 19

200,000 Icons in the Icon Rainbow

Icon Rainbow stickersIn the initial launch of Icon Rainbow, an icon color analyzer, we featured a small subset of 5,000 icons from the Apple iTunes store.  But Crystal and I knew that Icon Rainbow couldn’t be considered a fully developed project until we had the icons for all of the iPhone apps in the iTunes app store.  Well, it’s official - the Icon Rainbow now features the icons for all 200,000 apps in the iTunes app store.  And I guess that means you could call it a fully developed project now.  

I re-wrote the scripts that scraped, analyzed and saved all of the icons from apple.com, and ran those over the course of 4 weeks on our poor little $20 Slicehost server, which is still whimpering from its taskload.  Now that everything has been analyzed and saved, the icons have been migrated to Amazon S3 and an aggressive caching scheme has been put in place - the new Icon Rainbow dataset is ready for your perusing.

What’s next?  First, we’re planning to open source the code.  Next, we want to find ways that we can highlight the top applications from the app store, as well as the interesting colors that icons appear in the icons (my, designers sure do love their browns and periwinkles).  And eventually, we’d like to be able to highlight color trends that we notice in the app store.  We know we won’t be able to pull off color trending on our sad Slicehost server, so we’ll be looking into ways to efficiently analyze all of the data we’ll be collecting.

Jul 04

Creating Convenience when following Pollan’s Food Rules

For the month of June, I made a number of commitments to myself, including following the guidelines laid out by Michael Pollan in his book Food Rules.  

Following these rules wasn’t terribly difficult, as I already practiced a number of guidelines laid out in the book.  But where I got tripped up the most was on the days I was working long hours and needed quick, convenient meals and beverages to make it through the day.  

Whether your crutch is fast food or packaged microwaveable meals, here are a few of the things I found helpful to plan ahead, so that I did not depend on modern convenient foods when following Pollan’s Food Rules:

Prep Breakfast and Lunch the Night Before

When we’re running late for work, or have to grab a quick meal in between meetings, we simply don’t have time to prepare a meal.  But if we think and plan ahead, we can overcome this matter of inconvenience.  Prepping breakfast and packing lunches the night before are the best way to ensure we’ll eat proper meals the next day.  I try to package small salads in plastic containers to make sure I cover my plant intake needs, and always keep a salad dressing mixture of 2/3 part olive oil, 1/3 part balsamic vinegar, with dashes of salt, pepper and crushed oregano in my office.

Make multiple dishes ahead of time on Weekends

Take advantage of lazy Sundays to prep 2 to 3 dishes that can easily provide lunches for each day of the week.  Soups and stews are easy to prepare ahead of time, and ideal for packing a lunch that can be re-heated.  I love to roast a chicken for dinner, carve up the remaining meat that same day and create a tasty chicken salad, and then use the bones and carcass to prepare a homemade chicken broth.

Know which Foods are being Harvested

Keeping tabs on which foods are being harvested in your area at the given time will provide you the ability to plan your meals and shopping list in advance.  If tomatoes are about to come in season, you’ll have time to research recipes that you can make use tomatoes.  And having a set of recipes at the ready will allow you to know exactly which ingredients to add to your shopping list.  When tomatoes finally do come in season, you’ll be prepared!

Shameless plug:  This tip is the reason that I created the local seasonal foods guide on Foodgeeks.

Jun 11

[video]

Jun 02

Hitting the Reset of Button

I haven’t felt the best recently.  I haven’t been sick - I just constantly feel like I’m tired and recovering from overworking, overplaying or overindulging.  And when I’m in recovery mode, I don’t feel like I’m fully present, and therefore not able to really to give it my all in my work life or in my personal life.  So, this month I’m hitting the reset button.  For the month of June I’m making the following commitments to myself to do a bit of a cleanse in my life, which I have no doubt will help me to both feel better and feel more present on a daily basis.

1. Start each day with intention

I’m the kind of person who wakes up, hops out of bed, walks 13 steps into the next room, plops down on the computer in the home office and begins working.  It doesn’t matter if I wake up at 5:30am or 9am, the first thing I do is work.  This month, I’m committing to starting each day with an act of mindfulness, whether practicing meditation, qi gong, yoga or going for a run.

2. Follow Michael Pollen’s food rules

Recently, I’ve been really interested in the food revolution and moving away from eating processed foods.  Michael Pollen recently authored In Defense of Food, where he coined the motto “Eat food, not too much, mostly plants”, and followed that by breaking down the rules for his diet in a book called Food Rules.  I’ll be practicing his food rules, which include things like, “Avoid foods you see advertised on television”, “Avoid foods that contain high fructose corn syrup” and “Leave something on your plate”.  These rules will most certainly help me feel better, and it won’t hurt to drop a bit of pudge this month too!

3. No alcohol

I’m hopping on the wagon for the month of June.  It will be hard not to crack open a brewski on the back patio while the grill is heating up, but it will be great to step away from fermented beverages for a month.  Alcohol is a depressant, a sleep irritant, and an instigator of bad judgement, all of which help keep one from being completely present the next day.

4. Sleep

While reading the book Rework by the 37 Signals guys, the most surprising vignette was where these successful individuals encouraged the reader to stop burning the midnight oil and to sleep more.  They argued that the best workers were the ones who greeted problems with the freshest minds.  I’ve missed a lot of sleep over the last couple years, especially during my time with Shizzow, and could certainly stand to catch up a bit.  My goal is to get at least 8 hours of sleep every night in the month of June, and I have to tell ya, that just sounds delicious.

Those are my commitments for the month of June.  Most of the people I’ve mentioned these changes to have asked me why caffeine isn’t part of my list, and while I considered it, I figured I’m already making enough changes that I don’t want to add any more.  I need to feel sharp in my work, and can’t afford to suffer through a week of brain-no-worky.  I’ll at least cut back on caffeine, and replace my standard wake up medicine of Viso with coffee or tea.  If I gradually wean off of caffeine, maybe I’ll find I don’t need that morning cup of coffee?  We’ll see!

May 19

Upgrading from Kohana 2.3.x to 2.4

At Mozilla we’re using Kohana as the PHP framework behind a number of our sites, including the UI for the Crash Reporter, the Creative Collective and Jetpack Gallery

I’ve been upgrading one of our sites from Kohana 2.3.4 to Kohana 2.4 to determine how difficult it will be to upgrade our other Kohana sites.  For a dot release, this upgrade is much more time intensive than I’d originally anticipated (anyone remember upgrading from Drupal 4.6 to 4.7?). 

I’ve recorded my upgrade notes for 1 site so that we could implement this upgrade on our other Mozilla sites using the framework.  These notes assume that you’ve downloaded the most recent version of Kohana 2.4 and that you are comfortable working from the *nix command line. As a reminder, make sure you have backups of your code so that you can revert your changes in case you run into any major problems.


1. Move the new system folder into your repository.

cd existing_kohana_dir
mv system system.2.3.4
rsync -av new_kohana_dir/system ./

2. Copy Bootstrap.php into the root of the application folder.

cp new_kohana_dir/application/Bootstrap.php application/Bootstrap.php

3. Copy over the new index.php. Update directory settings in this file if necessary.

mv index.php index.php.2.3.4
cp new_kohana_dir/index.php ./

4. Add $config[‘config_drivers’] setting to application/config/config.php

/**
 * An optional list of Config Drivers to use, they “fallback” to the one below them if they
 * dont work so the first driver is tried then so on until it hits the built in “array” driver and fails
 */
$config[‘config_drivers’] = array();

5. Add $config[‘_default’] to application/config/routes.php to define the default controller for your app.

$config[‘_default’] = ‘home’;

6. Add $config[‘connection’][‘params’] to application/config/database.php

$config[‘connection’] => array
(

‘params’ => NULL
)

7. Change html::specialchars() to html::chars() in the application and modules directories.

find . -name “*.php” -print | xargs sed -i “s/specialchars/chars/g”

8. Change Kohana::log() to Kohana_Log::add() in the application and modules directories.

find . -name “*.php” -print | xargs sed -i “s/Kohana::log/Kohana_Log::add/g”

9. Change Kohana::show_404() to Kohana_404_Exception() in the application and modules directories.

find . -name “*.php” -print | xargs sed -i “s/Kohana::show_404()/throw new Kohana_404_Exception()/g”

10. Update all Kohana::lang() references, which have been split into messages, accessed via Kohana::message(), and i18n, accessed via __().

11. Change all references from Controller::$input to Input::instance().

12. Many methods have been deprecated, including html::specialurlencode(), form::close() and form::close_fieldset(), and you’ll need to update those on a case by case basis.

Now, this was not a tremendously difficult upgrade - unless your app uses either ORM or the Database Builder.  In either case, you’ll need to review all of your database statements to ensure that they’re working properly after the upgrade.  I don’t consider this a complete list, because even after upgrading one of the sites, I’m still finding gotchas here and there.

13. Update all methods using the query builder or ORM.

14. ORM::where() now accepts 3 parameters, the middle of which is a comparator.  ORM::in() is no longer available, and can be replaced using ORM::where() with the comparator parameter defined as ‘in’.  For example:

->where(
  array(
    array(‘designs.id’, ‘=’,  $id),
    array(‘users.status’, ‘>=’, 1),
    array(‘badges.id’, ‘in’, array(1, 2, 3))
  )
)

Outside of Mozilla, I also maintain a few sites that use the Kohana framework, and I won’t be updating those sites because the cost of development outweighs the benefits provided by the new framework.

May 09

Hey, ho, it’s the Icon Rainbow!

If you know me, then you know that I get really bored when I am not dealing with a wacky problem that needs to be solved.  When Crystal Beasley (@skinny) approached me with an idea about writing a color analyzer to help quench her one of her geeky designer itches, I couldn’t turn down solving such a fun problem.

The Icon Rainbow (@iconrainbow) is a color analyzer for iPhone app icons.  In the first iteration, we fetched a subset of iPhone app icons and grabbed the color for every single pixel in each of the images.  We then determined which colors were most prominent in each app’s icon, in each app category, and also in the entire icon subset.

Rather than spend time explaining the site and how it works, I’ll just point out a few of the places where we got a little geeky about colors…

The Color Spectrum

For each category page and each app page, the spectrum at the top of the site shows all of the colors used in that dataset. And each color of that spectrum is made a width equal to the percentage by which that color is used in the dataset represented on that page.  Click around the site, and you’ll notice that the spectrum changes from page to page…  Just compare the spectrum for the Games category and the Weather category…

Games Spectrum

Weather Spectrum

Click +EXPAND SPECTRUM at the top of the site over any data set and stare at the pretty colors.

Pixels and Percentages

For each category, all of the colors used are displayed ordered by most frequent use of the color.  Each color swatch shows how many pixels that color occupies in icons for apps belonging to that specific category.  The colored area of each color swatch acts as a graph bar by depicting the percentage that the color is used in that category; the shaded area of the color swatch acts as the end of the graph bar.

Color Percentages

Hex, RGB and HSB

When colors need to be detailed, we try to give you the hex value, RGB value and HSB value for that color.  For HTML geeks, it’s the hex value that matters the most, and for design geeks you can flip a coin between RGB and HSB being top dog.


It’s not done yet

The Icon Rainbow is far from being complete.  We still need to grab the entire set of iPhone app icons, tweak the color matching and add some more design geekery.  But for a quick 50 hour side project, we’re pretty happy with we’ve created.

Scrambled Eggs with Chives and Asiago made for a tasty Mother’s day treat.   The asiago and chives made for a great flavor combination, but nothing could be better than the farm fresh eggs from Afton Field, whose owners apprenticed with Joel Salatin.

Scrambled Eggs with Chives and Asiago made for a tasty Mother’s day treat.   The asiago and chives made for a great flavor combination, but nothing could be better than the farm fresh eggs from Afton Field, whose owners apprenticed with Joel Salatin.

Apr 24

Shizzow: What I would have done differently

It’s been nearly 3 months since I announced that I left Shizzow, and I’ve finally been removed from it long enough to write a reflection piece.  

I definitely share Dawn Foster’s sentiments in her great reflection post and promise not to repeat too much of what she stated.  I will reiterate that we definitely spent too much time putting the cart before the horse, whether creating a corporation entity that was too heavy for what we needed at the time, or writing our own framework to create a scalable service before even opening up to beta users.

Creating Shizzow was a wonderful experience.  From the start, we intended for Shizzow to be a service that allowed you to find your friends.  As a refresher to how Shizzow came about in late 2007, Mark, Sam and I were coding buddies, and we found that while there were a number of ways to communicate our location, it took too much effort to contact each individual in our group separately in order to gather on the weekends.  We created Shizzow to have a unified place to communicate location and status, and used the service to find and hang out with our friends.

Shizzow solved an immediate need for its founders, and initially for the Portland tech community as well.  We launched at a time when the Portland tech community had found each other through Twitter, and Shizzow provided a way for community members to quickly find each other in the physical world.

But as it grew outside of the Portland tech community, Shizzow did not solve the needs of other communities.  For new users, the “win” that the service provided was not a “win” for those individuals in other communities.

The location-based services that are still standing all provided wins for their users:  Brightkite and Gowalla met the needs of techies by offering a great user experience on their websites and iPhone apps; Brightkite allowed its users to show-off to their friends by taking and posting pictures of themselves and attach that to their check-in, while Gowalla provided virtual rewards.  Meanwhile, Foursquare met the needs of the gamer crowd by offering virtual rewards, such as badges, leaderboard statistics, and the ability to become the “mayor” of a location, which is awarded to the person to frequent a particular location the most.

While Shizzow wasn’t able to compete with the aforementioned services, I still consider it a success for developing into the Portland friend finder that it was originally intended to become.  But the way that we weren’t successful was that we failed to shift the focus of our service to create a win for new users in order to grow the Shizzow userbase.

Brightkite, Gowalla and Foursquare all created wins for their users, but these are temporary wins, in my opinion.  Virtual rewards only really speak to a small subset of the human population, and won’t work for mainstream people.  For my mother to have used Shizzow, it would have had to provided a win for her, and that only could have happened by creating a physically manifested reward for using the service.

If I could do it over again, I would have approached Shizzow from the standpoint that it needed to provide a physical reward for its users.  First, I would have developed a basic iPhone app for the service.  Then I would have wrangled up local businesses to provide coupons that would be delivered via push notification as soon as a user checked in to that location.  

For example, when a user checks-in to a Starbucks, they’re effectively advertising their preference for Starbucks to their entire social network, and Starbucks should reward a user for that advertisement.  After checking in to a location a user should receive a text message containing a $.50 off coupon code off their next purchase that must be used within 1 hour of checking into that location.  And heck, add an extra $.50 off for marketing that location by posting that check-in to Twitter, and maybe another $.50 off for posting that check-in to Facebook too.  If a mainstream user can save $1.50 off their $3.80 cappuccino simply by taking 15 seconds to declare their location to their social network - now that’s the kind of win that would get my mother to use that service.

Additionally, there were a number of developers who were working on iPhone and Android applications using the Shizzow API, none of which came to fruition because we didn’t provide a win for those developers.  The win that we offered was that we promised to provide the developers with recognition for their applications.  But writing a full iPhone or Android application was simply too daunting of a task and required a greater incentive to finish those applications.  In the scenario above, I would have offered incentives for developers to create applications for each of the mobile platforms by offering those developers revenue sharing for allowing users to check-in to Shizzow and also delivering coupons to those users upon check-in.

Now, this is a very condensed summary of what happened and why we didn’t reach the level of success that we’d intended.  There are any number of factors as to why we weren’t able to see that we weren’t meeting the needs of new users - from not being lightweight and agile enough to shift our strategy quickly, to spending too much time implementing technology that wasn’t yet necessary, to being burnt out from working full-time jobs and trying to launch this startup in our night and weekend hours.  While I don’t technically have regrets about how we operated Shizzow, I would have been okay with a $125 million buyout offer.

Apr 16

[video]

Apr 15

This was the greeting on the prep table at Beast in Portland.  These morels were breathtaking, and the dinner didn’t disappoint either!

This was the greeting on the prep table at Beast in Portland.  These morels were breathtaking, and the dinner didn’t disappoint either!