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.
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!
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"donot_active=Factory(:product,:active=>false)not_available=Factory(:product,:available=>false)active_available=Factory(:product,:active=>true,:available=>true)get:indexassigns(:products).should_notinclude(not_active)assigns(:products).should_notinclude(not_available)assigns(:products).shouldinclude(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!!