How to use Default Props in React with TypeScript

Adding default props in React with TypeScript has been a pain. TypeScript 3 is making this process simple.

Fixing Entity Framework Validation 30000 No Type Specified for the Decimal Column

Here's a quick fix for Entity Framework's Validation 30000 errors that show up on decimal columns.

How to Show the Current Active File in Visual Studio Solution Explorer

Trying to find your current active file in Visual Studio's Solution Explorer can be a pain. Here's how to make it less painful.

Scrape a Website & Send an E-mail with Azure Functions

Serverless Functions are an awesome way to create small tasks that can run on a schedule, by the click of a button or using your voice. We'll create a function that visits a website, collects important data & sends that via an e-mail back to us on a schedule.

Hosting Blazor on Netlify

Since Blazor is a frontend framework, we can host our Blazor apps on any serverless or static web host. The only requirement is that we can add minor configuration to redirect URLs so that all URLs point to our index.html page. Netlify fits this perfect. Netlify also happens to be my favorite host for static websites.

Add Coding Symbols to VSCode

As developers we spend more time reading code, than writing. One of the most common tasks we do are comparing items. Using symbols can make your code easier & more enjoyable to read.

How to Access the Hosting Environment in ConfigureServices

It can be useful to run different services in Development vs Production. The .NET Core templates do this within certain methods, such as the Configure method in the Startup class but there is no example of how to do it in the ConfigureServices method within the Startup Class.

Blazor Error - There is no Registered Service of Type

Experimenting with Blazor, I ran into this error. "There is no registered service of type...".

Cmder, My Favorite Windows Terminal

At a recent conference I learned about Cmder, an awesome terminal for Windows. I've only been using it for a couple of months, but here's what I really like.

Why is TypeScript Adding Class Comments to my Code

I noticed all my TypeScript compiled files had been modified after a recent change. I hadn't changed anything in them so this gave me some concern. What I found was TypeScript added a /** @class */ comment to the modified files.

What is CSP? Why & How to Add it to Your Website.

Cross-Site Scripting (XSS) sucks! It's found in 2 out of 3 websites. A CSP policy can help you avoid most XSS attacks. Here's how to add one and monitor it with ease.

Display Node.js Errors on a Windows IIS Server

If you are running IIS Node with a Node server on IIS and want your Node errors to show up instead of IIS errors, read this.

How to add a Header

This a simple & short guide on how to add a header to different server architectures.

Keep Your Startup Clean

Don't let your Startup.cs file turn into a mess. Use extension methods to keep it clean.

How to Implement Terms of Service on Your Website

I often hear a lot of developer's say to just copy someone else's Terms of Service, make some minor changes & call it good. This is obviously not great legal advice. Today I actually learned some important concepts in regards to Terms of Service.

Fix Git Self Signed Certificate in Certificate Chain on Windows

You are in the right place if you're trying to use git clone on a computer and running into one of the following errors. SSL certificate problem self signed certificate in certificate chain or SSL certificate problem unable to get local issuer certificate.

Difference Between Array<Type>, Type[], [Type] in TypeScript

When defining an array in TypeScript you might think it is okay to define it using `[string]`. I have made this mistake several times & I find others making it often as well. This is actually defining a tuple, which is probably not the array you are wanting.

What is Currency and Parallelism?

Concurrency is the ability to break a job down into multiple tasks & work on those multiple tasks at the same time by switching back & forth between the tasks.

What is the Actor Model & When Should You Use it?

The more things change, the more they stay the same. In the 1970's computer scientists were pushing hardware to its limits. The engineers of the day had all sorts of hacks to squeak out performance.

The Power of Destructuring in JavaScript

In my free time, I've been messing around with a functional programming language built for the Erlang VM called Elixir. One of my favorite features of Elixir is pattern matching. As of ES6, we now have some pattern matching features in JavaScript. One of those is destructuring. Using destructuring will simplify your code & make it more readable.

Understand the Risks of Not Having a Secure Website

Over 80% of the top million websites either don't have a secure HTTPS website or they have one and aren't properly using it. This can cripple your business, even if you're not doing any financial transactions.

Switch to HTTP/2, The Easiest Way to Speed up Your Site

If content is king, the speed of your delivery may be queen. Slow websites lose readers & customers. Large companies have long recognized that every millisecond counts. 1/10 of a second costs Amazon 1% of their sales. 1/2 a second costs Google 20% of their traffic. That is a lot of money for those companies. Therefore they put immense effort into tactics to increase the speed of their sites. Fortunately for everyone, HTTP/2 eliminates the need for a lot of those tools.

What is Pattern Matching in Elixir?

I was confused about pattern matching for quite a while. Every time someone spoke of it, they said how it was one of their favorite features. When they explained what it was though, it was always different from the last person. After finally learning what pattern matching is, it all made sense. Pattern matching is used for a lot of different reasons.

Where to Begin Learning Elixir

I've been skimming a lot of resources lately on learning Elixir. My preferred learning method is to build things immediately, while learning the syntax and finer details along the way. I've never been a fan spending hours learning the finer details & not having anything to show for it.

TypeScript Cannot Invoke an Expression whose Type Lacks a Call Signature

I have a love|hate relationship with TypeScript. I love it when it works & hate it when it doesn't do what I think it should. I was trying to clean up some code and wrote the following

Outlook Mail Merge - Preview E-mails Before Sending & Use a Secondary Account

Today at the office, I was trying to help someone do a quick e-mail merge using Microsoft Office. There are actually times, this is the preferred method over MailChimp, which we also use. We had our Excel spreadsheet of data done, we typed up the e-mail in Word & inserted our mail merge tags. Then I found out we needed to send from their non-primary account.

Reasons Why Every Website Should Use SSL/HTTPS & Where to Get a Free SSL

An SSL is a certificate that allows you to have a secure website. Your address will use HTTPS instead of HTTP and the browser will show a lock symbol or color the address bar to signify this to your visitors.

Using Ternary Operators in ES6 String Templates

The new ES6 version of JavaScript introduced Template Strings which allow for improved readability of code when working with multiple line strings.

Visual Studio Crashes Due to NPM

I've just started using Visual Studio and so far the experience has been great. The Web Essentials plugin makes web development a lot better. Unfortunately Visual Studio has not been playing nice when I select to "Open a Website" that is using NPM.

Compile Sass with SassC and Libsass

Recently Foundation launched version 5 of their framework. This introduced me to Libsass and SassC, a library and wrapper that compiles Sass using C instead of Ruby.