Skip to main content

Favorite Tools

List of of tools I use while programming.

Command Line Tools

Code search - ack

ack is a grep-like source code search tool.

source: https://beyondgrep.com/

I discovered ack when I was working to develop an Adobe Acrobat plugin in C++. The SDK's documentation was lacking, and the best way to find example of how to use particular api's was to find mention of that api in the source code. You can use grep to achieve most of the functionality that ack provides. However, ack's commands are easy, and it excels in monorepos with multiple languages. My favorite feature is how easy it is to filter the filetypes you want ack to search. For example, if I just want to look at C++ files, you'd write:

Only search C++ files using ack
ack findThis --cpp

There's more on the ack's documentation page: https://beyondgrep.com/documentation/

Better Diffs - delta

A viewer for git and diff output

source: https://github.com/dandavison/delta

Delta's super power is the ability to view diffs side by side in the terminal.

You can see a preview of how it looks here:

delta side by side diff view

I recommend installing delta using a package manager, that way the tool is available in the system's path. Installation direction are here: https://github.com/dandavison/delta#installation

To set it up, you can copy the following section in your .gitconfig file.

[core]
pager = delta --line-numbers --dark
[delta]
side-by-side = true

For more details on how to set up delta, here are two places to checkout:

Utility Shells - Nix

Nix-shell (and friends) is one of those tools that I cannot describe acurately. I can only tell you how I use it.

Currently, I use nix-shell as a tool to create shells for tools that I don't want to persist in my environment. For example, to create the favicon of this site, I need to get ImageMagick to convert severval PNGs to an ICO file. With nix-shell, you can create a shell that will function as if ImageMagick is installed and use it.

If nix is installed, getting a working version of ImageMagik is as easy as typing the command:

nix-shell -p imagemagick

This makes all of imagemagick's tools available in a temporary shell

The best place to start with Nix in general is here: https://nixos.org/guides/nix-pills/index.html


Websites

Regex 101

Whenever I need to use Regex in an application, I build and test the experession using https://regex101.com/

LibHunt

I use https://cpp.libhunt.com/ to explore my options for libraries whenever I am using C++. Libhunt also has explorer for many other languages (go, crystal, .net, and etc...)