Negative Responses

After 3.5 years I finally had a post that resulted in a negative reaction from a fair number of people. The morning after the .NET Parameterized Queries Issues with SQL Server Temp Tables post went live I woke up with 4 comments waiting for approval. Before I read them this was exciting. I thought that I had hit on an issue that a lot of people had faced. I was wrong.

The Negative

Three of the four comments were about that specific person’s view of best practices and how my post was a poor example and something that any seasoned developer would ever dare use.

I replied to all the comments and tried to clarify the points of misunderstanding. The post was based on a real issue we faced and something that was not at all clear on why. The post was meant to be simple in order to show the point and I did my best to communicate these points to the commenters. To say the least this was a hard day for me.

The post now has something like 33 comments, which is way more than any of my other posts. I think that for the most part, the commenters are more clear on what I was going for. The straight up negativity around the post in question is something I hope to avoid for the most part.

The Positive

On the plus side on the day in question, I hit a new record for single-day views on my blog. The previous record was from 3 years ago when I had a post featured on the ASP.NET homepage.

While less visible on my blog I also got a lot of support from people letting me know that they understood my point and through it was clear. The post has also appeared in a blog and newsletter that I highly respect. I really appreciate everyone who took the time to reach out and remind me that this type of thing will happen and to stay positive.

Future Strategies

If something like this happens again I will do my best to keep it in perspective. I want honest feedback on my posts. I welcome people posting issues and us working through them. It results in better information for my readers which at the end of the day is why I spend so much time doing this blog every week.

I think it is human nature for negative comments to stand out. It will be important for me to temper that initial negative reaction with the positive side of things.

Back from Disney World

Today is my first day back from being at Disney World for a week with my family. We had a wonderful time. It was awesome to see our 6-year-old light up seeing all the sights and ride for the first time.

This trip was also the first full week of vacation I have had in years. There was a lot going on at work and I found it really hard to unplug. I can’t tell you how many times I checked my email and Teams while waiting in line for one thing or another. I’m sure this amounted to less than 1% of the time I was off, but I feel like even that level of work is more than enough to lose some of the mental recoveries that vacation should provide.

Future Strategies

I think the biggest thing I could do in the future is different timing. This trip ended up being during a client go live which greatly added to the feeling that I needed to stay connected in case something went wrong.

Second, I need to take more time to ensure I’m not the single point of knowledge on any subject. The one thing I did end up having to do was because I forgot to convey some information on how our QA team was running a service.

Third, I just need to take more time off. As I said above this is the first time in years that I have taken a full week off. This has been due to family medical issues and it has gotten me in the habit of saving all the time off I can to cover times I need to be out to help out the family. Now that things have calmed down I am going to have to adjust to being able to have time off and disconnecting.

Wrapping Up

I’m still in the process of getting back into the swing of things and this topic was on my mind. I would love to hear how you all deal with this issue.

Limit Failure

My family and I just got back from our first really big trip since our son was born six years ago. We had a ton of fun and it was a great experience for us all. While we were gone I intentionally let a few things drop such as my diet, exercise, reading, and podcasts. For my everyday life letting all of those things drop is a big failure.

Letting go is OK

Let me lead by saying letting things go is OK. None of us can be on plan 100% of the time especially if any of the things you are doing require your willpower to get done. Check out Willpower Doesn’t Work for more information on why using willpower to change your life isn’t a good idea.

Plan, plan, plan

Having a plan for how far off of the rails you are going to go can help limit the damage you do. For example, planning to have one unrestricted meal a day lets you have some freedom while on vacation while limiting your downside versus what it would be if you just went off the rails completely. The key for me in the future will be finding the right balance between my normal routine and not affecting the enjoyment of the trip.

I haven’t tried this yet, but I have read going to the point of visualizing the challenges you might face and how you will respond to them can be a very powerful way of making sure you stick with your plan. Then instead of having to make choices at the moment, you can fall back to going with what you visualized.

This all comes down to not having to make a judgment call at the moment you face the situation. When making calls at the moment we tend to choose the option with the most immediate reward, not the one that is the best long-term.

Back to reality

When everything is over getting back into your normal routine can be hard. If you planned fully then this transition is planned and you just have to execute. Again taking the decision away from the moment.

For our trip, the transition didn’t go as planned. We had numerous delays in flights, unforeseen things to take care of after getting home. We have been back for close to a week now and I still haven’t gotten back on track with all of my activities.

You can’t plan for everything, but that doesn’t mean you don’t plan. When faced with unforeseen events you have to make the best choice you can at the moment and move on. As soon as you have the chance to reevaluate where you are and then adjust course.

The key point is we are all going to fail and that is OK, but we want to limit the downside of our failures as much as we can. Evaluate and adjust. Don’t beat yourself up over failing. Learn.

Learning Overload

