Scala, Java, Unix, MacOS tutorials (page 314)

A Programming Classic!
Design
Patterns

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.

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

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:

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

I truly believe (or at least hope) that 2013 will be seen as the year that software companies forgot about quality. Here are just a few examples I noticed last night and this morning:

Twitter: Today I was notified that people “favorited” some of my posts. Cool. Oh, wait, they were favorited eight days ago, but just showed up today.

This page shows a good Scala XML EntityRef example:

import scala.xml._
val xml = <body>Hello{EntityRef("#8198")}World</body>

That page states that 8198 is the unicode value for a tiny space character.

That code isn't too helpful unless you can see it in the REPL, so here it is:

I don't watch much television, but my nephew and nieces keep sending me URLs to Key and Peele videos, including the recent (2012) East/West College Bowl video.

As we sent emails back and forth, laughing about the names they came up with and which one we'd want to be, I decided to jot down the list of names they used in the video, and without any further ado, here are the names.

I just got a “java.lang.OutOfMemoryError: Java heap space error” when trying to use the Scala REPL to analyze a large XML dataset, as shown here:

Oh yeah, the big 5-0 ...

Nice bear ... sit boy ... lay down ...

A Programming Classic!
Design
Patterns