Etymological Delights 1-10

When I want to understand something I often start by looking up the history of a word. Here is a small selection of words and their history. Quotes are taken straight from, a wonderful english etymology site. Selective interpretations follow; I'm just a layman, an amateur.

Using regular expressions to learn a language

Regular expressions are cool creatures, but I've mostly been avoiding anything but the most basic ones, thinking they are more trouble than they are worth. Last week I found myself needing them when I was going through a largish code base. I ended up solving two problems, as well as ending up with two new problems.

Commmunication wells

Wiio's law states that "Communication usually fails, except by accident". To understand what words mean, it's useful to look at their history. Communication means "to make common". Accident comes from ad- "to" and cadere "fall". Taking this humorous saying seriously for a minute, where do we have to fall to make something common? Imagine a cross-section of a landscape, with a number of wells of various depth and breath. A well represents a field, like physics, cooking, or writing. The depth is how specialized the field is. The breadth is how many people are familiar with it. For example, English is quite complex but it's common to a lot of people, so that's a wide but deep well. Obscure trivia is shallow and not very wide. Something like Quantum Field Theory is very deep and not wide at all. As we discover more things, especially in science, wells merge or disappear. Is this an accurate depiction of human knowledge? Probably not, but it gives you a way to communicate complex ideas: (a) understand that you are in a well and (b) make it easy for people to fall into that well. (191 words)

Coin change problem

How many different ways can you make change for $1, given quarters and dimes? What about the general case with some amount and a list of different types of coins? The key observation is that we can divide the solutions into two parts: those that requires the first coin and those that don't. From this observation a recursive function "count" can be devised, with count(money, coins.tail) + count(money-coins.head, coins), together with some common sense base cases, will show how many ways we can make change. (86 words)

How to make scrambled eggs

The most important thing about scrambled eggs is stopping them from overcooking. Start off with eggs in the pan and some butter. Don't salt or whisk the eggs before they get into your pan. Use a spatula. Start on a generous heat. Give them a break from the heat once they get going, so they can combine and avoid drying out, repeat three or four times. Continue stirring, it's a live thing. When it starts to get together, take it off. Put creme fraiche to cool it. Season with salt, peppar and a touch of chives. Recipe by Gordon Ramsay. (100 words)


The Simplicity Toolkit

Last post we talked about simple vs easy in the context of general error handling. Here's a more general framework for thinking about simplicity, coming from Rich Hickey's talk Simple Made Easy. All distinctions made in this post are taken straight from that talk.

Simple error handling using slingshot and clj-http

Lately I've been been thinking about simplicity in software. When I say simple I mean: not compound. This is different from easy, which is a measure of familiarity. If this distinction is unfamiliar to you, I recommend you stop reading this and go watch Rich Hickey's talk Simple made easy first. With that said, let's turn to the subject matter at hand: What does simple error handling look like?