I recently discovered that bundler has a feature to create binstubs, so I decided to redo my benchmarks of
running a single pending spec (but including the complete spec_helper for my project).
To create rspec binstubs:
$ bundle binstubs rspec-core
Here are my findings:
Avg. Time (3 runs)
bundle exec rspec
Binstubs + Spork
Binstubs + Spork + Nailgun
jruby –ng -S bin/rspec –drb
It is still slower than I would like, but well worth the effort. Since I didn’t want to remember the specific invocation depending on what I have running, I have a script that will use binstubs, nailgun and/or spork if available:
Recently, I have been working on moving some processes from the request-response web cycle to a MongoMapper-backedDelayed::Job. Everything seem to go smoothly, but it seemed that there was some slowness actually queuing the jobs. Here is how I got to the bottom of it.
During the interview, she mentioned some rules that she had come up with to give when asked about design guidelines. She was clear that the rules could be broken, but once you understand why the rules are there in the first place.
Without further ado:
Your class can be no longer than 100 lines of code
Your methods can be no longer than 5 lines of code
You can pass no more than 4 parameters, and you can’t just make it one big hash
Your controller can only instantiate 1 object to do what needs to be done
Do you want to have a shortcut that takes you from a method call to it’s definition, wherever that may be in your code?
How about another shortcut to jump back to your previous position. Here is how to do it in Sublime Text 2