Being ill

Feverfew

Being ill is rubbish, but when you come out the other side it can make you feel grateful that things are back to normal.

Before you got ill, normal might have been stressful or boring. But after the lows of illness, when your body aches and you feel like you have no energy or drive, it’s a relief to finally be better and back to normality. You see life with a new positivity.

Command-query separation principle

When writing a program it’s common to have two distinct types of method, verbs and nouns. The verb methods have names like generate or launch, and the noun methods have names like quarterly_sales_statistics or current_altitude.

In verb methods we’re giving a command to perform an action, which is probably changing the state of our program in some way. In the noun methods we’re querying the state of our program, and we expect some return value from these methods.

The “Command-query separation” principle1 says that all methods in a program should either be commands (verbs), which change state but don’t return data, or queries (nouns), which return data but don’t change state, but not both.

So if you spot any methods in your programs with verb-like names, and those methods are returning data that’s used elsewhere in the program, then this is a potential red flag. These methods can be split up so that the part that returns data is moved into a method that has a noun-like name, which can then be called by the verb method.

Life Lessons from Bergson

I read Life Lessons from Bergson by Michael Foley a few months ago. It was an OK book, nothing outstanding, but there were a couple of good quotes that I wrote in my notebook that are worth sharing.

Refusing to learn anything new is a major cause of petrifaction.

It is not what we feel and think that guides what we do, but what we do that guides what we feel and think.

Sunset

Sun setting behind chimneys and trees

I relish a good sunset.

The dramatic dimming horizon when the skies have been blue. That burst of intense colour that occurs when there are enough clouds to provide a canvas. Or the slow menacing darkness when a stormy afternoon turns into a stormy night. They’re all beautiful in their own way, and they all remind us of the rhythm of the day.

Months, weeks, hours, minutes and seconds - these are all humans inventions. But days are more natural. You can see the sunrise and sunset and know that another day has passed.

On good days you can watch the sunset and enjoy what is, before it isn’t. On the not-so-good days you can watch the sunset and know that this day is nearly over, and tomorrow is a fresh start.

Beauty in decay

Rusty abandoned farm equipment in a field with a backdrop of hills

I stumbled across this piece of abandoned farm equipment in a field today while out walking.

One part of me sees this as a sad monument to the failure of humans to tidy up after themselves. A timely metaphor for the wider problems facing Earth.

But from another perspective there’s a beauty to this scene. I find myself intrigued and wanting to know more.

What’s the story behind this piece of machinery? Where did it come from? How did it end up rusting in the corner of a field?

Chopping wood

Pile of wood next to a chopping block with an axe in it

Every man looks at his wood-pile with a kind of affection.

– Henry David Thoreau

I enjoy chopping wood, it gives me an excuse to get out in the fresh air, and depending on how much I chop it can be a pretty good workout.

There’s also something quite therapeutic about squaring up to the chopping block with an axe. It requires a decent amount of concentration, so my mind doesn’t have time to wander, yet it combines just the right amount of challenge and repetition to get into a state of flow.

I think 30 minutes spent chopping wood is as good for your brain as 30 minutes spent meditating.

subscribe via RSS