This page contains a collection of Scala method examples. I created many of these examples while I was writing the Scala Cookbook. Unlike the Cookbook, where I explain these examples in great detail, on this page I’m just sharing many of the examples so you can use this as a method/function reference page. (The Cookbook contains more examples than this page, and explains them in detail.)

This page contains a collection of Scala trait examples. I created many of these examples when I was writing the Scala Cookbook. Unlike the Cookbook, where I explain these examples in great detail, on this page I’m just sharing many of the examples so you can use this as a trait reference page. (The Cookbook actually contains more examples than this page.)

Without any more introduction, here are the examples.

This post contains a collection of examples of Scala classes and class properties. I created most of these in the process of writing the Scala Cookbook. Unlike the Cookbook, I don’t describe them much here, I just show the examples, mostly as a reference for myself (and anyone else that can benefit from them).

This post contains a collection of Scala control structures examples. I initially created most of these in the process of writing the Scala Cookbook. Unlike the Cookbook, I don’t describe them much here, I just show the examples, mostly as a reference for myself (and anyone else that can benefit from them).

if/then control structures:

Here are some examples of the Scala if/then control structure:

This short blog post contains a collection of Scala number and date examples. I created most of these in the process of writing the Scala Cookbook. Unlike the Cookbook, I don’t describe the examples here much at all, I just show the examples, mostly as a reference for myself (and anyone else that can benefit from them).

Scala numeric types

Scala has these numeric types:

This page contains a collection of Scala String examples. I don’t provide too much detail here, mostly just examples that can be used as a reference page or cheat sheet.

First, here are some basic uses of the Scala String class:

(In case you ever wonder what I post for my friends on Facebook, the posts often look like this. It may be helpful to know before reading it that I’m known to have a donut addiction.)

Person behind the counter at Dunkin’ Donuts: “Hi, how can I help you?”

Me: “Hi. I’d like two donuts.”

“Two donuts?”

“Yes, four donuts.”

“Four donuts? I’m sorry, I thought you said ‘two’. Will that be all?”

An interesting comment from Cubs’ rookie pitcher Kyle Hendricks on pitching in the minor leagues vs pitching in the major leagues. (Image from this article.)

From this article on Paul Konerko. As a Cubs fan, the best tribute I can give is to say that I wish he had played for the Cubs.

Christina Perri, A Thousand Years:

I started watching Switched at Birth last week, and heard this song for the first time last night:

From San Antonio Spurs’ player Bruce Bowen talks about who he liked to guard, and many other things, including saying that Head Coach Gregg Popovich is, “nuttier than a fruitcake.” More information at this link.

“No one rises to the occasion. You always sink to your level of training.” ~ Philadelphia Eagles Coach Chip Kelly (Quote from this article.)

eXtreme Programming taught us that customers, programmers, and managers have certain “rights” on software development projects. As copied from this article, those “Bill of Rights” are listed below.

Some of the fall colors in Colorado. Photo from this tweet.

“Never rely on a single estimation method for a project. The more cross-checks and sanity checks you can employ, the better.” ~ Practical Project Estimation

About ten years ago I got great writing advice from a CIO. I had been struggling with how to write a proposal to her, and she said, “Al, just say what you mean.” She meant that I shouldn’t try to sugarcoat the situation, or try to make my solution sound incredibly perfect. I’ve used that writing advice ever since then.

I don’t remember where I saw this image, I think it was on Twitter, but it points out three elements you need for good mobile design. Personally I wish the icons were a little better in iOS -- a little more obvious -- but the idea comes across in these three images. I think the word is “context,” humans need context when using mobile apps, or any apps.

I always wondered what the differences were. Well done, Lazy Dog.

According to an article published in adn.com, Alaska will be the place to live in just a few decades as global-warming-slash-climate-change kicks into its next gear.