I came to the realization this weekend that the backlog of learning resources I have is now at the point that it is causing me to stress. My Pocket list is overflowing, I have courses I have signed up for, both paid and unpaid, that I have not even started, and not to mention a huge number of books I want to read.

Amazing Times

It is an amazing time that we live in that so many resources are available (mostly for free). Between blogs and YouTube alone, a person can learn more than enough to get going on just about any project. I am emphasizing how amazing this is because I don’t want anyone to take this post as complaining.

Plan to Focus

The strategy I came up with this weekend to help me address my backlog was one of focus. I have a ton of topics I want to learn about, but very few of those are in my core areas of focus. I went through my Pocket list and archived anything that was outside of those core areas. Yes, I want to dig more into both Microservices and Kubernetes, but since those are not areas I’m currently focusing on all the related resources got archived. The number of posts this left me with to read is manageable and I plan on keeping a limit on how large I let my list get.

After addressing the blog backlog I went through all the courses I have signed up for and make a prioritized list. I will be spending a set amount of time a week working my through them one at a time. I have also put a hard stop on signing up for new ones until the number in my backlog has dropped below five.

Leave Time for Doing

I love to learn new things and plan for it to continue to be a big part of my life. Going forward I’m going to be much more mindful of the course my learning takes which will help prevent it causing stress.  The plan is for this to free up some of my time to allow me to use some of my learning to actually do something.

While learning is enjoyable, what is the point if you do nothing with it? Finding a project is a whole other level of stress, but one that is worth it. I was to put all I have been learning into more practical use. I’m excited to see where this all takes me.

 

Three Years of Blogging

This Thursday will be the third anniversary of my first post to this blog. This post is going to be similar to the post I did last year in the form of a retrospective.

Positives

Most of my positive points are the same as last year. I guess I shouldn’t be surprised as these are the reasons I spend my free time working on the blog.

  • Driver for learning new things
  • Opportunity to use new/different technology outside of my normal work
  • Helping others learn new concepts
  • Helping others overcome problems
  • Made my first contributions to open source
  • Comments from readers letting me know posts were helpful
  • No big hosting issues this year (thank you NodeHost!)

Challenges

Again most of the challenges are in line with what they were last year. I guess I should take that as a red flag and focus on solving some of my challenges instead of living with them.

  • Learning new things on a deadline
  • Self-applied pressure to meet my goal of a post a week (increasing my stress level)
  • Not focusing on stats, shares, comment, etc.
  • Picking the right things to learn
  • Time requirements taking away from other projects I would like to do

Top posts of the year

I was a little surprised at the makeup of this list. I expected to have more than a single repeat from last year’s list.

I did a series of posts looking at Identity Server 4 this year that didn’t make the above list individual, but as a total, the series was huge for me last year. If you are interested you can check out all the posts here.

Resources

There are a couple of resources that I want to point out.

ASP.NET Weekly is a weekly digest of all the best ASP.NET related news and blog post run by Jerrie Pelser. Jerrie does a lot of good work in addition to ASP.NET Weekly including a blog and a book.

ASP.NET Community Standup is straight from the team at Microsoft who is responsible for ASP.NET Core. These videos are a great way to get the scoop on what is in the works. Also, note that if you have watched in the past this show has moved from Scott Hanselman’s YouTube channel to .NET Foundation’s channel so update your subscriptions.

John Sonmez’s free blogging course is what finally pushed me over the edge to start blogging. It is a great resource to help get you moving.

NodeHost is my hosting provider. They provide super simple and cheap hosting. If you are looking for a place to host your own blog check them out. Combine them with Cloudflare and Let’s Encrypt and you are all set if you are going to WordPress route.

The next year

As usual, I am looking forward to seeing where ASP.NET Core goes next. Things like SignalR Core, HttpClientFactory, Entity Framework Core improvements are going to be great to explore.

Outside of ASP.NET Core, I am looking at putting out a very basic Xamiran app. Based how that goes you may see a few posts related to Xamiran in the next year.

If there is a topic you would like to see covered leave me a comment and I will add it to my list of things to look at.

Welcome to 2018

This isn’t the post I had planned for this week, but thanks to a failed automatic upgrade of one of the WordPress plugins this site uses I had to restore a back up of the site which destroyed a lot of the post meant for this week. Thankfully NodeHost does automatic backups every day and the restore process is super simple.

On the positive, it gives me a chance to try out something new. I am going to list the books that I read last year. For the ones that are available on Amazon, I am using affiliate links just to see what happens. A lot of these books come from John Sonmez’s book reviews playlist. Without further adieu here is the list broken out by rough category.

Biographical/Entertaining

Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Living with a Seal (I laughed a lot on this one)

Business

EntreLeadership (Free gift from CodeStock 2 years ago)
The Phoenix Project

Health

The Obesity Code (Very informational if you struggle with weight read this one)

Parenting

The Kazdin Method for Parenting the Defiant Child

Personal Development

Think and Grow Rich
Boundaries
Triggers: Creating Behavior That Lasts
Never Split the Difference: Negotiating As If Your Life Depended On It
Banish Your Inner Critic
The Energy Bus
Eat That Frog!
The 10X Rule
Peak Secrets from the new Science of Expertise
Moonwalking with Einstein
Deep Work

Software/Career

SOLID Principles Succinctly
.NET Core Succinctly
Little ASP.NET Core Book
The Imposter’s Handbook
The Complete Software Developer’s Career Guide

Top Picks

The Phoenix Project is at the very top of my list from 2017 it uses a story to teach lean concepts from an IT perspective. I which I could get everyone in my company to read this book.

The Energy Bus helped me adjust my perspective and have a more positive outlook on life. If you have any issues with negativity check it out.

The 10X Rule is pretty high on my list as well. This book will get you taking action toward your goals if you follow its advice.

If you have any recommendations leave a comment as I am always looking to add new books to my backlog.

Hitting a wall

I have had a very frustrating week. I got sick, failure on two different blog posts, basically no progress on any project. I hit walls on everything I attempted.

Everyone has bad weeks and if you look back I am sure you will find I have made a couple of posts along these same lines. I don’t post this type stuff to complain, but instead to be clear that this isn’t easy and at times is a struggle. I share this so that it can be an encouragement when you hit your own walls. Everyone faces struggles. Pick your hero and I can promise that they struggle.

We tend to see only the positives from the lives of other people which makes what we are going through feel worse and unfair. Comparing the full depth of yourself to the public face of others is an easy way to head down a very negative path. A path I have struggled with at times.

If you struggle with some of the same things I recommend that you check out the content of John Sonmez and Gary Vaynerchuk. Both of them have helped me push through some of the walls I have hit. The Energy Bus by Jon Gordon has also been helpful for staying positive.

Whatever wall you are hitting keep working and push through. You can do this.

NDepend Spotlight

Today I am going to be doing a tool spotlight on NDepend. NDepend has a ton of features to help you keep a handle on your applications including the following plus much more.

  • Code Rules
    • 200 default rules with ability to add custom rules using LINQ
  • Quality Gates
  • Visual Studio Integration
  • Build Process Integration
  • Dependency Graph
  • Dependency Matrix
  • Technical Debit Estimation

For full disclosure, NDepend reached out to me to give their tool a try. I am writing based on my experiences with their tool and will be including both the positive and negative aspects of my experience. None of the links in this post are referrals that would in any way provide me any sort of payment.

Installation

The download is a zip file that you then have to find out what you want to do with. This was the first negative I hit with the product. While it isn’t hard to figure out it would be much nicer if this were an installer where I could select what I wanted to install instead of having to look at the getting started docs right away. For non-build usage, the options to run the tool is either via a Visual Studio extension (NDepend.VisualStudioExtension.Installer) or as a stand alone application (VisualNDepend.exe).

I chose to go explore with the Visual Studio extension. As a hint that I didn’t notice until later, VisualNDepend provides an option to install the Visual Studio extension in addition to providing all the functionality of the Visual Studio extension.

Visual Studio Extention

After installing the NDepend extension there will be a new top level NDepend menu in Visual Studio.

With the solution you want to analyze already open select the NDepend > Attach New NDepend Project to Current VS Solution.

This will launch a dialog that allows you to select which assemblies you would like to analyze preloaded with the assemblies for the current application.

As you can see from the dialog there are a lot of options. If your project has other assemblies or solutions that you would like to be included as part of the analyses they are easy to add. When finished adding items to analyze click the Analyze button at the bottom. I am using a small project for this entry and the process took less than 10 seconds. I also tried it on a large project (500k+ lines of code) and it took less than 30 seconds.

After the analyses are complete the extension shows a dialog asking what to do next as well as launching a web page with the results of the analyses if you kept the Build Report check box checked. Following are the options in the dialog.

From here I chose to View NDepend Dashboard, but also make sure and check out the report that the analyses generated as it provides a great summary at the end of all the issues found. The following is a part of the dashboard.

There is a ton of data provided. If you notice at the top there is a Choose Baseline option which would allow comparisons of solutions over time. I can see this view of a project over time is very helpful, but not a feature I will get to explore here.

Exploration

Exploration of the data NDepend provides is something I could spend hours looking at even on a small project. For example, the following is an output to HTML (their output is much prettier than the version that is shown here) of the issues that make up the critical group in the Rules box in the dashboard above.

