Skip to content

Instantly share code, notes, and snippets.

@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
require 'sinatra' # gem install sinatra --no-rdoc --no-ri
set :port, 3000
set :environment, :production
html = <<-EOT
<html><head><style>
#text{width:100%; font-size: 15px; padding: 5px; display: block;}
</style></head><body>
<input id="text" placeholder="Write then press Enter."/>
<div id="chat"></div>