how to pass a ruby code test

32
How to pass a ruby code test Robert Postill

Upload: robert-postill

Post on 20-Jun-2015

729 views

Category:

Technology


3 download

DESCRIPTION

After throwing down a few code tests I've started to have some ideas about what I want to see in a code test submission.

TRANSCRIPT

Page 1: How To Pass A Ruby Code Test

How to pass a ruby code test

Robert Postill

Page 2: How To Pass A Ruby Code Test

Huh?

Page 3: How To Pass A Ruby Code Test

Mea Culpa

Page 4: How To Pass A Ruby Code Test

No names

Page 5: How To Pass A Ruby Code Test

http://github.com/C3/code_test

Page 6: How To Pass A Ruby Code Test

Habits

Page 7: How To Pass A Ruby Code Test

Junior

Page 8: How To Pass A Ruby Code Test

No Objects?

Page 9: How To Pass A Ruby Code Test

No tests

Page 10: How To Pass A Ruby Code Test

Train Wrecks

thing.method.fiddle_result!.sort.fiddle_morethings.block {|yielded_thing|

15 lines …possibly including block}.mangle

IO.risky_operation.immediately_bugger_about_with_result

Page 11: How To Pass A Ruby Code Test

Ignore the standard library

Page 12: How To Pass A Ruby Code Test

No Gemfile

Page 13: How To Pass A Ruby Code Test

No Rakefile

Page 14: How To Pass A Ruby Code Test

No documented thinking

Page 15: How To Pass A Ruby Code Test

Show me you thought about the problem. That’s it.

Page 16: How To Pass A Ruby Code Test

Journeyman

Page 17: How To Pass A Ruby Code Test

Object Design

Page 18: How To Pass A Ruby Code Test

It only runs on Windows

Page 19: How To Pass A Ruby Code Test

Make it complex to run

bin/app –fiddly-flag –J –see-output

Page 20: How To Pass A Ruby Code Test

Use select, collect, reject and inject

Bonus fail points for all on one line

Page 21: How To Pass A Ruby Code Test

Give me an aesthetic sense

Make it easy to runDesign with objects Have some basic testsShow some environmental sensitivity

Page 22: How To Pass A Ruby Code Test

Craftsman

Page 23: How To Pass A Ruby Code Test

Don’t make a gem/redistributable package

Page 24: How To Pass A Ruby Code Test

Extend object

Page 25: How To Pass A Ruby Code Test

Do something tricky like ASCII bit-twiddling

Page 26: How To Pass A Ruby Code Test

Rely on an implementation bug

Page 27: How To Pass A Ruby Code Test

Go crazy with symbol to proc

Page 28: How To Pass A Ruby Code Test

Don’t consider object side effects

Page 29: How To Pass A Ruby Code Test

Don’t use large scale code organisation like modules

Page 30: How To Pass A Ruby Code Test

Wow me with:

a git repoa thorough test suitesome description of your thinkingwell organised files

Page 31: How To Pass A Ruby Code Test

How to get up the curve?

Books:Clean code: A Handbook of Agile Software CraftsmanshipThe Little SchemerStructure and Interpretation of Computer ProgramsRuby GroupContributing to projects

Page 32: How To Pass A Ruby Code Test

Questions?

Photo CreditsTurtle - http://www.flickr.com/photos/hyakuhei/2234810476/

Witch Burning - http://www.flickr.com/photos/marsumic/4384582059/PHP rock stars-

http://www.flickr.com/photos/rbowen/2523308528/Ninjas –

http://www.flickr.com/photos/osakajock/121838967/