So as I was recently saying, ack is a fine grep alternative for programming tasks, but I should also mention another useful tool: git grep. It’s extremely simple, it just searches through all your checked-in files for the given expression. The advantages are that it’s extremely fast due to git’s efficient disk layout, and it’s reasonably common to want to know where a given string has been checked in (especially if you have a lot of generated source code). The drawbacks are that its command line options are a bit limited, it’s missing all of ack’s nice features, and of course it only works on git repositories. Still, a handy little tool to have at hand.