Some time ago, frustrated with my RSS reader being overrun by VS2008 beta announcements, I wrote a short post announcing the release of VS 2009 beta 1. And although there are some calls to re-brand the most recent service pack, I doubt we’ll see this version.
Instead we got Visual Studio 2010, with new features such as support for cloud computing, parallel extensions, ASP.NET MVC, etc.
Frankly, I’m not that excited.
Most of the features to be included in the upcoming version are already available to developers as additions to existing developing tools (although most are in CTP mode at the moment).
There ARE the new features of C# 4.0, but unlike the changes between 1.1 and 2.0, the most recent set of changes is “nice to have” at most.
What is more impressive (in my opinion) are the changes and improvements in the new Visual Studio Team System package, which had a lot of room for improvement even after the latest service pack, and especially the new and improved tester version.
Considering the release of VS2008, we’ll probably be able to see a stable version (beta 2) at the second half of the year 2009.
Anders Hejlsberg, Mads Torgersen and Eric Lippert discuss the new features of C# 4.0
(If you use Visual Studio 2003 or you tend to ignore compiler warnings, this post is for you)
Static classes and members have their uses. However, I recently encountered a dangerous pitfall regarding their usage.
Consider the following code:
public static class MyClass
{
public static int myVal = MyClass.myVal;
public static MyOtherClass myClass = MyClass.myClass;
public static Color myColor = MyClass.myColor;
}
Can you spot what is wrong here?
You got it right - this class assign it’s members back to themselves, effectively avoiding assigning them.
If you try using this code using VS2003 it will compile without any notification. In more recent version you’ll only get a compiler warning.
What’s worse yet: you can make the member private and the code would still compile.
But it can get even worse: Since these members are not assigned, with value types you’ll get the default value, while with most classes you’ll have a null reference.
But the Color struct is something different. It retains an Empty value, and if your winform application uses the default theme and colors, assigning an empty color to a control basically does nothing.
Now try understanding why your panel refuses to change color….
One of the new and very annoying feature of Visual Studio 2008 is the WCF service host:
Windows Communication Foundation (WCF) Service Host (WcfSvcHost.exe) allows you to launch the Visual Studio debugger (F5) to automatically host and test a service you have implemented. The tool is integrated into Visual Studio through the WCF Service template and is invoked when you start to debug your project.
Sounds like a useful tool, right?
Well, if you don’t need this functionality, especially if you are used to VS 2005 WCF development, this can be incredibly annoying, more so since you can’t disable the darn thing.
Simply look for this GUID and remove it from your csproj file (don’t forget to remove left over semicolon):
{3D9AD99F-2412-4246-B90B-4EAA41C64699}
Apparently the upcoming service pack for Visual Studio 2008 should include an easier way to disable the service host, so hopefully this solution is temporary.
I have written before a short comparison between “old” and newer technologies, but at the beginning of that post I state that part of the choice of a new technology is the market trend towards that technology. After reading Justin’s post showing that moving to ASP.NET is beneficiary because it’s becoming a prominent technology I decided to implement his research methods (using Google) on different technologies.
I began by searching for file types However, this reflects only on files shared on the web, and since JAVA is a web technology (unlike Delphi) the results don’t say much.
But Google trends provides a clearer picture - while C# remains stable, other programming languages are on the decline:
Focusing on the .Net world, you can clearly see new technologies are dominant in Google searches:
WPF vs. Winforms
WCF vs. Remoting
The rise of .Net Framework 3.0 technologies
With Silverlight being the “Hot New Thing” (maybe because it’s a web-based technology)
So maybe choosing a new technology is a logical move even if it doesn’t offer a significant technological advantage - since keeping older technologies means you are working against the market trend.
So consider switching from Winforms to WPF, from various communication technologies to WCF and from VS 2003 or 2005 to VS 2008 - in the long run the market will force you to do it anyway, either through the job market or through customers demands.
Trying to simply copy/paste code to a blog (especially one you manage online) can create a very ugly block of text. There are two ways to solve this problem:
Visual studio addins - CopySourceAsHtml creates HTML formatted code to paste into the blog.
Online tools - This tool from Manoli.net creates HTML formatted code online.
Browsing through code is always a lot easier using regions, and I keep grouping methods/fields/properties in my code in regions. Now it seems I found the perfect tool for me: Regionerate lets you define regions in your code and determine the way members (fields, methods, properties etc.) should be placed inside them. Regionerate is a zero-friction tool - when setting up, you can choose a Code Layout (the way you want your code to look) or just use the default Code Layout. From that moment on, Regionerate will make sure your code follows that Code Layout.