Monday, November 17, 2014

Successfully completed M101P: MongoDB for developers


I have successfully finished the course M101P:MongoDB for developers, offered by the MongoDB, available at the university.mongodb.com.

The course is taught by Mr Andrew Erlichson, who holds phd from the university of stanford and is currently the Vice President Education at MongoDB Inc.

This course gives us an idea of what MongoDB is, how to use CRUD, how to design and engineer applications using schema, how to optimize performance and how to use aggregation framework.

I have received a certificate of completion duly signed and attested by both, Mr Max Schireson, CEO, MongoDB and Andrew Erlichson. I have scored 70% marks, and the cut off score to get certified for this course is 65%.

I have enjoyed the course, the way it has been presented, challenging assignments which has made me hands on on MongoDB ,online discussion forum where people were really helpful. Also, the final exam was really tricky, and I am glad that I have managed 70% overall.

Thanks for thinking about teaching and sharing knowledge with others, the journey has been wonderful.





Tell Me About Yourself - The Most Important And The Most Neglected Question



Whenever we attend an interview, or even if we have a normal conversation, we are or will be often asked this question, 'TELL ME ABOUT YOURSELF'. This question is the most important question, yet neglected, not only by the recent college pass outs, but even by the experienced professionals as well as the veteran people. This question is asked everywhere, be it an interview for a job or a GD/PI for MBA or even for hi-tech courses.

But why this question is so important?

The reason that this question is usually asked first by the interviewer is that tell me about yourself is an ice breaker to initiate a conversation. Answering this question with readiness and in an articulated manner gives the confidence to the interviewer that the candidate has prepared for the interview and is serious about the job. Majority of the job interviews actually involves forming rapport with the interviewer. Candidates often think that by cramming the answers, they will get the job, where as the interviewer is checking whether the candidate has prepared for the interview, how well he/she handles the situation.

The purpose of the interviewer is to gauge whether the candidate has clear picture about the work he/she has done or still does, whether they understand the instructions,will they be able to understand and solve problems and how do they approach a problem or the work- meticulous, careful or carefree, always in hurry, are they good team player. Also, what do they do apart from their professional work. Here also, one should not say that they listen to music etc, but must tell that how does the candidate utilize the time. Tell me about yourself actually describes the candidate's true personality, both at the professional level as well as at the personal level, hence this question is the most important and must be prepared and articulated in a proper manner.

But  lot of people neglect this question. They think that tell me about yourself involves telling the entire history of their life. That's not the correct way to attack this important question. This question has to be finished in 2 minutes, and in 2 minutes, no person on this planet will be able to narrate their entire life history.

So how to tackle this question?

Well, I normally attend software engineering interviews, so my advice will be for software engineers.

First, tell from where you have graduated, in which year and the university name. Then, start with the first job designation with the firm's name, then the last designation with the firm's name. After that, tell them about the job responsibilities. Then, tell what have you done at the work, any leadership position etc.

After that, tell the interviewer  how do you update yourself and keep track about the latest technologies. And how do you achieve this? Do you listen to webinars, attend workshops and events?

Then come to the personal level. Here also, don't describe about the family details. Talk about learning, being updated with recent knowledge, any research kind of activities.

Since this is an important question, I have written my response to it. Here it is:

My name is Radhakrishna Rao L. After completing my bachelors of Technology from Guru gobind singh indraprastha  university in the year 2005 with IT as majors, I started my career as associate applications engineer with   Oracle Technologies Pvt Ltd and rose to the level of Senior Software Engineer  with PeopleTechGroup.My job responsibilities  included customizing Enterprise modules using Peoplesoft Technology. The work included communicating with team members and clients, gathering requirements, and creating solutions. I have designed and optimized application engines to automate and integrate processes of the HR systems  using sql and peoplesoft.
  
 I keep myself updated by learning new skills .I have finished a course on R and statistics from the coursera, an online MOOC platform, and also,have finished a course on MongoDB,a next geneartion of database from mongodb university.  I attend hackathons to meet new people and work in teams in order to solve problems out of my domain. I also attend seminars, and listen to online webinars which talk about new technologies and demonstrate workshops. I also write and maintain a blog.
  
