Logo

Maarten Balliauw {blog}

ASP.NET, ASP.NET MVC, Windows Azure, PHP, ...

About the author

Maarten Balliauw is currently employed as a Technical Evangelist at JetBrains. His interests are mainly web applications developed in ASP.NET (C#) or PHP and the Windows Azure cloud platform.
More about me More about me
Send mail E-mail me


ASP.NET MVC Quickly Pro NuGet Subscribe to my RSS feed Follow me on Twitter! View Maarten Balliauw's profile on LinkedIn
Maarten Balliauw - MVP - Most Valuable Professional
Maarten Balliauw - ASPInsider

Search

Archive

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright Maarten Balliauw 2013


Don’t brag about your Visual Studio achievements! (yet?)

imageThe Channel 9 folks seem to have released the first beta of their Visual Studio Achievements project. The idea of Visual Studio Achievements is pretty awesome:

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.

Find the announcement here and the beta from the Visual Studio Gallery here.

The bad

The idea behind Visual Studio Achievements is awesome! Unfortunately, the current achievements series is pure crap and will get you into trouble. A simple example:

Regional Manager (7 points)

Add 10 regions to a class. Your code is so readable, if I only didn't have to keep collapsing and expanding!

Are they serious? 10 regions in a class means bad code design. It should crash your Visual Studio and only allow you to restart it if you swear you’ll read a book on modern OO design.

Another example:

Job Security (0 points)

Write 20 single letter class level variables in one file. Kudos to you for being cryptic! Uses FxCop

While I’m sure this one is meant to be sarcastic (hence the 0 points), it makes people write unreadable code.

There’s a number of bad coding habits in the list of achievements. And I really hope no-one on my team ever “achieves” some items on that list. If they do, I’m pretty sure that project is doomed.

The good

The good thing is: there are some positive achievements. For example, stimulating people to organize usings. Or to try out some extensions. Unfortunately, there are almost no “good” achievements. What I would like to see is a bunch more extensions that make it fun to discover new features in Visual Studio or learn about good coding habits.

Don’t get me wrong: I do like the idea of achievements very much. In fact, I feel an urge to have the Go To Hell achievement (and delete the code afterwards, promise!), but why not use them to teach people to be better at coding or be more productive? How about achievements that stimulate people to use CTRL + , which a lot of people don’t know about. Or teach people to write a unit test. Heck, you can even become Disposable by correctly implementing IDisposable!

So in conclusion: your resume will look very bad if you are a Regional Manager or gained the Turtles All The Way Down achievement. Don’t brag about those. Come up with some good habits that can be rewarded with achievements and please, ask the Channel 9 guys to include those.

[edit]This one does have positive achievements: https://github.com/jonasswiatek/strokes [/edit]
[edit]http://channel9.msdn.com/niners/maartenba/achievements/visualstudio/GotoAchievement [/edit]


Categories: C# | General | ICT | Quality code

Comments (5) -

Dan Fernandez United States |

Wednesday, January 18, 2012 6:13 PM

Dan Fernandez

Hi Maarten,
Thanks for the feedback, suggestions now, while we're in beta, are great. If you have specific ideas for achievements, like we said in the post, suggest them in the Q&A section. The majority of the achievements are positive achievements and in the description we include documentation about the features, like UML, that are underutilized in Visual Studio. We chose to have a few zero-point achievements to point out things that developers shouldn't be doing with the idea that if someone doesn't know how to fix code we can help them refactor code. As for other achievements, there's a lot of things we can do, I could easily imagine 10 achievements just around unit tests, another 20 for Azure, another 20 for TFS, and so on.
Cheers,
-Dan

maartenba Belgium |

Thursday, January 19, 2012 8:08 AM

maartenba

Hi Dan,

Hope you didn't take my post as an offence. I really really like the achievements, it's just that I would like to see a more clear indication that some achievements are negative.

To be constructive, here are some more positive ones:
- Pitcher! - Correctly rethrow an Exception
- Refactor an inherited class into composition
- Cloudy! Create a Windows Azure project
- Code dojo - Write more than 300 lines of code in various classes that compile the first time
- Build a thread-safe singleton
- Create a snippet for <insert common code that the user types>
- ...

Maybe even challenges can be fun:
- Implement the traveling salesman algoryhtm in LINQ
- Create a NuGet package
- ...

Best regards,
Maarten

Mike United States |

Wednesday, January 18, 2012 8:30 PM

Mike

A bit dramatic I think. But I agree, these achievements are only for achievements' sake. People will jump through the hoops to get them.

I'd like an achievement like this:

- Correctly indented HTML for 100 days in a row
- Removed 50 unused variables
- Created XSD before writing XML

Etc.

Wesley Belgium |

Thursday, January 19, 2012 8:27 AM

Wesley

- Thread ninja: wrote 100 threads using Thread, ThreadPool or other classes.
- XML Commentz: added XML documentation to each public or protected class/struct/enum/member in a signed class library
- Konsole Kombat: used NuGet's package manager console to add, remove, upgrade or configure a NuGet package.

Rudi Belgium |

Thursday, January 19, 2012 10:36 AM

Rudi

Maarten,

I agree. My first sentiment was 'I want the CleanCoder achievement'. Gamification does work with certain people to just go a bit further.
But then I had a look at the actual achievements and was really disappointed. The ones in the post are the ones where you should get -100 points for: 'Regional Manager', 'Interrupting Cow', 'Turtles all the way down', 'Magic Numbers', 'Equal Opportunist', 'Overload'

Achievements also seem to be targeted at 'old-school' programming styles. We all know VS is not TDD ready (there is no single TDD kata video out there using only VS2010! I even challenged Eric Mignot to do one... he kindly declined)

Indeed Jonas's Strokes project seems to be the one MS should have 'sponsored' instead of building their own.

There could indeed be achievements for using keyboard shortcuts, following SOLID principles, adhering to .NET conventions like correctly implement IDisposable, ...

So many positive achievements to be had. It's in Beta, so let's hope the RTM can bring a better message.

Comments are closed