Reducing Keystrokes and Errors
A few days ago, there was a query in one of the Slack channels about how to use our custom AWS login mechanism work from the CLI for India based employees because our OU in LDAP was different and therefore, we had to enter our usernames differently while using that tool. I responded to it because I'd struggled my way around making it work, and as a suggestion I also told them that I have an alias
created so that I don't have to type that long winded command every time.
One of the responses to that was from an individual who said creating an alias takes away the ability to pass in CLI flags to mix and match the options, therefore should be discouraged.
I've been pondering about this for a while now and am convinced that I'd still try to create multiple aliases for the options I commonly use in my daily workflow. And if that is difficult to achieve, I'd at least try to create an auto-completion script on my shell environment for this command so that I have assistance while typing it in.
I get annoyed when I see my colleagues not have Git auto completion on their computers and struggle with typing in commands which should ideally be git fet<tab> or<tab>
or some such.
One of the key takeaways from the book The Pragmatic Programmer for me has been to reduce the number of keystrokes I have to make. Because the more humans are involved, the more error prone the end result is.