What is an API?

An API is an Application Programming Interface, but what’s that really mean? In a more practical sense, it’s one programmer hiding the (possibly messy) details of their own code behind a nice veneer, in order to make it easier for another programmer to consume it in their own program.

  Jul 23, 2017 (rev. Oct 7, 2025) ·  6 min

Evaluating a string of code in Erlang at runtime

Did you know that Erlang has the ability to read in a string representing a line of code to execute at runtime? It can parse it out, evaluate it and return the value. Let’s see how… Evaluating Simple Expressions At its most basic, we can just read any expression passed in and execute it. 1 2 3 4 5 6 7 8 9 10 11 12 -module(parser). -export([ evaluate_expression/1 ]). -spec evaluate_expression(string) -> any(). evaluate_expression(Expression) -> {ok, Tokens, _} = erl_scan:string(Expression), % scan the code into tokens {ok, Parsed} = erl_parse:parse_exprs(Tokens), % parse the tokens into an abstract form {value, Result, _} = erl_eval:exprs(Parsed, []), % evaluate the expression, return the value Result. Let’s try passing in some simple arithmetic expressions, remembering that statements end in commas and functions with a period, so our strings need to include those punctuations: ...

  Mar 5, 2017 (rev. Oct 7, 2025) ·  7 min

How to Create a Git Alias

If you’re unfamiliar with Git’s “alias” feature, it provides a way to create shortcuts for other Git commands, which can save you a lot of time. They’re easy to setup and maintain too. Let’s see how.

  Jan 28, 2017 (rev. Oct 7, 2025) ·  4 min

Comparing Two Objects for Equality in C#

It’s common to compare two objects in C# for equality, such as for a save operation. Let’s take a closer look at how we define what equal means.

  Oct 31, 2016 (rev. Oct 7, 2025) ·  7 min

Implicit vs Explicit Conversion in C#

We use implicit and explicit conversion in C# all the time, without even realizing it. Let’s learn more about them and look at examples of each.

  Feb 11, 2015 (rev. Oct 7, 2025) ·  5 min

Obsolete Attribute on a Class is Ignored When an Interface is Involved

The Obsolete attribute on a class is ignored when an interface is involved. It caught me by surprise, but makes sense. Let’s see why.

  Feb 4, 2015 (rev. Oct 7, 2025) ·  3 min

Passing Data Between Forms in WinForms

Passing data between two Forms is very common in WinForms. There’s a couple ways to do it, and one’s better than the other. Let’s take a look.

  Dec 12, 2014 (rev. Oct 7, 2025) ·  6 min