comments .net, c#, visual-studio, csadvent edit

My contribution to this year’s CSAdvent, hosted by my buddy Matt Groves, is all about trying to surface your coding and naming standards right in Visual Studio. Visit to see the full calendar of posts!

Starting in Visual Studio 2017, we have the option of using an “.editorconfig” file to define tons of editor standards - from basic things, such as “Tabs versus Spaces”:

indent_style = tab //TABS RULE
indent_size = 4

to more advanced items like, “prefer curly braces to surround code blocks” (with an associated severity)

csharp_prefer_braces = true:none //"PREFER" them, but don't highlight the code in the editor

Backing up a bit, the .editorconfig file/format is an open standard that Microsoft has adopted as a first class citizen in Visual Studio. The open standard doesn’t define specific coding styles/standards (like we see above with csharp_prefer_braces), so those only apply to plugins or tools that know about them (i.e., Visual Studio - and I would expect, eventually, VSCode as well)

The greatest part about this, to me, is the ability to define various standards and what severity to surface them, all without third-party tooling (such as ReSharper).

I am able to define this rules in a plain-text file, and simply check it into my repository.

There are tons of rules you can apply, such as csharp_prefer_braces, to specifying the exact order you prefer your modifiers in:

# CSharp and Visual Basic code style settings:
dotnet_style_require_accessibility_modifiers = always:suggestion

# CSharp code style settings:
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion

# Visual Basic code style settings:
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion

And, as you can see, VB.NET is also supported. The rule name itself indicates the targeting:


You might be thinking, “That’s great, Calvin, but how does that make them any more discoverable?”. Wonderful question. The “discoverability”, lies in the severity ratings that most (not all) of the rules can accept:

Severity Description
none Does not show anything to the user when the rule is violated. Rules with this severity never appear in the Quick Actions or Refactoring menus.
silent/refactoring Does not showing anything to the user when the rule is violated, however, these rules will show up in the Quick Actions or Refactoring menus.
suggestion When this style rule is violated, show as gray dots under the first two characters.
warning When this style rule is violated, show it to the user as a compiler warning
error When this style rules is violated, show it to the user as a compiler error

As you can see, picking the proper severity will help surface these rules to your developers, right inside the IDE.

I have started leaning towards the warning severity, as the suggestion style is difficult to see (in my opinion).

We’ve only discussed stylistic standards up to this point, but what about your good ‘ole fashion naming standards? We need that private variable to start with an underscore, no exceptions! Well, you can do that, too!

Granted, naming standards get a little more involved, so let’s look at an example.

Here is an example that defines that all Local Functions are named using PascalCase:

dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions = local_function_style

dotnet_naming_symbols.local_functions.applicable_kinds = local_function

dotnet_naming_style.local_function_style.capitalization = pascal_case

This block defines a variety of things, but ultimately says that any “local_function” (applicable kinds) is “suggested” (severity) to be in “pascal_case” (capitalization).

These types of rules are a little more difficult to wrap your head around, so I suggest looking over the Visual Studio documentation to get a better understanding.

If you have any questions or comments, feel free to leave them below, and I’ll try to help in any way I can!

comments career edit

Today is bittersweet.

Today was my final day at Heuristics, and I had to bid adieu to my teammates of the last 4.33 years. We did a lot of cool things together, and I’m proud of everything we shipped (well, most of it anyway). I can honestly say that I learned a ton about begin a better software developer, about being on a remote team, shipping a quality application, and a lot more.

So, what’s next?

Well, I’ve accepted a position as a Senior Developer at JPMorgan Chase here in town, where I’ll get to put my skills to use on a .NET Core application, which I’m very excited about!

I don’t start until October 8th, so until then, I’ll be getting my home office rearranged into a “production studio” to support my Twitch channel / YouTube channel (CodeBytesTV) and upcoming podcast (.NET Bytes).

comments dictionary, sdd, boxing edit

For our first dictionary entry, we’re going to take a look at the term, “Boxing”.

Boxing can be described as the process of converting a value type (integer, decimal, char, etc.) to the object type, or to any interface type that the value type implements.

The act of “boxing” is implicit (it is possible to box explicitly as well, but not required), whereas the act of “unboxing” is explicit.

Take a look at the following example code that boxes the unboxedInt into the object boxedInt:

int unboxedInt = Int32.Max;

object boxedInt = unboxedInt;

Boxing is a fairly expensive process, as a new object, boxedInt, is created on the stack, which then references a copy of the unboxedInt value on the heap (which allows for garbage collection).

comments dictionary, sdd edit

Recently, I read a question that I simply didn’t know the answer to:

What is Boxing?

I “knew” to some degree that it was related to conversion - but that was it.

Thinking through that a little more, realizing that I’ve been a developer for over 15 years - over 10 professionally, and I didn’t know that answer. It bugged me. It got me thinking about other terms in software development that, maybe I’ve heard, but don’t really know the answer to either.

Hence this new blog series that I’m coining as “The Software Developers’ Dictionary”. Simply put, I plan on blogging about these terms I run across (boxing, covariance, contravariance, etc.), defining them in plain English with some type of sample code (probably C#, cause that’s what I do). And, to be honest, I’m doing this for me (although I would hope it helps at least ONE other person out there :) ). I know these terms are searchable on Google, Wikipedia, etc., but I feel like the exercise of writing it out with sample code will solidify it for me.

I’m not going to go in any specific order (alphabetical, etc.), because I just don’t know what terms I even plan to define here yet (outside of a small handful).

Eventually, depending on how many of these I do, I’ll pull all the individual posts into a table of contents, for easier navigation.

Stay tuned for the first entry coming later this week on, “Boxing”.

Oh, and, dear reader, if you have suggestions, please comment below and let me know.

comments database, physical, data model edit

I recently stumbled upon a new tool for modeling database structures - sqlDBM, and I had to share it because its awesome.

I generally always take a “database up” design approach to software development. For me, designing the physical data model really solidifies the forthcoming code.

In the past, I’ve used Toad (or whatever its called), and PowerDesigner (from SAP). Toad never really stuck for me, and PowerDesigner is crazy expensive. I don’t mind paying a few bucks a month for services, or a flat fee for a product - but PowerDesigner is in the thousands. Ain’t nobody got time for that.

With a little searching, the product came right to the top. I hadn’t seen it before (it’s still in Beta, so pretty new), but being web-based, it immediately caught my attention.

I signed up, validated my email address, and off I went. It was that easy.

Now, since sqlDBM is still in beta, I’m not currently paying anything for it - although they currently do have a “donate” option that I will likely use shortly.

I won’t go into the details of “physical database design”, but within the scope of what I’ve used - I’m impressed. I was able to quickly create a model, start adding tables, columns, and constraints - issue a save, and then share it out to other people with an invitation into the application. And, honestly, it looks good, too - even had a “dark” theme (which I totally love). Some of the other features mentioned on the website (that I haven’t yet personally used):

  • Revisions - Every time you save, a new revision is created - allowing you to rollback to a previous version is you mess up :)
  • MySQL Support - I’m using SQL Server, this is another option
  • Subject Areas - Create diagrams in separate “areas” to limit the viewing scope of the model

The level of physical data modeling I do anymore is minimal, but I’ll be keeping sqlDBM in my back pocket anytime the need comes up.

Check it out at!

comments programming, fiddler edit

Fiddler is a fantastic tool for assisting in debugging HTTP request/responses.

However, god forbid you try to scan the activity list for a specific request when other applications are constantly making outbound HTTP/S calls. Within a matter of seconds, the result view is chock full of crap.

I toyed around with the “custom rules” in Fiddler before, but lost them somewhere along the way - upgrades, new machines, etc.

Today, I decided to finally tackle it again. However, I wanted to add the rule as an option in the menu that is enabled by default, so that as soon as I launch Fiddler, it is automatically filtering the request output.

Start by launching Fiddler, and going to Rules | Customize Rules in the menu bar.

This will launch the Fiddler ScriptEditor.

Inside of the Handlers class, add the following code, which sets up a new menu item under “Rules”, called “Show Localhost Only”, with a default of true:

public static RulesOption("Show Localhost Only")
var m_ShowLocalhostOnly: boolean = true;

Now, scroll down until you find the OnBeforeRequest method. Looks like this:

static function OnBeforeRequest(oSession: Session) {        

Inside of that method, add the following conditional:

if (m_ShowLocalhostOnly &&"") == -1) {
	oSession["ui-hide"] = "true";

Locally, when I’m developing, I have hostnames setup for all of my sites using as the TLD. If you utilize something a little different, just modify the indexOf method inside of the if block.

Now, when I launch Fiddler, all of my requests are filtered out, by default, except for entries to * (Except for the Fiddler update check, because apparently that happens before the rule gets applied).

And, if I need to look at the other crap being logged, I can just toggle the menu item and turn it off for the duration of that Fiddler session.

comments programming, streaming edit

Recently, I’ve become somewhat hooked on watching a few people live code various things on Twitch.

Here’s the list of people I’ve currently been tuning into, as the schedule allows:

Kyle Shevlin

Kyle streams mostly JavaScript related programming

Check out his Twitch channel!

Suz Hinton

Suz streams a variety of items, from merging pull requests, to speed coding, to IoT

Check out her Twitch channel!

Jeff Blankenburg

Jeff has just recently started streaming on Alexa development, and I hope he does more of it!

Check out his Twitch channel!

Jeff Fritz

Jeff has been doing a stellar job of streaming on a consistent schedule, on a variety of topics, and has even starting bringing on guests for pair coding!

Check out his Twitch channel!

These are the only 4 coding-related streamers I’ve come across so far, but I’m definitely looking for more.

Do you have anyone you recommend? Let me know in the comments!

comments codemash, conference, review edit

After missing CodeMash last year for my wife’s cancer surgery, I was able to make my triumphant return to CodeMash this year.

I had a great time, meeting new people, talking to old friends, and getting to spend some time with coworkers (old AND new). The food was fantastic - not sure if anything had changed, specifically, but much better than my last visit. My co-workers and I played the Artemis simulator with another group of folks, and that was a complete blast. Somehow, though, I ended up as the captain, which I wasn’t quite ready for. I did get to say, “Make it so”, so that made me feel better.

With all that, let’s get into the detail on the pre-compilers/sessions I enjoyed!

Day One - Tuesday, January 9, 2018

Getting Real without Getting Fired – Saying Things in a Way People Can Hear

Presented by Allison Pollard & Marcus King

Allison and Marcus did a great job collaborating on this session. I walked in a little blind to be honest, as I had chosen the session based solely on the title alone. What I learned, however, is that a lot of people have the issue of “being able to tell it like it is, but nicely”. The one thing thats stuck with me, for some reason, is the discussion on “trust”. I generally lack any trust in an individual that I’ve only just met. Should I change my way of thinking, and give people the benefit of the doubt? I’m still thinking about this one, so thanks Allison and Marcus!

Leading in a Complex World

Presented by Doc Norton & Diane Zajac

Doc and Diane presented a fantastic session from start to finish. They placed us in groups and had us work together, which I always worry about, but it worked out wonderfully. Every step of the process they walked us through, led perfectly to the next and taught us leadership concepts the entire way. Honestly, if I could, I would attend this again. Great job!

Day Two - Wednesday, January 10, 2018

Webapp Pentesting for Developers and QA Persons

Presented by Brian King

This year, I decided to mix it up and check out some security related sessions. This pre-compiler was a great choice. Brian walked us through many details of pentesting/hacking, and then assisted us in learning (at a high level) some pentesting applications (Burp Suite and ZAP Proxy). This was a session I walked away from with enough “nuggets” of knowledge to go back to work and see what I can break :)

