Articles
Ever run into a SQL Exception error where you tried to submit a string that was too long but you couldn't figure out which value caused the error?I built my 3rd personal PC this year. The previous 2 each lasted around 10 years. Here's what has worked for me.A quick guide to adding Tailwind to Blazor or any .NET project.While working on a redesign, I needed a way for JavaScript to get the value of a CSS variable to determine the state of a page. Lucky for us, there is a browser compatible and easy method.A quick guide to setting a default starting directory in Windows Terminal for multiple profiles, including WSL.Create a date and time snippet or keyboard shortcut with VS Code built in variables.You can generate Lorem Ipsum in Microsoft Word with a =lorem(3,10) code followed by enter.What is Vmmem? Why is it using so much memory & CPU? Don't worry, it's safe!In preperation for the Microsoft Programming in C# 70-483 exam, I've created a free study guide.In preperation for the Microsoft Programming in C# 70-483 exam, I've created a free study guide.I've been enjoying Tailwind CSS as my main CSS tool for building components. One thing missing by default was how to use @import.I ran into the following error while working with Blazor. Error: There was an exception invoking 'MethodName' on assembly 'AssemblyName'. For more details turn on detailed exceptions in 'CircuitOptions.DetailedErrors'. Here's the fix.Having one true source of data is one of the first golden rules in software development. When creating components in JavaScript, you may want to add styles and classes that are also in your scss files. In an ideal world, you want to be able to make changes to these styles in one place and let your code update the rest.As an avid reader, I often get requests for my favorite books. The following is a list I shared a while back with a friend. If you're interested in tech, coding, entrepreneurship, science or self-development, I think you'll find these enjoyable as well.No need for an extension or ReSharper to sort and remove unnecessary using statements in .NET projects with Visual Studio. This is now built in, but you have to enable it.Adding default props in React with TypeScript has been a pain. TypeScript 3 is making this process simple.There may come a time where you want to reference types in your TypeScript file without importing the code. This is common if you have a script tag somewhere else that is importing JavaScript from a public CDN of a popular library.While installing Visual Studio with Xamarin, I ran into an error where it wouldn't download some of the Oracle parts. When clicking on the link for more information, it told me "In order to download products from Oracle Technology Network you must agree to the OTN license terms."The terms declarative and imperative are often thrown around when talking about different styles in programming. Here's a short way to tell the difference.Here's a quick fix for Entity Framework's Validation 30000 errors that show up on decimal columns.While messing around with .NET Core 2 and Identity, I ran into this error.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.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.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.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.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.Experimenting with Blazor, I ran into this error. "There is no registered service of type...".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.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.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.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.I was working on learning algorithms & data structures. Reading the comments, many people were angry their solution worked but didn't pass all the tests. Performance on large data sets are why these matter though. Here are a couple of my attempts, plus a third I found online afterwards.Here's a great pattern for adding optional values to a function in JavaScript.I can never remember the keyboard combination to use instead of Ctrl+Alt+Delete on a remote desktop.This a simple & short guide on how to add a header to different server architectures.Don't let your Startup.cs file turn into a mess. Use extension methods to keep it clean.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.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.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.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.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.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.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.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.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.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.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 followingToday 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.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.The new ES6 version of JavaScript introduced Template Strings which allow for improved readability of code when working with multiple line strings.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.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.