Demystifying .NET Standard

Clearing up the confusion

David Pine

5 minute read

Intro

Monday, August 14th was an amazing day to be a .NET developer! As the world celebrates another triumphant series of announcements from Microsoft, there is still confusion amongst the masses.

What is this .NET Standard thing? What does it mean to target .NET Standard versus .NET Core, or even the .NET Framework? As a developer, what .NET should I target and why? Are Portable Class Libraries (PCLs) dead? Developer Community

Perusing C# 7.1

The language features you've been waiting for

David Pine

6 minute read

Earlier this year in March – Visual Studio 2017 was released. With this the world was given C# 7, checkout my post on Exploring C# 7. In this post we will peruse C# 7.1, the first incremental release while C# 8 is being fleshed out.

Async Main

Since the release of C# 5, developers have either embraced the async and await keywords or fumbled along the way feebly attempting to comprehend them. Fear not, you’re not alone. Many others have been just as confused, but that’s not to say that the language didn’t make major strides towards simplifying your development efforts. In fact, I love asynchronous programming and C# makes me very happy with its implementation!

How to organize an amazing technical conference

Behind the scenes of MKE DOT NET

David Pine

6 minute read

Story Time

This is my third year organizing

<a href="https://www.mkedotnet.com/" target='_blank'>MKE DOT NET</a>

, so I’ve been accumulating plenty of interesting stories. Last year I was fortunate enough to have convinced Scott Hanselman to be our keynote speaker. Yes, “the

<a href="https://twitter.com/shanselman" target='_blank'>Scott Hanselman</a>

” - arguably the worlds most influential person in the tech industry. I was his ride to and from the airport and the conversations we had actually led to several key changes. As a result

<a href="https://www.mkedotnet.com/" target='_blank'>MKE DOT NET</a>

will be even better than ever before!

TypeScript - JavaScript Reimagined

"Making JavaScript tolerable"

David Pine

6 minute read

First things First

JavaScript is the world’s third most common programming language today. JavaScript was created by

<a href="https://twitter.com/BrendanEich" target='_blank'>Brendan Eich</a>

in about ten days. It might seem odd that the previous two sentences not only exist, but go together…yet it is true! JavaScript runs seemingly everywhere and applications written in this language are only getting larger.

JavaScript was perhaps intended for 100, maybe up to 1,000 lines of code and now with regularity people are building 100,000 line apps, if not 1,000,000 line apps.

<a href="https://twitter.com/ahejlsberg" target='_blank'>Anders Hejlsberg</a>

Exploring C# 7

Expressiveness Redefined & #notasugly

David Pine

12 minute read

Intro

Since we have all been actively celebrating the 20th anniversary of Visual Studio, it felt appropriate to post about C# 7! In this post we will explore the features that make C# 7 so promising. I’ve put together a demonstration C# 7 project, that is available

<a href="https://github.com/IEvangelist/IEvangelist.CSharp" target='_blank'>here</a>

.

This post contains examples and details on five of the nine new C# 7 features.

  • Pattern matching
  • out variables
  • Tuples
  • Local functions
  • throw expressions

These are the remaining features, that I do not cover in this post.

Overriding ASP.NET Core Framework-Provided Services

You take the red pill—you stay in Wonderland, and I show you how deep the rabbit hole goes

David Pine

4 minute read

Overview

In .NET it’s really easy to create your own interfaces and implementations. Likewise, it’s seemingly effortless to register them for dependency injection. But it is not always obvious how to override existing implementations. Let’s discuss various aspects of “dependency injection” and how you can override the “framework-provided services”.

As an example, let’s take a recent story on our product backlog for building a security audit of login attempts. The story involved the capture of attempted usernames along with their corresponding IP addresses. This would allow system administrators to monitor for potential attackers. This would require our ASP.NET Core application to have custom logging implemented.

What happened to my Thread.CurrentPrincipal

This is not the IPrincipal you are looking for...

David Pine

4 minute read

Overview

Like the title claims, if you’re using ASP.NET Core and expecting the Thread.CurrentPrincipal or ClaimsPrincipal.Current to be populated you’d be wrong. This is not the IPrincipal you’re looking for. In this post we’ll discuss what happened and what you need to do now. Additionally we’ll cover all the peripheral benefits as a result of this change.

History

If you have ever done any .NET Framework development, you’ve probably seen the Thread class. You’re probably familiar with the

<a href="https://msdn.microsoft.com/en-us/library/system.threading.thread.currentprincipal" target='_blank'>Thread.CurrentPrincipal</a>

member. This member of the Thread class is defined as follows:

Building a Magic Mirror

Windows 10 IoT Core, UWP, C#, Raspberry Pi 3

David Pine

6 minute read

Inspiration

I am certainly not the first one to create a magic mirror, and I will not be the last either. I was inspired by those who are true Innovators…some might say, “I’m standing on the shoulders of giants”. They would probably we right, and I’m okay with that. Earlier this year, I stumbled upon a tweet about someone how created a magic mirror…this is the root of my inspiration.

ASP.NET Core Response Optimization

Static File Caching & Compression

David Pine

6 minute read

Intro

If you’re a web developer, chances are you’re familiar with optimization strategies such as static file caching and response compression. I recently implemented these two concepts in tandem on an ASP.NET Core application that I have been developing… I’m going to share what I have learned.

If you haven’t had a chance to use ASP.NET Core yet, you’re missing out! As my friend Scott Addie likes to say:

ASP.NET Core is a cafeteria plan in which developers choose application dependencies à la carte. This is in stark contrast to ASP.NET proper, where developers are provided a set meal (a bloated dependency chain) containing undesired items. Don’t like broccoli with your steak? Maybe it’s time to consider ASP.NET Core. Scott Addie

Overcoming Impostor Syndrome

Taking off the mask

David Pine

6 minute read

What is “impostor syndrome” you ask?

According to

<a href="https://en.wikipedia.org/wiki/Impostor_syndrome" target='_blank'>Wikipedia</a>

:

Impostor syndrome (also known as impostor phenomenon or fraud syndrome) is a term coined in 1978 by clinical psychologists Dr. Pauline R. Clance and Suzanne A. Imes referring to high-achieving individuals marked by an inability to internalize their accomplishments and a persistent fear of being exposed as a “fraud”. Despite external evidence of their competence, those exhibiting the syndrome remain convinced that they are frauds and do not deserve the success they have achieved. Proof of success is dismissed as luck, timing, or as a result of deceiving others into thinking they are more intelligent and competent than they believe themselves to be.