<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>http://rmathew.com/</id>
<title>rmathew.com</title>
<link rel="self" href="http://rmathew.com/atom.xml"/>
<link rel="alternate" href="http://rmathew.com/"/>
<author>
<name>Ranjit Mathew</name>
<email>rmathew@gmail.com</email>
<uri>http://rmathew.com/</uri>
</author>
<updated>2010-09-01T23:31:36+05:30</updated>
<entry>
<id>http://rmathew.com/2010/tippt.html</id>
<title type="html">&amp;quot;The Tipping Point&amp;quot;</title>
<updated>2010-09-01T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/tippt.html"/>
<content type="html">
&lt;p&gt;
&amp;quot;The Tipping Point&amp;quot; by &lt;a href=&quot;http://www.gladwell.com/&quot;&gt;Malcolm
Gladwell&lt;/a&gt; is a book that expands upon &lt;a
href=&quot;http://www.gladwell.com/1996/1996_06_03_a_tipping.htm&quot;&gt;an article by
the author in the New Yorker&lt;/a&gt; published in 1996. It seeks to explore
how ideas, products, messages and behaviours &amp;quot;tip over&amp;quot; and suddenly
spread through or recede from society, just like pathological epidemics
through a population. These are termed &amp;quot;social epidemics&amp;quot; by the
author.  Understanding such phenomena can help us effect a desired change in
society (e.g. market a product or spread a message).
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/tippt.jpg&quot; alt=&quot;&amp;amp;quot;The Tipping Point&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/0316346624?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0316346624&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0316346624&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/tipping-point-malcolm-gladwell-book-0349113467?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
The book is full of several interesting anecdotes on a wide range of topics.
These include the sudden rise in popularity of Hush Puppies shoes, the sudden
fall in the crime-rate in New York in the 1990s, the spread of syphilis
through Baltimore, the midnight ride of &lt;a
href=&quot;http://en.wikipedia.org/wiki/Paul_Revere&quot;&gt;Paul Revere&lt;/a&gt; in 1775, the
continued rise in smoking among teens despite several measures by the
government and social workers, etc. All these anecdotes are presented to
support various points of the author's thesis, though it is not evident how
you can decisively conclude anything from these given the lack of hard data.
Nevertheless the anecdotes do enliven the book preventing it from becoming a
dry and dull read.
&lt;p&gt;
The author presents three &amp;quot;rules of social epidemics&amp;quot;:
&lt;ol&gt;
&lt;li&gt;The Law of the Few - a few people with rare social gifts are key
to spreading epidemics. &amp;quot;Connectors&amp;quot; are the bridges that link a
lot of people from different groups, &amp;quot;Mavens&amp;quot; actively seek
knowledge and spread it to others and &amp;quot;Salesmen&amp;quot; persuade people to
adopt new things that they otherwise would be reluctant to try.&lt;/li&gt;
&lt;li&gt;The Stickiness Factor - an idea or a product should have an essence that
makes it memorable for people and helps it stay on their mind beyond their
initial exposure to it.&lt;/li&gt;
&lt;li&gt;The Power of Context - a social epidemic is sensitive to the time and
place in which it occurs. Without the right context, it will fizzle out.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
These are intriguing ideas to be sure, but there is no conclusive evidence
in the book to support them or to indicate that they are the only ones that
matter. There are also several leaps of logic in making deductions (&amp;quot;X
happened and it was because of Y&amp;quot;) that are not at all clear to me. For
example, the author ultimately attributes the fall in the crime-rate in New
York in 1990s to &amp;quot;&lt;a
href=&quot;http://en.wikipedia.org/wiki/Broken_windows_theory&quot;&gt;fixing broken
windows&lt;/a&gt;&amp;quot;, while &amp;quot;&lt;a
href=&quot;../2006/freako.html&quot;&gt;Freakonomics&lt;/a&gt;&amp;quot; demonstrates
otherwise (and attributes it to the freedom of abortion of unwanted
pregnancies resulting in fewer unwanted babies).
&lt;p&gt;
The book thus appears flawed to me, though it is a must-read simply to
make sense of what many people keep talking about. If you hear phrases like
&amp;quot;tipping point&amp;quot;, &amp;quot;social epidemic&amp;quot;, &amp;quot;broken windows
theory&amp;quot;, &amp;quot;&lt;a
href=&quot;http://en.wikipedia.org/wiki/Bystander_effect&quot;&gt;bystander
effect&lt;/a&gt;&amp;quot;, &amp;quot;smoking is not cool - smokers are&amp;quot;, etc.
dropped into your conversations, this is the book that can give you the
necessary background. It is light and quick reading and available at a
cheap price.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/sitesrc.html</id>
<title type="html">Web-Site Source-Code Now Available</title>
<updated>2010-08-30T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/sitesrc.html"/>
<content type="html">
&lt;p&gt;
I am sharing the source-code for this web-site as a &lt;a
href=&quot;http://en.wikipedia.org/wiki/Mercurial&quot;&gt;Mercurial&lt;/a&gt; repository
hosted on &lt;a href=&quot;http://bitbucket.org/&quot;&gt;BitBucket&lt;/a&gt;. The repository
can be found at &lt;a
href=&quot;http://bitbucket.org/rmathew/website&quot;&gt;bitbucket.org/rmathew/website&lt;/a&gt;.
The source-code uses the &lt;a
href=&quot;http://en.wikipedia.org/wiki/M4_%28computer_language%29&quot;&gt;&lt;tt&gt;m4&lt;/tt&gt;&lt;/a&gt;
macro processor for generating the content. It also uses &lt;a
href=&quot;http://en.wikipedia.org/wiki/Make_%28software%29&quot;&gt;&lt;tt&gt;make&lt;/tt&gt;&lt;/a&gt;
and a few helper scripts for managing dependencies. It heavily depends
on the availability of a UNIX-like environment, as provided by Linux for
example.
&lt;p&gt;
To create or update the information about the dependencies among the
source-files (stored in &amp;quot;&lt;tt&gt;deps.mk&lt;/tt&gt;&amp;quot; and included by
the &lt;tt&gt;Makefile&lt;/tt&gt;), run &amp;quot;&lt;tt&gt;make deps&lt;/tt&gt;&amp;quot;. To generate
the content, run &amp;quot;&lt;tt&gt;make all&lt;/tt&gt;&amp;quot;. The content is
generated in the &amp;quot;&lt;tt&gt;pub&lt;/tt&gt;&amp;quot; folder. The source for the
content is in the &amp;quot;&lt;tt&gt;src&lt;/tt&gt;&amp;quot; folder, while the
&amp;quot;&lt;tt&gt;bin&lt;/tt&gt;&amp;quot; folder contains some helper scripts.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/trn2pak.html</id>
<title type="html">&amp;quot;Train to Pakistan&amp;quot;</title>
<updated>2010-08-06T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/trn2pak.html"/>
<content type="html">
&lt;p&gt;
&amp;quot;Train to Pakistan&amp;quot; is a short and deeply moving novel by
Khushwant Singh. It shows the effect of the partition of India, as the
British left the country, on the simple folks of Mano Majra, a small
Indian village on the banks of the river Sutlej near the border of India
and Pakistan. The Sikhs and Muslims of the village, living happily
together for centuries without any animosity towards each other, get
caught up in forces beyond their control with the Muslims forced to flee
to Pakistan and the Sikhs getting ready to kill unknown strangers who
just happen to be Muslims.
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/trn2pak.jpg&quot; alt=&quot;&amp;amp;quot;Train to Pakistan&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/8174364447?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=8174364447&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=8174364447&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/train-pakistan-khushwant-singh-book-0143065882?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
The peace of the little village is shattered when a robbery at night
results in the killing of the village moneylender by dacoits from
elsewhere. The police arrest, without firm grounds, the village ruffian
and an educated stranger out on a mission to spread communist ideals
among the peasants. This turn of events ends up being just a prelude
to a larger upheaval in the lives of the villagers.
&lt;p&gt;
The partition of India into Hindu-majority India and Muslim-majority
Pakistan at the time of its independence from British rule caused about
ten million people in the two countries to flee their homes and move
into the other country. The accompanying riots killed about one million
people and open abuse of countless women. Heavily-crowded trains
carrying fleeing families would be stopped by irate mobs, their
passengers slain indiscriminately and then allowed to cross over to the
other country.
&lt;p&gt;
The arrival of such a train laden with corpses into Mano Majra brings
the villagers face-to-face with the ugly realities of partition. The
arrival of rabble-rousers from elsewhere causes many of the villagers
to get ready to kill people fleeing into Pakistan and determined to send
a corpse-laden train into that country as a token of revenge. Only the
village ruffian stands between them and the execution of their demonic
plans.
&lt;p&gt;
The prose in the book is quite simple and easy to read, though some of
the phrases might seem a little strange in English without the knowledge
of the corresponding phrases in Hindi or Punjabi. To his credit, the
author shows no bias in laying bare the evil that overtook both sides. I
am a little puzzled by the missing article in the title - surely it
ought to be &amp;quot;&lt;i&gt;The&lt;/i&gt; Train to Pakistan&amp;quot;, no?
&lt;p&gt;
The book leaves a lingering sadness in its wake. It is however a useful
aid in understanding the deep injuries that have left permenant scars on
the two countries.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/abavg.html</id>
<title type="html">&amp;quot;Above Average&amp;quot;</title>
<updated>2010-07-30T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/abavg.html"/>
<content type="html">
&lt;p&gt;
&amp;quot;&lt;a href=&quot;http://www.aboveaveragebook.com/&quot;&gt;Above Average&lt;/a&gt;&amp;quot;
by &lt;a href=&quot;http://www.cse.iitd.ac.in/~bagchi/&quot;&gt;Amitabha Bagchi&lt;/a&gt; is
a novel about a smart boy with a middle-class background and his life
before, during and after his stay at &lt;a
href=&quot;http://www.iitd.ac.in/&quot;&gt;IIT Delhi&lt;/a&gt;. It is the story of
friendships forged and lost, love blossoming and withering. It is a
coming-of-age novel that has also been termed a &amp;quot;campus book&amp;quot;
because of the many recent Indian novels based on life at the IITs and
the IIMs. However it is certainly one of the better-written novels of
the lot.
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/abavg.jpg&quot; alt=&quot;&amp;amp;quot;Above Average&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/8172236530?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=8172236530&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=8172236530&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/above-average-bagchi-amitabh-book-8172236530?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
The comparison with the other popular novel based on life at IIT,
&amp;quot;&lt;a href=&quot;../2004/fps.html&quot;&gt;Five Point Someone&lt;/a&gt;&amp;quot; by Chetan
Bhagat, is inevitable. This book is surely the better of the two, while
retaining the simplicity of language and a reasonable price. There is no
straight narrative in this book as it keeps going back and forth in
time and place. I was reminded of the writing-style of &lt;a
href=&quot;http://en.wikipedia.org/wiki/Amitav_Ghosh&quot;&gt;Amitav Ghosh&lt;/a&gt; while
reading this book - &amp;quot;&lt;a
href=&quot;http://en.wikipedia.org/wiki/The_Shadow_Lines&quot;&gt;The Shadow
Lines&lt;/a&gt;&amp;quot; does in fact make an appearance in the novel and the
narrator praises its writing-style.
&lt;p&gt;
Our hero is an above-average academic achiever from a middle-class
background, born to a Bengali family, raised in Mayur Vihar in New
Delhi and has a keen interest in rock music and writing. He prepares
for and gets into an IIT, where he meets people with varied backgrounds
and with some of whom he forms lasting bonds. He goes on to pursue a
Ph.D. in Computer Science from the US. Some of the biographical details
match those of the author so much that the book seems autobiographical,
at least in parts. Being from an IIT myself, I can attest that the
author paints a fairly accurate picture of life in an IIT, though with
a little exaggeration here and there.
&lt;p&gt;
Some of the details in book were a little jarring for me. For example,
our hero, majoring in Computer Science, takes a class on Algorithms only
in the third year and describes it as the &amp;quot;toughest of all the
theory classes we were required to take&amp;quot;. Algorithms is usually
taught right at the beginning of the second year (if not within the first
year itself), is one of the easier courses and is full of practical
material. As another example, the hero is a boy in his late teens and
has thoughts that are a little too mature for his age - it's not
impossible, but it's unlikely. Finally, the usual confusion between
&amp;quot;invariably&amp;quot; and &amp;quot;inevitably&amp;quot; is on display here,
which is a little out of character for someone who is supposedly good
at writing in English.
&lt;p&gt;
Despite what &lt;a
href=&quot;http://www.tribuneindia.com/2007/20070429/spectrum/book6.htm&quot;&gt;another
reviewer would have you believe&lt;/a&gt;, this is not in the same league as
&amp;quot;A Portrait of the Artist as a Young Man&amp;quot; by James Joyce or
&amp;quot;In Search of Lost Time&amp;quot; by Marcel Proust. It is however a
good read, well worth the time and money spent on it.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/hfstats.html</id>
<title type="html">&amp;quot;Head First Statistics&amp;quot;</title>
<updated>2010-07-12T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/hfstats.html"/>
<content type="html">
&lt;p&gt;
I have come to believe that statistics is one of those important subjects
that most of us know woefully little about even as we increasingly rely
on the results of various studies to drive our lifestyle choices or on
data visualisation to take decisions at our workplace. That said, I have
been procrastinating on my resolution to study this subject in greater
depth than what was afforded by an introductory course I took in college
ages ago. The first step towards that goal has now been precipitated due
to the nature of my current work. Unfortunately for me, most of the
books on this subject looked too dull or intimidating
to serve as a useful review of the basic concepts. &amp;quot;Head First
Statistics&amp;quot; by Dawn Griffiths presented a welcome contrast with
its pages full of informal text and fun pictures, though I was sceptical
at first of its utility. I am happy to report that my scepticism was
entirely misplaced.
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/hfstats.jpg&quot; alt=&quot;&amp;amp;quot;Head First Statistics&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/0596527586?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0596527586&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0596527586&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/head-first-statistics-dawn-griffiths-book-8184045824?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
The book is another in the series of &lt;a
href=&quot;http://headfirstlabs.com/&quot;&gt;&amp;quot;Head First&amp;quot; books by
O'Reilly&lt;/a&gt;. True to its pedigree, this book uses lots of little
stories, pictures and exercises to provide a gentle introduction to
otherwise complicated-looking topics. Each chapter asks you to help
denizens of the fictional town of &amp;quot;Statsville&amp;quot; with their
sundry problems using increasingly-complicated statistical techniques.
Unlike most text-books where the exercises are lumped together at the
end of each chapter or section, sometimes without solutions or hints,
this book makes the exercises an integral part of its flow and works
out the solution for each of them in full after letting you take a
crack at it first.
&lt;p&gt;
All the usual suspects of statistics are here: data visualisation,
mean, median, mode, standard deviation, probabilities, probability
distributions, normal curves, sampling, hypothesis tests, t-distribution,
chi-square distribution, etc. I was frankly a bit surprised that the
author managed to cover so much ground in a book like this. My kudos to
her for making most of it so accessible to the lay reader.
&lt;p&gt;
Of course, despite her valiant efforts the author loses her grip
on lucidity in the latter half of the book that covers advanced topics
and where many a formula or statement is left hanging with an implicit
&amp;quot;Just take my word for it&amp;quot;. This could be deeply dissatisfying
if you are of an enquiring disposition. There are no references to
books, papers, articles or web-sites where the reader can go to find
more information or get a deeper understanding of the concepts. There
should have been some practice problems for the reader to test their
understanding, with the solutions perhaps available from a web-site. One
of my major grudges was the sudden switch to probability from statistics
in the early chapters without any explanation - only if you persist do
you discover in the later chapters how closely the two are linked to
each other and get your &amp;quot;Aha!&amp;quot; moment of understanding.
Finally I really believe that the book could have been thinner given
the ground that it covers.
&lt;p&gt;
While I feel that this is a great book to use to get introduced to this
important subject, it is not suitable for use as a reference or as a
guide to get a deeper understanding of the concepts. It will certainly
whet your appetite for the subject and is a great book if you find
yourself scared by the subject.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/cdk2e.html</id>
<title type="html">&amp;quot;Distributed Systems&amp;quot;</title>
<updated>2010-04-15T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/cdk2e.html"/>
<content type="html">
&lt;p&gt;
&amp;quot;Distributed Systems: Concepts and Design&amp;quot; by George
Coulouris, Jean Dollimore and Tim Kindberg is an introductory text-book
on distributed computing. It provides a broad overview of the basic
principles as well as the major issues in building such systems. Since
I happened to have the second edition around, I decided to read that
instead of going for the currently-available &lt;a
href=&quot;http://www.cdk4.net/&quot;&gt;fourth edition&lt;/a&gt; (a &lt;a
href=&quot;http://www.cdk5.net/&quot;&gt;fifth edition&lt;/a&gt; is in the works), as the
two editions didn't seem to differ significantly. This turned out to be
not that bad a decision.
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/cdk2e.jpg&quot; alt=&quot;&amp;amp;quot;Distributed Systems&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/0321263545?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321263545&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0321263545&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/distributed-systems-george-coulouris-tim-book-8131718409?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
There is a great amount of overlap between the foundational chapters
of this book and decent books on computer networks and operating
systems. The useful bits of the book comes more than half-way into
the text. The discussion of the design of distributed systems and the
implementation of distributed algorithms is at a high-level - this is
the book for you if you want to quickly get an overview of the issues
and the general approaches but not if you want to actually implement
any of the algorithms.
&lt;p&gt;
That said the book is quite comprehensive in its coverage. The problems
in synchronising disparate clocks, coordination, replication,
concurrency control, transaction management, recovery, fault-tolerance,
etc. are all covered here along with the major approaches to solving
these problems in distributed systems. The language used is fairly
friendly and formalisms are used sparingly.
&lt;p&gt;
If you are a student, you can use this book to get an overview of the
field and perhaps to see if this is an area worth pursuing. If you are
a professional faced with building a distributed system, you can use
this book to get an idea of the challenges you will run into and the
approaches you can use to tackle them.
&lt;p&gt;
Distributed computing is a field with some very interesting problems
for many of which there aren't any perfect solutions. Some of the
current distributed systems used for serving web-based solutions are
massive and on a scale far bigger than what could be imagined just a
decade back. This is a subject that now needs to be a part of the
core computer science and engineering curriculum instead of being a
specialised course. This book provides a useful, but by no means
sufficient, guide to the field.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/clrs3e.html</id>
<title type="html">&amp;quot;Introduction to Algorithms&amp;quot;</title>
<updated>2010-03-22T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/clrs3e.html"/>
<content type="html">
&lt;p&gt;
I put off reading &lt;a
href=&quot;http://mitpress.mit.edu/algorithms/&quot;&gt;Introduction to
Algorithms&lt;/a&gt; by Thomas Cormen, Charles Leiserson, Ronald Rivest and
Clifford Stein (popularly known as &amp;quot;CLRS&amp;quot;) for
quite some time because I was somewhat intimidated by its bulk. The
recent release of the third edition of this tome finally made me get a
copy and give it a dekko. This compendium of a number of algorithms and
data structures for computer programming is bulkier than its
predecessors, but it does not disappoint. It should serve as a good
reference for this field, though not quite as an introductory text for
beginners. A serious professional will have a copy handy at all times.
Somewhat surprisingly, it does manage to leave out some
commonly-encountered data structures and algorithms, so it is not
&lt;i&gt;as&lt;/i&gt; comprehensive and up-to-date as I would have liked.
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/clrs3e.jpg&quot; alt=&quot;&amp;amp;quot;Introduction to Algorithms&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/0262033844?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0262033844&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0262033844&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/introduction-algorithms-3rd-thomas-cormen-book-8120340078?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
With 35 chapters and four appendices, this book packs in a lot of
material. The main content is divided into eight parts, beginning with
the foundations of algorithm design and analysis and ending with a set
of special topics. Many of the algorithms are presented in pseudo-code
that can readily be translated into an imperative language of your
choice. Most such algorithms are also analysed for running costs,
usually by solving the appropriate recurrence relations. The mathematics
used in the analysis is not that complicated and the appendices
refresh your memory in case you have forgotten it since high-school or
college. The notation used throughout the book is thankfully one that
is now widely used.
&lt;p&gt;
Despite its name and the claims of the authors in the preface, this
book is &lt;i&gt;not&lt;/i&gt; suitable for absolute beginners to the subject. In
most places it just assumes that you know the basic concepts and proceeds
to expand on them. It does not clearly explain to the beginner &lt;i&gt;why&lt;/i&gt;
they need to study so many data structures and algorithms and how to
choose an appropriate data structure or algorithm. Somewhat surprisingly
for a book on the subject, it does not tell you what is an &lt;a
href=&quot;http://en.wikipedia.org/wiki/Abstract_data_type&quot;&gt;Abstract Data
Type&lt;/a&gt; (ADT). The authors use the term &amp;quot;dynamic set&amp;quot; instead
of the more common &amp;quot;collection&amp;quot; and this might unnecessarily
confuse some people.
&lt;p&gt;
I was surprised to find many a commonly-encountered data structure or
algorithm missing from this modern tome. For example, &lt;a
href=&quot;http://en.wikipedia.org/wiki/Trie&quot;&gt;trie&lt;/a&gt;, &lt;a
href=&quot;http://en.wikipedia.org/wiki/Skip_list&quot;&gt;skip list&lt;/a&gt;, &lt;a
href=&quot;http://en.wikipedia.org/wiki/Splay_tree&quot;&gt;splay tree&lt;/a&gt;, &lt;a
href=&quot;http://en.wikipedia.org/wiki/Dancing_Links&quot;&gt;dancing links&lt;/a&gt;, &lt;a
href=&quot;http://en.wikipedia.org/wiki/A*_search_algorithm&quot;&gt;A*&lt;/a&gt;, &lt;a
href=&quot;http://en.wikipedia.org/wiki/Judy_array&quot;&gt;Judy array&lt;/a&gt;, etc. are
either not mentioned at all or are referred to merely in passing.
Looking at the current trends in computer architecture, it is high
time such books explain some &lt;a
href=&quot;http://en.wikipedia.org/wiki/Cache-oblivious_algorithm&quot;&gt;cache-oblivious
algorithms&lt;/a&gt; that can run efficiently on modern CPUs. The chapter
on multi-threaded algorithms also seems to have been added as an
afterthought. For example, it does not talk about &lt;a
href=&quot;http://www.ddj.com/hpc-high-performance-computing/206100542&quot;&gt;super-linear
speed-ups&lt;/a&gt; that are possible with concurrent algorithms. Finally,
we have to increasingly deal with huge data-sets that do not fit into
a single computer's RAM or even hard-discs - learning to efficiently
store and process such data is important in modern computing (just as
it was in the old days) and a book like this cannot afford to leave
it out.
&lt;p&gt;
Unlike many other text-books, the problems in the exercises further
explore the topics introduced in the associated section instead of
merely testing the reader's comprehension, some times providing
more details or introducing a variant. Some of the problems use
mostly-funny names for professors - the authors provide &lt;a
href=&quot;http://mitpress.mit.edu/algorithms/profjokes3e.asp&quot;&gt;explanations
for these names&lt;/a&gt; in case you don't &amp;quot;get it&amp;quot;. The
bibliography is quite extensive and useful when you want to find more
information about a given topic.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/pp2e.html</id>
<title type="html">&amp;quot;Programming Pearls&amp;quot;</title>
<updated>2010-03-03T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/pp2e.html"/>
<content type="html">
&lt;p&gt;
&lt;a href=&quot;http://www.cs.bell-labs.com/cm/cs/pearls/&quot;&gt;Programming
Pearls&lt;/a&gt; by &lt;a href=&quot;http://en.wikipedia.org/wiki/Jon_Bentley&quot;&gt;Jon
Bentley&lt;/a&gt; is a book based on a collection of articles written by the
author for the eponymous column in &lt;a
href=&quot;http://cacm.acm.org/&quot;&gt;Communications of the ACM&lt;/a&gt;. True to its
name, the book presents several pearls of programming wisdom based on
the hard-won experience of a brilliant computer programmer who was also
lucky enough to be associated with some of the brightest minds in
computer programming (the group at Bell Labs). The icing on the cake is
the clarity and brevity of the book. I have read the book at least
three times over the years and I continue to learn new things from it -
no wonder this book is considered a classic in computer programming.
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/pp2e.jpg&quot; alt=&quot;&amp;amp;quot;Programming Pearls&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/0201657880?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0201657880&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0201657880&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/programming-pearls-joe-bentley-book-8177588583?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
The book is divided into three parts with five chapters per part. The
first part presents the fundamentals of programming, from programme
design to algorithms, data structures, programme verification and
testing. The second part focusses on performance and shows how to
perform rough estimations of running costs, improving algorithms, tuning
code and saving space. The third part applies the principles of the
previous two parts to problems in sorting, searching and
string-processing.
&lt;p&gt;
The chapters are short, clear and peppered with interesting anecdotes.
These make them easy to read, though it would be a terrible mistake to
zip through them. The author himself recommends that you take
the time to understand the concepts presented in a chapter and attempt
solving the given problems yourself before taking a look at the
solutions. The chapters only give you a flavour for some of the
concepts - you'll have to supplement it with reading a suitable book if
you are not familiar with these concepts. Here the author has some
recommendations and the usual suspects (&lt;i&gt;The Art of Computer
Programming&lt;/i&gt;, &lt;i&gt;&lt;a href=&quot;cc2e.html&quot;&gt;Code Complete&lt;/a&gt;&lt;/i&gt;, &lt;i&gt;&lt;a
href=&quot;tpop.html&quot;&gt;The Practice of Programming&lt;/a&gt;&lt;/i&gt;, etc.) all figure
prominently.
&lt;p&gt;
The author ends the book with a couple of amusing epilogues presented
as interviews with himself. He takes a dig at himself for the frequent
references in the book to his colleagues from Bell Labs. One of the
appendices contains rules for code tuning adapted from his
now-out-of-print book &amp;quot;Writing Efficient Programs&amp;quot;. I suspect
that an absolute beginner would have some trouble understanding these
recommendations since they are presented here without much elaboration
or examples, though there are references to related material elsewhere
in the book. Another appendix presents a model for estimating the costs
of various data-types and operations. These can be used to make quick
back-of-the-envelope calculations about the time and space that will
likely be taken by a given function during its execution.
&lt;p&gt;
Some of the material, like that on performance improvement or programme
verification, might not be very fashionable today, but no serious
computer programmer can afford to ignore it. Much of the advice in this
book is timeless and will definitely help you become a better
programmer.
&lt;p&gt;
Note that the web-site for the book as given in it,
&amp;quot;&lt;tt&gt;www.programmingpearls.com&lt;/tt&gt;&amp;quot;, is not valid any more as
a domain squatter has snatched control of it - the correct web-site is &lt;a
href=&quot;http://www.cs.bell-labs.com/cm/cs/pearls/&quot;&gt;http://www.cs.bell-labs.com/cm/cs/pearls/&lt;/a&gt;.
&lt;p&gt;
The sequel to this book was published as &amp;quot;&lt;a
href=&quot;http://www.amazon.com/gp/product/0201118890?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0201118890&quot;&gt;More
Programming Pearls: Confessions of a Coder&lt;/a&gt;&lt;img
src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0201118890&quot;
width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px
!important;&quot;&gt;&amp;quot;. That book is a little hard to find in most
book-shops as it did not become as famous as this one.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/cc2e.html</id>
<title type="html">&amp;quot;Code Complete&amp;quot;</title>
<updated>2010-02-24T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/cc2e.html"/>
<content type="html">
&lt;p&gt;
Books filled with good practical advice about &lt;em&gt;constructing&lt;/em&gt;
software are rare. &lt;a href=&quot;http://cc2e.com/&quot;&gt;Code Complete&lt;/a&gt; by
Steve McConnell is a well-written rarity in this field and has a
well-deserved reputation as a classic. It is one of those books that
every computer programmer ought to have read. I had read the first
edition, published in 1993, as a budding programmer and the book left
a lasting impression on me. With the benefit of several years of
experience, I find myself agreeing almost entirely with the updated
second edition, published in 2004. When someone asks me &amp;quot;How do
I write good code?&amp;quot;, I point them to this book without hesitation.
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/cc2e.jpg&quot; alt=&quot;&amp;amp;quot;Code Complete&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/0735619670?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0735619670&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0735619670&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/code-complete-2nd-steve-mcconnel-book-8178530856?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
The book is about &amp;quot;software construction&amp;quot; - as the author
notes, this includes coding and debugging, detailed design, construction
planning, unit testing, integration, integration testing, etc. The bulk
of the book focusses on coding since most of the effort in construction
is spent in coding. The emphasis of the book is towards creating a
toolbox of effective software construction techniques and on the
importance of using the right tool for a given job. In particular,
the author repeatedly advises you to programme &lt;em&gt;into&lt;/em&gt; a
language rather than &lt;em&gt;in&lt;/em&gt; it.
&lt;p&gt;
An endearing quality of the book is that instead of pontificating, the
author offers copious references to papers, articles and books to back
up his claims. The tone of the book is entirely non-condescending and
you can see that the advice is coming from a wary professional with
years of experience working on real projects with real people rather
than a wily snake-oil salesman. Rookie programmers will do well to heed
the advice in the book and experienced programmers will find themselves
nodding every now and then as they read the book.
&lt;p&gt;
At around 960 pages the book might seem intimidatingly big, but it is
worth spending the time needed to read it from cover to cover. The book
is divided into several parts, each part comprising several cohesive
chapters. Each chapter begins with an overview of the material covered
in the chapter and ends with pointers to additional resources, a summary
of the key points of the chapter and a check-list to help you verify if
your code adheres to the guidelines prescribed in the chapter. The
side-margins of a page are used to provide cross-references to material
covered elsewhere in the book, insightful or funny quotes, a short URL
on the book's web-site that contains additional material and icons to
bring something to your attention. These icons are &amp;quot;Hard
Data&amp;quot; (typically a reference to a study backing some claim),
&amp;quot;Key Point&amp;quot; and &amp;quot;Coding Horror&amp;quot; (an example of
badly-written code). This structure makes it easy to find the material
you're looking for as you refer to the book from time to time.
&lt;p&gt;
The focus of the book is on imperative programming and it mainly uses
code in Visual Basic, C, C++ and Java as examples. Functional
programming enthusiasts might particularly take offence to the material
on recursion where the author seems quite disinclined to use it and
advises minimising its usage. The author gives an example of a recursive
implementation of a factorial function and says that it is slow and has
an unpredictable impact on memory. In fact, the code uses a &lt;a
href=&quot;http://en.wikipedia.org/wiki/Tail_call&quot;&gt;tail-call&lt;/a&gt; and is
therefore a prime candidate for tail-call optimisation using a decent
compiler. A good programmer can use recursion to create neat functions
without adverse effects in many a case.
&lt;p&gt;
The author rightly points out the perils of &lt;em&gt;premature&lt;/em&gt;
optimisation of programmes, especially that done without proper
measurements to identify the real bottlenecks. The primary emphasis
should be on creating correct and maintainable code with performance
improvements taken up at the end, &lt;em&gt;if&lt;/em&gt; it is needed. I generally
agree with this, but would point out that many a time you would barely
have time to tackle performance in the end if you're working on a tight
schedule (as most of us are forced to do). Many programmes also have a
flat profile in that there are no obvious bottlenecks and yet the
programme is unacceptably slow. If you have automated regression-testing
set up with comprehensive code-coverage (as the author recommends
elsewhere in the book), performance becomes important even if it doesn't
matter during a single run of the programme or during a typical
user-interaction. In such cases, it might be better to keep an eye on
the performance of a programme during most of its construction.
&lt;p&gt;
There are at least three important aspects of software construction
that the author unfortunately leaves out of this otherwise excellent
and comprehensive book: security, supportability and concurrency.
Writing secure code is difficult, but very important and precious few
programmers are aware of the necessary techniques. The supportability of
software determines how effectively you are able to diagnose problems
encountered during its deployment - logging, state-dumps, etc. are
techniques that help here. Concurrency is important but is made
difficult by constructs available in mainstream programming languages.
To be fair to the author, it is only relatively-recently that security
and concurrency have come into increased focus with the Internet and
many-core CPUs being the prime drivers respectively.
&lt;p&gt;
With an additional 10 years of experience gained before the publication
of the second edition of this book, the author has slightly revised some
of his earlier recommendations and freely admits it. For example, the
first edition recommended a pretty-formatting of code where the
&amp;quot;=&amp;quot; operators of consecutive assignment statements line up
like this:
&lt;pre&gt;
int foo       = bar;
boolean snafu = wombat;
&lt;/pre&gt;
&lt;p&gt;
It turns out that while this looks pretty in the beginning, it leads
to additional effort as the code changes (e.g. variables change names)
during subsequent maintenance. It is not much worse to have a simpler
formatting that does not place unnecessary burden on maintenance. The
second edition also covers object-oriented programming and agile
development methods, but presents them in an even-handed pragmatic
manner. Much of the advice from the first edition remains intact in
the second edition.
&lt;p&gt;
The quality of the Indian reprint, published by &lt;a
href=&quot;http://www.wppublishers.com/&quot;&gt;WP Publishers&lt;/a&gt;, is unfortunately
quite disappointing. It has very thin pages because of which some of the
text and graphics on the opposite side of a page show through. The ink
doesn't have a good consistency and fades a bit in some places. These
make it a bit hard to read this reprint. At a price of Rs 600, they
could have done a better job.
&lt;p&gt;
If you are a computer programmer and wish to improve yourself, get this
book and read it.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/tpop.html</id>
<title type="html">&amp;quot;The Practice of Programming&amp;quot;</title>
<updated>2010-01-23T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/tpop.html"/>
<content type="html">
&lt;p&gt;
In their book &lt;a href=&quot;http://tpop.awl.com/&quot;&gt;The Practice of
Programming&lt;/a&gt;, Brian Kernighan and Rob Pike aim to advise computer
programmers on things like testing, debugging, style, performance,
design, portability, etc. that they are not usually taught in computer
science classes or programming courses. This is what they call the
&amp;quot;practice&amp;quot; of programming. Many pick these up over the
course of their careers with some trial and error; many simply don't.
This is the kind of book that has lessons for both rookie and seasoned
programmers and that deserves multiple readings over the course of
one's career.
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/tpop.jpg&quot; alt=&quot;&amp;amp;quot;The Practice of Programming&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/020161586X?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=020161586X&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=020161586X&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/practice-programming-brian-kernighan-rob-book-8177582488?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
I first read this book about a decade back when I was a relatively-new
professional programmer with a couple of years' worth experience.
Reading this book again after all these years makes me appreciate the
wisdom contained in these pages and agree with almost all that the
authors have to say. In fact, I think this is a great approach to
becoming a good programmer - learn the basics of programming, spend a
couple of years writing lots of programmes for fun or profit, read books
like this to improve yourself and come back to such books after several
years, having applied their principles in the interim. If you read such
a book &lt;i&gt;immediately&lt;/i&gt; after learning the basics, you might not
really understand the reasons behind the advice in the book and will
have to just take the words of the authors at face value.
&lt;p&gt;
This book is a typical &amp;quot;Kernighan book&amp;quot; - it is short and
to the point, the language is clear and simple, the material is
logically ordered with a natural progression and some of the examples
show that it is simple to implement things (e.g. a regular
expression parser) that might appear hard otherwise. It is also
an old-school Unix book in that it uses the command pipe-line:
&lt;blockquote&gt;
&lt;pre&gt;grap | pic | tbl | eqn | troff -mpm&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;
for type-setting instead of using something like a system based on &lt;a
href=&quot;http://en.wikipedia.org/wiki/TeX&quot;&gt;TeX&lt;/a&gt;.
&lt;p&gt;
The programming languages used in this book are C, C++ and Java with
an occasional sprinkling of AWK, Perl and Tcl. Most of the examples
use C however and some of the advice can be considered specific to this
language rather than being agnostic. That is not as bad as it seems
since every serious programmer must have C in their arsenal and not be
wedded to a single language or a narrow set of languages.
&lt;p&gt;
The book is full of pearls of wisdom that you might miss on a quick
skim through it. For example, in a section on debugging a problem, the
authors say:
&lt;blockquote&gt;
&lt;p&gt;Resist the urge to start typing; thinking is a worthwhile alternative.
&lt;/blockquote&gt;
&lt;p&gt;
When faced with a bug, most of us either fire up a debugger or start
modifying our programme in the hope of making the bug go away. With
experience we learn that carefully reading the code in question and
thinking about it lets us resolve the issue faster and some times
exposes other latent bugs. As another example, in a section on
performance, the authors say:
&lt;blockquote&gt;
&lt;p&gt;Thus the first principle of optimization is &lt;i&gt;don't&lt;/i&gt;.
&lt;/blockquote&gt;
&lt;p&gt;
Once again many of us spend a lot of time trying to optimise rarely-used
programmes or portions of a programme that we determine to be
bottlenecks based on reasoning and intuition alone. We have to ask
ourselves if the programme in question is worth speeding up and then
use measurements to determine the real bottlenecks. Even then, using
better algorithms and data structures coupled with clean and simple
code can provide greater benefits than complex code that tries to be
clever.
&lt;p&gt;
The last chapter in the book goes into topics like creating
domain-specific languages or compiling code on the fly with an emphasis
on using the right language for the job. It is better to create little
specialised tools that work with text files on their standard I/O
streams and that can then be combined in various ways (using Unix
pipes for example) to solve different problems. This is, of course,
the &lt;a href=&quot;http://en.wikipedia.org/wiki/Unix_philosophy&quot;&gt;Unix
philosophy&lt;/a&gt;. As an example, the authors create scripts for
getting the document for a given URL, removing HTML tags from a document
and formatting a text document into 60-character lines (written in
Tcl, Perl and AWK respectively). They then combine these scripts
to create a very simple, command-line-based, &amp;quot;web
browser&amp;quot; that shows a web-page as formatted plain-text.
&lt;p&gt;
In short, read this book if you want to be a better programmer. If
you have read it in the distant past, read it once again - you might
have missed some things the first time round.
</content>
</entry>
<entry>
<id>http://rmathew.com/2010/gwartney.html</id>
<title type="html">&amp;quot;Economics: Private and Public Choice&amp;quot;</title>
<updated>2010-01-10T00:00:00+05:30</updated>
<link rel="alternate" href="http://rmathew.com/2010/gwartney.html"/>
<content type="html">
&lt;p&gt;
If you are looking for a comprehensive and accessible introduction to
economics, &amp;quot;Economics: Private and Public Choice&amp;quot; by James D.
Gwartney, Richard L. Stroup, Russell S. Sobel and David Macpherson is
the book for you. It covers both microeconomics and macroeconomics in
addition to the core principles of economics. Though it is a textbook
meant for an undergraduate course in economics, it is also suitable as a
gentle introduction to the dismal science for the lay person. I read
the tenth edition of this book that was published in 2003.
&lt;div class=&quot;book_display&quot;&gt;
&lt;img src=&quot;../books/images/gwartney.jpg&quot; alt=&quot;&amp;amp;quot;Economics: Private and Public Choice&amp;amp;quot;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com/gp/product/0324580185?ie=UTF8&amp;amp;tag=rmathew-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0324580185&quot;&gt;
&lt;img src=&quot;../books/images/buyamz.gif&quot; alt=&quot;Buy from Amazon.com&quot;&gt;
&lt;/a&gt;
&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=rmathew-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0324580185&quot; width=&quot;1&quot; height=&quot;1&quot; alt=&quot;&quot; style=&quot;border:none; margin:0px;&quot;&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.flipkart.com/economics-james-gwartney-richard-stroup-book-0324580185?affid=INRanjit&quot;&gt;
&lt;img src=&quot;../books/images/buyfkart.png&quot; alt=&quot;Buy from Flipkart.com&quot;&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
This is a &amp;quot;modern&amp;quot; textbook in every sense. It is quite
colourful and is richly illustrated with several pictures, graphs and
icons. The chapters are not too big and are written in a simple
language. They begin with an overview of the chapter and end with a
summary of the key points learned in the chapter, a sneak preview of
what is in store in the next chapter and several critical analysis
questions for testing your comprehension (only some of which are
answered in an appendix). Several boxes sprinkled throughout the text
either talk about applications of economics or introduce a noted
economist. Teaching aids for the book like presentation slides,
instructor's manual, etc. can be separately obtained from the publisher.
The book comes with a ridiculous CD-ROM containing &lt;i&gt;a single HTML
file&lt;/i&gt; that in turn redirects you to the &amp;quot;&lt;a
href=&quot;http://gwartneyxtra.swcollege.com/&quot;&gt;Gwartney Xtra!&lt;/a&gt;&amp;quot;
web-site containing supplementary material for the book. I cannot help
but wonder why the publishers could not just provide the URL for the
web-site in the book.
&lt;p&gt;
The book is divided into six parts, each containing closely-related
chapters that progressively expand upon the respective subject of the
part. These parts are:
&lt;ol&gt;
&lt;li&gt;The Economic Way of Thinking&lt;/li&gt;
&lt;li&gt;Markets and Governments&lt;/li&gt;
&lt;li&gt;Core Macroeconomics&lt;/li&gt;
&lt;li&gt;International Economics&lt;/li&gt;
&lt;li&gt;Core Microeconomics&lt;/li&gt;
&lt;li&gt;Beyond Basics&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I was surprised to see macroeconomics presented before microeconomics -
I would have expected it to be the other way round. The last part is
a collection of 14 special topics on subjects like the burden of
social-security, rising healthcare costs, increasing national debt,
etc. that still seem quite relevant. The focus of the book is on the
United States, but international readers will not feel lost while
reading the book as the core issues that are discussed remain
universally relevant. The thrust of the book might be termed right-wing
or republican as it argues for a reduction in taxes, smaller role of
the government, etc.
&lt;p&gt;
Unlike some other textbooks on economics, this book is not math-heavy.
Like some other textbooks however, there is a lot of hand-waving and the
reader is expected to just believe the authors. For example, at least
in the beginning the authors could have shown how supply curves are
derived from empirical data and how they shift under changed conditions.
This book also seems to be revised every couple of years like other
college-level textbooks - this is a very expensive textbook and these
superfluous revisions can be seen as an underhanded attempt by the
publisher to kill the used-books market.
&lt;p&gt;
The book presents a strong case for capitalism, but does not explore
why communism or socialism became more popular in other countries. It
does provide excellent insights into why the democratic process does
not quite work the way people expect it to work. It shows how people
are forced to choose among candidates who might not represent their
stand on &lt;i&gt;all&lt;/i&gt; the relevant issues, only some. It explores the
rent-seeking behaviour of special-interest groups who use campaign
financing and intensive lobbying to get politicians to pass laws that
strongly benefit them but weakly harm the general public, sometimes in
not-so-obvious ways. It explains how politicians have a strong incentive
to take decisions that have short-term benefits but long-term hazards.
&lt;p&gt;
I felt that the book did not cover the very basics of economics and
finance in much detail. For example, the origin of money or the
evolution of the banking system could have been expanded upon. While
the book presents almost all the fundamental concepts, it does not
put it all together to illustrate how the student can perform economic
analysis on their own in a given situation. For example, how can you
arrive at the value of a house or a stock and decide whether an offered
price is cheap or dear? Concepts like opportunity cost, interest rate,
present value of money, inflation, etc. could have been used in the
analysis for such a case.
&lt;p&gt;
It is my firm belief that everyone should be familiar with the basics
of economics since it is so important in our times. If you have never
been introduced to the subject before, this is a good textbook to
get started provided you can afford the price.
</content>
</entry>
</feed>
