Good books are short books

November 29th, 2013 by Terrence Miao 1 comment »

Good books are concise to get complex ideas simply through. Good books are rare to find …

Even you have years of experience of JavaScript programming, the book JavaScript: The Good Parts still reveals a beautiful, elegant, lightweight and highly expressive parts in a language – ideas such as functions, loose typing, dynamic objects, and an expressive object literal notation in an outstanding object oriented programming language.

These make JavaScript, a sloppy language, become the language of the Web by default today.

Author Douglas Crockford, if you don't know him, he is the creator of JSON and Yahoo UI.

Embedded Link

JavaScript: The Good Parts: Douglas Crockford: 9780596517748: Amazon.com: Books
JavaScript: The Good Parts [Douglas Crockford] on Amazon.com. *FREE* shipping on qualifying offers. Most programming languages contain good and bad parts, but JavaScript has more than its share of the bad
» Read more: Good books are short books

How has the geography of religion evolved over the centuries, and where has it sparked…

November 24th, 2013 by Terrence Miao No comments »

How has the geography of religion evolved over the centuries, and where has it sparked wars? Our map gives us a brief history of the world's most well-known religions: Christianity, Islam, Hinduism, Buddhism, and Judaism. Selected periods of inter-religious bloodshed are also highlighted.

Want to see 5,000 years of religion in 90 seconds? Ready, Set, Go! 

Read more - http://www.mapsofwar.com/index.html

Google+: View post on Google+

Rewrite Java in Scala – Writing test for Java applications in Scala

November 21st, 2013 by Terrence Miao No comments »

Enjoy writing more clean and concise, BDD style enabled, natural language (a.k.a Queen's English) like test codes by using ScalaTest. For example:

file must be a ('directory')

result should be <= 7

"should produce NoSuchElementException when head is invoked" in {       intercept[NoSuchElementException] {
        Set.empty.head
    }
}

Read more – http://www.scalatest.org/user_guide

Embedded Link

» Read more: Rewrite Java in Scala – Writing test for Java applications in Scala

Melbourne rail network as anagrams

November 20th, 2013 by Terrence Miao 1 comment »

Melbourne rail network as anagrams

Melbourne rail network as anagrams

Google+: View post on Google+

Here is part two of the Iceland photos: from Höfn in the southeast, through the…

November 18th, 2013 by Terrence Miao No comments »

Reshared post from +Wilson Afonso

Here is part two of the Iceland photos: from Höfn in the southeast, through the eastern fjords and the mountains, all the way to Húsavík in the north.

» Read more: Here is part two of the Iceland photos: from Höfn in the southeast, through the…

Governments have never been more keen to leverage information technology for public…

November 15th, 2013 by Terrence Miao No comments »

Governments have never been more keen to leverage information technology for public projects, but their track record isn’t particularly good.

In Victoria, myki has been branded a “disaster from touch on to touch off”. HealthSMART in Queensland has been ditched. In NSW, the first transport card scheme, T-Card, became a legal saga before being canned.

Problems with public IT projects often start with the engagement process. Clients don’t understand the complexity of the technology required, and the providers often don’t understand the complexity of the business process they are working on. And sleek sales weasels are in the middle …

Embedded Link

Badly designed contracts doom public IT projects to failure

» Read more: Governments have never been more keen to leverage information technology for public…

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+