BACKEND SIDE :: TECHNOLOGY :: Ruby on Rails
Provide the list or PR or other contributions that proves understanding of each subject or ask for tech interview, where we will go step by step throught the following list.
Based of the result, you will reach one of the following assesment levels:
Level | Required points | Testing | Components | Introduction |
---|---|---|---|---|
Independent | ? | ? | ? | max |
Mid | ? | ? | ? | ? |
Senior | ? | max | max | max |
Max points: ?
Once you fill the doc, you can check your score in the browser console via the following snippet:
document.querySelectorAll("li input[checked]").length
Testing exam (run in console):
let n = 20;
let evaluationQuestions = ([]).slice.call(document.querySelectorAll("li input[checked]"))
.map(x => ({ x, r: Math.random() }))
.sort((a, b) => a.r - b.r)
.map(a => a.x)
.slice(0, n)
.map(
(liElement) =>
liElement.closest('li')
.innerHTML
.replace('<input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> ', '')
);
console.log(evaluationQuestions.join("\n\n"));
Curated list of learning resources can be found here
Working with GIT using CLI
- 📗 can checkout new branch
- can switch between branches
- can switch between branches
- can display and understand git log
- can add changes (progressively, all at once, selected files)
- can split changesets when adding changes progressively
- can edit changesets when adding changes progressively
- can stash and unstash changes
- can commit changes
- can commit changes to last commit without amending message
- can push changes to remote branch
- can force-push changes to remote branch
- can delete local and remote branches
- can merge branches using rebasing
- can resolve conflicts using any merge-tool or manually
- can rebase interactively (squash, fixup, reorder, rename, delete commits)
- can cherry-pick a commit from different branch
- can arrange a history of multiple "junk" commits mixed with "legit" commits into a commits list aggregating logical sets of changes (using any technique)
Resources
CSS & HTML Basics
- TODO
core and std-lib
RubyCan explain and effectively use following language features
Array
/Enumerable
-
<<
,push
,pop
-
|
,&
,+
-
at
,[]
,values_at
-
any?
,all?
,one?
,none?
-
map
,map!
,collect
,collect!
-
count
,size
,length
-
cycle
-
delete
,delete_at
,delete_if
-
drop
,drop_while
-
each
,each_index
-
each_cons
-
each_with_object
,inject
,reduce
-
empty?
-
index
,find_index
,rindex
-
first
,second
,last
-
find
,detect
-
find_all
,select
-
flatten
,flatten!
-
flat_map
-
group_by
-
include?
-
insert
-
join
-
keep_if
,select
,select!
-
min
,max
,min_by
,max_by
,minmax
,minmax_by
-
partition
-
reject
,reject!
-
reverse
,reverse!
,reverse_each
-
rotate
,rotate!
-
shift
,unshift
-
shuffle
,shuffle!
-
sort
,sort!
,sort_by
-
take_while
-
transpose
-
uniq
,uniq!
-
zip
-
Numeric
,Float
-
%
,modulo
-
abs
-
ceil
,floor
-
div
-
nonzero?
-
round
-
zero?
-
positive?
,negative?
-
1/0.0
vs1/0
-
Object
-
clone
,dup
-
enum_for
-
extend
-
is_a?
,instance_of?
,kind_of?
-
instance_variable_get
,instance_variable_set
,instance_variable_defined?
-
method
-
nil?
-
send
,public_send
-
respond_to?
-
tap
-
method_missing
-
instance_eval
,instance_exec
-
String
-
<<
-
=~
-
%
-
+
,*
-
[]=
-
[]
,slice
-
capitalize
,capitalize!
-
chars
-
chop
,chomp
-
count
,size
-
delete
-
downcase
,downcase!
,upcase
,upcase!
-
each_char
,each_line
-
empty?
-
gsub
,gsub!
,sub
,gsub!
-
include?
-
index
-
ljust
,rjust
-
match
-
next
,next!
,succ
,succ!
-
replace
-
reverse
,reverse!
-
partition
-
scan
-
split
-
strip
,strip!
-
squeeze
,squeeze!
-
start_with?
,end_with?
-
- Operators
-
==
vs===
-
<=>
-
<
,>
,>=
,<=
-
- File
-
basename
-
delete
-
dirname
-
directory?
-
exists?
-
new
-
open
-
Class
,Module
-
<
-
new
,initialize
-
inherited
-
superclass
-
alias_method
-
ancestors
-
attr_reader
,attr_writer
,attr_accessor
,attr
-
class_eval
,class_exec
,module_eval
,module_exec
-
const_get
,const_set
,const_defined?
-
define_method
-
extended
,included
, -
module_function
-
private
,private_class_method
-
private_constant
-
name
-
Range
-
..
vs...
-
min
,max
-
cover?
-
each
-
Regexp
- named captures
-
=~
-
match
,match?
Hash
-
[]
,[]=
-
dig
-
each
,each_pair
,each_key
,each_value
-
fetch
-
has_key?
,key?
,has_value?
-
invert
-
key
-
keys
,values
-
merge
,merge!
,reverse_merge
,reverse_merge!
-
transform_keys
,transform_keys!
,transform_values
,transform_values!
-
Time
-
now
,utc
-
day
,month
,year
,hour
,minute
,sec
-
wday
-
monday?
..sunday?
-
zone
-
strftime
-
iso8601
-
to_s(:db)
-
- Difference between strings and symbols
- Difference between local, instance and global variables
- Difference between class (static) and instance methods
- Procs and lambdas
- Exceptions handling
- Monkey-patching
- Mixins
-
ENV
-
Enumerator
-
Enumerator::Lazy
-
-
NotImplementedError
-
OpenStruct
-
&.
- Shorthand blocks syntax (
&:
) -
SecureRandom
Rails
ActiveSupport
- Core extensions
Array
-
deep_dup
-
extract_options
-
in_groups
,in_groups_of
-
to_param
,to_query
-
to_sentence
-
without
-
wrap
-
Class
-
class_attribute
-
descendants
-
subclasses
-
Date
,DateAndTime
-
beginning_of_day
,end_of_day
-
current
,tomorrow
,yesterday
-
days_ago
,months_ago
,years_ago
-
future?
,past?
,today?
-
on_weekday?
,on_weekend?
-
in_time_zone
-
Enumerable
-
exclude
-
index_by
-
many?
-
pluck
-
sum
-
without
-
Hash
-
assert_valid_keys
-
compact
,compact!
-
deep_dup
-
deep_merge
,deep_merge!
, -
deep_stringify_keys
,deep_stringify_keys!
,deep_symbolize_keys
,deep_symbolize_keys!
-
deep_transform_keys
,deep_transform_keys!
-
except
,except!
,extract!
-
slice
,slice!
-
with_defaults
,with_defaults!
-
Kernel
-
silence_warnings
-
Module
-
alias_attribute
-
delegate
-
delegate_missing_to
-
deprecate
-
Object
-
presence
,present?
,presence_in
-
with_options
-
Range
-
overlaps?
-
String
- Difference between
try
,try!
and&.
-
ArrayInquirer
-
Benchmarkable
-
Cache
- Available store types
-
NullStore
-
Callbacks
-
Concern
-
Configurable
-
CurrentAttributes
-
Duration
-
HashWithIndifferentAccess
Inflector
-
camelize
-
classify
-
constantize
,safe_constantize
-
dasherize
-
deconstantize
-
demodulize
-
foreign_key
-
humanize
-
ordinalize
-
parameterize
-
pluralize
,singularize
-
tableize
-
titleize
-
transliterate
-
underscore
-
upcase_first
-
-
MessageEncryptor
-
MessageVerifier
-
Notifications
,Subscriber
NumberHelper
-
number_to_currency
-
number_to_delimited
-
number_to_human
-
number_to_human_size
-
number_to_percentage
-
number_to_phone
-
number_to_rounded
-
-
OrderedOptions
-
RangeWithFormat
-
Rescuable
-
StringInquirer
ActiveRecord
- Active Record pattern
- ORM
- CRUD
- Create
- Read
- Update
- Delete
- Validations
- Kinds of validations and when to use them
- Skipping validations
-
valid?
,invalid?
,errors
- Validation helpers
-
validates_with
- Validation options
- Strict validations
- Conditional validations
- Custom validators
- Custom validation methods
errors[:base]
- Displaying Validation Errors in Views
- Callbacks
- Migrations
- Creating migrations
- Creating tables
- Column modifiers
-
null
-
default
-
index
-
limit
-
precision
-
scale
-
- Column modifiers
- Changing tables
- Changing columns
-
add_column
-
add_foreign_key
-
add_index
-
add_reference
-
add_timestamps
-
change_column_default
-
change_column_null
-
create_join_table
-
create_table
-
disable_extension
-
drop_join_table
-
drop_table
-
enable_extension
-
remove_column
-
remove_foreign_key
-
remove_index
-
remove_reference
-
remove_timestamps
-
rename_column
-
rename_index
-
rename_table
-
-
connection.execute
- Using the up/down methods
- Reverting previous migrations
- CLI
- Changing existing migrations
- Differences between :sql and :ruby schema dumps
- Responsibilities of migrations, seeds and data-fixes
- Associations
- Query Interface
- Retrieving single object
- Retrieving multiple objects in batches
- Conditions
- Ordering
- Selecting specific fields
- Limit and Offset
- Group
- Having
- Overriding conditions
- Null relation
- Readonly objects
- Optimistic locking
- Pessimistic locking
- Joining tables
- Eager-loading associations
- Scopes
- Enums
- Retrieving filtered and specific data from multiple tables
- Find or build new object
-
find_by_sql
-
select_all
-
pluck
-
ids
-
exists?
- Calculations
Views and Forms
- [Rendering]
- An action or template
- Text and HTML
- JSON, XML
- Options for render
- Conditional layouts
- Runtime chosen layouts
- Avoiding double render errors
-
redirect_to
andredirect_back
with fallback - Using
head
- Layouts
- Linking to JS and CSS files
- Using
content_for
andyield
- Rendering partials
- Using partials to render resource or collection
- Spacer templates
- Using nested layouts
- ERB
- HAML
- SLIM
- Dealing with basic forms
- Dealing with resource forms
- Uploading files
- Understanding parameter naming conventions
ActionController
- Controller responsibilities
- Controller naming conventions
- Parameters
- JSON parameters
- Routing parameters
- Strong attributes
- Sessions
-
flash
andflash.now
- Cookies
- Filters
-
before_action
-
skip_before_action
-
after_action
,around_action
- Using filters with blocks
-
- Concept of Request forgery protection
- Working with
request
andresponse
objects - HTTP Basic authentication
- Streaming data
- RESTful downloads
- Live streaming
- Log filtering
-
rescue_from
- Forcing HTTPS
Routing
Patterns
- Service Object
- Form Object
- Query Object
- Wrapper
- Client
- Decorator
- Presenter
- Serializer
- Controller
- Model
- PORO
- Helper
- Validator
- Policy
- Views
- Layout
- Worker
- Queue
- Collection
- Calculation
Testing
- TODO
Other
- Difference between using
attr_accessor
,cattr_accessor
andclass_attribute
for class-level attributes - MVC
- Idempotency
- Single responsibility principle
- Open/Closed Principle
- Liskov substitution principle
- Interface segregation principle
- Dependency inversion principle
- Tell, don't ask principle (link1)
- Law of Demeter
- Duck-typing
- Inversion of control
- Dependecy injection
- Explaining Variable
- DRY
- Eventual Consistency
- Composition over inheritance
- Loose coupling / High Cohesion
- GRASP
- Microservices
Gems and Libraries
Development
- Selleo/pattern
- aasm
- datafix
- devise
- draper
- jsonapi-resources
- pagy
- pry-rails
- pundit
- ransack
- scenic
- searchkick
- sidekiq
- simple_form
- virtus
- brakeman
- dotenv-rails
- rubocop
- wisper
Testing
- Selleo/rspec-tapas
- capybara
- factory_bot_rails
- vcr
- webmock
- database_cleaner
- rspec-rails
- simplecov
- shoulda-matchers
Tooling
- Rubocop
- Heroku
- Brakeman
- CI
- IDE or Editor of choice
- Quickly finding files
Open questions
- What is your list of top things/techniques to ensure high code quality and why?
- What do you think about metaprogramming?
- What do you think about custom controller actions (outside CRUD)?
- What do you consider clean code?
- What patterns do you consider useful when writing rails apps?
- How about testing? Are there any principles you identify with regarding TDD?
- How would you ensure that specs are easy to understand by other developers?
- Does writing tests after implementation affects process & quality in positive or negative way? Please explain.
- What is your opinion about monolithic vs microservice based architecture?
- How would you ensure reliability of microservice architecture?
- How would you deal with performance issues in RoR?
- What full-text search solution are you familiar with? In what cases would you use those solutions?
- What do you miss in Rails? Where do you think RoR is not the good fit?
- What do you like about Rails the most?
- What is your preferred way in working with repository? (i.e. GitFlow)
- What do you think about project documentation?
- What are the anti-patterns when writing RoR apps in your opinion?
- How do you deal with database related performance issues (when processing tens of millions of records)?
- How would you deal with complex, legacy project that you need to work with, if it does not have full tests suite?
- What options can you see in terms of static code analysis?
- Are you familiar with concept of Test Induced Design Damage? What is your opinion on that?
- How do you often deal with long running requests (i.e. generating documents)
- If you are asked to implement an interface that should work with live (realtime) data feed, how would you approach implementing it?
- How would you handle very intense traffic (i.e. from IoT) in Rails application?
- How would you describe “maintainable code”?
- How would you ensure stability of public API in application that is under active and rapid development?
- If I was to write API only application in ruby, what would be your recommendations / hints in relation to this task?
- What kinds of caching do you feel are the most useful when developing rails applications?
- If there is an information you need deep inside your code, but it is only accessible on top level (i.e. in controller), how would you approach propagating it (think “current_user”, but it can be anything else)
- What do you think about / where do you find application for SOA
- What do you think about / where do you find application for JWT
- What do you think about / where do you find application for CQRS
- What do you think about / where do you find application for DDD
- What do you think about / where do you find application for Reporting Databases
- What do you think about / where do you find application for Pub / Sub
- What do you think about / where do you find application for Event Sourcing
- What do you think about / where do you find application for CBRA
- What do you think about / where do you find application for UUIDs
- What do you think about / where do you find application for WebSockets and
ActionCable