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.

shoulda todo list integration test

One of the things I like most about TDD, and shoulda specifically, is that if a thought pops up of something I need to add I can add a deferred test and come back to it later. In shoulda you can do this with:

should_eventually "do something"

#or just leave off the block
should "do something"

This works great for models/controllers, but I also wanted a way to integrate a miscelanious todo list into the flow that would pop up in autotest or when running the whole test suite. To accomplish this I’ve been keeping a TodosTest in the integration tests directory:

require File.dirname(__FILE__) + '/../test_helper'

class TodosTest < ActionController::IntegrationTest
  context "TODO:" do
    todos = [
             'add the jquery rounded corners plugin',
             'add the jquery dropshadow plugin',
             'scope actions in application.js to specific pages'
            ]
    todos.each do |todo|
      should_eventually todo
    end
  end
end

The output of this is:

  * DEFERRED: TODO: should add the jquery rounded corners plugin.
  * DEFERRED: TODO: should add the jquery dropshadow plugin.
  * DEFERRED: TODO: should scope actions in application.js to specific pages.

Since this isn't really an integration test I usually add a line for this in the .gitignore.

Also - this is a handy bash alias to print the todo's without the deferred/should language:

alias todo="ruby test/integration/todos_test.rb | grep TODO | sed -e 's/DEFERRED: TODO: should //g'"

The cleaned up output is:

  * add the jquery rounded corners plugin.
  * add the jquery dropshadow plugin.
  * scope actions in application.js to specific pages.

Introducing Compost

This past weekend was the Rails Rumble and a team of intrepid blenderbox developers hunkered down in our Brooklyn headquarters and, in a mere 48 hours, produced a slick new web app: Compost.

Compost is the simple way to post, share, and present your design comps.

More than just a slideshow, Compost allows you to control your presentation and your message. Now your clients see what you want them to see, when you want them to see it.

Sharing comps is easy:

  1. Post. Give your gallery a name and upload your comps. Upload as many images as you need – all at once.
  2. Share. Invite people to view your new gallery. Emails are sent to your clients with a unique URL for their gallery.
  3. Present. Control your viewer’s experience in real-time – remotely! With complete control of your presentation, you decide when, and for how long, each image appears on-screen. The viewer – your client – sits back and watches the show.

Try it yourself.

A bash script for bootstrapping a Rails app with jRails/jQuery, rspec, restful-authentication, and a default controller.

Download from github:
http://github.com/npverni/rails-boilerplate-script

After running it in the root of a new Rails app you’ll be setup with:

  • Authentication via restful-authentication
  • the rspec plugins for BDD
  • the jRails drop-in replacement for using jQuery instaed of Proto/scriptaculous
  • A ‘welcome’ controller
  • A application.html.erb layout

The “tight collaboration” that created TimesPeople

Khoi Vinh on getting good ideas out faster by collaborating closely:

TimesPeople is the result of a tight collaboration between a small team of our technologists and designers and, for a new feature on our site, they managed to launch it in something like record time. It was actually a lot of fun bringing it to life, but the really important thing is the try-it-and-see approach that drove it. Rather than spend months and millions on creating the ‘perfect’ social networking addition to our site, we decided to take a good idea and get it out as quickly as possible. It’s certainly not perfect, but we’re hoping to learn as much as we can about how social networking makes sense in the Times environment.

From “People Wanted” (subtraction.com)