QQ improves puts debugging because most Ruby programmers are puts debuggers.
Type qq
instead of pp
, puts
etc are your variables will be pretty printed
to q
in your temp directory.
- Less keystrokes.
- Pretty-printed objects, vars and expressions.
- No searching for redirected
$stderr
,$stdout
. - No log levels, locations or filtering to obscure your debugging.
- Pretty colors!
require 'qq'
# ...
qq(foo, bar, baz)
Use the qq
command installed with the gem to tail the q
file in your temp
directory.
Python programmers will recognize this as a less awesome port of the
q
module by zestyping Ka-Ping Yee (zestyping).
Zestyping does a great job of explaining q
in his awesome lightning talk from
PyCon 2013:
Go developers may have seen this q
port by y0ssar1an.
Even if you don't write Go this port includes notes on shell setup, snippets
and autocomplete helpers for editors so it's worth a look if you use q
in
any language.
gem install qq
Sadly there is already this q
gem.
Yes
Your $TMP
or $TMPDIR
may point somewhere else.
qq --tmpdir
Calling qq
twice on the one line.
Thread::Backtrace::Location
doesn't list a column for the caller.
Use multiple arguments to the one qq
call instead.