Total Pageviews

Thursday, 19 December 2013

happiness equation !!!!

Who knew that happiness can have a equation, I was glancing through one of the lectures by   Swami   Sarvapriyananda, he introduced to something called as a happiness equation , something proposed by Martin Seligman, the father of positive psychology.   The version he shared and which is in perfect agreement with the  Purusartha’s of   Vedanta is something like this

H = P + E + M

  • P is for pleasure.   Good food, movies .  they are short-lived.
  • E comes from engagement, our profession, creativity , research
  • M is for meaningful, for others.  First beyond you and then beyond your family.

Happiness from E and M should make up for the most. u dine at a good restaurant , u spend 1 hour teaching a poor student.  after some months , years the later activity will give you much more happiness. 

Very profound!!!

More can be watched  @

Monday, 11 November 2013

Statistica , very few points

Don’t think I am qualified, but got a chance to interact with a professional from Statistica and thought of sharing few things about the tool

·         It has amazing integration with ms suites , may be something in the cards
·         Import is easy and wizard driven , supports multitude of data files ,allows connection with a file as well as database
·         It also allows to work on data from multiple sources
·         It has good statistical capabilities
·         Did not get a chance to look at all functionality
·         Correlation and Regression looked good with linear, multiple, factor regression
·         Help files are good and comes with quite a few sample datasets
·         To me a winner is , it’s vba coding interface , which will make life simpler
·         You do not necessarily , need to bring all data locally and process , there is a technique available for the same as well

I know , this is tip of the ice berg , but just thought of sharing what ever I gathered, will keep you posted.

Wednesday, 9 October 2013

Classification using neural net in r

This is mostly for my students and myself for future reference.

Classification is a supervised task , where we need preclassified data and then on new data , I can predict.
Generally we holdout a % from the data available for testing and we call them training and testing data respectively.  So it's like this , if we know which emails are spam , then only using classification we can predict the emails as spam.

I used the dataset .  The data set has 7 real valued attributes and 1 for predicting . has influenced many of the writing , probably I am making it more obvious.

The library to be used is library(nnet) , below are the list of commands for your reference

1.       Read from dataset


2.       Setting training set index ,  210 is the dataset size, 147 is 70 % of that

   seedstrain<- sample(1:210,147)

3.       Setting test set index

   seedstest <- setdiff(1:210,seedstrain)
4.       Normalize the value to be predicted , use that attribute of the dataset , that you want to predict

   ideal <- class.ind(seeds$Class)

5.       Train the model, -8 because you want to leave out the class attribute , the dataset had a total of 8 attributes with the last one as the predicted one

   seedsANN = nnet(seeds[seedstrain,-8], ideal[seedstrain,], size=10, softmax=TRUE)

6.       Predict on training set

   predict(seedsANN, seeds[seedstrain,-8], type="class")

7.       Calculate Classification accuracy

   table(predict(seedsANN, seeds[seedstest,-8], type="class"),seeds[seedstest,]$Class)

Happy Coding !

Wednesday, 4 September 2013

DBMS : few questions for freshers

Hello , once you are ready with the 'HR' type of questions , (you can take a look at some of the questions and answers at HR questions)  it is obviously important for getting ready for the technical and one of the subjects ,  and DBMS is one of the leading ones from both the parties. So I pen down few DBMS questions, this are all indicative ones , just to give you an idea on the depth and breadth. Normalization, Transactions , SQL and Indexing ,  I have seen to be all time favorites.

Feel free to give your comments , post answers , more questions , any other feedback.

