~ Speed is Just a Number

Monthly Archives: March 2014

Recently, while reading one particular section of the book ‘Gun, Germs and Steel’ by Jared Diamond, it once again reminded me of a thought that I had many years ago.

The topic was related to food production and mentions that while we are accustomed to eating almonds, many almond varieties found in forest land are bitter and contain a chemical that gets converted into Cyanide – poison.

The thought that was triggered: It must have been interesting times for early humans with regards to their eating habits. Each day must have been an adventure, where the task of eating was made interesting due to the fact that no one was quite sure about the ‘edibility’ of fruits and vegetables.

So, each day, many people must have picked fruits from the plants around them and tried to each them. Some of the fruit must have been bitter and would have been spit out immediately, while others must have been sweet and tasty. In severe cases like wild almonds, on eating such fruit, some people must have keeled over, dead.

Having a digital camera at your disposal liberates you in many ways. Now, you are no longer too worried about the image. You can shoot, examine the image and shoot again. Additionally, images weigh very less as compared to paper photographs and hence can be stored easily.

The sad part is that we end up taking too many pictures/photos. In my case, each year, I have been taking pictures of the Copper-pod tree when it blooms. While I get some good pictures, many are not great, as the tree is far away, I am shooting at maximum 10X zoom range and the tree moves due to breeze.

With the progress of technology and the relentless push by technology companies – much against the wishes of traditional book publishers – electronic books or e-books are now available for all major publications.

While many people still favour paper books, my preference is definitely towards e-books.

Let us compare the two formats.

Points in favour of e-books

No limit on the number of copies that can be ‘printed’.

No real storage required to store multiple copies of a book. The storage for one copy is enough.

No concept of ‘re-print’. Books never go ‘out of print’.

No concept of going ‘out of stock’.

Copy is never ‘old’ and soiled. Always ‘new’.

Tree friendly.

Ability to search through book content if suitable tools are available. Allows me to quickly look up terms if needed.

Points not in favour of e-books

Energy requirements – tablets and readers need power to help readers read.

Tendancy to break if they fall.

Book formats can be pain if they are reader specific and do not work across devices.

DRM enabled books are a pain against usability and against portability – hence flexibility.

Making books available for blind people is difficult.

Publishers using the term ‘license’ when people buy e-books, so as to limit their right of first sale. In other words, using copyright to stop activities like ‘lending’ and ‘resale’ of old books.

Other points

Weight – If we consider very thin books, readers are heavy, but this is out weighed be the fact that a reader can store hundreds of books at the same time.

A German court has deemed Microsoft’s FAT patent to be invalid on the grounds of being obvious. Apparently, this patent was being used to get royalty from Android phone makers, to an extent that Microsoft is said to be earning more money from Android than from Windows Phone.

As per the link below, Google is trying to sue Rockstar for patents that they are trying to enforce against many Android device makers.

While only time will decide the outcome this intervention I believe this is a much needed move. Google needs to protect its Android ecosystem from patent claims. Simply claiming that Android is Open Source cannot let Google off the hook for the technologies that are ‘core’ Android. It has to take responsibility for such features and face the patent threats head-on if it wishes to grow the ecosystem.

If Google does not step in, Android makers will continue to face threats from multiple vendors and will have to pay them off – irrespective of the quality and validity of the claims. The situation will soon get out of hand and vendors will prefer to move away from Android. Additionally, many patent claims will think twice from enforcing dubious patent claims if they get feeling that Google will protected its ecosystem, as they would be less willing to fight Google.

When writing a Java application, one of the most common tasks to perform is to read an input file, one line at a time. For this purpose, I frequently use a BufferedReader class. But the problem is creation of the class.

While reading input has always being painful in any programming language, Java has tried to make the task ‘simple’. And thus I end of using around 4 class along with the BufferedReader.

Out of frustration, I finally wrote a helper method/class for this purpose. Below is the code for the same. The idea is to use a BufferedReader as a separate class, along with a callback method that will be invoked each time a line is read from the input. This, hopefully will make the task of reading a file easier.

It is very important to baseline any activity and have a common understanding.

One of the typical complaints that we read about while purchasing external HDDs online are about the size. Most conplaints are about the fact that a 1 TB HDD is reporting a size of 900GB only. This infuriates many people.

But, an important fact needs to be noted. While computer manufacturers and OS vendors typically count 1K to be 1024 bytes, HDD makers count 1K to be 1000 bytes only. Then for each K, there is a 24 byte difference, which adds up when the volume of the storage increases.

A similar problem occurred in a famous flying incident, which came to be known as the ‘Gimli Glider’. In this case, a 767 flying in Canada ran out of fuel mid-air. While a mishap was avoided as the pilots managed to make the aeroplane glide and finally land on an abandoned airfield, later investigations revealed the root cause.

The root cause was measurements. In the normal scheme of things, fuel was loaded into the aeroplane using KiloLitres (as per the new metric system introduced at that time). But, when fuel was loaded in Europe, it was being measured in Pounds (as per the old system). While the numbers matched, the result was that the aeroplane was only half-full.