Background: I don’t know why, but without looking into it, all I know is that I could not use the Java Sound API from within SBT. Whenever I tried sbt run, I kept getting the following error message, even though I knew that my app and sound file worked when I packaged my Java application normally:

javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file

As part of the debugging process I created a little shell script named run.sh that contained these two lines:

This was said about Jeff Goldblum’s character Zach Nichols on the tv series Law & Order - Criminal Intent.

Twin Peaks often makes me smile.

I saw this on an episode of Continuum, and it reminded me of a way that I have always thought: You can fashion your future with your willpower.

Quick tip: To append when writing to a text file in a Scala or Java application, create your FileWriter with the append flag set to true, like this:

val bw = new BufferedWriter(new FileWriter(new File("/tmp/file.out"), true))
bw.write("Hello, world\n")
bw.close

I just ran across this info on the spray.io website and wanted to remember it here. The image shows a couple of flags that can be used to show Java JVM garbage collection and hot spot compiler information. In particular the second flag shows when the hot spot compiler is “done”.

The current story is that Steve Jobs’ office at Apple HQ is still there, untouched, but I have always liked this image of his home office.

At the moment it’s not easy to find instructions on how to log output to a file using Grizzled-SLF4J in a Scala application, so I’m taking a few moments to show how this is done.

Grizzled-SLF4J dependencies

First, assuming that you’re using SBT, your build.sbt file should look like this:

“Show me your friends, and I’ll show you your future.” ~ Maurice Clarett

Quick tip: If you need to display a message dialog in a Java application, you can do so in as little as one line:

JOptionPane.showMessageDialog(jframe, "Hello, world");

If you don’t have a JFrame available, you can use null for the first argument. There are many more details and examples in this Java JOptionPane showMessageDialog tutorial.

Textexpander lets you create short snippets of text which it will replace with larger snippets. For instance, “;em” will be replaced with your email address when you type it.

Wow. It was 99 degrees about three days ago, and this morning I just woke up to find the first snow of the 2014-2015 season.

Need help finding your motivation to learn Scala? How about a $200K salary?

I haven’t worn a watch since the 1990s, and despite the new stuff from Apple, Google, and others, I still don’t see myself wearing a watch in the future. I’m curious to see how this plays out, whether the watches will be a bomb, or successful. Personally, I’m much more interested in products like SARAH.

One more funny Twitter post ... and now I better get back to work.

I found this on a NSFW site (thechive) that has a great collection of funny Twitter posts.

Sergey Brin tried it at TED: There will be a ‘Mind Focus Challenge’ at this year's Buddhist Geeks Conference -  http://bgeeks.io/1rXWUxc

I just learned about the Emotiv neuroheadsets in a Buddhist Geeks email. I have used the inexpensive MindWave NeuroSky headset on and off for the last 15 months or so, but the Emotiv EPOC headset looks very cool (and significantly more expensive).

Great, there have been rattlesnake sightings in the neighborhood. I knew there was a reason I wanted to move back to Alaska.

Notes from “The peculiar habits of successful people”:

  • Dilbert creator Scott Adams doesn’t use goals. He uses systems instead.
  • When Charlie Munger was a lawyer, he saved the most productive hour of the day for himself.
  • Nikola Tesla designed complicated inventions in his head before tinkering.
  • Several great thinkers, from Isaac Newton to Albert Einstein to Adam Smith, were prolific wanderers and daydreamers.
  • Someone once asked Warren Buffett the key to success. He pointed to a stack of books and said, “Read 500 pages like this every day. That’s how knowledge works. It builds up, like compound interest.”
  • To think outside the box, inventor Steven Sample solved engineering problems by imagining them in the most absurd way possible.