No afternoon session for me :(

Apparently, today was the day everybody decided to attend the pre-compiler. I was ~5 minutes late finishing lunch, and every single room was packed. Some were standing room only, and for a 4 hour session with a laptop, that just doesn’t work.

I went back to my hotel room and napped.

Day Three - Thursday, January 11, 2018

AWS Security Essentials

Presented by Aaron Bedra

At our company, we’re exploring migrating our servers (100%, everything) to AWS. I likely won’t be too involved in that transition, but I still like to have some cursory information, especially as it relates to security. I learned quite a bit from Aaron in this session, and as we look to migrate, will be keeping the details in mind. Check it out if you’re new to AWS!

Getting Started with Deep Learning

Presented by Seth Juarez

Okay, so, in the “picked a session I probably shouldn’t have” category… Now, I should say, this has NOTHING to do with Seth - he’s a fantastic speaker. The biggest problem here is the amount of depth (deep learning?), and mathematics this session went into, that I, honestly, was not prepared for. I haven’t looked at the type of equations Seth was presenting for YEARS, and I just couldn’t keep up. Needless to say, this one fell flat with me, but was entirely my fault. However, if you’re up on your mathematics, and are looking to learn more about deep learning, this session IS FOR YOU.

Automated Security Testing with the OWTF

Presented by Jerod Brennen

In a “learn something way out of left field” for me, which includes the finer details of application security/pentesting, I left this session with fantastic information about the OWASP OWTF tool and how to start utilizing it to break, I mean secure, my applications!

Becoming a Servant Leader, Leading from the Trenches

Presented by Sarah Dutkiewicz

2018 is my year, for a variety of reasons, but specifically related to increasing my leadership. When I saw the title (and presenter, of course!), I knew I had to sit in. Sarah gives fantastic presentations, and I knew this would be no exception. I’ve followed Sarah for a while, so I knew she had strong leadership skills that aligned with my style, making this a no-miss presentation. Needless to say, I was not disappointed. Check this session out if you can!

Machine Learning for Gamers: Dungeon Forecasts & Dragon Regressions

Presented by Guy Royse of Nexosis

I try to never miss Guy speak, and this year is no exception. He’s great about weaving geekery into his presentations, even when it has to do with machine learning! I’ll be the first to admit, I don’t (yet) understand machine learning, but I still had a great time.

You Will F**k up & that’s Ok (How to be a Male Ally in Tech)

Presented by Ronda Bergman

The current status of the software development industry is getting worse, at least to me, but I never know what to do or how to do it. Ronda gives fantastic advice on a variety of topics on how to be a Male Ally, and letting us guys know that we’re going to screw it up - but as long as we’re sincere about our dedication to making tech a better place for everyone, not just men.

Day Four - Friday, January 12, 2018

Public Speaking without Barfing on Your Shoes

Presented by David Neal

I am entirely petrified of public speaking, yet I so desperately want to. David gives great advice in this session, that honestly, has me already thinking about session ideas. If you have aspirations of public speaking, but are still on the fence, stalk David to his next presentation of this session.

Chrome Developer Tools: Raiding the Armory

Presented by Greg Malcom

Greg did such an awesome job in this presentation. Not only did he teach, but he did so in a humorous fashion, which I completely appreciate. If you’re curious about being more productive in the Chrome Developer Tools, check this session out if you get a chance, I bet you’ll walk away learning something.

Advanced Patterns for Automated UI Testing

Presented by Seth Petry-Johnson

Seth is my boss, and was going to be discussing practices and processes we use daily, so I kind of had to go, right? Well, the good news is, Seth never disappoints in his presentations. Granted, I didn’t learn anything in this session, but it was nice to see a positive response to the topic from other attendees.


I’ve already said how much of a great time I had this year, overall, but I’d like to outline the top 3 sessions that really hit home with me this year (in order):

  1. Ronda Bergman - You will F**k up & that’s Ok (How to be a Male Ally in Tech)
  2. David Neal - Public Speaking without Barfing on Your Shoes
  3. Sarah Dutkiewicz - Becoming a Servant Leader, Leading from the Trenches

Naturally, I respectfully thank every single speaker for their contributions to CodeMash 2018, but I have to give these three speakers a special shout-out for literally changing the way I think.

Thanks to everyone who made CodeMash 2018 a fantastic time! The leadership committee, volunteers, speakers, and naturally, the sponsors!

See you next year!

comments meta, retrospective, planning edit


What a horrible year, both personally and professionally.

First, early on in the year, my wife had to have a double mastectomy due to a breast cancer diagnosis. Needless to say, the first 6 months of 2017 were spent healing - both body and mind. And, really, the mind is ongoing for this one. Thankfully, she is healthy, and cancer free.

In July/August, I took a break from social media, blogging, and pretty much any other extra-curricular activities. I cancelled all my accounts (deleted in cases where that’s an option), and just enjoyed being with my family.

In the latter part of 2017, it gets busy with the holidays and travel - but we did manage to pay off some more debt before the end of the year, which was awesome. It was also during this time, I decided to get back online and get back to business with blogging, twitter, etc. I did decide, right before December, that I would participate in the 2017 C# Advent that my buddy Matt Groves coordinated. I wrote a “quasi” C# post (the code examples were written in it :) ), but was primarily about Visual Studio and Live Unit Testing feature.

That was pretty much 2017 in a nutshell.


With 2017 over, it’s time to look ahead and plan some 2018 professional / career goodness!

I want to keep my goals for 2018 fairly simple, and try not to go overboard.

Here we go!

1. Publish 12 Blog Posts (1/month)

This one is easily measured, and not much of a stretch goal, especially since I’m going to count this post for January :)

2. Release the “Couchbase Explorer” extension for Visual Studio

