Rewrite Java in Scala – Guava vs. Scala

November 14th, 2013 by Terrence Miao 1 comment »

The latest Java Posse takes three Googlers talking about Guava. Curiously, I wonder how Guava compares to currently popular Scala. From someone's comments in Stack Overflow insight that why Guava's can't match Scala's overall solution, based on just trying to solve Collections issue.

Google Guava is a fantastic library, there's no doubt about it. However, it's implemented in Java and suffers from all the restrictions that that implies:

• No immutable collection interface in the standard library
• No lambda literals (closures), so there's some heavy boilerplate around the SAM types needed for e.g. predicates
• lots of duplication in type specifications, especially where generics are involved

Guava also has to exist in the presence of Java's standard collection library, so it's rare that 3rd party libraries will expose guava-compatible function literals or make use of guava-specific collection types. This causes an impedance mismatch for every third party library that you use. For example, you'll typically want to convert returned collections from such libraries to the appropriate guava immutable collection – especially if working in a multi-threaded environment.

Scala collections have a design that is far better integrated into the language, you'll find them widely used throughout the Scala standard library and through 3rd party products implemented in Scala. Scala collections are also immutable by default, so you end up with far safer code that doesn't require an extra layer of defensive wrapping.

Read more: http://stackoverflow.com/questions/6598498/google-guava-vs-scala-collection-framework-comparison

Embedded Link

» Read more: Rewrite Java in Scala – Guava vs. Scala

Dead Spin

November 13th, 2013 by Terrence Miao 2 comments »

Nadal's in London playing in the ATP World Tour Finals 2013, where this multiple-exposure picture was taken. We now can see the shift from "okay, toss it up gently" to "NOW MURDER THAT THING!" moment to moment. 

LONDON, ENGLAND – NOVEMBER 06: (EDITORS NOTE: Multiple exposures were combined in camera to produce this image.) Rafael Nadal of Spain serves in his men’s singles match against Stanislas Wawrinka of Switzerland during day three of the Barclays ATP World Tour Finals at O2 Arena on November 6, 2013 in London, England. (Photo by Michael Regan/Getty Images)

Google+: View post on Google+

GOCE has plunged on Earth. No one hurt. Human beings are saved

November 13th, 2013 by Terrence Miao 2 comments »

http://www.mirror.co.uk/news/world-news/ferrari-space-goce-satellite-crashes-2783519

Google+: View post on Google+

NO sympathy at all

November 11th, 2013 by Terrence Miao 5 comments »

Bitcoin has NO Australian government backed deposit guarantee. Losers deserve to lose as they risk the secure of the currency.

Embedded Link

Australian Bitcoin bank hacked: $1m+ stolen |
Security IT

Google+: View post on Google+

New iWatch concept

November 11th, 2013 by Terrence Miao No comments »

Read more - iWatch

Google+: View post on Google+

I.T. today can be illustrated a bit like the TV drama Breaking Bad

November 10th, 2013 by Terrence Miao No comments »

As developers are arse-off exhausted, couldn't write codes any more, a motivated boss from nowhere always comes out at right time and yells at them:

"Keep typing, bitches!"

Google+: View post on Google+

Nexus 5 Repairability Score: 8 out of 10 (10 is easiest to repair)

November 8th, 2013 by Terrence Miao 1 comment »

Nexus 5 Repairability Score: 8 out of 10 (10 is easiest to repair)

Embedded Link

Nexus 5 Teardown
Teardown of the Nexus 5 phone, November 4, 2013.

Google+: View post on Google+

Live like a Sir

November 6th, 2013 by Terrence Miao No comments »

Live like a Sir

Embedded Link

d24w6bsrhbeh9d.cloudfront.net/photo/3818225_700b.jpg

Google+: View post on Google+