We either make ourselves miserable, or we make ourselves strong. - Carlos Castaneda

“We either make ourselves miserable, or we make ourselves strong. The amount of work is the same.”

~ Carlos Castaneda

Scala - Thinking of functions as transformers

When you write Scala code like this:

val x = List.range(1, 10)
val evens = x.filter((i: Int) => i % 2 == 0)

the following portion of the code is a function literal (also known as an anonymous function):

(i: Int) => i % 2 == 0

When reading this code, it helps to think of this symbol:

How to run a Unix shell script from the Mac Finder

If you ever want to create a Unix shell script that you can give to someone else so they can double-click it and run it through the Mac OS X Finder, all you have to do is (a) name the file with the ".command" extension and (b) make it executable. So, just name your Mac/Unix script like this:

ShowProcesses.command

Then make it executable, like this:

chmod +x ShowProcesses.command

You can also leave out the usual #!/bin/sh part on the first line.

Writing a book is an adventure. To begin with it is a toy and an amusement.

“Writing a book is an adventure. To begin with it is a toy and an amusement. Then it becomes a mistress, then it becomes a master, then it becomes a tyrant. The last phase is that just as you are about to be reconciled to your servitude, you kill the monster and fling him to the public.”

~ Winston Churchill

Create like a God, Command like a king, Work like a slave (quote)

Create like a god.
Command like a king.
Work like a slave.

~ Constantine Brancusi

Bleeding Cubbie Blue

Woo hoo hoo,
eighteen hours with nothing to do,
I’m watching WGN,
and bleedin’ Cubbie Blue.

The Mediator Design Pattern in Java

Summary: The Mediator Design Pattern is demonstrated in a Java example (a Java Mediator Pattern example).

Law of Demeter - Java examples

Summary: The Law of Demeter is discussed using Java source code examples.

Whenever you talk to a good, experienced programmer, they will tell you that "loosely coupled" classes are very important to good software design.

The Law of Demeter for functions (or methods, in Java) attempts to minimize coupling between classes in any program. In short, the intent of this "law" is to prevent you from reaching into an object to gain access to a third object's methods. The Law of Demeter is often described this way:

The Good Will Hunting 'NSA scene' (causality)

The string of causality they put together in this “NSA scene” in Good Will Hunting is brilliant:

More snow - May 1, 2013

Woo-hoo, we're getting more snow here today in the Boulder, Colorado area. (May 1, 2013)

Syndicate content