Learning a little about programming could benefit anyone. If you want a fun intro to coding and logical thinking, check out Scratch!
All programming languages have gotchas to trip you up, and C# is no exception. Today, let’s check out the subtle (but significant) difference between “throw” and “throw ex”.
We’ve all seen word clouds, like in the sidebars of blogs, but let’s see how we might create our own with a little bit of code!
Every time I learn some new piece of CSS I’m amazed at how flexible and powerful it is. Like how easy it is to tailor your site for your visitor’s “dark mode” preference!
I was trying to add times in Erlang, but couldn’t find an existing function, so I wrote my own.
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.
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.
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.
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?
Modifying an Erlang config file at runtime wasn’t as easy (or obvious) as I’d thought it’d be. So I wrote a script to hopefully make it easier.
Porting .NET Framework code to .NET Standard has been a learning experience, with some challenges too. This time I had a .NET Standard library that expected an application config file, but loading one from an NUnit test suite proved to be more difficult than it sounded at first.
I was upgrading some code to use string interpolation, a feature introduced in C# 6, when I ran into a small snag with DateTimes and a format string stored as a constant.
Ever thought it’d be convenient to attach metadata to your code at design time, then read it at runtime? Attributes let you do just that - to methods, classes, tests, enumerations, and more. Use reflection to read them at runtime and take some action. Here’s a few examples for the uninitiated…
Ever had an EUnit test fixture fail with meck reporting it was “already_started”? Well I did, and here’s why…
When dealing with a dynamically typed language, any effort to tame the beast can pay off. For Erlang that means Dialyzer specs, but they can be a pain. Here’s some warnings I’ve seen and how to solve them.
Handling date and times is a thorn in every experienced developer’s side. If you haven’t had the pleasure yet, you will. ;) Coming off a week of standardizing some datetimes across an Erlang app, here’s a few personal thoughts.
I wrote a small library for calculating Easter and other holidays in Erlang. Here’s how I did it and what I learned.
Have you ever had a collection of items and needed to select a random one from the lot? What if you have a class with some property (i.e. ‘age’ or ‘weight’) that you want to take into account when doing the random selection? Let’s see how we might approach that…
Have you ever tried to execute a function at some future time in Erlang? You can, with a timer, but the compiler may complain that the function you’re calling via the timer is unused. Why is that and what can you do?
I ran into a problem in Erlang yesterday that made me think… is there anyway to implement a property accessor on a record?