Fuck Command-Line Interface Elitism

28 July 2015

I recently read a post by Chris Beams on How to Write a Git Commit Message. Before I get into it, I want to emphasize that this post isn’t about hating on Chris or his advice; they’re both awesome. ♥

This post is about something I noticed in Chris' post and something I hear come up way too often in the programming world: how amazing the command-line interface (CLI) is and how everyone should be using it as exclusively as possible because it’s the best thing ever.

Towards the end of Chris' post, we are left with some helpful tips to be the best git-people that no one ever was. One tip focuses on the importance of using git on the CLI:

Learn to love the command line. Leave the IDE behind.

For as many reasons as there are git subcommands, it's wise to embrace the command line. Git is insanely powerful; IDEs are too, but each in different ways. I use an IDE every day (IntelliJ IDEA) and have used others extensively (Eclipse), but I have never seen IDE integration for git that could begin to match the ease and power of the command line (once you know it).

Certain git-related IDE functions are invaluable, like calling git rm when you delete a file, and doing the right stuff with git when you rename one. Where everything falls apart is when you start trying to commit, merge, rebase, or do sophisticated history analysis through the IDE.

When it comes to wielding the full power of git, it's command-line all the way.

You know what I think? FUCK COMMAND-LINE INTERFACE ELITISM.

Look, I use git on both the command-line and with my preferred git GUI of choice: Tower. I like to do certain things in Tower (review commits, stage individual files, write commit messages) and I like to do other things on the CLI (interactive rebases, fetches, resolving merge conflicts, pushes). It works well for me. I am comfortable and capable with my workflow, and I’m pretty fast at getting from point A to point B in the git world, even though I am not going “command-line all the way.”

We can all live in HARMONY!

For anyone getting started with git I always tell them about my own workflow. They’ll learn about how you can use both GUIs and CLI, which is more than enough to get them going. If they have any questions down the road, I’ll also already be familiar with their setup. :) I don’t feel like I’m setting them for failure by encouraging using a GUI but rather just showing them that there are many ways to get git done. Becoming comfortable and good at anything is a process and it should be treated as such.

I think this whole “CLI or bust” attitude is really silly. Writing a blog post about it is definitely may be even sillier…

P.S. I also can’t stand shitty commit messages so if you haven’t already, go read Chris' post now!

Useful Utilities - Paste Typer

18 July 2015

Sometimes you just want to paste. And sometimes you can’t paste. Right-clicks are ignored. Command/Control + V is also ignored. Sadness ensues.

Off the top of my head, here are some of those annoying times you can’t just paste:

  • Entering passwords when creating and opening an encrypted disk image.
  • Websites that (stupidly) prevent you from pasting passwords.
  • Pasting text copied from outside a Genymotion emulator into the emulator.
  • Logging into certain apps like Google Drive on Mac while setting them up.

There are plenty of AppleScripts and applets that promise to simulate typing what’s on your clipboard to get around this issue. My favorite is Paste Typer. Download it, copy it to Applications folder and then drag it from there into the dock. Put your cursor where you want text pasted, click on the icon on your dock, and boom! The contents of your clipboard are pasted.

I always have a hard time finding a download link for Paste Typer when I want to download it, so here is a link to Paste Typer.

Now enjoy the freedom to never be denied your unalienable right to pasting.

Olá Francesinha!

10 July 2015

It’s been five years since I was last in Portugal. One thing I was excited about (besides seeing family) was eating a francesinha: the ultimate sandwich. This is a francesinha.

Francesinha from Café DNA (Vila de Arcos de Valdevez)

It looks like a sandwich on a plate covered in sauce. But it’s way more than that!

The sandwich contains all sorts of meats including steak, ham, smoked pork sausage (linguiça), fresh sausage (chipolata), and maybe some other meats depending on where you get it. It’s topped off with a ton of queijo (cheese), an ovo estrelado (fried egg), and a side of batata frita (fries). Your arteries deserve to be clogged.

The sandwich is imposing, but it’s really the molho (sauce) that makes the francesinha special. Recipes are well-kept secrets but the common ingredient in them all is cerveja (beer). It varies from place to place and the sauce is usually what people will argue about when discussing their favorite francesinha.

The sauce varies from place to place, but the entire dish is sometimes reimagined. The Portuguese no longer explore the seas. Instead, they search for culinary paradise. For example, at Mauritânia Grill in Leça de Palmeira, Porto (the hometown of the francesinha) you can get a francesinha that comes loaded with a ton of seafood like shrimp, prawns, mussels, barnacles, clams.

Francesinha Artilhada from Mauritânia Grill

I’ll miss you so much francesinha. Até já (until we meet again)!

The Date is Set!

16 June 2015

The day will be December 4th, 2015. The sadness of not knowing when Xenoblade Chronicles X is coming to North America is over. It has been replaced by both sadness and anticipation that it’s a little under half a year away.

There were a lot of exciting announcements at this year’s E3, but a release date out of the Nintendo and Monolith Soft camp is all I wanted. We even got another trailer that features those iconic Hiroyuki Sawano-esque vocals right when you have robots epically gliding over water!

 

Pro Bash Profiling

10 June 2015

My Bash profile is critical to keeping me elite on the command-line. Keeping myself elite across multiple computers is also very easy with Dropbox (or your file syncing service du jour). Then I create a very, very simple .bash_profile that looks like this:

~ cat .bash_profile

source ~/Dropbox/Bash/main.sh

This grabs the contents of main.sh from a folder in my Dropbox and effectively puts it in the .bash_profile file. What does main.sh look like?

~ cat ~/Dropbox/Bash/main.sh 

# Git Power Up!
source ~/Dropbox/Bash/git-completion.sh

# Android
source ~/Dropbox/Bash/android.sh

# Evernote
source ~/Dropbox/Bash/evernote.sh

# The rest including everything and the kitchen sink...

I separate things out a little more to keep things modular and keep similar functionality together, which makes everything a little easier to both maintain and read.

I don’t update these files very often, but anytime I do, it’ll get synced automagically. The sad days of typing a new alias on a computer and seeing “command not found” are gone!

Came here looking for awesome Bash profile aliases? Check out Nate Landau’s extremely OP Bash profile for some excellent Bash profiling!

Happy Bash profiling!