Themes from An Event Apart (Boston 2010)

The farther away one gets from the end of a conference, the less likely one is to write about it. I’m no exception, which is a shame because there was a ton of great thinking and practical advice that came out of the energizing An Event Apart 2010 in Boston.

So, on the tiny off-chance that I can’t write in-depth, lucid details about everything that inspired me, I wanted to at least capture the broad themes I heard last week.

Without further ado, here they are:

Your designs should embrace the diversity of browsing experiences offered by different devices

Media Query

  • It is no longer necessary—or even possible—to make the browsing experience the same across all browsers. Like HDTV, the device determines the experience you get; the experience is not (and should not be!) the same for every device. Design and testing processes should change to reflect this reality.
  • CSS3 media queries are an easy, stylesheet-based way to adapt our designs to devices with variable widths.
  • Read more: “The CSS3 Experience” by Dan Cederholm, “Hardboiled Web Design” by Andy Clarke and “Everything Old is New Again” by Eric Meyer.

Mobile is moving to the center of the web design practice

Growth Opportunity

  • Change is coming: designing for mobile browsers will represent a significantly larger chunk of your design focus and energy in the next 5 years, due to the incredible proliferation of smartphones.
  • Consider designing the mobile experience before the desktop experience, it allows you to focus on users’ primary needs.
  • Designing mobile experiences means embracing—and designing for—flexibility.
  • Read more: “Mobile First” by Luke Wroblewski, “Everything Old is New Again” by Eric Meyer, and “A Dao of Flexibility” by Ethan Marcotte.

Usable is no longer good enough

Aarron Walter - An Event Apart: Seattle 2010

There’s still no substitute for good planning, informed design, and responsiveness, both in project management and product design

  • Plan for change at all points of the project, from scoping the project down to the individual design decisions.
  • Avoid adhering to hard and fast rules if you have the opportunity to investigate, research, and make an informed decision. But don’t ignore your gut.
  • The more techniques you learn, the more flexible your processes can become.
  • The qualities that contributed to the success of the web as a platform are the qualities that make us successful as web developers: rough consensus, working code developed quickly, velocity, and responsiveness.
  • Read more: “Put Your Worst Foot Forward” by Jeffrey Zeldman, “Anatomy of a Design Decision” by Jared Spool, and “How the Web Works” by Jeff Veen.

For more details from the individual talks, Luke Wroblewski’s conference notes are that rare combination of concise and thorough. I’ve linked to them liberally above; here’s the full list: Luke’s An Event Apart notes.

before and after

A client came to us recently and asked us to duplicate the functionality seen on this nytimes article.

One of our talented designers, Jacks, came up with an updated design and passed it along to me for development.  

Screenshot

At first glance, it seems like something that would be a little tricky to re-create without flash.  As the resident flash guy, I’ve been getting a lot of pressure from the internet community at large to start flexing my Javascript muscles, so due to its lack of special fonts and uncomplicated layout, I set out to create it using HTML, CSS and jQuery UI and ended up with this little bit of JS, CSS, and HTML – before and after.


Here’s how I created it.

First, I created the layout in HTML and CSS, that way I got the base styles and layout ready before introducing the JS and any additional styles they require.

After a little trial and error, My HTML ended up looking like this:

<div id="beforeAfter">
	<div id="canvasContainer">
		<div id="canvas">
			<div id="before"><img src="img1.jpg" alt="Before" height="413" width="718" /></div>
			<div id="after"></div>
			<div id="sliderContainer">
				<div id="slider"></div>
			</div>
		</div>
	</div>
</div>

My CSS ended up looking like this:

body { background:#999; }
#beforeAfter { background:#656565 url(bg.gif) repeat-x; padding:4px 0 19px; width:730px; }
#canvasContainer { height:417px; margin-left:4px; width:722px; }
#canvas { background:#fff; display:none; height:417px; overflow:hidden; position:relative; width:722px; }
#before { position:absolute; right:2px; top:2px; }
#after { background:url(img2.jpg) top right no-repeat; border-left:3px solid #fff; height:413px; position:absolute; right:2px; top:2px; width:722px; z-index:2; }
#sliderContainer { bottom:-32px; height:31px; left:2px; overflow:hidden; position:absolute; width:718px; z-index:3;}
.ui-slider { left:-6px; position:absolute; width:663px; z-index:3; }
.ui-slider-handle { background:url(handle.png) no-repeat; cursor:pointer; display:block; height:31px; position:absolute; width:67px; }

The beforeAfter div is responsible for the background and dimensions.
The canvasContainer div creates the height and width of the canvas so that when I show the images, the height remains the same.
The canvas div is the container of my before and after images.
The before div is the image before and the after div is my image after.

The slideContainer div matches the width of the images and has the ui-slider inside it. Since my handle has a drop shadow, I needed to offset the slider by the extra pixels from the handle’s shadow. I added overflow:hidden to the sliderContainer so that when the slider handle gets to the edge of the slider, it lines up with the edge. I also set up the ui-slider’s width to be the total width of the images minus the width of the handle.


Next, I went to work on the Javascript.  I grabbed jQuery 1.4 from the google jsapi and a custom jQuery ui download of just the slider widget.

After more trial and error, I came up with this JS (read through the comments for an explanation):

// wait for everything to be loaded before doing anything
$(document).ready(function(){
	// set the max width var because it's used in several places
	var max=722;
	// set a var to reference the after div
	var after = $('#after');
	// initialize the slider
	$("#slider").slider({ max:max, min:0,
		slide:function(e, ui){
			// when the slider slides, set the width of the image based on the max width
			after.width(max - ui.value);
			// if it is at the max, hide it. If it is not and it's not visible, show it.
			if(ui.value===max){
				after.hide();
			} else if(!after.is(':visible')) {
				after.show();
			}
		}
	});
	// create an image in the dom to load the after image so we don't display the widget until the image is there
	var img = new Image();
	img.onload=function(){
		// show it all with a couple of effects
		$('#canvas').delay(500).fadeIn('normal');
		$('#sliderContainer').delay(800).animate({bottom:0});
		img=null;
	}
	// set the image source to kick this whole thing off
	img.src='img2.jpg';
});

For the animation, I tried to make it simple and clean. One of my biggest pet peeves with a lot of the JS/HTML/CSS work that is coming out these days is that it’s not seamless.  There is a skip, there is a blink, there is a jump when the animation starts or ends.  It just doesn’t produce the quality of animation/motion graphics that you can get from using flash.  To avoid this, I chose the simpler animation effects and added a bit of delay so that the user can actually see what’s happening.

Grab the source here

Ubuntu 10.04 LTS Terminal Opacity

I upgraded my Ubuntu machine to the latest LTS build last week and was quickly disappointed that my terminal no longer had opacity. No matter what I did, the window would just appear as a solid color. I tried googling, etc. but couldn’t find any solution online.

I gave up and ended up editing my background profile and fixed it totally by accident. I switched my background from transparent to a solid color and then back to transparent and voilà! transparency was back.

I’m not 100% sure why the issue happened in the first place-anyone?-but I hope that someone finds this fix out there.

Superscript and subscript with dynamic flash text

We recently came across an old issue that I’ve experienced with flash, dynamic text, and superscripts before, but some of our other developers had never seen before, so I thought I would create an entry for posterity’s sake.

The issue is as follows, you want to enter superscript into an HTML enabled text field, so you add a sup tag around the text you want to superscript. You compile your file and no text appears where you expect it to. Turns out, sup and sub tags are not supported by a textfield that is dynamically populated.

Oh crap. What to do?

Well, don’t fret!

Download these fonts, install, and restart Flash. Next you need to embed the fonts in the SWF. There are many ways to do this that are well documented. My preferred method is to open your FLA and create a dynamic textfield, setting the font to the desired super or sub font. Then include the characters you want to publish (typically, I just need numerals). Limiting the characters you include will limit the file size of the resulting SWF.

Use the following html tag to set the super or sub font. For instance,
This text requires a footnote <font face=”GG Superscript Sans”>1</font>

Voila, you’re ready to add super or sub scripted fonts to your flash.

Windows console ‘ls’ tip

I’ve been using the console a lot more on my windows machine here at blenderbox, and I find myself typing in the unix command ‘ls’ to display the directory listing over and over.  Each time I want to display the directory, I end up having to type in two commands.  I finally decided to do something about this today and created a batch file for ls to run the dir command.  To do this,

  1. Open a new text file, type: dir
  2. Save as ls.bat in C:\Windows\System32\

Now whenever I type ls by mistake, it runs the dir command, giving me the directory listing.  Sweet yea?

DBP, Renée Rouleau, Blenderbox Honored with W3 Gold Awards

Blenderbox is thrilled to announce this year’s W3 honors — two Gold awards in the Tourism and Homepage categories for Downtown Brooklyn Partnership’s “It’s the Moment” campaign site, and one Gold award in the Beauty and Cosmetics category for the Renée Rouleau Skin Care site!

This awards cycle received
 nearly 
3,000 
entries 
from 
ad 
and interactive
 agencies,
 in‐house
 creative
 professionals, web and graphic 
designers, and other
 web
 enthusiasts, and less
 than
 10%
 of
 all
 entries
 were
 selected
 as
 Gold
 Winners.  We are truly honored to be counted among these highly talented agencies.

“We were incredibly impressed by the quality and creativity of this year’s entries.    W3 winners continue to set the bar in Web development and design, push the limits of web advertising creativity and advance the use of web video. We are thrilled to have reviewed such a diverse and respected pool of work” said Linda Day, the executive director of the IAVA. “On behalf of the entire Academy, we congratulate this year’s W3 Award winners as they continue to advance Internet creativity and greatly contribute to the robust and ever-changing online community.”

64-bit MySQL, Ruby, Rails, RubyGems and Git installer for Snow Leopard

Snow Leopard
I took the release of Snow Leopard as an opportunity to do a clean wipe and re-install of Leopard and Snow Leopard. As usual, Dan Benjamin has a great series of articles on getting the latest and greatest setup.

I aggregated these articles into a bash script to automate installing MySQL, Ruby, Rails, RubyGems and Git.

Prerequisites
As Dan mentions, the prerequisites for this script are:

  1. Mac OS X 10.6 Snow Leopard
  2. The latest Xcode Tools (from the Snow Leopard DVD or downloaded from Apple — the 10.5 version won’t work)
  3. Confidence running UNIX commands using the Terminal

Caveats

  • This has only been tested on a completely fresh install of Snow Leopard, not recommended for upgrades
  • This will overwrite your existing ~/.profile

Instructions

  1. Download and extract the following gist: http://gist.github.com/178699
  2. $ sudo sh
    bootstrap_snowleopard.sh

When finished you will have 64-bit versions of MySQL, Ruby, Rails, RubyGems, and Git.

BONUS! Get the installers for Firefox, Adium and Textmate http://gist.github.com/178773

should_be_valid_with_factory macro for Shoulda/factory_girl

When writing unit tests I tend to 1) use factories instead of fixtures and 2) keep my factories in synch with model validations. As such, I like to write a test to ensure that out of the box a new instance of a factory object will be valid. Here is a macro to help out with that:



