Archive for the ‘programming’ Category

Html.Encode in .NET 3.5 (used to encode special characters to help stop SQL injection attacks) worked on all the special characters except a single quote.  So if you called Html.Encode (“O’Connor”), it would not encode the single quote.  They fixed this in .NET 4.0 when it started properly encoding to '

Today Microsoft announced Visual Studio Community edition.  It’s basically Visual Studio Professional free for teams of 5 or less.  Good opportunity to learn the Microsoft stack if you were ever interested…but it’s also a great javascript/html editor.

You know you’ve been programming too long when you start trying to end sentences with a semicolon;

I like how in all of these modern APIs, they’re finally realizing that the first thing a developer looks for is an example.  It’s often right there on the front page.  They don’t want to read through a page of crufty descriptions of all possible uses when an example explains it clearly.

For a corporate web application, I was looking into using an open source DLL that was under the Affero General Public License.  Initially, I thought it’d be free because it was open source.  In this case, it turned out it’s only free for commercial use if you publish your own source code.  Otherwise, you have to pay for a commercial license.  This might be ok in the right situation, but I learned from this not to just assume that open source libraries are free in all cases.  Check those licenses carefully before you do anything!

I recently used a Tuple, which is a newish .NET compound key structure. Need to look up something in a data set using 4 keys? You can use a Dictionary with a Tuple key. What if you want to be able to return more than one row for each key? Use a Lookup with a Tuple key.

In scrum software development, there are all these ridiculous special phrases like “story points”, “burn down”, etc.  Specialized phrases always annoyed me.  Why can’t you just speak in plain English?  Why do they have to invent these silly terms?  Is it just to protect the trademark of the process inventor?  It’s kind of like Bananagrams…great (and stressful) word game, but instead of “next” you say “peel” and “bananas” instead of “done”.

The new Visual Studio will be predominantly black and white.  This is great news for coding dogs!

You can write stored procedures in C#.  Who knew?  SQL is an ancient language that LOOKS VERY SHOUTY because it’s often in all caps.  I was just noticing that T-SQL added TRY/CATCH back in 2005.  Maybe Microsoft will modernize their version of SQL as they did VB.  You can do any object-oriented stuff in VB as you can in C#…like attributes…if you can stomach the syntax.  Imagine modern object-oriented programming in an ALL CAPS language.