!SLIDE
#job_interview
!SLIDE
You get asked dumb questions, and are asked to perform stupid programmer tricks.
!SLIDE
#FizzBuzz
@@@ ruby 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
@@@
!SLIDE
#FizzBuzz
@@@ ruby
require 'job_interview'
ans = JobInterview::Answer.new
ans.fizz_buzz(5)
=> [1, 2, "Fizz", 4, "Buzz"]
@@@
!SLIDE
#Fibonacci
(iterative and recursive implementations!)
!SLIDE
#Fibonacci
@@@ ruby
ans.fib(10)
=> [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
@@@
!SLIDE
#Fibonacci Defaults to recursive. But we can also iterate!
@@@ ruby
ans.fib(10, :iterative)
=> [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
@@@
!SLIDE #Quine
@@@ ruby
ans.quine(__FILE__)
=> "ans.quine(__FILE__)"
@@@
!SLIDE #Primes You want the first n primes? You get the first n primes!
@@@ ruby
ans.primes(10)
=> [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
@@@
!SLIDE
#Benefits
!SLIDE
#Benefits
!SLIDE #Benefits
Demonstrate to prospective employers you use libraries to address solved problems, rather than re-inventing the wheel.
!SLIDE
!SLIDE
How awful would it be to actually have to confront your greatest weakness.
!SLIDE
!SLIDE
With the job_interview gem, you don't even have to bother thinking of BS.
include JobInterview::Questions
!SLIDE
!SLIDE
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."
!SLIDE
!SLIDE
=> "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." !SLIDE
!SLIDE
=> "Because Reuleaux Triangles are hard to manufacture."
=> "Because men are round."
=> "So they don't fall in."
!SLIDE
!SLIDE
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."
!SLIDE
!SLIDE
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."
!SLIDE
!SLIDE
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."
!SLIDE
!SLIDE
We have excellent test coverage with RSpec, so we think it will.
@@@ ruby
def is_correct_answer(type, answer)
if answer.respond_to? :wrong
return false
else
return true
end
end
@@@
...
@@@ ruby
is_correct_answer.should be_true
@@@
!SLIDE
!SLIDE
- 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.
!SLIDE
#Don't waste your time.
gem install job_interview
(Already downloaded > 160 times!)
!SLIDE
#Thanks for allowing us to waste your time.
!SLIDE
http://rubygems.org/gems/job_interview
https://github.com/ruby-jokes/job_interview