Ron Johnson did a very nice and very concise introduction to index performance and analysis that is very worth your time. It is only an introduction but could still help someone out there fighting an index performance problem.
If you’re not a member of SQLServerCentral.com, it’s quick, easy and free to sign up so don’t let that deter you from reading the article!
There are some major upgrades coming to System Center Virtual Machine Manager 2012. Paul did a good summary write up here. Hyper-V 2012 is also going to get some major improvements that will put it far ahead of VMWare. Check out Sean’s write up here. Things are really changing in the VM world!
Happy (Virtual) Coding!
The preview of the SkyDrive tool for Windows is now available! Much easier to work with. Finally!
Just announced! Microsoft Surface Tablet. 16:9, 1.5 lbs., magnesium case, 9.3 mm thick, beveled edges, full sized USB 2.0 port, Win8, works for all games in the new Windows Store, built in stand, display is 10.3 inches, Corning Gorilla Glass 2.0, cover is 3 mm with magnetic edge for attaching, THE COVER GOES FULL MULTICOVER KEYBOARD!
How many times have you written Trace code and used MethodBase.GetCurrentMethod() or the Exception.TargetSite or the StackTrace in that code to get the method name or better yet, tried to get the line number. Well, they’ve made that much easier in .Net 4.5. Here is a snippet that shows how easy it is (or will be once it’s released):
public void CallMyMethod()
TraceMessage("This is the trace message I want to see.");
public void TraceMessage(string message,
[CallerMemberName] string memberName = "",
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0)
Trace.WriteLine("message: " + message);
Trace.WriteLine("member name: " + memberName);
Trace.WriteLine("source file path: " + sourceFilePath);
Trace.WriteLine("source line number: " + sourceLineNumber);
Very soon, it will be a breeze!
After creating some unit tests, I ran into a problem where the TestInitialization method was failing with either one of two errors.
The test initialization was performing something similar to:
public void Initialize()
myMock = MockRepository.GenerateMock<IMyInterface>();
myMock.Stub(m => m.NextValue()).Return(6).Repeat.Once();
myMock.Stub(m => m.NextValue()).Return(7).Repeat.Once();
myMock.Stub(m => m.NextValue()).Return(9);
The first error I might get on the GenerateMock would be:
Message=Object reference not set to an instance of an object.
Or, on one of the Stub calls I might get:
Message=Previous method ‘IMyInterface.MyMethod();’ requires a return value or an exception to throw.
This was a really frustrating problem and it took getting several people reviewing the problem with me before one individual spotted that two unit tests were running at once. The problem ended up being that using the parallelTestCount=”2″ attribute in the testrunconfig file and the total problem that using this creates. Trying to execute multiple tests at once would be great except for the fact that MSTest executes multiple parallel tests within the same test class. Rhino Mocks is also NOT multi thread safe.
So the next time you see these types of errors, check to see if you’re using a parallelTestCount greater than 1. It might save you a lot of time.
The languages got some major upgrades as well, C++ in particular. The list for C++ is far to long to go into. The F# asynchronous abilities show their influence in the async syntax in C# and VB.
The .Net framework is now even faster and even more support for building parallel and concurrent applications.
I mean the list is huge! Jason Zander did a great summary write up. It’s well worth your time and will give you some of the highlights.
As many of you know, our beloved tool .Net Reflector was bought by RedGate and is no longer free. The last free version is showing it’s age. Enter Telerik to the rescue. They are providing a FREE .Net Decompiler! And this is not some dumbed down version. It supports side-by-side assembly loading, .Net versions 1.1 through 4.0, Silverlight and Compact Framework, lambda expressions, generics, yield statements and auto generated properties. Telerik apparently didn’t think that was enough. They added the ability to create a full Visual Studio project from a decompiled assembly! And if that wasn’t enough, they do three major updates a year! Way to go Telerik!!!
Happy Coding! And decompiling!
When we’re building WCF services, we often want to debug our code. Creating a harness to host our service is easy enough but I’ve seen people open two instances of Visual Studio to do this. One to host and one to debug. However, that’s not necessary. The trick is to go to the Solution properties and set the “Multiple start up projects” and select which ones you wish to start. In my example, I have created a simple WCF service project, a project to contain my service contract, a console app to host the service in for testing and finally a project to actually make the call to my service. I can tell VS to start both my hosting program and my caller program by making the changes shown below.
Another way you could accomplish the same is to right click on the project you want to start, select debug and then select start new instance.
Script Junkie delivers another good post about using the <audio/> tag in HTML5. I really liked the table showing what codecs are supported in each browser. Thanks Emily!