Khalid Abuhakmeh

Finding The Second Lowest Item In A List Using C# and F#

I cam across an interesting problem where I needed to find the second lowest item in a list. You may think this is a simple problem with a simple solution:

Sort the list in ascending order, and take the second item from the list. Done! (Mic Drop)

The knee-jerk solution described above would work for a list of unique items, but not for a list . . .

Read More

October 02, 2015

Using F# To Calculate Health Insurance Tax Subsidy Rates

When the Affordable Care Act was signed into law by President Obama, the U.S. government set aside financial incentives for families that qualified for help. In the Ritter Insurance Marketing quote engine, we help consumers determine if they qualify for help, and how much they could potentially save. None of this information is secret, as it . . .

Read More

September 28, 2015

LINQPad Is A Must Have For .NET Developers

This week has been a busy one for the team and I. Our API is in the public and has been executing some complex LINQ queries. After a data update we started seeing this issue, which may be familiar to any Entity Framework user.

The cast to value type 'System.Int32' failed because the materialized value is null. Either the result . . .

Read More

September 24, 2015

Submitting A Dictionary To An ASP.NET MVC Action

Model Binding A Dictionary Is Easy :)

When building line of business applications, requests for saving dynamic key/value pairs are inevitable. The "best" way to store dynamic data is in a Dictionary, the mother of all flexible data structures. This post will show you the minimum required to post a dictionary to your ASP.NET MVC action so you can meet your business . . .

Read More

September 10, 2015

Centroids Are Not Enough For Geo-Location

In a previous post, I described how to use the MapQuest API and retrieve a user's current address via a reverse lookup. Almost immediately afterwards, MapQuest changed the terms of their API and now they are looking to implement a token based authorization system to prevent abuse. I thought:

Why not implement my own reverse lookup? How . . .

Read More

September 02, 2015

Selfie Quote - Using Microsoft's Oxford API To Provide Health Quotes

For the past several months, we have been working on a health quote engine. This quote engine is designed to give individuals and their families a quote for specific health insurance products. At Ritter Insurance Marketing, we imagine a future where you do not have to go through the arduous task of entering your entire family's . . .

Read More

September 01, 2015

Chaining Actions The Easy Way In C#

Action, Func, and predicates are a great addition to C#, and most developers are pretty familiar with them at this point. What developers might not know, is that you can chain them together the same way you could chain events. Take a look at this example.

using System;using System.Linq;public class Program{ public static void Main() { Action  . . .

Read More

August 30, 2015


All Categories: c#(2) home