Avoiding Herd Mentality by Asking “Why?”

My two-year-old daughter is in a phase of her development where she questions everything she  doesn’t understand. She throws questions at us faster than a 90mph curve ball. I’ll admit there are times where the incessant “why is this blue?” and “why did you open the bottle?” become hard to tolerate but this is an…

Guidelines for unit testing

Have you ever wondered what it takes to build a commercial Jet? It often blows my mind to think of the hours engineers spend assembling components together to build the plane. Interestingly enough there are similarities between building software and assembling planes. The individual units for each part of the software application or plane must…

Viewing application logs in realtime using Sentinel & NLog

We all know how important log files can be when trouble shooting issues in an application. While log files are great to have, sometimes you just want a stream of information which describes what is going on in your application. Sentinel and NLog provide a great way to achieve this. Sentinel is a log-viewer with…

Generating an iCalendar file

Situation: Generate an iCalendar file which will trigger a calendar application (eg. outlook) to open with an updated event. The iCalendar file is a fairly common feature which most developers add to enable  users to add events to their personalized calendars via a custom calendar application. Solution: Create a web handler which will create a…

Geolocation using Advanced HTML 5

Geolocation is a feature in HTML5 which enables browsers to determine the geographical position of a user. For privacy reasons, geolocation is disabled by default in all supporting browsers. Users have to explicitly give permission to the browser before their position can be determined. The geolocation API is published through the navigator.geolocation object. Retrieving the…

Configuring Glimpse diagnostic tool

Glimpse is a free, open source diagnostic tool that can save you a lot time when it comes to troubleshooting and diagnosing issues in your application. Over the years more and more developers have contributed to glimpse making this a must have tool for daily .NET development. Glimpse works by inspecting web requests as they…

Eliminating If-else statements using a rule engine

Nearly every developer at some time in their career has run into the dreaded long chain of if-else statements. The chain of conditional statements makes code difficult to read and debug. While working on a recent project, I discovered a new way to clean things up. I’ll first take you through the old approach with…

Breaking down Interfaces

I often hear heated debates between developers about the usage of interfaces. Unfortunately, many of these debates are skewed toward the personal preferences of developers who fail to understand what an interface is and what it does. So let me use a couple of minutes to break it down for you….. Take a Digital Video…