Command Line Productivity (Part 3)

Here are links to Part 1 and Part 2 of this series.

OK, back to productivity post. I wanted to make my command line work more efficient and streamlined. Even with wonderful zsh autocomplete of remote ssh server paths, git branches etc, there is a lot of typing going on and not all is necessary.

One big annoyance for me is that I have several projects, and often I need to get from one to the other quickly. Often I would have several tabs open in iTerm2 and each would be for some context, and within that context that window would be split further. Often I would keep those for several days, just to avoid having to type all of this again.

This is all fine, but I started using sometime 2+ years ago aliases for projects and spaces I go frequently. As long as I have similar file organization on all my machines, and that aliases file is kept on Dropbox, things are great. Dropbox is awesome :), just saying.

Back to my aliases file which I mentioned in Part 2 of this series.

# apps
alias reload=”source ~/.zshrc”
alias be=”bundle exec”
alias cuke=”bundle exec cucumber”
alias rs=”bundle exec rspec”

# locations
alias work=”cd ~/work”
alias fit=”cd ~/work/fitclub”
alias zelio=”cd ~/work/zelio”
alias home=”cd ~”
alias aliases=”mvim ~/Dropbox/Apps/aliases”
alias web=”cd /Library/WebServer/Documents/”

I removed several projects from this, as I feel exposed by having all my aliases here.

First part shortens long app related commands, obviously I do a lot of rails, if you use different tools, it pays to shorten them. Other part is for different location on my machine I feel like I like to have their locations.

This all works really well. However recently I came across … bash script I can’t find source to properly attribute credits… well here it is, it is very short and uses symlinks to remember folders aliases. Just include this in your .bashrc or .profile or .zshrc

