tommy
  • photography
  • projects
  • archive
  • taking stock of domains

    dev, project, website Jan 6, 2019

    Over the Christmas & New Year break, I spent a bit of time reviewing and cleaning up my side projects. Fiddling with the DNS for my new projects forced me to inventory the domains I have registered. An update to my projects is long overdue, so this post can scratch that itch.

    Read on →
  • moar photography

    photography Jul 22, 2018

    Read on →
  • updated photography

    photography Nov 5, 2017

    Read on →
  • heaps o things

    IDEO, JavaScript, UX, dev, project Feb 3, 2013

    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!

    Read on →
  • Cleaner RSpec Controller Specs

    RSpec, dev, ruby, testing May 19, 2011

    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:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    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)
    end
    

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

    Read on →
← Older
  • sillylogger
  • sillylogger
  • A place for me to put photography and work that is too long for Twitter, but doesn't fit in Medium's sandbox.