What We’re Thankful For!

Today is Thanksgiving in the USA, a time for reflection and gratitude for all of the joys in our lives.  And while our staff will be busy showing our family and friends how much we appreciate them, several of them took a few moments to say what in they are thankful for in technology. The…

Wintellect Becomes Premier Xamarin Consulting Partner

It seems that all roads in software development today lead inevitably to mobile apps. Building apps that span multiple mobile platforms is no easy task, but Xamarin makes bridging those environments much easier. And so it’s with great pleasure we announce that Wintellect has become a Premier Xamarin Consulting Partner. Wintellect employs a dedicated team…

Wintellect’s Jeff Prosise Interviewed on Twit.tv!

Wintellect Co-Founder Jeff Prosise was recently a guest on the latest episode of Coding 101 on Twit.tv.  Father Robert Ballecer who calls himself the “Digital Jesuit” interviewed Jeff with Lou Maresca from Microsoft and they covered many topics starting with how Jeff got started with computer science having come from an engineering background before getting caught up…

Wintellect Announces Live Virtual Training

Wintellect is adding a new resource to their training toolbelt by offering Virtual Instructor-Led courses to their catalog of On-Site and WintellectNOW On-Demand training courses. Ever wish you could attend a real training class led by the industry’s best trainers without leaving your desk or even having to get out of your pajamas?  Well now you can…

Wintellect.Analyzers: Five New Roslyn Diagnostic Analyzers and Code Fixes

When I first saw the Roslyn compiler, I was thrilled! For once the compiler was not going to be a black hole where source code comes in and on the other side of the worm hole a binary comes out. With open extensibility there’s going to be some amazing tools developed that were impossible to do any other way. With this week’s release of the Visual Studio 2015 Preview, the Roslyn API is solid and ready for extension!

We have posted on Wintellect’s GitHub account our first five analyzers and code fixers we wrote to explore that part of the API. They should give you a good idea how to get started writing your own new rules. Here’s the initial set of rules:

AvoidCallingMethodsWithParamArgs
This informational level gives you a hint that you are calling a method using param arrays. Because calls to these methods cause memory allocations you should know where these are happening.

AvoidPredefinedTypes
The predefined types, such as int, should not be used. When defining a type the built in types can be different sizes on different versions of .NET (e.g., desktop and Internet of Things) so you want to be as explicit about types as possible.

CallAssertMethodsWithMessageParameter
Calling the one parameter overload of Debug.Assert is a bad idea because they will not show you the expression you are asserting on. This analyzer will find those calls and the code fix will take the asserting expression and convert it into a string as the second parameter to the two parameter overload of Debug.Assert.

IfAndElseMustHaveBraces
If and else statements without braces are reasons for being fired. This analyzer and code fix will help you keep your job. :) The idea for this analyzer was shown by Kevin Pilch-Bisson in his awesome TechEd talk on Roslyn. I just finished it off.

ReturningTaskRequiresAsync
If you are returning a Task or Task<T> from a method, that method name must end in Async.

There’s no real secret to writing rules. The Roslyn API is extremely well done and once you start getting a feel for it, you can quickly see how things fit together. The best thing you can do is just spend time looking at the Roslyn Syntax Visualizer to see how syntax and tokens fit together. I personally found right clicking on the expression and looking at the Directed Syntax graph was super helpful.

Feel free to add your rules to our repository. I’ve got a couple of more I’m working and so do other folks at Wintellect so subscribe so star the repo to get notifications of updates.

How Wintellect uses Microsoft Azure

Starting around two years ago we started moving all of our internal business applications, tools, and web properties over to Microsoft Azure.  As with any transition there were bumps in the road but overall the move has been a huge blessing and ve...