I heard today that Greg Maddux had a “try less” philosophy for when times get hard. Here are two quotes I was able to find related to that philosophy.
Scala, Java, Unix, MacOS tutorials (page 265)
This is a note on how the Giants beat the Nationals in Game 1 of the playoffs. Photo from this article.
This article is a collection of Scala packaging and import examples. I created most of these examples when I was writing the 1st Edition of the Scala Cookbook. I share them here without much discussion, but for more examples and discussion, please check out the Cookbook.
Packages imported by default
By default, three packages are implicitly imported for you:
- java.lang._
- scala._
- scala.Predef._
This article is a collection of Scala “object” examples. I put the word object in quotes there because it has at least two meanings in Scala. In the first meaning, just like Java, an object is an instance of a class.
In its second meaning, Scala has an object keyword, and using that keyword lets you do a variety of things, including creating a main method to launch your application, to create the equivalent of Java’s static methods, and also to create something called a companion object.
I often wonder how some companies get into some businesses. When I heard about Socialcast, and then learned that it was created by VMWare, I had that wondering feeling again. As far as I know, Socialcast is a social networking tool for businesses.
I just learned about RoboVM, which lets you “create native iOS apps in Java." More information at RoboVM.org.
This map shows the ground temperatures in the United States on September 30, 2104. The temperatures range from 113 degrees F (yellow) to “freezing,” which is shown in white.
The top 25 mobile apps by unique visitor. Image comes from this page on qz.com.
I woke up this morning to the pitter-patter of little feet on the roof. At first I thought it was Santa and the reindeer, but then I realized he’s still 86 days away. As I listened more, I thought, “I know that sound.” When I heard the sound move from the roof to the outside wall I ran out to the deck where, after a trek of seven years and 3,000 miles, my little friend found me.
For more information on what the heck this means, so my website, AlaskaSquirrel.com. :)
I recently went into a Subaru dealership to buy a 2015 Subaru Forester. I currently live in Colorado, and may move back to Alaska, so it’s important to me to have an all-wheel drive vehicle for either winter experience. Although I went into the dealership to buy a Forester, I ended up buying an Outback. As a result of that experience I thought I’d share what I learned about the two Subarus.
Body style
The obvious difference between the two vehicles is that the Forester is a small SUV, while the Outback is more of a station wagon, though some people say it looks like a smaller SUV. I went into the dealership to buy a Forester because my current car is (was) a 2006 Toyota RAV4, and I wanted another SUV style vehicle. But, in my opinion, I think the Forester body design/style is dated. From a purely design standpoint, I think my RAV4 looks much nicer than the Forester. This became further apparent to me when I saw a Forester parked next to an Outback.
Interior
The Forester interior is very plain. My old RAV4 looks much more finished, and the Outback interior is much nicer than both of those vehicles. The Outback interior is nicer, more modern, and more finished than the Forester. I’m not sure, but it seems like Subaru has put a lot of design money into the Outback, and very little into the Forester.
Ride
I took two test drives of the Forester, and found the ride to be rough and bumpy, like I’d expect with a Jeep. By contrast, my RAV4 had a much smoother ride, and the Outback has a nicer ride than either the Forester or the RAV4. (I also took a test drive of a Honda CR-V, and the Outback ride is comparable to the CR-V.)
Interior size
I thought the Forester would be larger than the Outback, and it does indeed have more headroom than the Outback. But the numbers aren’t that different. The Outback has 108.1 cubic feet of passenger volume and 35.5 cubic feet of cargo volume, while the Forester comes in at 108.3 and 34.4 Despite the Forester being a taller vehicle with more headroom, I think the numbers work out this way because the Outback is a little wider and longer than the Forester.
Engine and gas mileage
The base engines in both vehicles are the same. Neither one is fast, but they get the job done. The Forester is estimated to get 32/24 mpg, and the Outback is estimated to get 33/25 mpg.
All wheel drive
My understanding is that both vehicles have the same all wheel drive (AWD) systems, but the Outback also has an additional XMODE that can be used for climbing and descending dirt/gravel roads. I think that’s an option on the Forester.
Weight and towing
The Outback feels like a much heaver vehicle, but a little research shows that the 2014 Outback had a weight of 3,423 pounds, which is only slightly greater than the 3,296 pounds of the Forester.
There is a huge difference in the towing capacity though: Edmunds shows the 2014 Outback has a towing capacity of 2,700 pounds, which is much higher than the 1,500 towing capacity of the Forester.
Price
The Outback is about $2,000 more expensive than the Forester for each model level. (Subaru refers to their model/pricing levels as Standard, Premium, and Limited.)
Summary
Since I had the RAV4 for eight years, I decided that it was worth an additional $2,000 to have what I thought was a nicer vehicle for hopefully the next 8+ years.
The biggest issues with the Forester for me was the significantly rougher ride. Several times a year I make very long road trips, and I think my bodily organs would all be arranged after a 10-15 hour drive in the Forester. The body styling/design was another significant drawback for me; I didn’t like the idea of buying a car whose design looked older than my 2006 RAV4.
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:
(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 bit of 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.”