Weekend Reading List

What I Learned From Bombing An Amazon Coding Assessment

Are you going to interview at tech companies? Make sure you read Andrew’s tips on how to solve coding questions. His approach is really valuable.

Easy data seeding in .NET (Core) applications

Almost all developers have that annonying moment where you have to create dummy data locally in order to test your application. This article uses `DbTool` utility and `Korzh.DbUtils` library for seeding the database.

Debug & Catch Exceptions in Visual Studio: The Complete Guide

Am I the only always putting a break point in `catch` line _after_ I have encountered the exception? I’m sure I’m not. Well, there’s a setting option in Visual Studio to break on every exception, so you can avoid this very issue.

7 Habits Of Highly Effective Programmers – Inspired by an ex-Google TechLead #humor

It’s not just enought to be a good programmer, it’s also help to become a highly effective programmer. Avoid meeting is one of the habits.

The Steve Wozniak Guide to Building Better Software

Pretty easy read on how to apply hardware-engineer approach to become better software developer in software-engineer.

Free eBooks

Everyone gotta loves free stuff. Here are free eBooks that would improve your technical skills and knowledge.

Cognitive Complexity

Fairly short read. SonarQube, a company that makes an automatic code-review tool with the same name, has come up with an algorithm to determine how complex code is and the score to determine easy it’s to understand, called Cognitive Complexity.

Azure Security Best Practices

If you are in Azure environment, this is a really good resource to understand what Azure has to offer to secure your application and environment. From identity management, network, monitoring system, VMs and database, it covers pretty much everything security.

Learn Azure in a Month of Lunches

You can learn everything Azure in a month of lunches, that’s 30 days x 1 hour = 30 hours! Sounds pretty good deal to me!

My Sunday Reading List

Declarative vs Imperative


This is probably your interview questions, even though not many company I came across has asked these. Declarative programming vs imperative programming, is basically, in its very simple form, like functional programming vs object-oriented programming.

6 Key Concepts in Andrew Ng’s “Machine Learning Yearning”

If you want to learn Machine Learning, Andrew Ng is the man you need to listen to. There’s so much more to cover beyond this article, but it lays out 6 basic concepts in Machine Learning.

Using the Microsoft Graph API with PowerShell

A detail walkthrough on how to query Microsoft Graph API, which is a service to manage all most aspects of Azure AD and Office 365, with Powershell. From setting up secrets, certificate, application permission to access token, all covered here.

Why our team cancelled our move to microservices

Sometime you have to know when to back out as in this story of Steven’s team backing out from implementing microservices. What’s even more awesome is, he documented the lesson-learned from his team on what to consider when implementing microservices.

How you can build a Serverless API using GraphQL .Net Core, C# and VS Code

A step-by-step walkthrough on how to build GraphQL-based API with .Net Core, C# and Azure Functions.

Setup SQL Server Connection Resiliency with Entity Framework

Tested on:
Microsoft SQL Server 13.00.5292
Entity Framework 6.2.0

When an application execute too many operations against SQL Server, a transient fault could occur.
Transient fault in SQL Server could occurred in self-hosted or cloud SQL Server. It could caused by many reasons and extremely (if not impossible) to debug.
You might encountered error messages like:

“Database * on server * is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of *.”

Other similar messages also point to transient fault errors.

Microsoft suggested solution to transient fault is to retry the executed operation, often dubbed as database connection resiliency. To set this up in Entity Framework, follow this step:

  1. Set EF DbConfiguration using code-based configuration, see this post.

  2. In the constructor, add following code

    SetExecutionStrategy("System.Data.SqlClient", () => new SqlAzureExecutionStrategy(10, TimeSpan.FromSeconds(50)));

  3. The first parameter of SqlAzureExecutionStrategy is the maximum number of retry and second parameter is the delay in milliseconds between retries.

Once set, EF will retry the faulted operation automatically. Consider performance when deciding how many tries and delay time to configure. The longer the try or delay time will increase operation time.

Sql Server Backup Academy

Programmatically Configure EF DbConfiguration

Tested on:
Entity Framework 6.2.0

There are few ways to set EF configuration, this describes using code-based DbConfiguration.

  1. Create a class inherit from DbConfiguration.
    using System.Data.Entity;
    namespace InfinityDataModel
        public class InfinityConfiguration : DbConfiguration
            public InfinityConfiguration()
                // Sample configuration
                SetDefaultConnectionFactory(new LocalDbConnectionFactory("InfinityDb"));

  2. The class must be in same assembly as your the Entity Framework Data Model.

  3. In the constructor, set the configuration you wanted. For all possible configurations, see here.
  4. There is no need to do anything else. EF will load your configuration class when initialized.


What to Read?

Stateful Serverless: Long-Running Workflows with Durable Functions

Great post by Jeremy Likness on how to use Durable Functions in Azure Functions to create a long-running workflows. Yes, a serverless service can be used for long-running application. Some of the pattern implemented are: fan-out-fan-in, human interaction, etc. Although the example given is a game, it can definitely be applied in many Enterprise situation.

What’s the big deal with IAsyncEnumerable in .NET Core 3.0?

Ever wonder how you can stream data asynchronously? Now you can with IAsyncEnumerable<T>, a new feature in C# 8.0 and .NET Core 3.0.

Create dependent pipelines in your Azure Data Factory

One of the very common scenarios in data integration and movement is the dependency of one task to another. Azure Data Factory now offers option to run triggers based on dependency of another trigger. You can even specify offset and dependency size of a trigger.

The guide to Visual Studio Code shortcuts, higher productivity and 30 of my favourite shortcuts you need to learn

Want to code faster in Visual Studio Code, this will help you.

Solving Cold-Start disturbs serverless’ definition and it’s okay

Serverless has its advantage but cold-start is not one of them. With Azure Premium Functions, you can solve cold-start issue although technically, it’s no longer a serverless. Maxime made an argument when to use serverless or not.

IOT Challenge: Build IOT Device and Win Prizes – FREE Azure Sphere Kit

Hackster is hosting an IOT challenge: “Secure Everything with Azure Sphere”, build your IOT device and win prizes.

Head to: https://www.hackster.io/contests/SecureEverything

At the least, you can get free Azure Sphere Kit, worth $75 !!