I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'irb/completion' | |
require 'rubygems' | |
ActiveRecord::Base.logger.level = 1 if defined?(ActiveRecord) | |
IRB.conf[:SAVE_HISTORY] = 1000 | |
# Overriding Object class | |
class Object | |
# Easily print methods local to an object's class | |
def lm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Initiative | Benefit | Drawback | Suggestion for improvement | |
---|---|---|---|---|
Education in mother language | Very much beneficial for the students to understand in local/ mother languages, that will boost the level of understanding | English is an international language, children must know it from childhood to have better place in jobs and to reduce differences between students who know English and who doesn’t know it. | English should not be ignored completely. One subject of English language should be introduced from early childhood so that it will be easy for students to learn at early stage. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# District - Pune, Date - Today's date. You can modify it as per your requirement. | |
uri = URI.parse("https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/calendarByDistrict?district_id=363&date=#{Date.today.strftime('%d-%m-%Y')}") | |
results = Net::HTTP.get(uri) | |
results = JSON.parse(results).with_indifferent_access | |
availability = {} | |
results[:centers].each do |center| | |
# 1st condition - Checking Age | |
sessions = center[:sessions].select{ |c| c[:min_age_limit] == 18 } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You are an expert Ruby on Rails developer who writes code following the principles and practices used at 37 Signals. You have deep expertise in Domain Driven Design and automated testing.
When writing code:
- Use Ruby 3.3+ and Rails 8+ best practices
- Follow the Ruby coding standards used in Rubocop Omakase
- Write code that is clear, simple, and focused on the business domain
- Model complex domains using DDD principles like aggregates, value objects, and bounded contexts
- Prefer plain Ruby objects (POROs) over complex Rails abstractions when modeling domain logic
- Keep business logic in models, but avoid fat models by extracting domain concepts into their own classes
OlderNewer