Skip to content
/ qq Public

Improved puts debugging output for busy Ruby programmers.

License

Notifications You must be signed in to change notification settings

techspaceco/qq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QQ

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.

Why is this better than pp, puts, print?

  • 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!

Usage

require 'qq'
# ...
qq(foo, bar, baz)

Use the qq command installed with the gem to tail the q file in your temp directory.

Haven't I seen this somewhere before?

Python

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: ping's PyCon 2013 lightning talk

Go

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.

Install

gem install qq

FAQ

Why qq and not q?

Sadly there is already this q gem.

Is qq thread safe?

Yes

Why is there no q in /tmp/q?

Your $TMP or $TMPDIR may point somewhere else.

qq --tmpdir

Known issues

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.

About

Improved puts debugging output for busy Ruby programmers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages