Right on the heels of the upgrade to Web Developer 3.5, I took the test for an upgrade to .NET 4. I’ve finally caught up to the latest release. I have to say this was the longest Microsoft certification test that I’ve taken. It was over 80 questions long and split into 4 sections. For a second I thought my test would be lost. When I clicked to finish the exam the testing software crashed. Fortunately, everything was there just like I left it when they rebooted the computer.
Over the holidays, I upgraded my MCPD to .NET 3.5. Now only one more to go to catch up to latest release. This was my first upgrade so I didn’t know what was going on until after I was done. They split the upgrade up into 2 banks of questions representing the 2 tests for that MCPD. Just a heads up for those wondering why you get told you’ll get 40-something questions and end up with 1 of 20-something on the first screen.
If you’re a SharePoint developer, you’ve run into public key tokens but what you might not know is that Visual Studio comes with an executable that can make retrieving them a much easier process.
The following steps will add a “Get Public Key’ option to your Tools menu in Visual Studio:
- Click ‘Tools > External Tools’
- Click ‘Add’ and a new entry will appear
- In the ‘Title’ field type: Get Public Key
- Click the ‘…’ button and navigate to the appropriate sn.exe
- If VS 2008: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\sn.exe
- If VS 2010*: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\sn.exe
- In the ‘Arguments’ field type: -Tp “$(TargetPath)”
- Select ‘Use Output window’ checkbox
- Click ‘OK’
This will save you a ton of time if you are still using tools like Reflector to get the public key.
* This path is from a 64-bit version of Windows.
This is another one of those cases that just beats it into your head to stop making assumptions.
My first delve into RDBMS’s was MySQL. When you create a Foreign Key in MySQL, it will create an Index for you. Unfortunately, I assumed that SQL Server would do the same. Then about a year ago, I was researching ways to speed up some of the queries in a customer’s application when I came across a thread on StackOverflow. What did I find? I was making the wrong assumption and you have to create both the Foreign Key and Index in SQL Server.
Save it. Print it. Do whatever you normally do to catalog your favorite articles but this article by David Mann isn’t just a must read for SharePoint developers everywhere. This article can be used as a checklist or roadmap in any of your future SharePoint development.
I will clarify his point on unit testing though. We all know it can be done with expensive products but they aren’t needed to get worthwhile coverage ratios. Steps 3 and 6 (Patterns and Refactoring) go a long way in making your SharePoint code more unit test friendly. The Patterns and Practice group he mentions have examples of SharePoint code using Repository, MVP, and Service Locator patterns. As you add each one of these to your code, you’ll see it become more flexible and unit test friendly.
Also, his point on throwing exceptions doesn’t mean run out and drop unnecessary try/catch blocks all over your code. If you’re building a library and you find yourself with an empty catch block, you need to assess whether that try/catch is actually necessary or if you can just allow the error to bubble up.