Over time I've been adapting my development environment to increase productivity. This means trying out alternatives beyond the out-of-the-box tools you get in a specific OS. I run Ubuntu, 16.04 at the moment, and this is a recap of the tools I currently use to work.
As a takeaway, the most remarkable productivity boosts I've experienced so far have been due to:
Terminator is my default terminal. You can have multiple terminals in the same view (split panes) and multicast commands to all of them.
I also use Guake which is a drop-down terminal, meaning you can hide it and it's not managed by the OS GUI as a running application. I mainly use it to run stuff in the background like setting up a VPN, tunnels or starting up local services I occasionally need.
Let's face it, if you use the command line there's not much room to improve efficiency while using Bash.
I use zsh instead, along with oh-my-zsh to manage its configuration. It provides improved autocompletion for commands and its arguments, shared command history between all open shells and it lets you expand environment variables, among other features.
It's also git-friendly by allowing to customize the prompt to display the current git branch, commit and the number of staged and unstaged files, and enhances git
autocompletion with description of the commands and arguments, including your own git
aliases.
oh-my-zsh
, on the other hand, adds the capability of installing themes and plugins. One of them is zsh-navigation-tools which provides visual navigation for many commands such as history
or kill
, so you can interactively browse and pick the history command to replay or the process to kill, respectively.
I use git from the command line, along with a bunch of git
aliases. Since I use GitHub as the remote repository there are some things that need to be done through their UI, usually reviewing and merging PRs. While developing though, the only thing you need from GitHub is to open the PR, and I use hub for that. You can setup git
as an alias to hub
and then you can open a PR in GitHub just by running:
git pull-request -b BASE_BRANCH
If you need to make requests to a REST API, the curl
command is the usual choice. It was mine indeed, until I discovered httpie, a human-friendly command-line HTTP client. It lets you easily make HTTP requests with authentication, headers, body, etc. For instance, posting a comment on a GitHub issue is as easy as:
http -a USERNAME POST https://api.github.com/repos/jkbrzt/httpie/issues/83/comments body='HTTPie is awesome! :heart:'
JSON is the implicit content type httpie
uses by default. It makes it really simple to define the serialized JSON object in the request body:
http PUT example.org name=John email=john@example.org
And the response body is pretty printed for readability:
PUT / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Content-Type: application/json
Host: example.org
{
"name": "John",
"email": "john@example.org"
}
I mainly develop in Java & Scala, with Maven and Sbt as build tools respectively. To avoid having to manually manage installation and upgrades I use sdkman, a tool for managing parallel versions of multiple SDKs. Installing the latest version of Sbt is simply:
sdk install sbt
It has a beta channel which offers early access to new features. For instance, it currently allows to install a Java SDK with a simple
sbt install java 8u111
Once this goes stable it will allow to setup most JVM related development environments with a single manager.
My IDE of choice is IntelliJ IDEA. It's slick and fast. I've used Eclipse and NetBeans in the past and they can't even compete, at least regarding my needs.
For other purposes like developing in Javascript or writing this blog I use Atom, the text editor by GitHub. Although I have to admit I still use Sublime Text 3 for editing large files. So far Atom doesn't seem to be able to handle large files, I guess because it's web-native.
I automated the setup process a while ago using Ansible to avoid installing all these tools and some more manually. The source code is available at GitHub and I plan to write a post about it in the near future.
Would you like to leave a comment? Since this blog is hosted on GitHub Pages there's no straightforward way to do so.
Instead, you can add a comment in this GitHub issue. If you'd like to see it here, refresh this page after posting the comment.