Minor Blog Name Change

In trying to continue to clean up some names, I will be moving my blog from https://jmarkhowell.wordpress.com over to http://johnmarkhowell.com (my full name).  The old blog will hang around for a while but new postings will be on the new site.  All old posts were imported into the new site so you don’t have to go back and forth to search for older postings.

Happy Coding and see you on the other side!

Posted in Uncategorized | Leave a comment

Finally IIF is coming to T-SQL!

After a long wait and many, many requests, the IIF function is finally coming to SQL Server 2012! If you aren’t familar with this function but yet you do use CASE statements, you’re going to love the IIF function.  Check out the MSDN entry and see!

 

Happy Coding!!

Posted in Uncategorized | Leave a comment

Nice & Quick SQL Index Perf Intro

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!

Happy Coding!

Posted in Uncategorized | Leave a comment

SCVMM 2012 is changing the game!

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!

Posted in Uncategorized | Leave a comment

SkyDrive Preview for Windows

The preview of the SkyDrive tool for Windows is now available!  Much easier to work with.  Finally!

Posted in Uncategorized | Leave a comment

Microsoft Surface Announced!!!!!!!!!!!!!!

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!

Posted in Uncategorized | 3 Comments

Yet another nice new feature in .Net 4.5 (beta)

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!

Happy Coding!

Posted in Uncategorized | Leave a comment

(Not so much) fun with Rhino Mocks

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:

[TestInitialize]
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:
    System.NullReferenceException occurred
      Message=Object reference not set to an instance of an object.
      Source=mscorlib

Or, on one of the Stub calls I might get:
  System.InvalidOperationException occurred
  Message=Previous method ‘IMyInterface.MyMethod();’ requires a return value or an exception to throw.
  Source=Rhino.Mocks

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.

Happy Coding

Posted in Uncategorized | Leave a comment

Visual Studio 11 Beta–Holy Smokes Batman!!

Visual Studio 11 Beta and .Net 4.5 Beta became available on February 29th.  Some where expecting the normal incremental updates and improvements but the VS and .Net team appear set to knock this one totally out of the ball park!  Everyone knew that the UI was going to get a facelift for Win8 but that’s just the tip of the iceberg.  You can debug those Win8 apps locally or in the simulator.  You can upload directly to the Windows Store.  The tab bars have been simplified.  The JavaScript tooling support has been greatly improved.  And that’s just some of the stuff in the IDE.

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.

Happy Coding!!

Posted in Uncategorized | Leave a comment

Decompiling .Net

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!

Posted in Uncategorized | Leave a comment