Heaps O Things

IDEO, JavaScript, UX, dev

Good software is intuitive. Leveraging one’s pre-existing knowledge of the physical world can be useful formaking a software application more comfortable for the user. More literature on that here. I’ve worked with IDEO on a few pieces of software and seen this physical pattern in their designs more than once:

When I look at that sketch; I see the designer’s intention and I think that arrangement of elements in a clump is natural, but what an unbearable pain it is to make that happen with HTML! There’s no magic CSS for display: in-a-pile;… until now!

Cleaner RSpec Controller Specs

RSpec, dev, ruby, testing

Testing is an important part of software development. Having a solid test suite allows you develop more confidently – enable you to make large refactorings without fear of unintended consequences. I test almost all the code I write.

Recently, I found a bug that allowed users to see ‘inactive’ products; so I wrote a test to prevent that. I’ve seen lots of specs that test active products like so:

it "scopes products to active and available" do
    not_active = Factory(:product, :active => false)
    not_available = Factory(:product, :available => false)
    active_available = Factory(:product, :active => true, :available => true)
    get :index
    assigns(:products).should_not include(not_active)
    assigns(:products).should_not include(not_available)
    assigns(:products).should include(active_available)

Test like this are wordy and can lead to a ton of factoried objects. There’s got to be a better way!!

Berkeley Asian Business Conference

poverty, wikipedia

The most anti-poverty tool the world has ever seen is Wikipedia.
Peter Schwartz

Malaysian Flip Flops

Facebook, Google, Malaysia

I just got back from Port Dickson with Mike, his wife Shux, and her entire family for Chinese New Year. I was really impressed with the counterfeit products you can buy in the market.. these flip flops look just like my real Facebook flip flops.