What is the Law of Demeter?

At work, we’re running through The Pragmatic Programmer - the original, not the 2nd edition published last year. If anyone is reading that, I’d love to know if it really updates things for modern programming and whether it seems necessary. The original seems pretty timeless. Yesterday was my turn to present, listing out highlights from chapter 5, sharing some thoughts, and hopefully spurring some conversation. The authors start by talking about the Law of Demeter, but they don’t explain it very well, nor do they call it by its much more self-explanatory name, the Principle of Least Knowledge. ...

  May 2, 2020 (rev. Oct 11, 2025) ·  6 min

How to find the iCal address for a public Google calendar

Every Google calendar URL has an iCal file you can use… here’s how to find it.

  Feb 28, 2020 (rev. Oct 11, 2025) ·  2 min

Hands-on Ansible, using two DigitalOcean Ubuntu droplets

Today I’m wrapping my head around a build tool called Ansible, used for deploying machines in a scriptable, repeatable manner. Follow along as I step through an excellent tutorial from DigitalOcean, applying what I learn to a couple DO Ubuntu VMs… the $5/mo ones - nothing fancy needed!

  Dec 18, 2019 (rev. Oct 11, 2025) ·  4 min

Add and subtract time from a DateTime structure in Erlang

I was trying to add times in Erlang, but couldn’t find an existing function, so I wrote my own.

  Dec 1, 2019 (rev. Oct 11, 2025) ·  2 min

Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

This error might look a little cryptic at first glance, but it’s fairly descriptive in explaining what’s wrong. You’re likely to come across this one before your first cup of coffee.

  Nov 14, 2019 (rev. Oct 11, 2025) ·  2 min

Assign C# code to a variable and then run it

Did you know most languages have a way to pass around code to other functions, so you can call (invoke) it in other parts of your application? In C#, it’s called a delegate.

  Nov 13, 2019 (rev. Oct 11, 2025) ·  3 min

How can I find the state of NumLock, CapsLock or ScrollLock in WPF?

If you’re writing a WPF application and need to find the state of the Num Lock, Caps Lock, or Scroll Lock keys, you’re in luck - there’s a method for that.

  Nov 12, 2019 (rev. Oct 11, 2025) ·  1 min

What is the opposite of Any in LINQ?

One of the many nice functions in LINQ is a single word that iterates through a collection, returning true if at least one item in the collection matches the condition you specify. But what’s the opposite of the Any keyword in LINQ?

  Nov 11, 2019 (rev. Oct 11, 2025) ·  2 min

Enable logging for an AWS Lambda job

In a new AWS Lambda function, logging is initially disabled. Lets see how to enable it, for those times where additional detail is needed.

  Nov 7, 2019 (rev. Oct 11, 2025) ·  2 min

What's the GitHub Package Registry?

Most of us host something (and some of us everything) on GitHub, especially since they host private repos for free too now. I’ve been eager to try the GitHub Package Registry since they announced it last May. Well, I just got access to the beta, so let’s see what we can do!

  Oct 6, 2019 (rev. Oct 11, 2025) ·  10 min