Skip to content

Instantly share code, notes, and snippets.

@venkatch789
Last active May 31, 2016 23:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save venkatch789/0af4324d0ec7b6a0fa01 to your computer and use it in GitHub Desktop.
Save venkatch789/0af4324d0ec7b6a0fa01 to your computer and use it in GitHub Desktop.
Interviews

@Pramati - HYD (16/07/2015)

  1. What is your role and responsibilities in your current project?
  2. Find common elements from two arrays? Without using any Ruby operator and tell me how would you write a program?
  3. How to find an element from an array? How it internally works?
  4. How to sort ruby objects based on particular object? For ex: [@user1, @user2, @user3, @user4] - Then sort it by user's salary.
  5. Explain MVC?
  6. What is the use of moving controller code to model?
  7. Tell me the internal flow of execution when I call some method? For ex: @object.some_method
  8. How would you add methods to the class at runtime?
  9. What are proc and lambda?
  10. What is metaprogramming?
  11. What is the difference between primary key and unique key?
  12. How do you investigate if a SQL query is running slow?
  13. What are different JQuery selectors?
  14. What is ORM?
  15. What are dynamic finders in Rails?
  16. What is STI?

@Pramati - HYD (20/07/2015)

  1. What these two statements return?

1 == 1.0 ? and 1.eql?(1.0)

  1. Sort the keys in the hash based on the length of their values as String

{"abc"=>"hello", "another_key"=>123, "4567"=>"third"}

  1. What would be the output of following code?

    class Y
      def a
        self.x
      end
    
     private
       def x
         puts "hi"
       end
    end
    
    Y.new.a
    

4. What would be the output of the following code?

def my_method puts "before proc" my_proc = Proc.new do puts "inside proc" return end my_proc.call puts "after proc" end

my_method


5. What is the difference between includes and extends modules?

6. Why we use modules and what is the advantage?

7. What is the concept of eager loading?

8. How do you define the schema of following entities?
 College
 Student
 Course

9. Write a SQL query that finds all students who are not enrolled in any course? (Use above schema)

10. What is database indexing and advantages?

11. Can I create index on string type column (For ex: gender)? Does it make sense?

12. What is the difference between `e.preventDefault` and `e.stopPropagation` ?

13. What is the challenging work you are doing in current project?

14. Tell me about your current project? (First question)

15. Does javascript events work correctly if DOM is appended through AJAX? How you make it work?

16. What Rails component we use for routing?

17. How do you deploy the applications? What stack you are using in current project?

18. What are the main concepts you know in AngularJS? (I mentioned AngularJS in resume)

19. What is the difference between before each and before all in RSpec?

20. What is INNER JOIN, LEFT JOIN and RIGHT JOIN?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment