Friday, March 29, 2013

Benchmarking the performance of Java & web Frameworks/Platforms

The guys over at TechEmpower put some of their time to great use for the benefit of the community and put together a meaningful test to benchmark the performance of Java and web frameworks / platforms that are popular these days. The results were very surprising - Netty, Vertx and Servlets outperformed all others by a very big margin!

However, one of the major eye-poppers was raw PHP (no ORM framework) and MySQL database with multiple queries per request - which is likely the practically used business case - performed amazingly well! Add to this the dearth of available good PHP programmers and low hosting costs, no wonder many small businesses opt for rolling their own custom PHP apps & websites than going for big frameworks.

Check out the full blog post with the graphs and details of the test in the TechEmpower blog post here.
You can also check out their code on Git here and join in on the conversation at HackerNews here.

Let the flame wars begin!  :P   ;P

Thursday, March 7, 2013

Count distinct values of a field in a text file on Unix

Here's a simple command to count the number of distinct values in a field in a delimited text file on *nix.
For example, we can assume that the text file is comma separated and the field being counted is the second field.

cut -d ',' -f 2 /files/data.csv | uniq | wc -l

On the other hand, if you also wanted a count of how many times each value has occurred, then use the following command:
cut -d ',' -f 2 /files/data.csv | uniq -c

Simple does it - no need for awk or sed!

Wednesday, March 6, 2013

Interesting fact about the Bluetooth logo

An interesting background about the Bluetooth logo that we see almost every day - quoted from Wikipedia.

The word "Bluetooth" is an anglicized version of the Scandinavian Blåtand/Blåtann, the epithet of the tenth-century king Harald I of Denmark and parts of Norway who united dissonant Danish tribes into a single kingdom. The idea of this name was proposed by Jim Kardach who developed a system that would allow mobile phones to communicate with computers (at the time he was reading Frans Gunnar Bengtsson's historical novel The Long Ships about Vikings and king Harald Bluetooth). The implication is that Bluetooth does the same with communications protocols, uniting them into one universal standard
The Bluetooth logo is a bind rune merging the Younger Futhark runes Runic letter ior.svg (Hagall) and Runic letter berkanan.svg (Bjarkan), Harald's initials.
You can read more details about Bluetooth on Wikipedia or the official Bluetooth website as well.


Related Posts Plugin for WordPress, Blogger...