Archives

Archives / 2008 / November
  • Looking at synchronization and one scary tool

    It is funny how things work out, a disaster can lead to opportunities. Last month my main pc at home somehow got a corrupt hard drive and at first I thought I had lost all my private data (family pictures, documents etc), the drive wasn’t backed up as it was a mirrored drive, which I had thought would be an alright disaster recovery mechanism. It happened while I was upgrading to Server 2008. I broke the mirror and disconnected them. So the drives themselves weren’t connected at the time of upgrade, it was when I reconnected them after the upgrade was successful, the OS just couldn’t see them, maybe a corrupt partition table. I even rolled back to Server 2003, but nothing. The most important thing was that I had to recover that data somehow. This lead me to a piece of software called Active File Recovery which is just so simple to use. To cut a long story short I managed to recover all my missing data. But one thing that really made me think was the fact that this software could see my data and all previous owners data (it was a 2nd hand drive bought from a computer fair).

  • How do you test private methods?

    This morning I read a post by Davy Brion who was explaining a technique to test private methods. Although the post was interesting, it was a comment by Rafferty Uy that got me thinking. He suggests that you make your method protected instead of private and have the testing class inherit from this class. There is much debate as to whether you should be testing private methods at all, and as I am fairly new to unit testing, I have only ever tested my public methods.