Monday, August 19, 2013

Code Defensively

Code Defensively
  1. Use Microsoft's Code Contracts
  2. Don't call LINQ .FirstOrDefault without checking the return value
  3. Thow ApplicationException for internal checks (and check often)
  4. Check for null after casting a variable using "as"
  5. Think before you code  :-)

Can't RDP? How to enable / disable virtual machine firewall for Azure VM

Oh no!  I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore.  I did ...