Test an SQL Server Connection

August 17, 2016

I found myself working on a ASP.NET MVC application that was backed by a SQL Server database.  Now the team over in the office can connect to it fine.  However, as mentioned previously, I am working from home until the new office in Winchester opens.  The server was an Amazon RDS instance and I bet that it only allowed white-listed networks to connect to it.  (My speciousness was due to an error reported by Entity Framework as ‘The underlying provider failed’)

So I needed to test it quick, and only test the connection and nothing else.  So I saw this on msdn and created an empty ‘.txt’ file and renamed it with the ‘.udl’ (Universal Data Link) extension.  Then I put in my connections strings and hit ‘Test Connection.’


Sure enough, I got an access denied error.  So I called the person responsible for managing that instance, gave them my I.P. address and I was off to the races.

Good thing to keep in your head.

Backbone: initialize vs constructor

October 20, 2015

I seem to run into this over and over in my Backbone projects. What is the difference between initialize and constructor when creating Backbone object (models, collections, views)?

According to this GitHub issue response by tbranyen:

"constructor runs before Backbone sets up the structure. initialize is called inside the structure’s constructor function. So basically if you need to augment anything before Backbone sets up the structure, use constructor if you need to augment anything after Backbone sets up the structure use initialize.”

So almost always use initialize().  If you do use constructor(), remember that you will most likely need to call the ‘parent’ constructor in your constructor.

Turn off ‘bell’ or ‘ding’ in Terminal

August 11, 2015

If you are using bash:

  1. Edit or create a .inputrc file in your $HOME direcotry
    • vim $HOME/.inputrc  (for vim users, can substitute gedit for ‘vim’
  2. Append the following line:
    • “set bell-style none” (without the “”)


If you are using ‘Terminal’ on Mac OSX see this stackoverflow question.

(To paraphrase: “With Terminal open, go to ‘Terminal’ > ‘Perferences…’, the click the ‘Profiles’ tab,  then go to ‘Advanced’ and there is a ‘Bell’ subsection where you can uncheck “Audible Bell.”)