I just ran into one thing I wish I had included in the Scala Cookbook that I didn’t include: How to access a val or var field in a Scala object from your Java code.

In short, if you have a field named appName defined in a Scala object, like this:

From a recent (late 2014) article on Jonathan Ive.

The photo shows the top reasons Apple rejects apps, and comes from this page. Here’s a link to their Mac App review guidelines.

Step away from the computer” ~ great advice from Ward Cunningham, where he suggests stepping away from your computer to think about your code. (If you’ve never used CRC cards, I still find them helpful for my thinking, especially when coding by myself, or training others.)

I like to have fun with graphics once in a while, so when I created my new eBook, How I Estimate Software Development Projects, I took a couple of hours to come up with a cover I kinda-sorta like. I could do much better given a couple of days, but for only working on it for a few hours, I’m okay with this.

With Scala it’s common to embed variables in strings like this with the s string interpolator:

val name = "Fred"
println(s"My name is $name.")

That’s cool, but when you need to format your string, Scala gives you an even more powerful tool: the f string interpolator. Here’s an example of how I just did this in my LittleLogger logging library:

Why cats should not be in business meetings.

“Choose a job you love, and you will never have to work a day in your life.” ~ Confucius

Over the last few weeks I’ve taken a little time here and there to put my notes on software cost estimating together, and the end result is a free, 100-page PDF that I’m sharing here today. The PDF covers most everything I know about the art and science of estimating the time and cost of software development projects.

At the moment I can’t think of too much to add to the book, as I cover a lot of ground in the book’s Preface, and in its “Three Lessons.” So, without any further ado, here is the download link for the book:

I was looking through this code on Github, which was shared at the 2014 Lambda Conference in Boulder, Colorado this summer, and ran across this for comprehension:

This code may not make much sense without seeing the end result, but ... the following source code shows how to draw lines and arcs in Scala and Java:

This is the view from my home office. I’ll be moving soon, and this is what I’ll miss most.

As a quick note, in a Scala/Swing application, I needed to change the font on a TitledBorder on two JPanel instances, and this code worked:

// the desired font
val font = new Font("Helvetica Neue", Font.PLAIN, 15)

// set the font on the titledborder instances
volumeControlPanel.getBorder.asInstanceOf[TitledBorder].setTitleFont(font)
keysPanel.getBorder.asInstanceOf[TitledBorder].setTitleFont(font)

The key in the solution is to get the Border from the JPanel, then cast it to a TitledBorder, where you can set the font. (Of course this assumes that you’re trying to change the font on a TitledBorder component.) While the example shown here is written in Scala, it can easily be converted to Java.

A guy pretends that he’s gone back to 2004, and tweets what he’d say to Steve Ballmer. (I have no idea why he wants to help Steve Ballmer.) Tweets from this Twitter account.

Scala Notebook is a project on Github that lets you run the Scala REPL in a browser.

Mac FAQ: What is the standard/default Mac OS X Yosemite font? Answer: Helvetica Neue.

“Make it a compelling product.” ~ Jonathan Ive, Apple

A little homage to Haskell, Learn You a Haskell for Great Good, Functional Programming, and Halloween.