The ESM Module Loader is Experimental

If you fire up a new TypeScript app and whack it into Node, you might come across the following error about The ESM Module Loader is Experimental. (dev) [email protected]:~$ node –experimental-modules run.ts (node:11333) ExperimentalWarning: The ESM module loader is experimental. (node:11333) Warning: To load an ES module, set “type”: “module” in the package.json or useContinue reading “The ESM Module Loader is Experimental”

Real Life Performance Cost of compilation debug=”true”

There is a little setting in your ASP.NET Web.config file that sets compilation debug to true. If you debug your application locally, this gets set for you if it hasn’t been set already… <system.web> <compilation debug=”true” targetFramework=”4.5.2″ /> <!– … –> This is necessary for debugging, but also costly. That’s why your default Web.Release.config transformContinue reading “Real Life Performance Cost of compilation debug=”true””

Stand Away From the Edge: Thinking About Edge Workers

As today’s Cloudflare outage rages on, with a multitude of services that depend on Cloudflare being knocked out of operation simultaneously, we are all reminded about resilience. In particular, it’s a good time to think again about edge workers. Cloudflare is quite amazing. It handles huge amounts of traffic using just a small number ofContinue reading “Stand Away From the Edge: Thinking About Edge Workers”

Minification Failed. Returning Unminified Contents.

Has you ASP.NET applicaiton reported that minification failed? If you are using bundles in application, you might come across this exception comment at the top of your larger-than-expected bundle file. /* Minification failed. Returning unminified contents. (List of problems here) */ It can happen for JavaScript or CSS, but it means minifier has found somethingContinue reading “Minification Failed. Returning Unminified Contents.”

Use PowerShell to Count the Number of Elements in XML Files

I needed to know how many pictures were being sent in a collection of XML documents, so I wrote a PowerShell script to count the number of picture elements. The element I’m looking for is in the $element_xpath variable. The example below is any picture element, anywhere in the document. You could limit this byContinue reading “Use PowerShell to Count the Number of Elements in XML Files”

Capturing Telephone and Mail Link Clicks in Google Analytics

There are a great many posts on the subject of capturing events for telephone or email clicks in Google Analytics. Of the examples I found, none handled asynchronous content. That means there is the potential for them to fail to capture clicks if the links are loaded after the initial document ready event in theContinue reading “Capturing Telephone and Mail Link Clicks in Google Analytics”

Genius in Hindsight: TypeScript Type Annotations

When TypeScript first landed in public view in October 2012, the type annotations looked a bit funky. If you were a student of type theory, they would have been familiar; but most programmers wouldn’t have seen a type annotation like this before: var name: string; Given the popularity of putting type names before variable names,Continue reading “Genius in Hindsight: TypeScript Type Annotations”

You Can Only Create a User with a Password in a Contained Database

If you attempt to create a user in SQL Server and get the following error: You can only create a user with a password in a contained database You probably didn’t quite configure your database as you intended. You can use the script below to fix it up (substitute DatabaseNameHere with your actual database name.Continue reading “You Can Only Create a User with a Password in a Contained Database”