Saturday, May 5, 2012

Look around - there's huge DATA

It is my humble opinion, the one indispensable attribute to acquire knowledge is to analyse the ‘data’ around - if one does this over years, he/she will realise what knowledge is all about !!!

The intent of this post is just doing some groundwork - gathering and putting forth some data for further analysis and references. Hence, this post will be referred in the future posts.

Having made the above statement, I will just put ahead several, random observations which need no eagle’s eye - even a common man engrossed in his deadly ‘routine’ can have them. These observations are, seemingly, insipid account of events occurring around us and there is no intention(NOT IN THIS POST)to give a verdict about these.

  1. There was a time once when people used to cry, even commit suicides, if due to some god-forbidden situations in their lives, they had to sell their(possibly ancestral) lands, houses. It was considered a responsibility, a moral duty to maintain the ancestral lands and related occupations. Today, lands are sold everyday for ‘money’, are seen as liabilities due to their use only for ‘obsolete’ tasks and occupation.Moreover, selling lands and becoming ‘rich’ is looked upon and envied. They are bought with a view to generate more ‘money’ in the coming times by again selling it
  2. There was a time when festivals were celebrated with at most simplicity(rather simplicity was the very fabric of life) - during Ganesh-Visarjan, people used to recite ‘aratis’ and walk peacefully to the sites of Visarjan.During Diwali, it was a routine of people visiting each other homes and spending a lot time together, even friends of ‘young’ ages were involved. I remember several occasions where we visited our friend’s places during Id, with the only sign of ‘celebration’ was greeting, embracing and feeding the guests with delicacies. Today, people block traffic, dance(?) on cheap tunes played on deafening stack of loudspeakers - be it Ganesh Visarjan or Shiv Jayanti. During Id, people block roads for Namaaj.
  3. There was a time when teenage friends met, they had loads of things to share, discuss about the events in their lives(as well as of others :P). True, they used to argue over ‘national’, ‘social’ stuff about which they could do little. Each one had a bicycle. If that was not the case, the strongest guys use to ride the bicycle while the weaker sat pillion. Today, when teenagers meet, most of them are busy sharing stuff on expensive cell-phones, chatting on it, riding two-wheelers at dangerous speeds
  4. There was a time when mothers - either housewives or working, felt restless when their children weren’t at home for long. The fathers had enforced a strict code of conduct - from food to spending, from rising in the morning to sleeping at night. The grandparents were the supreme mentors and observers, also served as knowledge repositories. There is no need to quote how these things have changed now(nuclear families, high rate of migration), not to mention how they will change in immediate future
  5. There was a time when even in late twenties, men used to be slim and sturdy. Going to gym, playing, riding, walking etc. weren’t ‘leisure’, ‘special’ activities but an embedded, routine activity. Today, even the school kids, teenagers are out-of-shape, obese. Exercise has become ‘daunting’, ‘requires special attention’
  6. There was a time when mom cooked vegetables, it’s aroma itself used to suggest the vegetable’s name. The taste was authentic and vegetables, grocery etc. came cheap. Today, there is no limit left on the ever-rising prices of food commodities. The vegetables are so tasteless, toxicated and dull, I wonder about their nutritional values !!!

I suddenly realised that I had summarised numerous such things before and again listing them would be a mere redundancy !

Friday, January 20, 2012

Why History ??? Part-1

Note : Owing to my potential, the formatting and look-and-feel is as screwed as ever - requesting the readers to focus on the content

This is the question which I, who dreams to be a full-time Historian, must have attempted to answer ages ago. But better late than never !

The people of our mother/father ‘s generation used to love a song ‘ Sikandar ne Porus se, ki thi ladai, jo ki thi ladai toh main kya karun ? ‘ This song was an epitome of the question, rather an exasperation, that occured in the young minds - ‘Why should we learn, worse remember, who was whose grandfather, which battle was fought - when and for what, why to learn about swords and elephants in the era of ballistic missiles, why to remember the list of political parties’ and so on... I admit that I was no different from these people UNTIL I realised that what we learnt in the school is far from being qualified as ‘History’ - it was just a dump of chronology, a subject to mug-up and in a way, a liability !