The development on this has already started, and the basic extension is there. I’d like to release the first version before the end of the year. All it has to do:

  1. Allow server connections to be saved
  2. View the buckets in those servers
  3. Retrieve a read-only listing of documents in the selected server

That’s all. Slap 1.0.0 on it, and ship it. Then, we iterate.

3. Live Stream

I’ve already done this a few times. Neither time did I have any viewers, but that’s okay, because the streams easily get republished to YouTube and Twitch for later viewing, which is nice.

Ultimately, I’d like to live stream twice a month, and by the end of the year, have 100 followers on Twitch.

4. Videos

Even though the live streams get pushed to YouTube/Twitch for later viewing, I’d still like to publish a few independent videos on software development that wouldn’t be live streamed.

By the end of the year, I’d love to have published a short video for each new feature in C# 6.0/7.0/7.1, with accompanying blog posts. Even though C# 6.0 is “old”, it’s still “new enough” to warrant instructional content (in my mind).

5. Promotion

I’d like to increase my career standing this year. Now, that could mean a promotion at my current employer, or not, I don’t know. I’ve always had aspirations of owning my own software company (product or consulting), so maybe that’s the next path for me.

I think that’s enough. I don’t have grandiose goals like I used to, now that life has smacked my family in the face. Mostly, I want to create content and code.

Stick around throughout the year to see if I’m able to keep up with these goals.

Thanks for reading, hope 2018 treats you well!

comments lut, live unit testing, vs2017, visual studio 2017 edit

Welcome to the Christmas Eve edition (December 24th, 2017) of of the inaugural C# Advent Calendar! Please go and check out the other 23 awesome posts in the series.

I hope you enjoy this post / find something useful from it, and then go forth and have a very Merry Christmas!

Live Unit Testing

You may be curious what “live unit testing” means, so let’s dive into that a little bit.

“Live” unit testing is simply the automated execution of unit tests that may have been impacted by a code change, and provides the results of that test run back into the IDE (in this case, Visual Studio) in real time.

There are products out there that have provided this mechanism for quite some time - most notably, NCrunch, which is a fantastic tool.

However, Microsoft has recently given us this capability directly inside the Visual Studio IDE, without the need for external tooling/extensions!

Live Unit Testing in Visual Studio

Before we get too far, let me preface this with a few caveats:

  1. You must be using Visual Studio 2017 Enterprise edition.
  2. The feature is only supported for C# and Visual Basic projects (Full .NET Framework, or .NET Core)
  3. Using one of three supported frameworks (of which a minimum version is required)

Since the first two bullets are pretty self-explanatory, let me provide some more information on #3.

The three supported frameworks, and their editions (as of this writing) are:

Framework Framework Minimum Version Adapter Minimum Version
MSTest MSTest.TestFramework 1.05.preview MSTest.TestAdapter 1.1.4-preview
NUnit NUnit 3.5.0 NUnit3TestAdapter 3.5.1
xUnit xUnit 1.9.2 xUnit.Runner.VisualStudio 2.2.0-beta3-build1187

If you’re using a different framework, or not currently using one of the specified versions of that framework - you’re going to miss out on some sweet, sweet, testing.

To configure the Live Unit Testing feature, you can find the settings in Tools | Options | Live Unit Testing:

Live Unit Testing Settings Dialog

The new Microsoft docs platform has a great entry describing each of the settings on this dialog, which you can find at

Example Time!

In this first screenshot, I have a very simple extension setup to convert a string to a possible boolean. However, take note of the blue lines to the left of each line of code.

Code with no tests

The line tells us that it isn’t covered by a corresponding unit test, so let’s add one!

Here you can see a very (very) simple test checking our “true” condition of our extension Test is passing!

And, now that our test is executing, we can go back to our extension code, and see that Live Unit Testing is now marking the line of code as covered AND passing! Sweet Code Coverage

Clicking the green check-mark will show you the test names of tests that execute that line of code: Cool!

If we introduce a test that fails (since a “false” string should return false), such as: Uh oh

Back over to our actual code, we’ll now see which lines of code are failing during that test: Not good

And, clicking the red X will show you the test names of tests that are currently failing: Ah, that's the one


Testing your code is great, but seeing it happen in real-time is pretty darn sweet. This feature is ever-evolving as well, as Microsoft has updated the feature a variety of times already since the initial release. Keep up to date over at (and for even more information that I didn’t touch on - like test exclusions (an absolute necessity for integration tests))

Check out the 2017 C# Advent post for links to other great content!

Thanks for reading!