Personally ,apart from spending time with my family, I like to learn languages, especially Sanskrit. I take keen interest in Indian politics, research on history of civilizations and empires, collect and store information from the newspaper articles and magazines, and like to keep myself fit. 


It is clear that I have covered everything, my education history, my job history, my work history, team player, how do I learn new things, and how I spend my personal time. Also, this answer will take less than 2 minutes to speak out.

I hope that this article will help the readers to achieve their goals.

Thanks for the read.

Saturday, November 15, 2014

Madhava Rao Peshwa Thorale -THE MAJESTIC AND THE UNPARALLELED


History, for some, especially government and politics, is a tool to promote vested interests and agenda. And for others, History is a tool to study about the past, their rich culture and heritage and learn the marvelous beauty of the ancient civilization. Also, history gives us an opportunity to learn about great men, those people who showed resilience, strength, courage, conviction, rose to the occasion and hence, have got their names written as great men of all times.

One such personality, who also happens to be my source of inspiration is Madhav Rao I (or Pradhanpant Shrimant Madhavrao (Ballal) Peshwa I aka Thorle Madhav Rao Peshwa )

The last 1000 years saw a battle where , all the forces, from middle east to saudi arab, western europe, eastern europe, central asians, engaged in battle to establish superiority. The world war-1 and 2 were again the repeat of the same 1000 years of battle, but for a new world order. And this is when, a certain group, called mohammedans, arrived in the land of vedas, where they started massacring the vedic people because they questioned these marauders that why shall we follow you, you are bringing the wrong methods. Unfortunately, even today, in modern India, we have slave of such people who want hindus to act like slaves of mohammedans, consider them good. Now, I really don't want to name or blame anyone, but this also include a prominent leader of modern indians, who is considered a mahatama by everyone.


Sanatnis created two great empires to attack and resist the force of alien powers, europe and mohammedan. One was the great vijaynagara empire, which was founded by swami vidyaranya, harihara and bukka whose capital was the city of hampi, which got plundered after the battle of talikota.


The second empire came when swami samartha ramdas inspired a great hindu king chatrapati shivaji and then formed a very strong state of maratha confederacy, whose capital was Pune City.


It was Shivaji who created the Peshwa, the titular equivalent of a modern Prime Minister designation in order to more effectively delegate administrative duties during the growth of the Maratha Empire. The Peshwas were all ministers who initially started as the chief executives to the king. Prior to 1749, Peshwas held office and controlled the Maratha army. They later became the de facto hereditary administrators of the Maratha Empire from 1749 till its end in 1818. 


The first Peshwa was  Moropant Trimbak Pingle.


The Peshwa became a hereditary administration after chattrapati Shahu  appointed  Baji Rao I, son of Balaji Vishwanath (Bhat), as Peshwa in 1719. Baji rao's son was Nanasaheb Peshwa, whose son is madhava rao peshwa.

The maratha empire incurred heavy losses after the third battle of panipat. In the Third Battle of Panipat, the Maratha Empire suffered a serious blow at the hands of combined forces of Durrani Empire, the Nawab of Awadh and Rohillas under Najib ad-Dawlah. Their power was virtually wiped out of the North India and the confederacy itself experienced fragmentation. The Bhonsles of Nagpur did not participate and tried to remain aloof of the aftermaths too.


It was at this time, that madhava rao peshwa, aged 16, was bestowed with the responsibility of the peshwaship of the empire which was in turmoil. And what an administration it was. Using all the entrepreneurial zeal, innovation, he again brought the empire back to its acensdancy. The sword of maratha again started bleeding the blood of the enemies, and this time, it was even more brutle. Enemy of the state were virtually wiped out. Corrupt officers were removed (There is a hint that corruption in India has been since long time and not after 1947 as proposed by baniya BJP).

One of his biggest achievement is the victory over haider ali, the islamic marauder, in the famous battle of nijagal. Even though, secularist praise and glorify tipu sultan, they never make a point about the brutality of haider ali and tipu sultan on the hindus.

Madhava Rao Peshwa, with the help of madikeri naya of chitradurga, made sure that haider ali gets defeated. At this point, peshwas became powerful, which meant hinduism goes strong. But destiny has something else written for hindus.

Not only was he an able administrator, he also possessed brilliant diplomatic skills. An English officer Mr. Mastin met Madhavrao. He requested that two ports, Vasai and Sashti be given to the East India company to set up a military base so that they can protect their trading ships. In exchange, he offered his assistance to fight against Madhavrao’s domestic enemies in the south. Madhavrao flatly told Mastin that even though he had domestic enemies, they were Indians first, but the British who came under the disguise of trade, had quickly thrown the scale and taken the sword. The gem of this conversation is that Madhavrao asked Mastin to give the Marathas two equally good ports in the British territory where the Marathas could keep their army, build base and conduct trading. No need to say, this meeting was not fruitful for the British. 

During this time, an interesting incident occurred. Madhavrao was busy managing the treasury of the kingdom and supervising the calculation of the expenses encountered during the war. One day he noticed a large crowd anxiously waiting at the entrance of Shaniwar Wada. Upon summoning the guards, he discovered that they were the aggrievated citizens of Pune who had lost their families, house, land and wealth in the war. They had been visiting his residence for the past few days with hopes of expressing their unbearable losses. However, the guards had not allowed them to meet the Peshwa by excusing that his health had deteriorated. When he heard this, Madhavrao became furious with the guards; he immediately left all his tasks aside and stepped out of Shaniwar Wada. He personally met with the poverished families and patiently listened to each one of them. He made a note of every family’s loss and personally saw to it that these losses were compensated from the empire’s revenue. This speaks volumes about why the citizens always looked up to him with tremendous faith and respect.

His own uncle kept conspiring against him, despite madhava rao showing immense respect to his uncle. He escaped many assassination attempt which his uncle used to hatch against him in order to gain the ascendacy of the throne. Unfortunately, he was diagnosed by tuberculosis, which eventually proved out to be the reason of his  demise.

Now days, the Indian B schools, who are supposed to produce Business leaders in the field of management and administration just teach about how to make corp orates more profitable. But none of our so called cream business school graduates take charge of a fallen businesses or empires and get them back on track, creating sustainable solution. All B-schools of India must teach about madhava rao peshwas work ethics, leadership abilities to prepare better administrators. I don't see anything wrong in this. Infact, if India can include chapters on tippu sultan, akbar etc, and is ready to teach german language instead of sanskrit, what's wrong in teaching about madhava rao peshwa the great, who made hinduism strong?

18 November 1772, early morning approximately at eight: Madhavrao died at the temple premises of Chintamani, Theur. Thousands of citizens visited the site and paid their last respects. His wife Ramabai performed sati during his cremation later that day. Madhavrao was cremated on the banks of the river which was about half a mile from the temple. A small memorial carved out of stone rests today at that place as a memorial.


Assessing the impact of the loss of Madhavrao, the writer James Grant Duff eulogised:
"And the plains of Panipat were not more fatal to the Maratha Empire than the early end of this excellent prince…" 


Saturday, October 18, 2014

MongoDB: Aggregation Framework


This blog post will give a basic introduction to MongoDB's aggregation framework.

What is Aggregation in MongoDB:
Aggregations are operations that process data records and return computed results. MongoDB provides a rich set of aggregation operations that examine and perform calculations on the data sets. Running data aggregation on the mongod instance simplifies application code and limits resource requirements.
Like queries, aggregation operations in MongoDB use collections of documents as an input and return results in the form of one or more documents.
This is similar to Group-By clause in RDBMS world of databases.
We use aggregation framework in MongoDB to compute the sum,averga,mean,median of the numerical type data in the documents of a collection.
Basic Syntax of aggregation:
The general aggregation framework is this:
                           db.collection.aggregate([{"aggregation operation"}])
