Skip to content
Insights & Iterations Making sense of AI: technical, everyday, & reflections.

#code

Modifying a File Locally Without Updating the Remote Git Repository
Modifying a File Locally Without Updating the Remote Git Repository

April 5, 2024 • 1 min read

Have you ever needed to modify a file locally without committing the changes to the remote repository?

A Binary Search Implementation
A Binary Search Implementation

December 1, 2020 • 1 min read

The binary search algorithm quickly searches a large array of numbers, it’s often referred to as divide and conquer.

The Benefits of Using a Build Framework
The Benefits of Using a Build Framework

November 25, 2020 • 2 min read

Continuous Integration (CI) and/or Continuous Delivery (CD) is the norm on software projects these days. There are many build servers such as Azure DevOps, TeamCity, Jenkins, and Cruise Control.Net.

Tools and Resources I Commonly use to Develop Software
Tools and Resources I Commonly use to Develop Software

October 23, 2020 • 6 min read

Below is a collection of tools, libraries, and resources I commonly use.

NVarchar Vs Varchar
NVarchar Vs Varchar

August 5, 2020 • 3 min read

Each engineer defining a new string column decides: Do I use nvarchar or do I use varchar?

Changing a React Input Value from Vanilla Javascript
Changing a React Input Value from Vanilla Javascript

July 27, 2020 • 1 min read

Changing a React input value from vanilla Javascript is not as simple as you might think.

When to Use The FromService Attribute
When to Use The FromService Attribute

November 20, 2019 • 3 min read

The [FromServices] attribute allows method level dependency injection in Asp.Net Core controllers.

C# 8 - Nullable Reference Types
C# 8 - Nullable Reference Types

November 3, 2019 • 4 min read

Microsoft is adding a new feature to C# 8 called Nullable Reference Types. Which at first, is confusing because all reference types are nullable… so how this different? Going forward, if the feature is enabled, references types are non-nullable, unless you explicitly notate them as nullable.

9 Guidelines for Creating Expressive Names
9 Guidelines for Creating Expressive Names

October 27, 2019 • 6 min read

Naming is subjective and situational, it’s an art, and with most art, we discover patterns. I’ve learned a lot through the reading of other’s code. In this article, I’ve compiled 9 guidelines I wished others had followed when I read their code.

With or Without Curly Braces?
With or Without Curly Braces?

October 13, 2019 • 2 min read

There’s a heated debate around single statements and whether they should have curly braces or not.

Understanding Begins with Expressive Names
Understanding Begins with Expressive Names

September 30, 2019 • 4 min read

Understanding code is the first step to modifying it.

Codifying the Secret Sauce
Codifying the Secret Sauce

September 15, 2019 • 5 min read

Codifying the secret sauce is instrumental in writing maintainable and successful applications.

Garbage Collection Types in .Net Core
Garbage Collection Types in .Net Core

September 1, 2019 • 4 min read

Memory management in modern languages is often an afterthought. For all intents and purposes, we write software without nary a thought about memory. This serves us well but there are always exceptions…

You Are Not Your Code
You Are Not Your Code

August 18, 2019 • 1 min read

Your code reflects neither your beliefs, nor your upbringing, nor your character.

The 5 Different Meanings of the Question Mark in C#
The 5 Different Meanings of the Question Mark in C#

August 5, 2019 • 1 min read

In C# the question mark has 5 meanings as of C# 8.

The Collection Comparer, Finding the Differences Between Two Collections
The Collection Comparer, Finding the Differences Between Two Collections

July 21, 2019 • 2 min read

Have you had to compare two collections and execute some logic based on whether the item is in the source collection, in the comparing collection or in both? Yeah, me too, I needed to merge data from the UI and the database. I couldn’t find a good solution, so, I wrote a collection comparer.

Implementing Request Caching in ASP.Net Core
Implementing Request Caching in ASP.Net Core

July 7, 2019 • 4 min read

At some point in an application’s development, usually, fairly early on, you realize the application is slow. After some research, the culprit is, unnecessarily retrieving the same data, and a light goes off, and you think: “I need some caching.”

Running Await in a Constructor
Running Await in a Constructor

June 23, 2019 • 1 min read

If you must run code in a constructor. I’d look for a different way, but if you must, here’s one way.

Workaround for 'Template parse errors;' in Angular
Workaround for 'Template parse errors;' in Angular

October 30, 2017 • 2 min read

