animal

Running on all fours

Over the last few years I’ve had a few dreams where I become lucid in a dream and find myself running on all fours. When this happens I think, “Well, this is odd, why am I running like this?” I then try to stand up, but I can’t. Typically I just keep running like that until I fade into the blackness of unconscious sleep.

One time when this happened I found myself running on all fours down a sidewalk, with a street to my left. Just as I was thinking about trying to stand upright I heard a noise to my right. I stopped in place, saw something small moving, and more or less against my will I began running towards the thing that moved. It suddenly occurred to me that the reason I was running on all fours was that I was a dog. “I” had my normal “I know I’m Alvin” consciousness, but I was in a dog’s body and I didn’t seem to have much control over the situation, I was just a passenger.

Another dream where I am running on all fours

Had another dream this morning that I was running on all fours. Rather than ask myself, “Why in the world am I doing this?”, I now just accept that I’m a dog (or a cat, or some other animal) in the dream. That helps me go along with whatever is happening in the dream, rather than fight it and wake up.

(Notes from a dream on June 28, 2016)

Running on all fours in a dream

Wow, how embarrassing. It has taken me *years* to realize that when I run on all fours in a dream that I’m actually a dog (or maybe some other four-legged animal).

I finally realized it this morning when I was running like that and came up to a group of human friends, and one said something like, “Hey, look over there, it’s your new friend.”

When I looked in the direction he was pointing I saw a group of people who didn’t look familiar, and a black dog. Just then the dog came running at me. When it got to me it started licking and biting me and I thought, “This dog is crazy, why doesn’t someone get it off of me,” when everything suddenly made sense.

A Scala “Null Object” example

A Null Object is an object that extends a base type with a null or neutral behavior. Here’s the Scala version of the Java example Wikipedia uses to demonstrate this:

trait Animal {
  def makeSound()
}

class Dog extends Animal {
  def makeSound() { println("woof") }
}

class NullAnimal extends Animal {
  def makeSound() {}
}

As you can imagine, later in your application you might have some code like this: