Monday, August 31, 2009

Mac Pro upgraded to Snow Leopard

Painless install of Snow Leopard on my early 2009 Mac Pro. I don't really notice much new. System seems a bit snappier, but that purely qualitative observation on my part. No numbers to back that up.

Tuesday, August 18, 2009

Know your SUT and your mocks

I was working with a colleague of mine tonight and he became confused with his unit test. It was an interesting exchange, so I thought I would write it up. He had a system under test (SUT), a service, that had a number of dependencies. The dependencies were mocked using a mocking framework (mockito in this instance). He was writing a test to get better code coverage in preparation for some refactoring and he started to add an expectation to the SUT. When he ran his test, the test failed, but the error lead you to believe that it was the improper use of matchers within mockito. It took him and I awhile to realize that he was trying to add expectations to a non-mock class. In hindsight, he should have picked up on this right away, as we have a coding convention of naming our mock object instances as mock*. The SUT does not follow this naming convention and hence you should see the problem right away. A little concerned that mockito didn't alert us to the fact that we were trying to add expectations to a non-mock instance. Moral of the story: Make your mock object instances stand out--name them appropriately so everyone knows that it's a mock.

Wednesday, August 12, 2009

My top 5 favorite Mac OS X apps/tools/utilities

One of my friends is buying his first Mac (a Mac mini) and I told him I would compile a list of tools and utilities that I use on my Mac systems. Here are my top 5 that I absolutely must have:


  • Google Quick Search Box/Quicksilver: I was a big fan of Quicksilver, but it seems to be dead. Sounds like the Quicksilver developer is now working with/for Google on something similar: Google Quick Search Box (QSB). Love QSB and it seems to be in active development too.


  • iTerm: Gotta have a command line. This one does tabbed terminal consoles.


  • TextMate: Great programmer's editor.


  • Versions: A good Subversion client for OS X.


  • Growl: Notification system. Extremely helpful.