Here, we have to pass the collection name and then use 'aggregate' command and then perform appropriate aggregation operation.
The following are the most commonly used aggregation operations which are used in MongoDB:
  • $project - Reshapes the document & brings at the top. Uses 1:1 mapping. Use this to pass                   the  fields which are needed in the next state of the pipleline. Also use this to filter                     the output of the aggregated dataset where certain fields are required.
  • $match -  Filters the documents to pass only the documents that match the specified                     condition(s) to the next pipeline stage. Best suited to optimize the                                 pipeline.Put the $match criteria in the beginning of the pipleline to minimize                   the amount of processing down the pipe.
  • $group - Groups documents by some specified expression and outputs to the                             next stage a document for each distinct grouping. The output documents                       contain an _id field which contains the distinct group by key. The output                       documents can also contain computed fields that hold the values of some                     accumulator expression grouped by the $group‘s _id field.                                            $group does not order its output documents.
  • $sort  -    Sorts all input documents and returns them to the pipeline in sorted order.

    Aggregation Pipeline framework:

   The aggregation pipeline is a framework for data aggregation modeled on the concept of      data processing pipelines. Documents enter a multi-stage pipeline that transforms the
   documents into an aggregated results.

   The MongoDB aggregation pipeline consists of stages. Each stage transforms the 
    documents as they pass through the pipeline. Pipeline stages do not need to produce
   one output document for every input document; e.g., some stages may generate new
   documents or filter out documents. Pipeline stages can appear multiple times in the 
   pipeline.

   Aggregation pipeline have some limitations on value types and result size, these limits
   are:
  
  •  Pipeline stages have a limit of 100 megabytes of RAM. If a stage exceeds       this limit,  MongoDB will produce an error. This is resolved by using  allowDiskUse option which enables aggregation pipeline stages to write data to temporary files.
  • If the size of document that contains the complet result set exceeds 16 MB size, then the aggregate commands produces an error. This can be solved if the command return a cursor or store the results to a collection.

  Aggregation Expressions:

  The following are the most commonly use aggregation expression in the MongoDB's aggregation  d  framework:

  • $sum: Calculates and returns the sum of all the numeric values that result                                 from applying a specified expression to each document in a group of                              documents that share the same group by key. This is an accumulator                            operator and is available in the $group stage only.
  • $avg:  Returns the average value of the numeric values that result from applying a                  specified expression to each document in a group of documents that share the              same group by key. $avg ignores non-numeric values. This is an accumulator              operator and is available in the $group stage only.
  • $min:  Returns the lowest value that results from applying an expression to each                     document in a group of documents that share the same group by key. This is               an accumulator operator and is available in the $group stage only.
  • $max: Specify a $max value to specify the exclusive upper bound for a specific index               in order to constrain the results of find(). The $max specifies the upper bound             for all keys of a specific index in order.
  • $push: The $push operator appends a specified value to an array. If the field is                        absent in the document to update, $push adds the array field with the value as              its element. If the field is not an array, the operation will fail.If the value is an                array, $push appends the whole array as a single element.
  • $addtoSet: The $addToSet operator adds a value to an array only if the value                                 is not already in the array. If the value is in the array, $addToSet does not                     modify the array. $addToSet only ensures that there are no                                           duplicate items added to the set and does not affect existing duplicate                           elements. $addToSet does not guarantee a particular ordering of                                   elements in the modified set. If the field is absent in the document to                             update, $addToSet creates the array field with the specified value as its                       element. If the field is not an array, the operation will fail.
  • $first:       Returns the value that results from applying an expression to the first                             document in a group of documents that share the same group by key.                           Documents must be in sorted order to work.Available only in the $group                       stage.
  • $last:     Returns the value that results from applying an expression to the last                            document in a group of documents that share the same group by key.                          Documents must be in sorted order to work. Available only in the $group                       stage.

   Special Pipleline Stage Aggregation Operator -  $unwind:


