How To Pass A Ruby Code Test
-
Upload
robert-postill -
Category
Technology
-
view
729 -
download
3
description
Transcript of How To Pass A Ruby Code Test
How to pass a ruby code test
Robert Postill
Huh?
Mea Culpa
No names
http://github.com/C3/code_test
Habits
Junior
No Objects?
No tests
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
Ignore the standard library
No Gemfile
No Rakefile
No documented thinking
Show me you thought about the problem. That’s it.
Journeyman
Object Design
It only runs on Windows
Make it complex to run
bin/app –fiddly-flag –J –see-output
Use select, collect, reject and inject
Bonus fail points for all on one line
Give me an aesthetic sense
Make it easy to runDesign with objects Have some basic testsShow some environmental sensitivity
Craftsman
Don’t make a gem/redistributable package
Extend object
Do something tricky like ASCII bit-twiddling
Rely on an implementation bug
Go crazy with symbol to proc
Don’t consider object side effects
Don’t use large scale code organisation like modules
Wow me with:
a git repoa thorough test suitesome description of your thinkingwell organised files
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
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/