Imagining you guyz are reading this because of your impending campus , read smartly , fine balancing with enjoying life , work on a plan and you will be partying in time :)


  1.    What is OLAP and OLTP?
  2.    What are the advantages of DBMS over file system? ( Do not forget key ones like transaction , normalization,  indexing , locking , logging etc. )
  3.     Why RDBMS called RDBMS ? Stress on the relational part.
  4.     Draw an ER Diagram for the project you did ? 
  5.    .What is the degree of a relationship? Does relationships always needs a table ?
  6.      How do you achieve generalization and specialization in an ER?


  1.      Why do we normalize?
  2.      What are the different anomalies?
  3.      Why do we denormalize ?
  4.      Give an example of a table , which is not in 3 NF , explain diffrent anomalies in that context ,  tell how you will make it normalized


  1. What is a transaction?
  2. What is ACID property? Explain each one with example.
  3. How the durability property is implemented ?
  4. How do you implement a transaction from a programming language like C# or java?
  5.  Can a transaction be partially committed ?
  6. What is locking , what is two phase locking ?
  7. What is seralizability ? 


  1. What are different type of constraints ?
  2. What is primary key , foreign key , candidate key ?
  3. What is unique , Check constrains 
  4. Difference between a primary key and unique constraint ?
  5. Is it possible to create a table with out a primary key ?


  1.  Why do we use index?
  2. What are the overheads of index?
  3. What is the difference between clustered index and a non-clustered index ?
  4.  What is the difference between B Tree and B+ Tree
  5.  Another way of asking the same question , what are the diffrent data structures that are used 

  1.  What is difference between a function and stored procedure ?
  2.  What is cursor ?  What are the different types of cursor in oracle ?
  3. What are the different indices that oracle support?’ ( Special focus on bitmap indices)
  4. What is the difference on where and having clause ? 
  5. Questions on NULL
  6. What is the difference between char data type and varchar data type?
  7. What is a view?  What is materialised view?  Why they are used?What are different types of joins , what is difference between a Cartesian product and a full outer join ( Practise this with few examples )
  8. What is the function of UNION ?  Is it different from UNION ALL? 
  9.  What is DDL and DML,  how truncate is different from Delete
  10. Where will you use trigger , what are the different types of trigger ?
  11. Why do we create packages ?
  12. How do we handle exceptions?
  13. What is the role of dual ?
  14. If two tables have PK - FK relationship and you want when the PK gets deleted , the FK entries also gets deleted , how do you do that ?
  15. Why and how do you create sequences?
  16. How can you delete dupicate data from a table ?

Sunday, 18 August 2013

Preparing for Campus ...

The most important thing in a campus interview is to be yourself.  It is easier said than done as in all probability it is your first job interview and you are in cloths, which you generally do not wear, additionally there is a tie hanging awkwardly.  To top it, the procedure has started from morning, so it is quite exhausting mentally and physically.  So best thing is be prepared ,  I will give you simple dos and don’ts from the experience that I have during my years in Cognizant and various student interactions in Calcutta University and Institute of Engineering and Management ( The views are completely personal)

Ø    Read each and every word of your resume , don’t keep anything if you are not comfortable
Ø    Introduce yourself is a sure question , don’t fumble on this , set it up here , tell about your subject interest , hobbies ,  if you are a student partner , a class representative , some uncanny hobbies, part of your college computer society .  If you have done something academically very good don’t forget to mention that.
Ø    Strength and weakness is optional and if you say something, please be prepared to back it up. So if you say you have analytic mind or you are hard working, you should be able to give few examples
Ø    You need not be too forthcoming on your weaknesses, and please do not mention like I am too emotional or I am loose tempered.
Ø    Have a professional looking email id ,  not something like itwasnoteasy  , walkthetalk , or futufutejyosthna . Don’t laugh , I have faced it
Ø    I will say write it down and practice, record and listen to if required.
Ø    Don’t over commit on your subjects , two theoretical subjects , one/two programming language , one database should be sufficient
Ø    Prepare well on your final year / Internship project ,  architecture , business sense / unique proposition should come out very clearly
Ø    People have told their hobby is reading, when I have asked what book they last read, they are drawing a blank.
Ø    Be prepared for questions like, “Why do you want to join TCS”, “Why should we hire you”.  I would have been honest with these questions like “I have heard very positive things from my seniors, and Tata name has a huge brand value. The training programs are excellent ……..”. Not something like this is my dream company and I have always thought of joining this company and all that.
Ø    If you have a year lag or considerable % drop please prepare for the same question.
Ø    On technical part , please understand people who are coming will be 10 + years experience and mostly they might not ask you definitions ,  I will ask you to focus from interview perspective , not an examination purpose ,  know the examples , understand the concepts , discuss with friends to gain confidence.

Ø   Pseudo code will suffice most of the cases , so do not spend lot of time on syntax

For few technical questions on DBMS , you may visit DBMS Questions

Wish you All the very best. 

Follow by Email