Design of the Day – Vertical version of World Map (竖版中文世界地图)

October 15th, 2013 by Terrence Miao No comments »

Design of the Day – Vertical version of World Map (竖版中文世界地图)

Read more - http://haiguotuzhi.com/?p=2733

World Map

Google+: View post on Google+

Rewrite Java in Scala – companion object

October 13th, 2013 by Terrence Miao No comments »

The companion object basically provides a place where one can put "static-like" methods. Further more, a companion object, or companion module, has full access to the class members, including private ones.

Companion Objects are great for encapsulating things like factory methods. Instead of having to have Foo and FooFactory everywhere, you can have a class with a companion object take on the factory responsibilities.

Scala truly has nothing static.

One way in which Scala is more object-oriented than Java is that classes in Scala cannot have static members. Instead, Scala has singleton objects.

Google+: View post on Google+

Rewrite Java in Scala – implicit parameters and conversions

October 13th, 2013 by Terrence Miao No comments »

What to do if you are stuck with existing libraries and API's.

There's a fundamental difference between your own code and libraries of other people: You can change or extend your own code, but if you want to use some other libraries you have to take them as they are.

A number of constructs have sprung up in programming languages to alleviate this problem. Smalltalk has meta classes, Ruby has modules. These are very powerful, but also dangerous, in that you modify the behaviour of a class for an entire application, some parts of which you might not know. C# 3.0 has method extensions, which are more local, but also more restrictive in that you can only add methods, not fields or interfaces to a class.

Scala has implicit parameters and conversions. They can make existing libraries much more pleasant to deal with. 

Embedded Link

Pimp my Library
There’s a fundamental difference between your own code and libraries of other people: You can change or extend your own code, but if you want to use some other libraries you have to take them as they are. A number of constructs have sprung up in programming languages to alleviate this problem.
» Read more: Rewrite Java in Scala – implicit parameters and conversions

Do you feel like a millionaire?

October 10th, 2013 by Terrence Miao No comments »

The number of Australian millionaires increased by 38,000 to 1.123 million people.

The millionaire calculation includes the value of real estate owned outright.

Australians were shown to have a much higher level of wealth held in property and non-financial assets – 58.5% compared to the world average of 45% and just 38% in the US.

Basically, if you have a house and have paid off, welcome join in the millionaire club.

Hahaha …

Embedded Link

Aussies the world’s richest people: report
Australians remain the richest people in the world, by one measure at least.
» Read more: Do you feel like a millionaire?

Connection reset by peer

October 10th, 2013 by admin No comments »

This mysterious OpenSSH client broken error when try to connect linux boxes in corporate network from Cygwin’s OpenSSH client.

But, Windows’ Putty program is without such issue.

Come across a post discussing a similar issue - http://www.held.org.il/blog/2011/05/the-myterious-case-of-broken-ssh-client-connection-reset-by-peer/

It seems that limitation on Cisco switch so network people change the default ciphers on OpenSSH Server. So the solution is quite simple – have a look “Ciphers” and “MACs” settings in /etc/ssh/ssh_config file, then add the SAME ”Ciphers” and “MACs” into client’s config file:

$ cat ~/.ssh/config
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160

What are you going to do with if your PC has 32GB RAM?

October 9th, 2013 by Terrence Miao No comments »

Actually, you can take 8GB RAM out and set up a RAM disk, e.g., Drive D. Remember RAMDRIVE.SYS driver when you still used DOS 2.x which let you have a virtual RAM drive to store some high disk I/O apps?

Though today's SSD is a few times faster than traditional, physical, electromechanical, magnetic hard disks. Comparing DDR3 RAM (read and write speeds of 6GB/s), SDD (about 300MB/s) is nothing but a laughing stock. 

You can set up Windows TEMP and TMP on RAM disk. Soon you will find out Chrome / Firefox become lighting fast. Moreover, you can set database dat file on it, soon db input / output I/O improved dramatically.

Other options are many many more …

Read more - http://www.raymond.cc/blog/12-ram-disk-software-benchmarked-for-fastest-read-and-write-speed/
Download more - http://www.softperfect.com/products/ramdisk/

SoftPerfect RAM Disk 3.3.1

Google+: View post on Google+

Atlassian JIRA, the insanely complicated maze

October 7th, 2013 by Terrence Miao 7 comments »

Atlassian JIRA, the insanely complicated maze

Atlassian JIRA insanely complicated maze

Google+: View post on Google+

Have you tried turning it off and on again?

October 2nd, 2013 by Terrence Miao 1 comment »

Have you tried turning it off and on again?

Have you tried turning it on and off again?

Google+: View post on Google+