class ActiveSupport::TestCase

  def self.should_be_valid_with_factory
    klass = self.name.gsub(/Test$/, '').underscore.to_sym
    should "be valid with factory" do
      assert_valid Factory.build(klass)
    end
  end

end

Put this in your ActiveSupport::TestCase definition and it will be available in all your tests. Simply call it by name with no params:


class BuildingTest < ActiveSupport::TestCase
  should_be_valid_with_factory
end

Naming for this method was inspired by a similar method in Dan Croak's Blitz plugin.

Blendercise!

One of the great things about working at Blenderbox is being surrounded by people that are constantly trying to better themselves in one way or another.  Blenderboxers are a curious bunch, always looking to do more, learn more, and create more, and in no instance is this more apparent than during the semi-annual celebration of knowledge known fondly as the Blendercise.

Blendercises are our own particular brand of continuing education; an opportunity for designers to teach us some of the finer points of Photoshop, for developers and information architects to teach us the best SEO techniques, or for project managers to provide tips on organization that might help us in our constant struggle to keep our time sheets up to date.  They’re a way for each department to learn more about the day-to-day work of others and to take away valuable information that makes us stronger individually and as a team.

Anyone can suggest a topic for a Blendercise, and with the constant stream of innovations in web technology, we’re never at a loss for new material.  Previous Blendercises have covered a diverse range of subjects, from SEO and Google Analytics to Photoshop and Web Form Design, and many more are yet to come.

Currently scheduled Blendercises include sessions on InDesign and Sitecore, but with an increased interest in projects requiring open-source development and a variety of opportunities for professional development outside of the Blenderbox office, 2009 may be our biggest year yet for tech-centric Blendercises.

Blenderbox Launches Hewlett Beta

When Blenderbox first engaged with the Hewlett Foundation to redesign their existing site, Hewlett wanted to be sure that their site’s users would stand to benefit first and foremost.  So Blenderbox developed beta.hewlett.org, allowing the Foundation to gather feedback from the site’s users that could be used to gauge their level of satisfaction with the new design and influence the ultimate re-launch of hewlett.org.

After receiving initial user feedback, the site’s new design is a rousing success!  New sections like “What We’re Learning” have been met with remarkably positive feedback, and many users are applauding the Foundation’s user-friendliness and transparency as well.

Since 1967, the Hewlett Foundation has been making grants to solve social and environmental problems at home and around the world.  For more information about the Hewlett Foundation’s mission and work, and to check out the Beta redesign, head over to beta.hewlett.org.