With a wide range of professions engaging numerous youthful elements(except politics :P), there are some questions, I as an amateur Historian, would like to pop :

  1. Why the activity of requirement analysis carried out so extensively and seriously before undertaking a project/product development ? Why don't just start coding and building apps. ?
  2. Why a doctor, especially a psychiatrist, are hell-bent on various tests and ‘history’ before starting the treatment? Why don’t they subscribe a random medicine and later proceed with a trial-and-error methodology ?
  3. Why do lawyers have those piles, stacks, cupboards of books having references to cases spanning over decades ? Why not just have a book that lists all laws and fight each case as it comes ?
  4. Why so much pains taken by software engineers to come up with design patterns, best practices, pitfalls etc. ? Why strive so much to avoid ‘re-inventing the wheel’ ? Why not just hit the coding button directly ?
  5. Why do civil engineers, geographical experts spend years analysing terrain, studying crust and mountains before undertaking construction projects? Why not directly begin with the construction ?
  6. Why there is so much demand and respect for ‘experience’ in the world - be it a grandfather, a veteran soldier, an old fox having served in the intelligence? Why not put young guys right away and let them learn ?

The list of such questions from my side is unending ! However naive and stupid they may seem to the respective professionals. they can be asked by some one who doesn’t understand the scope, the pitfalls and the impact of that particular profession. If you are patient and honest till this line, you can get a ‘slight’ idea of the frustration and dilemma a true Historian faces when some one questions the validity and usefulness of History !
The objective of this article is just to clear the dust on the mirror - NOT to prove anyone greater/smaller than anyone !

Let me analyse and put forth a few reasons why History always seems ‘obsolete’, ‘boring’, ‘mysterious’ etc. First question, in the Indian context, to be more specific, Maharashtra board, what we studied & when(how part later) :
  1. Std. IV - Shivaji
  2. Std. V-X - Various revolutions, Indian struggle for Independence, WWI and WWII

Now I am going to stress the brain of the readers a bit more - recall the manner, the methods in which the subject was taught, learnt and looked at - the teachers just used to read(asked to read !) the chapters, the students good at memorizing saw it as a trump card while others dreaded it! More or less, it was true about it was/is true about all subjects, not just History ! But History, and the one we have learnt, didn’t find any direct application/relevance to our further education - engineering, medical, management, arts etc. The exams focused on the chronological orders, naive and mundane events, extreme insistence on partisan politics and politicians etc.which killed the interest of the students in the subject(precisely, that was/is the intention ! ). The students and people are bombarded, since ages, with worthless ideological statements, to quote some ‘India is a nation with rich cultural heritage’, ‘A period of golden History’. If that is not enough, they are scared with statements like ‘History repeats itself...’ and so on(NOT TO MENTION THE DISTORTION OF THE HISTORY!!!). But no attempts are made (DELIBERATELY !) to make the masses to realise the crucial nature of History - it’s relevance to the current period, the knowledge and wisdom, the boon of prediction and analytical powers, the direly needed self-esteem(in the national sense), the solid and fruitful values it can inculcate! Thus, History is reduced merely to a dreaded academic subject at the school level !

After all that abstract salvo, let me bring some ‘relevance’ to the flow :
  1. WWII is what we all studied in school. How many of the things we see around today are rooted in WWII ? Just give a Google - Internet, Ballistic missiles, Nuclear warheads, Inter-continental aviation, Indo-Pakistan problem, North-South Korea problem - the list is mammoth !
  2. When we talk about Shivaji, partisan politics, Hindu extremism(?) etc. all such myopic terms come to play. Well, there was a short strike made by him at Umberkhind, near Lonavla where he ambushed a Mughal army of 20000 with just 3000 of his, most of them belonging to infantry, and won it with minimal bloodshed. For those who need 'Western Endorsement',  the 352yr old Harvard Business School has about 600 books on Shivaji Maharaj for references on management casestudies. About 20-25 countries including Switzerland, Vietnam teach military warfare techniques of Shivaji in their military training.
  3. The DBMSs(DataBase Management System) have come a long way & so have PLs(Programming Language). Today, we see a new framework, a new tool etc. popping before we can breathe. All claim to be innovative. A veteran programmer/developer/architect can easily expose myths and segregate the useful and useless stuff !

While umpteen such examples can be given, many minds must already have started debating against it. But it must be remembered that in either case, the role of History can’t be denied. Another point, History has something for everyone. Unfortunately,this article focuses on too less arenas as those are the only areas of my (limited) knowledge !

After having written a no. of lines enough to cause yawning, I would like to summarize what History has to give, depending upon the interpretations and expectations :

  1. For those interested in building their own philosophy(like me :P ), it acts as a data repository
  2. It helps, after analysis of course, to expose myths and establish facts
  3. It gives invincible power of prediction - learn more, predict more accurately
  4. It inculcates,especially among the youth, qualities that are direly need - perseverance, rationality, open-mindedness, tolerance, defiance, patriotism etc. These are the things one has to experience and learn - they can’t come out of the thin air so no need to agree with the above statement !

I intend to expand this article in future, in time. It is challenging for me to cram my findings of a decade in one article;more challenging, rather killing, for the readers(if any :D )

Tuesday, October 18, 2011

A lazy and intricate start

This post may appear contradictory to what the name of the blog suggests. But it is not the case - only because my inability to provide a detailed background - scientific,historical,spiritual, this post is appearing complex.

I will first mention the trigger :
http://anupamk-blog.posterous.com/self-modifying-code

I and my friend used to have long chats about many things that are termed as 'insane' in today's era. I am posting my comment on the above post as a post on this blog - I strongly recommend the readers to first read the post that the link points to !

My comment/(post) :

Sorry to begin with a negative note but I need to be very cautious,henceforth,before I ask you about something/to read something.The reason is simple - I don't wanna accelerate my(and maybe yours,too) descendance to insanity ;)
Before I proceed,I will like to highlight a crevice in your question - you think that code is intelligent/self-learning etc. But code is nothing but the implementation - your father knows that one tight slap and you will be as straight-laced as a lamb;the 'slap' here is the code.Now depending upon the intensity of the situation,your father will decide how many,how intense and where the slaps must be delivered :P
Even if you disagree to above statement,I suggest you read this piece of *hit to the end !!!
Let me make an Adolf Hitler attempt towards victory :P
You wrote :
self-modifying code => reflection => self-reference (=> self-awareness??) => meta-cognition => intelligence
Now the first concept that popped in my mind was that of the 'sample space' we learned in Maths.Or to be more naive,we can use the term 'context',as known in English or Computing domain. I,hereby,list the terms and notions that can help us to start solving this jig-saw puzzle :
1. Sample space/Context
Had Sir Einstein been here,he would have given you a call to explain his dreaded 'Theory of Relativity' and then I would have been subjected to the pain of seeing you been shackled in a remote mental asylum :D
2. Based on above the term, comes the term 'Intelligence' which according to me is purely relative term. Intelligence can be logical,instinctive,statistical,emotional or EVERYTHING of it !!!
Ex : Man survives all weathers because he can collect data and analyse it - in a way,it is problem solving based on the data set. Animals lack this - they have a fixed set of hard-wired instructions but they too have limited learning capabilities - a puppy initially isn't scared if u pick a stone but as it grows into a dog,the gesture of picking a stone scares it. On the other hand, man lacks the instincts given to the animals - he can't sense earthquakes or other natural calamities.But again,he learns to observe the animal behaviour to deduce dangers.
3. Self-awareness - this term is grossly vague and undoubtedly,the subset of the notion-2 - when I say that I am 'self-aware',it is nothing more than the claim 'I have exhaustively analysed all the data sets I know and now I can predict how will my body and mind react in a given situation'.
But the spiritual explanation of self-awareness,at a naive level(where we stand),is 'an unending journey towards the ultimate Truth - who am I,why am I so,who made me,what is the objective of my life,what makes me different from others,where do I fit in the big picture' and all those deranged thoughts :P
To suffice,when you say that you are 'self-aware',it is again purely contextual - I may be aware of what I want,what I can do to get it etc. but that in NO WAY makes you intelligent OUTSIDE your sample space/context.
To be a bit deductive,take the example of Skynet in the Terminator series - it becomes 'self-aware' when it is switched on by Lt.Gen. Robert Brewster and soon takes over the entire technical backbone structures of earth. But it still takes years to come up with a plan to destroy the human leadership - it comes up with a notion that humans need something to believe in.Hence,it falsely inactivates few of it's bots and makes the Resistance leaders believe that the bots rely on a radio wave from the Skynet HQ. But again,John Connor uses his 'emotional' intelligence/instincts and turns out to be the only surviving top-brass !!!
I will just write a crude code snippet which I wrote to get rid of the goddamned switch cases in a servlet for redirecting requests to the correct model code/classes(actually,this is what all the frameworks and *hit,even JRE does :D )
package com.javaee.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class Controller
*/
public class Controller extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Controller() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
* response)
*/
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
* response)
*/
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
/*
* Step-1 : Retrieve the action ID(the int used in the normal switch
* case)
*/
/*
* Step-2 : Get the destination for this request - a jsp/a java class/a
* URL from DB/properties file etc.
*/

/*Step - 3 : Use reflection API to invoke the java class*/

/*Step - 4 : Forward the request using request dispatcher*/
}
}
Now step-4 is where the 'reflexive,self-modifying' code lies.
From the servlet's perspective,that code is 'intelligent' as it correctly decides the destination.
But from the JVM perspective,it's just an above-average worker code !
Now go back to the dad's slap example :P
As you know how horrendous I can be when it comes to drawing,art and stuff,else would have provided a pictorial depiction.
Please note that I have changed my residence.Hence,no point in rushing to my old place with an intention to kill me :P