Really?

I am playing around with S3’s REST library for fun. I started writing the request signature code and quickly realized something, the .NET HttpWebRequest object doesn’t allow the date header to be set. You can’t send the Date header. No matter what. Unless you implement your own TcpClient

Am I missing something? Does this make sense to anyone? Encapsulation doesn’t mean restricting behavior, it means restricting knowledge of implementation details. Maybe Microsoft had a reason for enforcing this behavior, but I would like to at least know about it.

Luckily, Amazon supports the alternative x-amz-date header.

SQL Server Mirroring Starter

The past few days, I have been playing around with mirroring on SQL Server. Even though there is a GUI to guide you through setup, it isn’t that easy until you understand a few things. I won’t go into details since there are tons of great resources to help setting up mirroring, I will just point you towards some of those resources.

  • The step-by-step guide - This has most of the info you need for mirroring, but it is way too long. Still a great article though.
  • Servers should be in a domain - The first time I tried this, I tried it without a domain controller and DNS. It was a pain. Adding the servers to an AD domain makes it a ton easier. Also, most everyone with SQL Server already has an AD domain, so this is a no brainer.
  • SID’s are a pain - In a previous post, I talked about the orphaned user problem that backup restores have. Well, mirroring has the same problem, but a different solution. Since the witness server controls failover, you can’t rely on a script to fix the user mapping when something fails over. Instead you have to create a login with the same SID on both the principal and partner servers. This article talks more about SIDs and the MSDN site has info on CREATE LOGIN syntax.

Once mirroring has been setup correctly once, the next time is a lot easier. I would highly recommend creating deployment scripts that can set up your entire DB environment because SQL Server setup just has too many steps that are easy to forget or miss.

Review: Quickcam Pro for Notebooks

My dad was early adopter of webcams. I was not. Looking back on it, he understood their power to bring people together that aren’t geographically close at all. During that time, he experienced the pain of bad internet connections, terrible drivers, and installation hell. I waited until all that disappeared.

I bought the Quickcam Pro for Notebooks because I have an increasingly growing number of people I want to talk to that aren’t anywhere close to me. This model caught my eye because it works for notebooks, but has an awesome stand for desktops. Not to mention it is super sleek and small.

Aesthetics are always important, but the quality is where the substance is and this camera has amazing quality. Skype HQ video is really awesome and I use it all the time.

Most importantly, the installation is super easy and lightweight. Pop in the CD, install, and it works. No problems, at least for me.

I highly recommend buying this webcam to anyone out there, you won’t regret it. Unlike the Arc mouse, I have had this camera longer and would buy another one if it broke tomorrow.

Not only do I recommend this webcam, but I recommend video conferencing for anyone that needs to talk to people remotely, but that’s a different story for a different day.

My Favorite Noteworthy Webmail Feature

I use Noteworthy Webmail all day, every day. Yes I work for Mailtrust. Yes I coded on the Webmail team for a while. But that doesn’t change the fact I love the webmail interface.

Yesterday, I got back to my desk after a meeting and started attacking the 30 emails that had accumulated during that time. After reading through them, the next step was deleting because I use my Inbox like a task list. While doing this, something dawned on me. My favorite webmail feature is the one I don’t think about. It is the one I use every day. Check-Drag.

Check-Drag is the ability to click on a checkbox, hold the mouse button down, and select other checkboxes by dragging the mouse over them. Hopefully the video below illustrates how this works. Using it has become second nature, so the only time I notice it is when I am using a different application that doesn’t support it.

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Webmail still supports shift-click and ctrl-click, but check-drag is just easier to use in my opinion.

As a side note, this is my first screencast Feel free to mock and heckle me. Also, tell me if you think it is stupid, or good. If it could be better, tell me how. I hate watching it because I hate the sound of my voice. At this point in my life, I believe I am ready to take the criticism that my peers might have :)

Book Review: Refactoring to Patterns


Refactoring to Patterns provides some of the glue that Design Patterns (GoF) and Patterns of Enterprise Application Architecture (PoEAA is missing. The concept of the book is very simple: to provide examples of how to use design patterns to refactor code. A side product of this is the reader should really have an understanding of the two books previously mentioned before reading this book. If GoF and PoEAA is the bible, then Refactoring to Patterns is the Sunday school teacher. I definitely recommend it to every developer.

What I love most about this book isn’t the content, but how it attacks problems. Every developer has created code that isn’t beautiful. Code that quickly becomes unmanagable. This book bridges the divide between that code and a beautiful, design patterns based solution. When I first skimmed through some of the refactorings, I thought really? Compose Method made it into this book? But then I started thinking that it is probably the simplest, yet most under utilized design pattern around.

Much like GoF or PoEAA, this book should not be read once, but regularly. I would encourage readers to try and take one or two things away from the book, not everything. Memorizing the steps or refactorings isn’t as important as understand where and when they should be used. Personally, Compose method, Move Accumulation to Collecting Parameter, and Replace Constructors with Creation Methods are the refactorings I took away from the book.

Although I wrote this whole review, the afterword of the book contains the best summary of what this book means to developers.

The true value of this book lies not in the actual steps to achieve a particular pattern but in understanding the thought processes that lead to those steps