Skip to content

Instantly share code, notes, and snippets.

@budu
Created February 14, 2015 01:20
Show Gist options
  • Save budu/06ba5ff76f4d1d825185 to your computer and use it in GitHub Desktop.
Save budu/06ba5ff76f4d1d825185 to your computer and use it in GitHub Desktop.

Interview Outline

Introduction

Code Genome

C, Java, .NET, Clojure

Setup

rails new

rvm & rbenv

Ruby

Basics

dynamic

global variables: $foo

instance/class variables syntax: @foo/@@foo

symbols

blocks: [1,2,3].each { |n| puts n }

open classes OO (easy monkey patching)

mixins

functional: lambda { |foo| foo }

rich collection support with enumerable: all?, any?, collect/map, count, detect/find, inject/reduce, max, min, select and more

args: default, hash, splat

1.8

old school but still used

1.9

big change

new syntax for chars (?a), json hashes {a: 1}

better lexical scoping, block variable must be local

enumerators: [1,2,3].each

new lambda syntax: -> foo { foo }

tap

2.0

keyword args: def foo(bar: 'baz')

refinements like scoped patching (debate, file scoped, scaled back due to perf.)

prepend: more flexible mixins

lazy: [1,2,3].lazy.cycle.map {|x| x * 10}.take(5).to_a

2.1

refinements module scoped

rational literal 0.1r

required keyword args: def foo(bar:)

faster & better GC (partial gen.)

2.2

shiny

performance

keyword args speedup

GC on symbols

unicode 7

Rails

  • conventions
  • MVC
  • migrations
  • AR

3.0

mature and modular

4.0

  • strong params
  • turbolinks
  • russian-doll caching

4.1

  • spring

  • variant

    respond_to do |format| format.js { render "trash" } format.html.phone { redirect_to progress_path } format.html.none { render "trash" } end

4.2

  • active job
  • async mail
  • adequate record (faster db queries)
  • web console

5.0

Editor & IDE

editor: Emacs, vi, Sublime

IDE: RubyMine (JetBrains), RadRails (Eclipse)

Deployment

Capistrano

Outro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment