Showing posts with label Inheritence. Show all posts
Showing posts with label Inheritence. Show all posts

Saturday, 18 April 2015

Born Group

Questions:

Round I:
There were very long uncomfortable pauses between each question.
  1. What all modules in hybris have you worked upon?
  2. How to use the REST webservices of hybris?
  3. How to use the SOAP webservices of hybris?
  4. How to create a SOAP client?
  5. How to do a server side validation using Spring?
  6. What all classes are in Collections framework?
  7. Difference between ArrayList and LinkedList?
  8. How to define a cronjob in Hybris?
  9. How to customize solr?
  10. How does data from solr comes to Product listing page?
  11. What is association?
  12. How to implement association in hybris?
  13. Which element implement association in hybris in items.xml?
  14. Implementing cardinality in hybris?

    Lots of questions about web-services, spring MVC and their implementation in Hybris.
Round II:
    1. What is deployment table in hybris? How is it stored internally?
    2. Entire story about WCMS?
    3. Simple database table to store details of a family and their relations.
    4. How to override a service or any bean in java? What are the best practices?
    Round III:
    HR round
       This is where it gets interesting. The HR's have a mood swing. One moment they are the nicest, coolest most co-operating saints in corporate industry. Next moment they turn angry, fussy, exceptionally dumb, bullies. And then they turn back to their efforts for canonization. Just bear with their antics and any revolutionary idea that they come up with. Having said that these guys like to believe that they are an elite club of hybris nerds. And this means that they won't mind dolling out large lumps of CTC to pump their egos. Good for them, good for us.
    My advice is that negotiate hard, they are willing to walk the extra mile.  

    Monday, 17 November 2014

    Hong Kong and Singapore Based Firm

    Telephonic for a Singapore based firm with clients in Hong Kong.

    Spring:

    1. What is AOP?
    2. What is DI?
    3. What is IOC?
    4. How many types of IOC?
    5. How to inject bean using constructor?
    6. How to inject bean using setter?
    7. How many types of beans?
    8. Life cycle of beans?
    9. Example of singleton bean?
    10. Is it thread safe?
    11. When does singleton get instantiated?
    12. When does prototype get instantiated?
    Java:
    1. What is dynamic polymorphism?
    2. What is interface?
    3. Why use interface when we have abstract class?
    4. How to restrict a method from being overridden?
    5. Can private methods be overridden? 
    6. Can static methods be overridden?
    7. Can non-static content be referenced from a static method?
    8. What if system.exit() is called in a try block?
    9. StringBuilder vs StringBuffer?
    10. What is volatile keyword?

    Saturday, 15 November 2014

    Ebix Solutions

    Ebix Solutions:

    Venue : Located in the last corner of earth also know as Noida Phase 2.
    Date: 14 November 2014 (Happy Children day.......beat that shit)

    4 rounds in total.

    Now before i start, some basic info about the company.
    It is located in Noida Phase 2. This must explain the whole story to anybody in Delhi NCR. But if you don't get the gist, allow me. Ebix was no different. Just by the look of it you get a gut feel that something is very wrong. Its redder than a commie flag. The LED lights in pillars and walls and floor and in your face alternate between blue and red. The walls are chrome plated. Even the stairs have false lighting and you can bask in the glory of walking over DJ set while thinking of proper typecasting for your objects. It took me longer than expected but the Software Firm is literally established in a discotheque. However, if you are still reading then just for your acknowledgement, i haven't even started with the good part.

    Reminds me of Ebix!!!

    Round 1:
    The very first round is an HR round. Surprise. Welcome to the Wonderful world of Noida Phase 2 firms. The HR discusses your salary, likes, dislikes, expectations, consummations and most important why you are planning to move over to Ebix (It appeared so innocent back then). Then she asks about your family and more about family and hometown of family and current lodging of family, until you start feeling uncomfortable. To my relief she was married, but you never know. And with the foreplay to set the mood right, she drops the bomb. WE CAN'T PAY. Plain and simple, that's what we do as a firm. We hire people to develop software, we organize walk-ins, discuss everything inside out and then we just don't pay. Can it be more obvious. Now a bewildered me mumbled something of the likes, "Then?!". Here's the explanation that can put Einstein to shame:
    "See. We will pay what your are getting in your current firm. Only we will not provide you with any insurance (medical or otherwise), bonus, allowance or other perks. So, we will simply convert your current salary to your in-hand salary. Cool isn't it .And while your current firm provides you stupid cab facility like picking you from home and dropping you to office, we keep our buses at major metro stations that will ferry you to this awesome desolate location. Of course you can teleport to the metro stations from your home."

    Then i have to wait for about 2 hours before anything happened. You can do wonderful activities in this time like, twist on the sofa, overhear the girly discussion on why Gauhar's sister is a weak contestant in Big Boss and how Bihar is going to be the next IT hub. Still, this was the most fruitful part of the entire interview process. The hot chocolates of the day (read guys who were sent back after interview rounds) ensured that their enlightenment provides them with enough chances to flirt with the girls who were more than eager to trade any inhibitions for that sort of knowledge. Some insight in their gyan:

    1. They will hire only if you know what's the difference between Spring 2.5 and Spring 3.0. Coz, that's what clients ask, isn't it. Why would they develop a checkout mechanism or product detail page. All they wanna know is the DIFFERENCE between Spring versions.
    2. You have to know Spring, Struts and Hibernate.
    3. They have a project that will end on specific deadline so ARE YOU prepared to go for it?
    Then he bragged about his duels with his managers while flashing a cell phone with a screen the size of your television. In my view he was the only winner of the day and with that sort of attention he is getting laid sooner than his next technical round.

    Round 2:
    An interviewer who is tired beyond grief, finally calls me in for the first technical round. Asks a lot about resume, current project, etc. Dialogues from first round help a lot to clear this one. Then he jolts down some technologies on which he has not worked yet and gets really curious over them. Who was interviewing whom, again!!!. 4 hours after arriving and shitload of discussion later i am finally confronted with the first Java question:

    1. A simple scenario where a job inside a method can be hit by two or more processes. Just to make it cheesy he said that the job has serialization implemented on it. Actually, it was a classic case of a situation where threading must have been implemented. Theses processes should have Thread or Runnable implemented and the job must be inside a synchronized block. As, this was not the case in current code, we have to do it manually. So, use a semaphore/mutex and do the entire code for threading yourself.
    2. A is the parent of B and both of them have a method foo().
      public class Parent {
      public void foo()
      {
      System.out.println("Parent");
      }

      }

      public class Child extends Parent {

      public void foo()
      {
      System.out.println("Child");
      }

      }

      public static void main(String[] args) {
      Parent p = new Child();
      p.foo();

      }

      Now, a reference of Parent is assigned to an object of Child. What will get printed on calling foo().
      Ans. Child

      Then, he removes the foo() method from Parent class.

      public class Parent {

      }

      Now, what will be printed?
      Ans. Nothing. It will  not even compile and give an exception regarding unidentified method.
    After, round 2 i was made to sit outside again. Only this time an HR cum peon got really excited and kept saying after every 5 minutes that i will have the next round after 10 minutes. Needless to say i have to wait for full 1 hour again before the next guy bothered.

    Round 3:

    An even tiresome interviewer finally takes me to a glass chamber and asks the core question on which this company was established. Yes, you guessed it right. Family, that's what hey wanna know. By now, Ebix guys knew more about my family than i do. After getting his fix, he moved to Java. And then he asked me the exact same inheritance question that i was asked in the previous round. On protest, he started blushing. Don't you dare ask me why? It's perfectly natural and Noida Phase 2 rocks. The next 5 minutes were spent discussing who took my previous interview and his relation with that guy. However, this gave me a very very interesting idea.

    **Did you realize that of all the stuff that happened this guy never. Never ever, bothered to get an answer. Now how cool is that!!! This can be used as a trick in future interviews. So, instead of whining and shitting your pants on that nightmarish question you just have to say that it was asked in the previous round. Even if the interviewer calls your bluff you just have to answer the question, which you have to answer any way. BINGO!!!

    Finally, he comes to the point and openly confessed that they are simply looking for anyone who know Hibernate and Struts as well. I didn't. Still i was instructed to wait for the 4th round.

    Round 4 (Final Round):
    Enter the big boys. By look and accent you can tell that they were the actual players. As for the questions you must have an idea by now. "Yes sir, i live with my family in .....". And on it goes. More about myself and then they repeat the first round all over. The first guy finally satisfied after quenching his thirst for the details of my family, invites the other big boy for his fair share of dope. You could have actually skipped the whole article, (but its too late, isn't it), to read this part which explains what the actual deal is. Dude number 2:

    1. You comfortable working late hours?
    2. How will you get to this location. Do you own a vehicle?
    3. We work on weekends more that often. Cool?
    4. What exactly do you do? Question of the day.
    5. How long will it take you to learn Spring and Hibernate?
    6. Why do you wanna switch?
    7. What do you know about XSLT?
    8. What do you know about DOM and SAX?
    9. More and more technical acronyms were bombarded, before he declared that they won't pay a dime above my current salary.
    Did you notice that all these questions don't have an answer. Its because i dint give any, nor did he expect any. Any effort on the contrary was immediately stalled by asking the next question. Then it got over and i thanked GOD more than once.
    Free from any further torment, i ate the omlette at the dhaba cum canteen (which was exceptionally clean with the only catch of being right next to a fuming generator), had a real good look at this wonderful creation of Almighty called Noida Phase 2 and decided to leave. What had started in the middle of the day ended late at night. But i am really glad that it got over. As usual i got ripped by the autowallah into paying 100 bucks for reaching sector 37. 
    All in all, Ebix is a software company and they are hiring and GOD is great.

    Tuesday, 6 August 2013

    Sirion Labs Interview

    Sirion Labs
    Interview:
    Venue: Palm something, Gurgaon. Within 15 minutes ride from Sikandarpur metro station. Auto wala will charge around 50 bucks to land you straight up there.
    Date : 3 August 2013
                        
    Round I:
    First round is Java basics. Well, not that basic. The questions keep getting twisty as you move through the paper. Some of them are plain silly. And yes, there are a couple of questions relating to data structures as well.
    In total there are 16 questions.
    No marking at all. They will simply discuss the solution to the answers. So be cautious about any guess that you make. In the interview they will discuss any question that you marked as wrong or any such question that turned out to be right in your case, but the majority got it wrong.
    Questions of first round (in no particular order):

    1.             class A
    {
        public static void  X()
      {
              Y();
      }
      public static void Y()
      {
            System.out.println("parent");
      }
    }

    public class B extends A
    {
            public void Y()
            {
                    System.out.println("Child");
            }
    }
    What will the following code snippet print?
    B.X() ?
    Ans.
    Explanation: From the first look it appears that either Parent or Child will be printed. But, there’s a catch. All the methods are static and static methods cannot be overridden as they are properties of class.

    2.    try
    {
       int a = 5;
       System.out.println("Try");
    }
    catch(Exception e)
    {
        System.out.println("Exception is ="+a);
    }
    What will be printed on running the above code snippet?
    Options:
    A)     Try
    B)      Exception
    C)      Run time error
    D)      Compile time error
    Ans. D) Compile time error
    Explanation: You may spend a lifetime trying to figure out what’s wrong with the above code and still write A with an uneasy feeling that something is definitely amiss, maybe I am just overlooking it. Your gut feeling is correct. Something is amiss. But it’s just silly. Did you notice that the variable ‘a’ is being called in exception block while its scope ends in ‘try’? See, it’s silly. The code will simply give a compile time error.

    3.   A very long question. First it lists the definition of in order, pre order and post order traversal. It refers to post order as reverse order. Whoever came up with that? Then it innocently gives the pre order traversal of a tree. ABCDE. As expected, the question asks to come up with the corresponding in order and post order traversal.
    Options:
    A)     CBDAE, CDBAE
    B)     Insufficient data, CDBAE
    C)     Insufficient data, CABDE
    D)     Insufficient data, insufficient data
    Ans.
    Explanation: This question can have two possible answers.
    In option A if we consider the in order traversal ‘CBDAE’ as part of the question then CDBAE is indeed the correct post order traversal. Hence, A is correct.
    Both, B and C are incorrect because we cannot find the post order traversal without knowing both the in order and pre order traversal.
    D can also be correct as only pre order traversal cannot give us both the post order and in order traversal.

    4.         String a = null;
        String b = "xyz";
        String c = a+b;
        System.out.println("c");
       
    What will be the output on running the above code snippet?
    Options:
    A)     xyz
    B)     nullxyz
    C)     Complie time error
    D)     Run time error

    5.   public int method(int n)
        {
            int result = 0;
            n <<= 1;
            while (n > 0) {
                result += (n / 2) % 2;
            }
            return result;
        }
    The method is called as method(13977) or some very large odd number. What will the method return in the variable result?
    Ans.
    Explanation: N<<=1 simply multiplies N with 2. It is equivalent of n*=2.

    6.   The entire code for reversing a link list. They just removed the initialization part and the part inside the loop. You have to write that part.

    7.  int result =0;
       for (int i =0; i< 10; i++)
       {
           for (int j=0; j<10; j++)
           {
                  result+=i+j;
           }
         }
         What will be the value of result?
    Ans.
    Explanation: The catch in this question is that i+j will be calculated after result+=i is calculated so result will eventually be ∑(10*i) i.e. (10*0+10*1+10*2…….+10*9).

          There were 9 other questions. Most of them, related to inheritance.

    Round II
    All the questions were related to algorithms. You can choose any language you wish.

    1.   There is a 2-D matrix of 0’s and 1’s.  Given a 2D array of 1's and 0's, find the size of the largest block of 0's. For example the following 2D array:
    int[][] array = {
                         {1, 0, 1, 0, 0, 0, 1, 0 },
                         {1, 0, 0, 0, 0, 0, 1, 1 },
                         {1, 1, 1, 0, 0, 0, 1, 1 }
                         };
    Will return "9", because there is a 3x3 square of 0's, and that is the biggest block of 0's in the 2D space.

    2.   Find the largest distance between two nodes in a binary tree.
    The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two leaves in the tree. The diagram below shows two trees each with diameter nine, the leaves that form the ends of a longest path are shaded (note that there is more than one path in each tree of length nine, but no path longer than nine nodes).
    The diameter of a tree T is the largest of the following quantities:
    * the diameter of T’s left sub tree
    * the diameter of T’s right sub tree
    * the longest path between leaves that goes through the root of T (this can be computed from the heights of the sub trees of T)

    Interview:
    1.   Implicit objects in JSP?
    2.   What happens if destroy() is called on a servlet object?