export MARKPATH=$HOME/.marks
function jump {
cd -P $MARKPATH/$1 2>/dev/null || echo “No such mark: $1”

function j {
cd -P $MARKPATH/$1 2>/dev/null || echo “No such mark: $1”

function mark {
mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1
function unmark {
rm -i $MARKPATH/$1
function marks {
ls -l $MARKPATH | sed ‘s/  / /g’ | cut -d’ ‘ -f9- | sed ‘s/ -/\t-/g’ && echo

It usage is to cd into folder let’s say ~/work/my_awesome_code, then say ‘mark awesome’ and in future, if you say ‘jump awesome’ you will be there. If you say ‘marks’ it will list all remembered locations. Very simple, awesome.

While my aliases served me well for years, this solution is very elegant and I really like how it is done.

This is pretty much what I had so far. There some smaller tricks I like to do, like creating todo.txt in folder and in .rvmrc or some other file to add ‘cat todo.txt’, so each time I open a folder, it will tell me what next it is supposed to happen in that project. This obviosly can be done in .zshrc as independent function, I just didn’t spend time on it.

Also,  whenever I notice I am typing same command over and over, I will make an alias for duration of project if nothing else, to save me from typing.


Command line productivity (Part 2)

So yesterday I was looking into my command line usage and what are the most frequent command(s).

Here is link to part 1.

Obviously I spend a lot of time working the git. So most benefits I would gain if I could do something to improve that part. I already noticed that typing git commands is very verbose.

I also remember in the past when I was doing such analysis, tool would produce aliases for commands you frequently use. This is all fine, but it was hard to remember those commands, and it would take me more time to remember what was exactly shortcut, then to type it. So I quickly abandoned such system.

This time it will be different. For start, I am pretty sure that aliases like gp, gc etc, will not give me benefits. This got me thinking, how else can I name aliases that I can skip step where I pronounce command I want to be able to remember beggining letter. How about removing git from beginning?

Here is what I did:

first, so that I don’t have to create separate aliases in laptop and multiple desktops, I created a file in dropbox ‘aliases’ and in my .zshrc I added line to source it like this:

source /Users/zeljko/Dropbox/Apps/aliases

Then I started creating aliases. I made point to make them like I would think of those commands. For example ‘push’ is for ‘git push’

# git commands
alias s=”git status -s”
alias c=”git commit -m”
alias gd=”git diff”
alias add=”git add ”
alias log=”git log –oneline”
alias reset=’git reset HEAD –hard’
alias push=”git push”
alias pull=”git pull”
alias pick=”git cherry-pick ”

This helps me great deal. First day it took me a little time to get used to it, old habits die slowly. However, since it is intuitive, it works great.

One thing I am not super happy is gd for git diff, but diff is utility and we should not create confusion. On the other hand, as someone who likes to call git status, between pretty much most of the steps, shortening this and commit, is awesome.

Now, workflow would be something like this:

s (git status)

add . (git add .)

c “zd [#xxx] my feature” (git commit -m …)



push –tags

So this alone helps me great deal. What else I would like to improve is folder traversing. This will be topic of next post tomorrow.


Command line productivity (Part 1)

Being productive, we all want it, we rarely implement it. Most of the time, we have no idea where to start.

Since I spend most of my day in terminal, I felt this is a place I can make more productive. It is already made more pleasant to look at by choosing a custom font and tweaking several other settings.I also spent time to learn terminal shortcuts (iterm2), so I can quickly split windows, switch tabs etc. If you don’t do  those things in your terminal, and that is where you spend your day, you should start by learning shortcuts and customizing settings. One great terminal I really enjoy on Linux is Terminator. On Windows there is PowerShell and Console2.

I tried to make OSX open in terminal on startup, like you could do in Linux, but I didn’t find simple way to do this. I don’t shut down it anyway, so it is OK.

So, how can we be more productive on command line. For start, I wanted to learn better how I use commands and what and how often I am using them. From few years back I remember someone had neat oneliner that would analyze frequency of command in history.

Didn’t have to search long to find this blog post ‘Command Line Analytics

In essence all you need to enter is this command:

history | awk ‘{a[$2]++}END{for(i in a){print a[i] ” ” i}}’ | sort -rn | head -10

It goes through your history, takes first part of command line entered, sorts it, takes first 10 items and displays them along with frequency of usage. For my analysis, I wanted to see top 25 commands I used:

3014 git
630 cd
568 ls
378 brew
355 mvim
304 ack
285 bundle
281 rm
260 be
204 rake
180 rvm
169 ssh
165 tig
160 lime
150 gem
142 cat
121 curl
117 l
109 sudo
90 rails
86 open
79 npm
79 gd
73 touch

Some of these are duplicates, like ls and l (l is alias for ls) mvim and lime are editors.

Let’s stare at this for a moment… I will continue tomorrow on what I did next.

Command Line Productivity (Part 2)

ActionMethod update

I have update on my previous post about ActionMethod. TL;DR I use orange to mark in progress actions.

A lot of people suggested other tools that would somehow help me better. I appreciate all sugestions sent and all of them were good. While some have some of the aspects better, Omnifocus, Things, they are bound to Mac platform and it is always better to have your actionable items with you everywhere. Also I’ve seen those tools and tried them long time ago. If I would pick one, I would take HitList as great tool and while using it, I remember I enjoyed it quite a bit.

I don’t believe it is a to-do manager I need, ActionMethod is a tiny bit more which is why it is so valuable to me.

Issue I had with ability to mark actions that are in progress or the ones I would like to do next or in immediate future, I resolved. ActionMethod has three colors to mark your actions. I started using orange to mark things that are either in progress or I plan to do soon. I’ve been doing this for few days already and it seems to be working well.

I wish they would address that, also, my critique of ipad app stands, they can do much better.

One last, very important thing. You should not jump from tool to tool and always get next shiny thing. I managed to do quite a bit of really good work using actionmethod and I will continue to do so. I wish it would expand in parts that would help me with planning, but I will not go on and create another to-do app :), that is for sure, I have better things to do.

Action Method review

I read few months ago ‘Making Ideas Happen’. This book is authored by people behind website Behance. Ideas in the book supposedly are represented by tool ActionMethod. Oh, and let me add, I am not related to Behance people and they didn’t offer me anything to write this.

First, book is really good, anyone interested in productivity should read it. I enjoyed reading it, it did open my eyes a little on several topics. For example, I always believed that messy desks are sign of people working… well maybe, but organized desks are sign of people accomplishing things.
They also tout that tools you use should be beautiful tools. And they do provide some.

So, naturally after going half-way through the book, I had to try ActionMethod (I did try it before once and didn’t use it). This time I tried it and decided to give it a chance. I bookmarked website in all my machines (desktop and laptop), I bought app for ipad as well as my android phone. This last one is really nice touch as it helps add actions when I am away from other computing devices.

Before saying anything about ActionMethod, I did try a number of productivity tools and systems. I’ve been fan of Getting Things Done for a long time. I am still surprised when people have email in their inbox etc. However even with all this, lately, with three kids, I’ve been having trouble getting done anything. And most of the time, I didn’t even know what I should do.

One of the first impressions I had about ActionMethod, is that I finally could organize things in a way that makes sense and feels natural. What I did before is either tried to make multiple lists, or single large one that would have everything mixed up. This is just very poor way to keep track of things. Also, some tags, just not disciplined enought to use them properly I guess.

ActionMethod has a way to organize projects in groups, so I have for example, my big client group with all projects going on there, I finally don’t have to dig through the mail when someone calls me up about something we talked month ago, since it is a project that is on-going, I would look it up in action method, see what was left to do. So that way of organizing your tasks brings a lot of clarity in what needs to be done and where are those areas where tasks are present.

I have lists for learning and list for articles I would like to read. So having those is really beneficial and helps me feel in control.

What I think is missing from action method is that tasks that are in progress are not well accounted for. Book suggest we mark it done when we shoot someone email and recreate task. This is total bullshit honestly. Another thing that is not good is that I can’t plan my day by selecting which tasks I would like to do and work off that. There is focus group but it is limited to 5, which is great kanban like principle, however in practice I have things I am waiting on and would like to have more available for me to work on. So, I would like to have ability to mark things as in progress.

Another thing that annoys me is that ActionMethod on ipad is actually very ugly app, so it breaks principle that tools we use are beautiful. Where website provides organized view of work, Ipad app feels very cramped and I am never sure where my tasks are. I don’t have issues with phone app mostly as I use it for adding tasks.

I keep using actionmethod for now, as it does bring clarity and organization to my daily work, however, there are some frustrations with it that I feel the need to address.

Getting control over your time and inbox

So, it’s been a while since I wrote, a lot of things happened. Often I started a blog post but didn’t post it. Here is one that I think it will be useful.

My inbox has been at zero in last probably 7 years, it is a habit that when I learned, I just kept it and I don’t really have to think about it much any more. I am surprised when I read tweets and posts about otherwise capable people, struggling with getting inbox to zero. And on top of that I never did that email bankrupcu thing that some people do when they erase emails for them. If you sent me, I read it, or not, but I sure don’t miss it accidentally (happened rarely, few times).

I will explain how to get there simply and easily, this is simple way to get more productive and efficient, feel better and communicate better.

So, how do you get your inbox there?
Very simply, take a deep breath and decide to do it. You don’t even have to do everything in the same day, if you really get a ton of emails, but decide.
Then create folder ‘past inbox’. Move all of your emails there, just select all and move. From that moment on, you will decide about every email that comes to you.
Next step is to start from the top of past inbox pile and decide about emails. You will do following things with it:
* respond to it (you can create folder action and move it there, I respond it right away)
* decide this is something you don’t need, VERY IMPORTANT, don’t just delete it, if it is a newsletter make sure you click and unsubscribe. From now on, any newsletter, mailing that you don’t really have time to read, can find info online etc, click on unsubscribe and then delete.
This way you will save yourself work in the future.
* any regular mailings that you receive but really don’t need your immediate attention, just filter into appropriate folder. Being wise there is of utmost importance.
I love getting sales info from NewEgg and like, however every sale newsletter from them goes to newsletters/sale folder. I can find them whenever I need them
* shopping notices go to shopping folder, account creating emails go to account folder, facebook updates go to facebook folder (which I rarely check).
* If you have server monitoring and think that you need to see those emails, it is fine, I would still filter them into folder but check it, however, for some finance related stuff, I just make filter that would mark it with appropriate label, but will leave them in my inbox. That way I can take a look and then just archive them.
* Delete a lot, most of information that is coming to your inbox can be easily found online, unsubscribe whenever you can.
* project based, client based emails, make filters for people you corespond to label them, then if you see something you want to respond later, you can just archive them and check them later. No need to do anything more then once that can be automated.

Now that I made my inbox clean, I don’t really check it that often, no need, rarely emails are that important. But when I do, there is never too much and it is easy to respond.

One more thing I noticed, if you don’t like something, if client is unreasonable or plain silly, put that email aside and respond in 30 mins.

Hope I made you productive, I already am.

Zeljko Dakic

Getting productive

There is a new magazine on productivity, it is online only and you download it in PDF and print it or read it off the screen.

I bookmarked it few days ago but just got around to actually read it. No first issue should be without interview with David Allen of ‘Getting Things Done’ fame, so here it starts with him. To my surprise rest is also very good and I found quite a bit of interesting things to read.

Since I printed it, I found that format is also very convenient for reading, as articles span one or more pages, but don’t cross pages, so if you want to keep something, just keep those pages of the article. Also they can be rearranged if you like that. I find this extremely convenient, specially because I can toss rest and just keep the good stuff for reference later.

Right now I am busy adopting some of the practices I re-learned from the magazine (I kind of knew them but newer really applied them, so…).