Visual Studio Achievements – The Beta Goes Live!


image001

The gang over at Channel 9 have just released the first beta of their Visual Studio Achievements project. I tried it out last night and it’s very cool. Here’s what it’s all about:

Bring Some Game To Your Code!

A software engineer’s glory so often goes unnoticed. Attention seems to come either when there are bugs or when the final project ships. But rarely is a developer appreciated for all the nuances and subtleties of a piece of code–and all the heroics it took to write it. With Visual Studio Achievements Beta, your talents are recognized as you perform various coding feats, unlock achievements and earn badges.

You can read the full announcement here and grab the beta from the Visual Studio Gallery here.

 

C# + ReSharper = Awesome: Tip #2 – Create Field


This is the second in a series of quick how-to posts on ReSharper.

Tip #2 – Create Field

Use: Within the body of a class or property, you can type the name of a non-existent variable name. When you place your cursor on the variable, ReSharper provides several options to resolve the impending compilation error. Create Field is one of the options.

Before
   1:          public void AddAlbum(string album)
   2:          {
   3:              if (String.IsNullOrWhiteSpace(album))
   4:                  throw new ArgumentOutOfRangeException("album",
   5:                                                        album,
   6:                                                        "Please provide an album name.");
   7:   
   8:              _albums.Add(album);
   9:          }
Press <Alt+Enter>

image

After
        private IList<string> _albums = new List<string>();

        public void AddAlbum(string album)
        {
            if (String.IsNullOrWhiteSpace(album))
                throw new ArgumentOutOfRangeException("album",
                                                      album,
                                                      "Please provide an album name.");

            _albums.Add(album);
        }

Note: I chose the type IList<string>. The default type selected by ReSharper in this case was object. I also added the initializer to the field to avoid null reference exceptions. Please don’t take any of these examples as best coding practices, they are contrived to demonstrate a particular refactoring.

Happy coding!

 

del.icio.us Tags: ,,

Halo-Inspired Theme for Visual Studio


I will eventually get this posted to Studio Styles. Until then, here is a dark theme for Visual Studio that I created. The green and orange give it a Halo-ish feel. Let me know what you think in the comments.

HaloVibe theme in VS2010

Downloads

HaloVibe theme for VS2008

HaloVibe theme for VS2010

 

kick it on DotNetKicks.com

About Me

I am a Philadelphia-area .NET developer, Microsoft MVP, husband, dad, and geek. I am currently a software engineer at Eclipsys Corporation. I have over 15 years of software development experience in the Healthcare and Manufacturing industries.

More...

Categories

Archives