Temple by Matthew Reilly

Book Cover of Temple by Matthew ReillyThis book is a real page turner, from the first page itself I was finding it difficult to resist finishing this in one go. I have read almost all of the books by Matthew Reilly and this is the best so far. Reilly has written quite a good number of books which can be classified under historical fiction. Temple is one such book where the author has taken a plot based on the fictions historical account of of Incan empire. He has beautifully fitted Nazis (or Neo Nazis) into the plot along with some of the elements causing civil unrest in the USA.

In this book along with Spanish, Incan, American and Germans, there is one special being also. This special being is an animal from the Cat family and is called Rapa.

This is an action packed book and a very fast paced. Happy Reading.

Posted in Book Reviews | Tagged , , | Leave a comment

Business Doctors by Sameer Kamat

business doctors book coverBusiness Doctors is a debut book by Sameer Kamat, who is the founder of a top MBA admissions consulting firm and also writes about book publishing in India.

The story line is uniquely based around using the principles of management in underworld. Yes you read it right, “underworld”.

For the folks in the underworld, the illegal work they do is business for them. And like every business there are ups and downs there also. While the business is on a downside it  may need help from business consultants, who are supposed to indicate the gaps in processes, people and revenue lines and potentially suggest remedial action items.

This book revolves around WFB a.k.a Woody Family Business which is running from three generations and is now seriously impacted by the recession and entry of new players (or so the boss thinks). He called in a consultant Schneider to help him revive his business. Schneider understands the business and presents the gaps in the same and also help Mr Woody hire appropriate talent by helping them in breaking the jail and thus spending 6 million dollars in the process. Angie, wife of Mr Woody played a very important part in all this action.

Overall the storyline was one of a kind, with a simple writing style and keeps the reader interested throughout. There was a place where I felt the sentence had a typo (don’t remember the page number though, but a grammar check in word processing software should pick that up). And I must say the climax was something which came as a little surprise to me. While the author has taken his time for various phases in the story line, the last 20 or so pages demanded a little bit more and the climax could have been wrapped up nicely. I was feeling that something was missing when the book came to a sudden end. The cover design and fonts could have been a little better and catchy.

Disclaimer – I received a review copy from the author and my review is not biased by that fact.

Posted in Book Reviews | Tagged , , | Leave a comment

The Treasure of Kafur

The Treasure of Kafur Book Cover The treasure of Kafur is the second published book of the author. However it was the first one written (as per the notes at the end of the book). This is an historical fiction book based on the time of Mughal Emperor Akbar. Malik Kafur looted treasures during his raids to the Southern India, while he was in the army of Alauddin Khilji. The plot in this book is based on the riches looted during Kafur’s raid and which was hidden somewhere.

The story revolves around a young man Datta who along with his grandmother Ambu is aware of the location of Kafur’s hidden treasure. His grandmother was abducted by a warlord of the South who wanted to conquer the Mughal empire. Datta successfully made alliance with Akbar and together they fought the battle.

The is a simple, yet gripping story. The language is very simple. The starting of the book was quite good. It slows down for couple of chapters after the initial one and then picks up the pace. There are no unnecessary details given anywhere, yet the reader does not feel (s)he is missing anything.

I enjoyed this book and finished it late last night. Looking forward to the next book from the author.

Disclaimer – I received a review copy from the author and my review is not biased by that fact.

Posted in Book Reviews | Tagged , , | Leave a comment

Build An MP3 Catalogue System With Perl – Basics

My mp3 collection was increasing and I wanted to build a catalogue for the same. There are various steps in having even a simple catalogue system. In this post and a few posts that will follow, I will be explaining how to write such a system using perl as the programming language.

MP3 Format and ID3 Tags

MP3 is an audio coding format for digital audio. The audio data in this file is in a compressed format. The compression is a lossy compression, meaning the sound quality is not very clear. In spite of being a lossy format, it is one of the most popular format for audio streaming and storage. The mp3 file has built in bibliographic information such as title, artist, album. This information is stored in a field inside the file known as ID3 tag. Using this information, the MP3 players are able to display the Song Title, Album name and Artist name(s) etc.

There are couple of versions of these ID3 tags in use. ID3v1 (1.1 being the last in version 1 series) and ID3v2 (ID3v2.4 being the latest version).

