Use the left/right arrow keys to navigate.

job_interview

Interviewing sucks.

You get asked dumb questions, and are asked to perform stupid programmer tricks.

FizzBuzz

(Don't write it like this)

 def fizz_buzz(max)
    Array.new(max) do |i|
      j = i + 1
      val  = (j % 3 == 0 ? "Fizz" : "") +
      (j % 5 == 0 ? "Buzz" : "")
      val.empty? ?  j.to_s  : val
    end
  end

FizzBuzz

require 'job_interview'

ans = JobInterview::Answer.new
ans.fizz_buzz(5)

=> [1, 2, "Fizz", 4, "Buzz"]

Fibonacci

(iterative and recursive implementations!)

Fibonacci

ans.fib(10)

=> [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]

Fibonacci

Defaults to recursive. But we can also iterate!

ans.fib(10, :iterative)

=> [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]

Quine

ans.quine(__FILE__)

=> "ans.quine(__FILE__)"

Primes

You want the first n primes? You get the first n primes!

ans.primes(10)

=> [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]

Benefits

Saves time!

Benefits

It's easier than actually solving trivial problems yourself.

Benefits

Demonstrate to prospective employers you use libraries to address solved problems, rather than re-inventing the wheel.

Ok, they know I can code

Now what?

Personality Questions

Everyone lies when they get asked these.

How awful would it be to actually have to confront your greatest weakness.

- Fear of clowns

- Never feels loved

- Drinks too much

SOLUTION

With the job_interview gem, you don't even have to bother thinking of BS.

include JobInterview::Questions

Q. Where do you see yourself in five years?

Q. Where do you see yourself in five years?

ruby-1.9.2-p290 :005 > in_5_years

=> "I'd love to have enhanced shareholder value by creating diverse logistical intranet."

=> "I'd like to made someone else rich with my multi-layered assymetric frame."

=> "I'd love to have enhanced shareholder value by creating enhanced contextually-based ability."

Q. Why are you leaving your current position?

Q. Why are you leaving your current position?

=> "I'm not happy with the opportunities I have to expedite B2B schemas."

=> "I'm leaving because I can't mesh vertical convergence."

=> "I'm leaving because I have to innovate out-of-the-box metrics."

Q. Why are manhole covers round?

Q. Why are manhole covers round?

=> "Because Reuleaux Triangles are hard to manufacture."

=> "Because men are round."

=> "So they don't fall in."

Q. What is your greatest weakness?

Q. What is your greatest weakness?

ruby-1.9.2-p290 :027 > greatest_weakness

=> "Some times I work too much so I make too much money."

=> "I always care too much so I innovate too hard."

=> "I always fail so rarely so I shift too many paradigms."

Q. Why do you want to work here?

Q. Why do you want to work here?

ruby-1.9.2-p290 :051 > why_here

=> "Your company is re-inventing sharable mission-critical encryption."

=> "Your company has revolutionized optimized web-enabled alliance."

=> "Your company is renowned for secured multi-tasking customer loyalty."

Q. Does P = NP?

Q. Does P = NP?

ruby-1.9.2-p290 :075 > p_equals_np

=> "With our current models of computation, answering that question remains infeasible."

=> "If it does, we can kiss encryption goodbye."

=> "I doubt it, but it would make life easier for traveling salesmen."

Will it work?

Will it work?

We have excellent test coverage with RSpec, so we think it will.

def is_correct_answer(type, answer)
  if answer.respond_to? :wrong
    return false
  else
    return true
  end
end

...

is_correct_answer.should be_true

The real question

Why would you do that?

  • We wanted to hack on something trivial at BohConf
  • Silly gems are fun
  • We wanted to make a point about how inane most job interviews are.

Don't waste your time.

gem install job_interview

(Already downloaded > 160 times!)

Thanks for allowing us to waste your time.

Micah Gates

@micahjgates

Jason Lewis

@canweriotnow

http://rubygems.org/gems/job_interview
https://github.com/ruby-jokes/job_interview