Applicable to those documents which are stored in an array.Deconstructs an array field from the input documents to output a document for each element.Each output document is the input document with the value of the array field replaced by the element.

The $unwind stage has the following prototype form:

                                         { $unwind: }
To specify a field path, prefix the field name with a dollar sign $ and enclose in quotes.

Behaviors

$unwind has the following behaviors:

  • If a value in the field specified by the field path is not an array, db.collection.aggregate() generates an error.

  • If you specify a path for a field that does not exist in an input document, the pipeline ignores the input document and will not output documents for that input document.

  • If the array holds an empty array ([]) in an input document, the pipeline ignores the input document and will not output documents for that input document.

In the next post, I will show how to write queries using aggregate operators and how to work on the dataset to sum,average, finding min and max from the documents of a collection.





Th





Friday, October 17, 2014

MongoDB Installation and running


This post will discuss about the installation of MongoDB, how to create config files, how to start MongoDB.

For installation of the MongoDB, kindly go to the following URL and select the appropriate installation file, based on the operating system which you are using:

http://docs.mongodb.org/manual/installation/

In my case, I am using windows 8 which is 64 bit, but my mongodb version is 32bits.

I will advise to use 32 bit installation of MongoDB because the drivers developed in the languages such as Python etc work very well with 32 bits version. There are lot of issues encountered when 64 bit version of Python is used. Also, use Python 2.x version, not 3.x

Once the installation is complete, run the setup, install mongodb in the directory. I have chosen C: directory for the same.

Starting MongoDB:

MongoDB can be started as windows service. But before that, we need to create --dbpath file,conf file and the log file.

Infact, the best way is to create dbpath and logpath in the config file and run the config file while starting the mongodb instance, which I will explain.



Create a config file, mongodb.conf, put it in the folder C:\wamp\bin\mongodb\mongodb_win32\conf,which might be different for your machine. Just make sure that conf file is residing where the mongodb resides inside the \bin directory. Also, kindly take care of the path, for windows it is '\' and for unix it would be '/'

Add the following lines in the config file and name it as mongodb.conf:

# mongodb.conf

# data lives here
dbpath = C:\wamp\bin\mongodb\mongodb_win32\data\db\

# where to log
logpath = C:\wamp\bin\mongodb\mongodb_win32\logs\mongodb.log
logappend=true

# only run on localhost for development
bind_ip = 127.0.0.1                                                             

port = 27017
rest = true

To run the mongodb instance from the cmd, make sure to open the cmd in administrative, for linux and unix, the mode should be super user.

Now, open the command prompt as administrator and do the following:




The mongod instance is up and running.

Now, open another command prompt as administrator and do the following:


Here, we have use mongo command to connect to the database, we are connected to the test database.


By default, mongo looks for a database server listening on port 27017 on the localhost interface. To connect to a server on a different port or interface, use the --port and --host options.

The mongo shell  session will use the test database by default. At any time, issue the 'db' operation at the mongo to report the name of the current database:

To get the list of databases, use 'show dbs'



To use a database, issue use db command, where db is the name of the database, as show in the screen shot below:



Now we are connected to the students database.

As mongoDB is a json related document,A manual:database holds a set of collections. A manual:collection holds a set of documents. A manual:document is a set of key-value pairs.

In order to find the collections of a database, issue 'show collections' operation:

The collection present in the database 'students' is 'grades'. It is using this collection that we will perform all the operations on the database. 

Some basic operations using mongoDB queries, such as finding data inside the collection, counting the number of documents in a collections:

To find the data, we use the operation db.collection.find()

For our example, we will use db.grades.find()




We can see the output in the key:value pairs in the documents returned by the command, "student_id" is key whose values are 0,1,2 etc.

To find the number of in a collection, use db.collection.count()




The number of documents in the grades collection is 600.

In the next post, I will show some more operations such as finding specific document, and how to use aggregation framework to sum,average data and also, I will show you how to write file using pymongo, a driver available in python language.

References:

[1] http://docs.mongodb.org/manual/reference/method/db.collection.count/

[2] https://university.mongodb.com/


Monday, September 15, 2014

MongoDB-Next generation of database



I recently got a chance to work, or rather tinker/play with a document database, MongoDB which is a next generation of database. The cool think about this database is that it does not follow traditional methods of storing data, which is in the form of tables/records and fields. That's why MongoDB is also known as NoSql database.

What is NOSQL database?

NoSQL, or 'Not Only SQL', represents the new class of data management technologies designed to meet the increasing volume, velocity, and variety of data that organizations are storing, processing, and analyzing.

Compared to relational databases, NoSQL databases are more scalable and provide superior performance. NoSQL databases address the opportunities that the relational model does not, including:

  • Large volumes of structured, semi-structured and unstructured data
  • Agile sprints, quick iteration, and frequent code pushes
  • Flexible, easy to use object-oriented programming
  • Efficient, scale-out architecture instead of expensive, monolithic architecture


Document Databases

When relational databases were introduced into the 1970s, data schemas were fairly simple and straightforward, and it made sense to conceive objects as sets of relationships. For example, an article object might be related to a category (an object), a tag (another object), a comment (another object), and so on.

Because relationships between different types of data were specified in the database schema, these relational databases could be queried with a standard Structured Query Language, or SQL. But the environment for data, as well as programming, has changed since the development of the SQL database:

The emergence of cloud computing has brought deployment and storage costs down dramatically, but only if data can be spread across multiple servers easily without disruption. In a complex SQL database, this is difficult because many queries require multiple large tables to be joined together to provide a response. Executing distributed joins is a very complex problem in relational databases.

The need to store unstructured data, such as social media posts and multimedia, has grown rapidly. SQL databases are extremely efficient at storing structured information, and workarounds or compromises are necessary for storing and querying unstructured data.

Agile development methods mean that the database schema needs to change rapidly as demands evolve. SQL databases require their structure to be specified in advance, which means any changes to the information schema require time-consuming ALTER statements to be run on a table.

In response to these changes, new ways of storing data (e.g. NoSQL databases) have emerged that allow data to be grouped together more naturally and logically, and that loosen the restrictions on database schema. One of the most popular ways of storing data is a document data model, where each record and its associated data is thought of as a “document”. In a document database, such as MongoDB, everything related to a database object is encapsulated together. Storing data in this way has the following advantages:

  • Documents are independent units which makes performance better (related data is read contiguously off disk) and makes it easier to distribute data across multiple servers while preserving its locality.
  • Application logic is easier to write. You don’t have to translate between objects in your application and SQL queries, you can just turn the object model directly into a document.
  • Unstructured data can be stored easily, since a document contains whatever keys and values the application logic requires. In addition, costly migrations are avoided since the database does not need to know its information schema in advance.
  • Document databases generally have very powerful query engines and indexing features that make it easy and fast to execute many different optimized queries. The strength of a document database’s query language is an important differentiator between these databases.


MongoDB:

MongoDB (from "humongous") is an open-source document database, and the leading NoSQL database. Written in C++, MongoDB features:

Document-Oriented Storage »
JSON-style documents with dynamic schemas offer simplicity and power.

Full Index Support »
Index on any attribute, just like you're used to.

Replication & High Availability »
Mirror across LANs and WANs for scale and peace of mind.

Auto-Sharding »
Scale horizontally without compromising functionality.

Querying »
Rich, document-based queries.

Fast In-Place Updates »
Atomic modifiers for contention-free performance.

Map/Reduce »
Flexible aggregation and data processing.

GridFS »
Store files of any size without complicating your stack.

MongoDB Management Service »
Monitoring and backup designed for MongoDB.

Partner with MongoDB »
Reduce cost, accelerate time to market, and mitigate risk with proactive support and enterprise-grade capabilities.

In the next post, I will write about installation, some basic commands and how to write a file using one of the popular package available in Python Prgoraming Language.

Saturday, September 13, 2014

Probability and the problem of plenty

Hi,

I am writing an off beat thought here, and want to deal with a mathematical technique called probability, which means chance in a layman's language and the problem of plenty, which again means, many in a layman's language.

Before, all of you even start guessing that  about what I am going to talk, I will clarify, the problem of plenty is about applying to job positions in the multinational corporations.

Now, don't get me wrong. I have absolutely nothing against the corporations, and also, the way people, especially Indians think. This is just a thought which came to my mind while searching for new jobs.

To begin with, I will explain about probability, please don't get scared, as I am not going to cover the nitty-gritty of this subject, which itself is a paradox, and I believe that the probability that probability understands itself is zero. Now, the definition of probability from wikipedia:

'Probability is used to quantify an attitude of mind towards some proposition of whose truth we are not certain.[2] The proposition of interest is usually of the form "Will a specific event occur?" The attitude of mind is of the form "How certain are we that the event will occur?" The certainty we adopt can be described in terms of a numerical measure and this number, between 0 and 1 (where 0 indicates impossibility and 1 indicates certainty), we call probability.[3] Thus the higher the probability of an event, the more certain we are that the event will occur. A simple example would be the toss of a fair coin. Since the 2 outcomes are deemed equiprobable, the probability of "heads" equals the probability of "tails" and each probability is 1/2 or equivalently a 50% chance of either "heads" or "tails". '


Scared? Confused? Ha ha, don't worry, as I have said, that probability that probability understands itself is zero. I will tell you the most simplest of the thing about probability while dealing with this paradox : "PROBABILITY WILL NEVER BE LESS THAN ZERO AND GREATER THAN ONE".

Just keep zero and one in mind, and your life will be easy, whatever outcomes we obtain from the total number of universal set is probability.

So suppose, I have two coins, and coins have HEADS AND TAILS ,so

Total number of the Event E = {2}, as heads and tails

Sample count of  Heads in a 'FAIR' coin H = {1}

Sample count of  Tails in a 'FAIR' coin T = {1}

Probability of obtaining HEAD while a 'FAIR' coin is flipped P{H | E} = 1/2 = 50%

I guess this is sufficient.

Ahh, now the original matter. While I have been applying for new positions for my job search, which I guess is considered very normal for an IT guy of India, in order to increase my package, I started thinking on this that people 'ADVISE', which is another 'INDIAN' trait, me to keep on applying and then you will get through. So keep on applying here means that I must keep on posting my portfolio or resume to various companies, and then, I will get short-listed by them, and then they will follow an algorithmic procedure to hire me.

Wait, you will tell me that what's so wrong with it, that it made me to write a blog, that too, using a topic like probability. I will say, why not apply probability to give a proof that applying profiles to hoards of companies to seek out employment actually reduces our chances of getting an employment.

Yes, you have read it RIGHT, the more we will apply to companies, the more it will reduce our employability chance.

How?

Now, consider a case, I apply to one company, so my chances  of getting entry into that company or organization will be 1, as there is only one sample event and one event which will occur, so it is 100%, similarly, chances of not getting into that organization will be zero, which I guess is fair.

I apply to two companies, so chances of getting call of an interview is (1/2), chances of not getting an interview call (1/2) as in probability, the sum of the outcomes is always 1.

This gives rise to interesting cases now. I have got a call of interview, I will do research about that firm, could be possible that I like it and I decide to attend the interivew.

So chances of all those three outcomes would be (1/3) * (1/3) * (1/3), and this is out of the 50% of the chances, so overall probability (1/2) * (1/27) = (1/54).

Probability of not happening this would be 1- 1/54 = 53/54 almost equal to 1.

                                                                     53/54 > 1/54.


We can clearly see that the chances of getting selected in an organization decreases as we apply to more firms. If the situation is getting out of control by applying to two firms, then imagine what would be the result if we apply for jobs to more than 10 firms.

But Indians keep on applying for jobs in the portals thinking that more the application, more the chances of getting selected.

This was just an attempt on my side of trying to prove a hypothesis which I had thought off, and could be possible that I may be wrong.

Happy Reading!