This was one of the more frustrating issues with Angular 2/4/+. It’s not an issue with Angular 2/4/+ per se, but with how webpack bundles the supporting HTML files.

Examining the Case for Switch Statements
Examining the Case for Switch Statements

December 6, 2015 • 10 min read

For nearly 50 years, the switch statement (also known as the case statement) has been an integral part of programming. In recent years, however, some are claiming that the switch statement has outlived its usefulness. Others go even further by labeling the switch statement as a code-smell.

4 Practices to Lowering Your Defect Rate
4 Practices to Lowering Your Defect Rate

November 17, 2015 • 9 min read

Writing software is a battle between complexity and simplicity. Striking balance between the two is difficult. The trade-off is between long unmaintainable methods and too much abstraction. Tilting too far in either direction impairs code readability and increases the likelihood of defects.

Index Fragmentation in SQL Azure, Who Knew!
Index Fragmentation in SQL Azure, Who Knew!

April 26, 2015 • 2 min read

I’ve been on my project for over a year and it has significantly grown as an application and in data during the year. It’s been nonstop new features. I’ve rarely gone back and refactored code...

Proofing a Concept and Growing the Code
Proofing a Concept and Growing the Code

March 1, 2015 • 2 min read

In a recent conversation, a friend mentioned he creates proof of concepts and then discards them after testing their viability. I’ve done the same in the past. This time it didn’t feel right. I cringed when he said he threw away to the code. Maybe my days as a business owner has turned me into a froogle goat, but it felt like he was throwing away value.

Securing AngularJS with Claims
Securing AngularJS with Claims

February 14, 2015 • 6 min read

At some point an application needs authorization. This means different levels of access behave differently on a web site (or anything for that matter). It can be anything from seeing data to whole area’s that are not accessible by a group of users.

3 Reasons Why Code Reviews are Important
3 Reasons Why Code Reviews are Important

January 28, 2015 • 3 min read

A great code review will challenge your assumptions and give you constructive feedback. For me, code reviews are an essential part in growing as a software engineer.

5 Steps for Coding for the Next Developer
5 Steps for Coding for the Next Developer

January 1, 2015 • 5 min read

Most of us probably don't think about the developer who will maintain our code. Until recently, I did not consider him either. I never intentionally wrote obtuse code, but I also never left any breadcrumbs.

Implementing Transparent Encryption with NHibernate Listeners (Interceptors)
Implementing Transparent Encryption with NHibernate Listeners (Interceptors)

November 3, 2014 • 5 min read

Have you ever had to encrypt data in the database? In this post, I’ll explore how using nHibernate Listeners to encrypt and decrypt data coming from and going into your database. The cryptography will be transparent to your application.

Calling Stored Procedures with Code First
Calling Stored Procedures with Code First

October 16, 2014 • 2 min read

One of the weaknesses of Entity Framework 6 Code First is the lack of support for natively calling database constructs (views, stored procedures… etc). For those who have not heard of or used Code-First in Entity Framework (EF), Code-First is simply a Fluent mapping API.

Conditional Sql parameters with nHibernate
Conditional Sql parameters with nHibernate

March 26, 2014 • 5 min read

The problem is a the nHibernate’s `CreateSqlQuery` needs a complete sql string to be created, but you can’t create a string until you’ve evaluated the parameters. The only work around is to evaluate the conditional parameters to create the sql string to create the nHibernate session and then revaluate the parameters again to add them to the `nHibernate` query object.

Crystal Reports 13 Maximum Report Processing Limit Reached Workaround
Crystal Reports 13 Maximum Report Processing Limit Reached Workaround

December 18, 2013 • 6 min read

In the Visual Studio 2012 version of Crystal Reports 13 there is a threshold that throttles concurrent reports, this also includes subreports, to 75 reports across a machine. This means if there are 5 web applications on a given server all opened reports across all 5 web applications counts toward the 75 report limit.

Considerations When Throwing Exceptions
Considerations When Throwing Exceptions

March 21, 2013 • 2 min read

There is an underlining philosophy in this system that nulls are bad. In most cases where a null can be generated an exception is thrown. At first I did not see a problem with this. I saw it as an architecture decision, an aesthetic, but as I interface with the code, it’s apparent to me it’s an architectural mistake.

Creating a Generic Type at Runtime
Creating a Generic Type at Runtime

May 22, 2012 • 1 min read

To use a runtime type with an IOC container like StructureMap to find a generic implementation, create the generic type using `MakeGenericType` and then retrieve the instance from the container using `_container.GetInstance(type)`.