Last Updated: February 25, 2016
·
574
· cwninja

Debugging for hours? Not making any sense?

Ask yourself the magical question:

Is this definitely the code you think it is?

It's amazing how often you end up investigating something that has nothing todo with the running code.

Debugging a live app deployed with capistrano?

$ cd $PWD

… because being in /apps/*/current can mean many things.

Is the code right, but the results wrong. Make the code raise 'foo' and ensure it does.

Basically, don't waste time looking at the wrong code.