Is IE7 the new IE6

February 24, 2011 – 12:24 am

As a web software engineer, I am often creating websites that need to work and look correct on a variety of browsers. Of all the browsers out there to code for, Internet Explorer is by far the worst. There are entire websites devoted to this fact (http://ihateinternetexplorer.com). YouTube does not even work on IE6. Although not as bad as IE6, IE7 is now the worst browser in terms of standards compliance and display issues. As the new “most despised” browser, and with IE6 practically dead with only 2.5% of global pageviews, IE7 is the new IE6.

I recently solved a particularly hairy IE7 bug, and created this image to commemorate the occasion. Feel free to use it.

Tom Merritt – UIUC IDs

January 27, 2011 – 12:00 am

Tom Merritt is a tech reporter and host on TWiT – This Week in Tech – the podcast network of Leo Laporte. Tom is also an alumnus of the University of Illinois at Urbana-Champaign, my alma mater. He recently was showing some old identification cards on the live TWiT stream, and one of them was of his old I-Card, the U of I college ID. A far cry from today’s version, seen below.


Tom Merritt’s I-Card, circa 1980s?


My I-Card, 2006


Current version of the I-Card, 2010

Where is K’naan?

January 21, 2011 – 2:28 pm

I recently read a great article in Fast Company magazine – Portrait of the Rapper as a Young Marketer: How K’naan Delivered on Coca-Cola’s $300 Million Bet. It’s about K’naan, a Somalian musician, his rise to fame when he booked an advertising deal with Coke for the World Cup 2010, and how he’s still trying to make it in the music business.

One interesting fact about K’naan’s deal with Coke is that he created a special cut of his song “Wavin’ Flag” for the campaign. It’s called the “Celebration Mix.” The two versions are here:


Some would call this act of creating two versions of your song “selling out” – but K’naan does not think so.

“I knew Coke wasn’t going to put its money behind ‘So many wars, settling scores/ Bringing us promises/ leaving us poor.’ And writing a whole new thing would have been a jingle. Emmanuel was too sensitive to ask me to rewrite ‘Wavin’ Flag.’ So I offered to do it.” … “It might sound arrogant or stupid,” says K’naan, “but I feel so outrageously authentic at what I do that the question of selling out or not selling out doesn’t even enter my head. I think people who worry about this must already be worried about their true credibility. I’m just interested in, How do we get my message out?” (Fast Company)

Future

Another interesting part of the article is about where K’naan is now in his career. He’s not in a place where you would expect a musician who has been heard so prevalently to be. He’s tired. He’s depressed. He’s divorced. He’s playing at small venues. I highlighted some parts of the actual article and attached it.

What does it take these days for a new music artist to get big? It seems like many of the newer artists are struggling to find an audience. What is the reason for this? An increasingly digital music audience who value singles over artist loyalty? Will K’naan be able to make it big in the coming years?

How to Create a Heat Map of the United States

January 5, 2011 – 11:59 pm

With the recent release of Remember the Umbrella, I wanted to create an informational graphic of where our users are located across the United States.

I was first going to dynamically create a Scaled Vector Graphic (SVG) that would change the color of the state based on the number of users currently signed up for Remember the Umbrella in that state. That was the plan until I saw a site that uses the Google Graph API to dynamically create a map of where users are logged in from. “Cool,” I thought to myself – ready to dive into creating this feature.

The Base Data

Remember the Umbrella is a fairly simple service with a fairly simple database. Basically there’s a table that has one column with all the zip codes of the users. I begin by getting all of those zip codes. These zip codes will need to be converted to states (the state that the zip code is in).

Convert Zip Codes to States

I convert each zip code into a state using the Google Maps API. I get back JSON encoded data using this URL structure:

http://maps.googleapis.com/maps/api/geocode/json?address=[ZIPCODE]&sensor=false

And my code takes that JSON and gets the state code. So you use this URL, for example, to get the geographical data for 90210.

Arrange the Data

After I have the state for each zip code, I have to assemble this into an array in the format Array([State] => Qty, …). So the data may look like this:

Array ( [WA] => 60 [MD] => 22 [NY] => 18 [TX] => 16 [CA] => 10 [MS] => 50 [WI] => 11 [MO] => 21 [NJ] => 30 [KS] => 80 [IL] => 147 )

This data is what will go into the Chart API.

Using the Google Chart API to Create the Image URL

The Google Chart API allows you to create a chart by specifying the parameters in a URL in the form:

https://chart.googleapis.com/chart?[Parameters]

I am using the map chart, so the first parameter is cht=map. This specifies the chart as a map.

The next parameter goes right after the word map, and is the coordinates of how to zoom in on the United States. This parameter is :fixed=20,-160,55,-35.

Then we add the size of the image that we want our map to be. This is done by the parameter chs=600×400.

So far we have:

https://chart.googleapis.com/chart?cht=map:fixed=20,-160,55,-35&chs=600×400

… and now is the time that we add the colors and the states. To do this, for each state I add a color to the chco parameter (exception: the first color in chco is the color of the background) and the state ID to the chld parameter. So these parameters:

chco=cccccc|ffcccc|ffffcc&chld=US-IL|US-MO

… would create a background that is gray (#cccccc) and color Illinois and Missouri #ffcccc and #ffffcc, respectively. My code loops though the states and assigns colors appropriately. A final URL for the image could look something like this:

https://chart.googleapis.com/chart?cht=map:fixed=20,-160,55,-35&chs=600×400&chco=cccccc|ffcccc|ff6666|990000&chld=US-WI|US-MO|US-IL

The final product is here:

Update 6/6/2011 – jVectorMap seems to be a good way to do this as well.

Happy New Year – 2011

January 3, 2011 – 7:09 pm

I don’t like new year’s resolutions. They are too often forgotten a few weeks down the road. I do, however, like to have short and long-term goals, and the beginning of a new year is a great time to reflect on what you have accomplished, and what you plan to do in 2011.

Gavin and Dean Adesida2010 Completed List:

Goals for 2011:

  • Learn Drupal and donate a new website to my old High School
  • Learn Photoshop
  • Create a Blackberry or Android app
  • Add new features into Remember the Umbrella including text messaging and rain vs. snow preferences
  • Learn about beekeeping
  • Learn Guitar
  • Grow plants
  • Learn to cook

Have questions or ideas about any of these? Please let me know!

Thanks to Kevin Rose for the idea for this post.