Thursday, August 11, 2011

Hardly working hard

I am lazy. I don’t remember when it began, but to the great frustration of my mother, it has yet to end. Luckily though, there are many tools available for the lazy software engineer, some of which I’d like to share today in this post.

Too lazy to type?

I like saving key strokes. Why type when you can...not type? There are a couple of bash tricks I learned from Carlos and Jesse that I really like:

  1. cd - cd to last visited directory. Everybody knows about cd ~, but this is at least as useful. Instead of taking you home, cd - takes you to the last directory you visited.

Example use case:

cd /path/to/logs

tail log1 | cut -f 3 | sort

tail log2 | cut -f 5 | sort

cd -


2. ctrl + r: Reverse search bash history. Here at Adku, we run A LOT of map reduces. Most of the time, we’re calling the same few commands. ctrl + r lets us run, forget, and then run again later.

Example use case:

fab some_map_reduce_job:arg1=’ahhhh’,arg2=’wahhhhh’

cd ../

touch ‘asdf’

ctrl + r


fab some_map_reduce_job:arg1=’ahhhh’,arg2=’wahhhhh’

3. !n:x-y Recall arguments x-y from the last nth command. This is another command that is a great help when running map reduces with complicated argument lists. Though, it is a lot more complicated than the other commands mentioned here, and worth reading about separately. True to the theme of this post, I redirect you to: for a great resource on this, and will stick to giving a few simple examples.

Example use case(s):

>echo “foobar”


>echo “moocow”







cat foo > impossible_to_remember_filename_akj3kj2437fvaj

nano !:3


port install haskell-platform

##oh no, permission failure##

sudo !!


>echo “hi” && echo “why”






Too lazy to go to work?

Being too lazy to go to work is, of course, never a problem for me. But theoretically, I could see the following scenario occur.

1. While at work, start a ssh tunnel between your work computer and a gateway server. (For details on how we do this, checkout:

2. Go home, relax.

3. Start a ssh session to your work server.

4. Start tmux

5. never go to work again.

With the exception of 4 (and 5?), this is probably a familiar process. But here’s the beauty of four:

connection closed by remote host.

Never again.

To quote the tmux man page:

Each session is persistent and will survive accidental disconnection (such as ssh(1) connection timeout) or intentional detaching (with the `C-b d' key strokes).

Aside from never losing your work due to connection problems, Tmux also makes it easy to start a job at work, go home, and continue monitoring that job remotely, or vice versa.

For example:

I start a tmux session at start tailing a random log at work:

To remember this session, I name it by typing

ctrl + b + : rename_session “foo”

Then I go home.

At home, I ssh into my work computer and type

and everything just works!

In addition to creating and naming sessions, tmux makes it easy to create and name panes within sessions. I often find myself running many jobs of the same type, which I like to organize into named panes within a single session.

The panes I have open are called “mo”, “meeny”, and “eeny”. In each screen I am running a different map reduce job. By naming the panes, I’ll remember exactly what I was running in each pane wherever I go.

Basic panel usage:


ctrl + b c


ctrl + b x


ctrl + b ,

navigate to previous panel

ctrl + b p

nagivate to next panel

ctrl + b n

navigate to panel #

ctrl + b #

Too lazy to...continue?


  1. Type even less:

    alias -='cd -'
    alias ..='cd ..'

    1. The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Final Year Project Centers in Chennai.

      Software management seeks for decision support to identify technologies like JavaScript that meet best the goals and characteristics of a software project or improvement programme. JavaScript Training in Chennai Accessible experiences and repositories that effectively guide that technology selection are still lacking.

      Aim of technology domain analysis is to describe the class of context situations (e.g., kinds of JavaScript software projects) in which a software engineering technology JavaScript Training in Chennai can be applied successfully

  2. Gracias por compartir sus ideas con nosotros. Friv Games Gry Friv gracias por la detallada información. Juegos Friv Gry Friv Friv Gracias por vuestras reacciones a las transmisiones que os han hecho. Friv Games Juegos Friv Acogemos con agrado los comentarios de los lectores.

  3. I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again..

    starfall | brainpop

  4. This is a great blog. Thanks for mentioning.
    I am also very happy to be able to show some of my work. Hope you will also visit and learn my


  5. This is a great blog. Thanks for mentioning.
    I am also very happy to be able to show some of my work. Hope you will also visit and learn my website
    Happy Wheels

  6. I admire the person who wrote this post, you are so talented, hope you will promote them and become more successful. I do not feel sorry for taking the time to read this post, it is really nice and useful to me, thanks for posting it.
    Jogo para menino, cá koi mini, friv at school 2019, friv Games for kids online

  7. تريد الحصول عليه ونحن نقدم هذه الخدمات بأسعار Sibah ومن خلال فريق مدرب حتى تكون شركة التنظيف في الدمام هي اختيار أفضل العملاء لتنظيف المنازل والقصور والفيلات ، والتي تشمل تنظيف الواجهات الزجاجية وحمامات السباحة والسقوف وكذلك جميع الغرف مثل كغرف معيشة وغرف نوم كما نقدم خدمات تنظيف السجاد وتنظيف المفروشات والأرائك وكل ما تحتاجه معنا.
    شركة النجوم لخدمات التنظيف
    شركة تنظيف فلل بالطائف
    شركة تنظيف مجالس بالطائف
    شركة نقل عفش بالطائف

  8. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.

  9. is  best  antivirus available in the market. If you want to protect your system online or locally from any unforeseen events   is is a must have software in your PC or Mac. 

  10. Since the world is developing each day with new computerized advances, digital dangers, malware, information, and harming diseases have additionally turned out to be increasingly more progressed with every day. These digital contamination's harm a gadget or documents in different ways.  follows the concept of refine your system, you don’t need to worry about data loss or system failure because of the malfunctions.   works finely on every system including android and ios and supports device like, computer, laptops, mobile phones and tablets.

  11. Install your by downloading now. Microsoft Office applications are a complete package if multiple integrations like Microsoft Office, Microsoft Power Point, Microsoft Excel etc. All of these programs have their own features and speciality and are used in a lot of industries, small organizations and big organizations.