try-catch-FAIL

Failure is inevitable

NAVIGATION - SEARCH

Practical Promises in JavaScript - What are they, and how do I use them?

JavaScript promises are a concept that I see developers, both pros and novices, struggle with on a regular basis. For those of us that come from a synchronous-programming background, using them effectively and understanding what's happening can be challenging, especially if you don't have a good grasp on all the ways that promises can be manipulated and used. In this new series of posts, we'll be looking at how to use promises effectively. More...

Altering a JSON Response with Azure API Management Portal Policies

Altering a JSON Response with Azure API Management Portal Policies One of my clients has started using Azure API Management (APIM) on top of their ASP.NET Web API endpoint. This worked fine for just about everything, with very few changes, until we started returning paged result models. Suddenly, our clients were making requests to the internal URL, and not the APIM URL, and things started blowing up. There's a happy ending to this story though, as fixing the issue was easy, thanks to APIM's built-in Policies. More...

Handling Environment-Specific Configuration with Visual Studio Tools for Apache Cordova

I would wager that just about every app you work on is actually deployed in multiple environments. [More]

SpecsFor and SpecsFor.Mvc Updated!

Thanks to some nice pull requests by Gheorghe Bulicanu, both SpecsFor and SpecsFor.Mvc have been updated! SpecsFor 5.0.1 fixes the annoying issue regarding incompatibility with NUnit 3.0. The SpecsFor now correctly restricts to versions less than 3.0 (which isn't currently supported.) SpecsFor.Mvc 4.8.0 includes updated Selenium WebDriver support, which will work with the latest versions of Chrome and IE. Both packages are available on NuGet now. Thanks again, Gheorghe, for the pull requests!

Turn an Array into Proper-English with an AngularJS Filter

I needed a way to display a nicely-readable list of strings for an app I'm working on. And by that, I mean that I wanted to display, "Mary, John, and Mark" instead of "Mary, John, Mark". A simple ngRepeat would have been too complex for this, so, filters to the rescue! More...

CodeStock 2017 Voting is Open!

It's that time of year again. Another CodeStock is right around the corner, and that means it's time to vote for sessions! More...

What Time is It (in the cloud with .NET and Azure)?

Seriously, I just need to know what time it is! But that's a harder question to answer these days. *At least* half the apps I work on require some form of "Tell me what's happened **today**" reporting. And **today** depends on where the user is. And **today** where the user is doesn't match **today** where the app is running in Azure, which uses UTC. [More]

Heroic.AutoMapper 3.0 (Almost) Released

It's release candidate time (finally): you can now use AutoMapper 5 with Heroic.AutoMapper!

More...

A Reusable, Simple Gulp File

It’s been over a year since my last semi-rant about gulp.  I’ve continued to use gulp as my client-side build tool on countless projects.  I’ve learned a ton.  I finally feel like I’m ready to create a reusable, all-purpose gulp file.  Here’s what I have so far More...

A Simple Trick to View Data in SQL Server While Your Specs Are Running

It’s ridiculously easy to do integration testing against Entity Framework and a real database when you are using SpecsFor.   I use SpecsFor to do all my integration testing.   But it occurred to me that I’ve never publicly documented one of the common tricks I use: viewing data in the test database while the specs are running. More...