Perl MP3::Tag Module

The MP3::Tag module of perl can be used to read and write both the versions of the ID3 tag. Here are few of the sample perl programs to do that. This will help in understanding the usage of the modules before we proceed to the next steps.

Below are couple of examples showing how to read ID3v1 and ID3v2 tags.

#!/usr/bin/perl
#
# id3v1_read.pl
#
use 5.010;
use warnings;
use strict;
use MP3::Tag;

# set filename of MP3 track
my $filename = "your_mp3_file";

# create new MP3-Tag object
my $mp3 = MP3::Tag->new($filename);

# get tag information
$mp3->get_tags();

# check to see if an ID3v1 tag exists
# if it does, print track information
if (exists $mp3->{ID3v1}) {
  #$mp3->{ID3v1}->remove_tag();exit;

  say "Filename: $filename";
  say "Artist: " . $mp3->{ID3v1}->artist;
  say "Title: " . $mp3->{ID3v1}->title;
  say "Album: " . $mp3->{ID3v1}->album;
  say "Year: ". $mp3->{ID3v1}->year;
  say "Genre: " . $mp3->{ID3v1}->genre;
} else {
  say "$filename: ID3v1 tag not found";
}

# clean up
$mp3->close();

ID3v2 tags are a bit more complex as they allow a lot more information to be stored in the MP3 file such as the album artwork etc. If you run the following script on one of your MP3 files it will print all the ID3v2 information to the screen. I have used the getc() function in order to allow you to observe the output and press <Enter> to proceed to the next set of key-value pair. After couple of keystrokes you will see there are lot of junk characters printed. These junk characters are nothing but the album artwork and following the junk characters is the MIME type of the artwork. In my case the MIME types were all “image/jpeg”.

#!/usr/bin/perl
#
# id3v2_read.pl
#
use 5.010;
use warnings;
use strict;
use MP3::Tag;

# set filename of MP3 track
my $filename = "mp3_file_name;

# create new MP3-Tag object
my $mp3 = MP3::Tag->new($filename);

# get tag information
$mp3->get_tags();

# check to see if an ID3v2 tag exists
# if it does, print track information
if (exists $mp3->{ID3v2}) {
  # get a list of frames as a hash reference
  my $frames = $mp3->{ID3v2}->get_frame_ids();

  # iterate over the hash, process each frame
  foreach my $frame (keys %$frames) {
    # for each frame get a key-value pair of content-description
    my ($value, $desc) = $mp3->{ID3v2}->get_frame($frame);
    if (defined($desc) and length $desc) {
      say "$frame $desc: "; 
    } else {
      say "$frame :";
    }
    # sometimes the value is itself a hash reference containing more values
    # deal with that here
    if (ref $value eq "HASH") {
      while (my ($k, $v) = each (%$value)) {
        say "\n     - $k: $v";
      }
    } else {
      say "$value";
    }
    # allows to view each iteration
    getc(STDIN);
  }
} else {
  say "$filename: ID3v2 tag not found";
}

# clean up
$mp3->close();

Next Steps

Most of the current MP3 players read ID3v2 tags. It will be good to understand the structure of the ID3v2 tags, using one of the links I provided above. This will help you prepare for understanding the further articles in this series. In next part we will see how to extract desired information quickly and how to extract the artwork data from the MP3 file. Stay tuned for more.

Posted in FLOSS, Programming, Tips/Code Snippets | Tagged , , | 1 Comment

Einstein’s Universe

Einstein's Universe Book CoverAn excellent book written for ordinary people who want to understand about Einstein’s ideas on universe. Written in a very simple language and no mathematics. The author has successfully explained the complex concept of Special Theory of Relativity and General Theory of Relativity.

However, the book only covers Einstein’s view on the Universe and as it is clearly known that Universe can be better explained together with Relativity and Quantum Theory, the universe can not be explained. Einstein never accepted the quantum theory and hence this book does not mention much about quantum theory.

In close to four decades since this book was published first time (first published in 1979), a lot has transpired in the field of quantum theory including the very recent discovery at CERN of God particles (Bosons traveling faster than light) (experiments are still going on).

Nevertheless this book is still worth a read for every Relativity fan.

Posted in Book Reviews | Tagged | Leave a comment