Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.26 KB

2013-12-26.md

File metadata and controls

45 lines (30 loc) · 1.26 KB

emil

Yeti theme for bootstrap

I like this new free twitter bootstrap theme from bootswatch called Yeti.

Watchdog exception handler in sidekiq

I was reading sidekiq source and stumbled across an interesting 'watchdog' pattern for handling exeptions raised in mission critical parts of the system. Watchdog is nothing but a method :

def watchdog(last_words)
  yield
rescue Exception => ex
  handle_exception(ex, { :context => last_words })
  raise ex
end

handle_exception method is mixed in from the ExceptionHandler module, and this method has the responsibility of doing stuff with the exception, like logging, send to airbrake, etc.

So if you have something_important to run, you run it like this :

watchdog("This is so important") do
  something_important
end

Easy Ruby source reading

The Ruby Cross Reference is like ctags enabled Ruby internal code navigation on the browser. Pretty good !

deepak

popping the why stack

asking successive questions to find out the root rationale. also asking questions is valuable

https://github.com/cucumber/cucumber/wiki#business-value-and-mmf http://www.theregister.co.uk/2007/06/25/thoughtworks_req_manage/