4 rules Issues Debt Annual Interest Breaking Point Category Full Name
Avoid methods with too many parameters 1 issue 1h 9min 5min 4 522d Project Rules \ Code Smells Rule
Avoid non-readonly static fields 12 issues 32min 4h 0min 48d Project Rules \ Immutability Rule
Avoid namespaces mutually dependent 2 issues 30min 1h 1min 179d Project Rules \ Architecture Rule
Avoid having different types with same name 3 issues 30min 1h 0min 182d Project Rules \ Naming Conventions Rule
Sum: 18 2h 41min 6h 6min 4 933d
Average: 4.5 40min 1h 31min 1 233d
Minimum: 1 30min 5min 48d
Maximum: 12 1h 9min 4h 0min 4 522d
Standard deviation: 4.39 16min 1h 28min 1 899d
Variance: 19.25 34d 979d overflow

Here is the same view inside the Queries and Rules Edit window.

Double click any line will take you to a detail view showing a listing of the rule broken down by project, namespace, and class.

The same window also shows the query that was used to find the rule violations. For example, the above is powered by the following query.

warnif count > 0
from f in Application.Fields
where f.IsStatic && 
     !f.IsEnumValue && 
     !f.IsGeneratedByCompiler &&
     !f.IsLiteral &&
     !f.IsInitOnly

let methodAssigningField = f.MethodsAssigningMe

select new { 
   f, 
   methodAssigningField,
   Debt = (2+8*methodAssigningField.Count()).ToMinutes().ToDebt(),
   Severity = Severity.High
}

The above is CQLinq or Code Query LINQ which is used to query the code model that the NDepend analysis creates. The detail of CQLinq are outside the scope of this post, but based on the above you can see how powerfully this could be.

Other considerations

Based on my usage to get the best value from NDepend your whole team would need to be licensed and making sure new code satisfies with all the rules your team wishes to follow. NDepend has a component that can be used as part of server based build processes which is needed, but I would want to use that component as a fail safe, not as a way to avoid buying licenses. If you use multiple computers it seems that you will need multiple licenses which will cause issues for some users.

Wrapping up

After trying NDepend out for awhile I am still amazed at the amount of data it provides. Not to mention the ability to add new queries and rules of your own. One blog post is never going to be enough to cover even a fraction of what this tool does. It feels like Resharper in it does so much that it takes a lot of time to learn and take advantage of the full set of features it provides.

First talk retrospective

I made it through my first lightning talk at the May meeting of the Nashville .NET user group. If you want some background you can check out this post on my preparation for the talk.

This post is going to be mostly for me to look back on in the future in case I decided to attempt another talk, but I am sure if someone is a new speaking it could be a useful as well.

Retro

Overall the talk went OK. There was no huge epic failure, but it far from a good talk. I was extremely nervous which lead to me be locked to the podium and flying through the talk way faster than I should have. I am pretty soft spoken and didn’t project as much as I really needed to. As a result of that is my points weren’t as clear as I would have liked.

David Neal was right that the audience does want you to succeed. There were a couple of questions at the end of my talk which made me feel that my point wasn’t totally lost. I got feedback for some of the audience members and other speakers which I included in the previous paragraph. All the feedback was presented to me in a kind manner which I greatly appreciated.

The future

In the future, if I try speaking again I have a lot of things I can improve on. I know that sounds negative, but I am looking at it as an opportunity to grow. I now know that I will need more time during the prepping stage to practice out loud and in front of people.

I love technology and sharing what I learn with others. That is one of the reasons I write this blog every week. Speaking may or may not be part of the future way I get to share with other, but I am happy to now know it is something I can do. It would require a ton of work, but it is no longer something I can’t ever see myself doing.

Visual Studio 2017 Error: The project doesn’t know how to run the profile IIS Express

I have a couple of computers I work between for the samples I use on this blog and when switching to between of them I got the following error last week.

The project doesn’t know how to run the profile IIS Express.

I verified the project would still run on the other computer with no issues. I also verified that on the computer with the issues the project would still work using dotnet run from the command line still worked.

Next, I went to verify the project properties. Here I noticed a strange thing on the computer with the error the Debug tab of the project properties was missing a lot of setting. The following is a screen shot of the computer with the issues.

And here is the same tab on the same project, but from a different computer.

The cause

After more time that I would like to admit I was able to track down the issue. On the computer with the issue, I often work on projects that are very large which tend to slow down Visual Studio pretty bad. In an effort to speed things up a bit I when through and disabled all the extensions that I could including the Microsoft Azure App Service Tools. Turns out that disabling the previous extension caused the Microsft ASP.NET and Web Tools extension to be disabled as well (with no warning).

The solution

The only way I was able to get the project to work properly was to enable both the Microsft ASP.NET and Web Tools extension AND the Microsoft Azure App Service Tools extension. I am not sure why the Microsft ASP.NET and Web Tools extension need the Microsoft Azure App Service Tools extension but based on my experience they are related in some way.