• About

    Swaroop C H is 29 years of age. He is a coder and startupper. He has previously worked at Yahoo!, Adobe, his own startup and Infibeam.


    Read more about him


    Email: swaroop (at) swaroopch.com

  • Subscription

    If you want to know when new stories and articles appear on this website, you can receive them via:

  • I'm a Wannabe Hacker

    The Glider: A Universal Hacker Emblem

Archive for the ‘Self Improvement’ Category

Talk on Productivity at Barcamp Bangalore 10

Tuesday, June 14th, 2011
At Barcamp Bangalore 10 on Saturday, I talked about GTD, Pomodoro and Productivity: NOTE: If you have trouble viewing the web version, there is also a PDF version of my slides. I was nervous when preparing for this talk because it is not a concrete topic, it’s something abstract and perhaps even illusive for many people, so when I started off my session, I asked people to set aside their cynicism for half an hour, I then established some source credibility, explained my view of how I look at productivity, success and happiness, and how GTD and Pomodoro tie into all this. The presentation above is quite self-explanatory, so I’ll not repeat that again, except for the demo-on-whiteboard part where I did a live session about how to do Pomodoro. (photo by @the100rabh) The session went surprisingly well, and most people grokked what I was explaining, which I’m still very surprised about. I guess part of it is because (1) the audience was so interactive and asked questions and (2) most people in the audience have already tried experimenting with todo lists and GTD, so it is a problem they were already facing, so they assimilated what I was saying very quickly. (photo by @anenth) The best part about Barcamp is that I got to talk about a personal obsession of mine and I would have otherwise probably never gotten a chance to discuss such a topic in-person with other people who are interested in this topic. Some of the feedback on my session:

Loved the session on Pomodoro and GTD by @swaroopch at #BCB10!
Jun 11 via TweetDeckFavoriteRetweetReply

swaroopchSwaroop C H
in reply to @swaroopch

@swaroopch i wanted to attend that but it was full, i couldn’t come in!! #bcb10
Jun 11 via TweetDeckFavoriteRetweetReply

Interesting, thought provoking conversations with @swaroopch about productivity and planning on getting things done. Now for the doing…
Jun 11 via EchofonFavoriteRetweetReply

It was even more fun to hear from people when days after the conference, they were actually trying out the Pomodoro technique:

@swaroopch Looks like, i need a pomodoro allocated to read the pomodoro ebook . .too many distractions!
Jun 13 via MetroTwitFavoriteRetweetReply

I started practising the Pomodoro Technique @swaroopch taught us at #bcb10. So far so good! (cc: @theAnand). (oops, this is interruption ;)
Jun 13 via webFavoriteRetweetReply

arunbasillalArun Basil Lal
in reply to @arunbasillal

@arunbasillal @swaroopch @theAnand well, a fact is that Pomodoro Technique is well suited for exams. Tried and tested. higher efficiency !
Jun 13 via webFavoriteRetweetReply

http://twitter.com/kaushalgoa/statuses/80498975857324032 There were many other good sessions in Barcamp that I liked, I especially loved the sessions about the Namma Cycle project and about ShreeKumar’s adventures and how to survive while doing a yatra across the country, talking the locals, etc.

The slower you travel, the more you learn. What have you learned on a flight? – Shree at #BCB10
Jun 11 via twiccaFavoriteRetweetReply

And I really do hope that the Namma Cycle project takes off – Murali who effused passion when talking about it has shown a lot of progress already – got sponsorship, got government buy-in, and is starting off at Bangalore University and has big dreams about turning Bangalore into a cycling city. That seems to be already under way, with the new cycle stand near M G Road. Overall, even my non-techie wife thoroughly enjoyed the day and was inspired by the people she met at Barcamp. And that really says it all for me on how much I enjoyed going to Barcamp again.

Good talks on Productivity hacks, JS, Bangalore bicycle venture etc. Met some great folks. Lovely day. #bcb10
Jun 11 via webFavoriteRetweetReply

Thanks @barcampbng for pulling off another fine barcamp. Some good sessions plus catching up with folks made it worth the travel #BCB10
Jun 11 via twiccaFavoriteRetweetReply

Special thanks to SAP Labs India for hosting the Barcamp in their beautiful campus and the great lunch as well. And not to forget, all the organizers of BCB10, kudos to you guys for making it happen! P.S. Regarding the Quantified Self phenomenon, I highly recommend reading the New York Times article by Gary Wolf on The Data Driven Life. Update: Just remembered a related old article of mine – Creativity and Organization is Impact”.

Passionate Programmer book review

Tuesday, May 17th, 2011

Every once in a while I get an email like this:

Sir, I am a beginner to python and programming. I started with the C++ and found it hard so one day via google I found your perfect tutorial “A byte of Python”. I read the whole tutorial in one day because it is so interesting and helpful. Sir, I have created the script to backup files from directory as you mentioned. Please see the script once and tell me if I have chances in programming career. Sir I am final B.tech student and I love programming. But I was rejected by every company during campus placement because of my poor communication skills and due to this my confidence level is very low. Sir I have also created a web based application using PHP, MySQL and Kannel on Debian based server for intra-college communication. Sir, I am regular reader of your blog and I respect what you are doing to help freshers like me. Sir I would like to know if you have any advice for me.

And like this:

I want to thank you about this great book ;-) . I am a 20-years-old student in computer science from Bulgaria and i found this book very interesting and helpful. I’ve been programming in python for half a month. I had little experience in C from the university and I wanted to learn a high level language with simple syntax like Python and then learn C++ and start writing useful programs. I send you a solution of the problem in the end of the book that is just a demo version. Can you give me a hint what i got to improve to make the address book program better and give me the source code of your solution? I really want to become a programmer so any advices especially from a man with your knowledge would be highly appreciated! Thanks.

For a long time, I used to scratch my head for every such email because I really didn’t know what advice I have to offer. I did end up writing How Fresh Graduates Can Grow which a lot of students have liked.

In the past couple of years, I have started replying with just one line - I ask them to read The Passionate Programmer: Creating a Remarkable Career in Software Development by Chad Fowler. I happily recommend this book knowing that if they actually do read and apply the principles in this book, they can’t go wrong.

I had read this book in its first edition when it was called My Job Went to India and I read it again when the renamed second edition came out.

The title of the book is self-explanatory but what makes the book special from other regular career books is that it is geared specifically to the art of software programming as well as explaining networking and many soft concepts/human aspects in a for-geeks “53 recipes” style.

Some of my favorite recipes/lessons are:

4. Be the worst

Legendary jazz guitarist Pat Metheny has a stock piece of advice for young musicians, which is “Always be the worst guy in every band you’re in.” Being the worst guy in the band means always playing with people who are better than you.

Being the worst guy/gal on the team has the same effect as being the worst guy in the band. You find that you’re unexplainably smarter. You even speak and write more intelligently. Your code and designs get more elegant, and you find that you’re able to solve hard problems with increasingly creative solutions.

6. Don’t listen to your parents

I remember talking to a friend about potentially moving out of this company, and he said, “Is it your destiny to work at $bigcompany for the rest of your life?”Hell no it wasn’t!_ So, I quickly found another job and left.

This movement marked the clear beginning of a nonlinear jump in my success in the software industry. I saw new domains, I worked on harder problems, and I was rewarded more heavily than ever before. It was scary at times, but when I decided to be less fear-driven and conservative in my career choice, the shape and tone of my career – my life – changed for the better.

15. Practice, practice, practice

When you practice music, it shouldn’t sound good. If you always sound good during practice sessions, it means you’re not stretching your limits. That’s what practice is for. The same is true in sports. Athletes push themselves to the limit during workouts so they can expand those limits for real performances. They let the ugliness happen behind closed doors – not when they’re actually working.

Our industry tends to practice on the job. Can you imagine a professional musician getting onstage and replicating the gibberish from my university’s practice rooms? It wouldn’t be tolerated. Musicians are paid to perform in public – not to practice. As an industry, we need to make time for practice.

Practicing may include learning more about your programming environment (APIs, libraries, methodologies, etc.), sight reading (reading new pieces of open source code to improve your ability to read and understand code), improvisation (introduce new constraints in small projects to improve your thinking abilities) and so on. [paraphrased]

32. Say it, Do it, Show it

You should start communicating your plans to your management. The best time to start communicating the plans is after you have executed at least one cycle of the plan. And – this is an important point – start doing it before they ask you to do it. No manager in his or her right mind would be unhappy to receive a succinct weekly e-mail from an employee stating what was accomplished in the past week and what they plan to do in the next. Receiving this kind of regular message unsolicited is a manager’s dream.

Start by communicating week by week. When you’ve gotten comfortable with this process, start working in your thirty, sixty, and ninety-day plans. On the longer views, stick to high-level, impactful progress you plan to make on projects or systems you maintain. Always state these long-term plans as proposals to your manager, and ask for feedback.

The most critical factor to keep in mind with everything that goes onto a plan is that it should always be accounted for later. Every item must be either visibly completed, delayed, removed, or replaced. No items should go unaccounted for. If items show up on a plan and are never mentioned again, people will stop trusting your plans, and the plans and you will counteract the effectiveness of planning. Even if the outcome is bad, you should communicate it as such. We all make mistakes. The way to differentiate yourself is to address your mistakes or inabilities publicly and ask for help resolving them. Consistently tracing tasks on a plan will create the deserved impression that no important work is getting lost in the mix.

43. Making the Hang

Speaking for myself (and extrapolating from there), the most serious barrier between us mortals and the people we admire is our own fear. Associating with smart, well-connected people who can teach you things or help you find work is possibly the best way to improve yourself, but a lot of us are afraid to try. Being part of a tight-knit professional community is how musicians, artists, and other craftspeople have stayed strong and evolved their respective artforms for years. The gurus are the supernodes in the social and professional network. All it takes to make the connection is a little less humility.

Of course, you don’t want to just randomly start babbling at these people. You’ll obviously want to seek out the ones with which you have something in common. Perhaps you read an article that someone wrote that was influential. You could show them work you’ve done as a result and get their input. Or, maybe you’ve created a software interface to a system that someone created. That’s a great and legitimate way to make the connection with someone.

44. Already Obsolete

You have to start by realizing that even if you’re on the bleeding edge of today’s wave, you’re already probably behind on the next one. Timing being everything, start thinking ahead with your study. What will be possible in two years that isn’t possible now? What if disk space were so cheap it was practically free? What if processors were two times faster? What would we not have to worry about optimizing for? How might these advances change what’s going to hit?

Yes, it’s a bit of a gamble. But, it’s a game that you will definitely lose if you don’t play. The worst case is that you’ve learned something enriching that isn’t directly applicable to your job in two years. So, you’re still better off looking ahead and taking a gamble like this. The best case is that you remain ahead of the curve and can continue to be an expert in leading-edge technologies.

Looking ahead and being explicit about your skill development can mean the difference between being blind or visionary.

P.S. This lesson was the reason why I started admiring DHH even more after seeing he is not afraid to include CoffeeScript and SCSS in Rails 3.1

51. Avoid Waterfall Career Planning

The important thing to realize is that change is not only possible in your career but necessary. As a software developer, you would never want to pour yourself into developing something your client doesn’t want. Agile methodologies help prevent you from doing so. The same is true of your career. Set big goals, but make constant corrections along the way. Learn from the experience, and change the goals as you go. Ultimately, a happy customer is what we all want (especially when, as we plan our careers, we are our own customers) – not a completed requirement.

I probably put more excerpts from the book here than I should, but I wanted to drive home the point on some of the non-obvious-but-critical points that the book raises that every software developer should ponder about.

Go buy the book / ebook now!



Update: Also see Top 5 Developer Skills That Will Get You Hired or Promoted

Book Review : Pomodoro Technique Illustrated

Monday, January 17th, 2011
  1. Have a list of things to do.
  2. Pick one thing to work on. Start clock.
  3. When tired, stop clock. Take a break.

It worked because of two reasons:

  1. Observing yourself led to the Hawthorne Effect
  2. Time spent per day was a quantifiable measure of productivity.

Simple.

It worked quite well for more than six months, but it just fizzled out for me. I couldn’t explain why at that time.

In retrospect, I think it was because of a few problems:

  1. It did not solve procrastination. When I knew it was a big task, I would just delay getting started because I had put pressure on myself to not pause the clock early once it was started.
  2. It did not help me stay focused for long. I would lose enthusiasm every few days because I would feel drained.
  3. It was easy to lose track that I was doing time tracking! For example, I would be focusing on an action item, and when something urgent came up, I would just switch to that and would have forgotten about the running clock.
  4. After a few months, it was not satisfactory enough to just look at a number at the end of the day and say “I’ve been productive today.” It just wasn’t doing the trick any more.
  5. If a task was big and could not get completed that day, I would often feel demotivated and frustrated rather than happy about having put effort on the task.

Many people had commented on that article suggesting that I try out the Pomodoro technique. After six months, I did visit that website, but reading “Work in units of 25 minutes, with 5 minutes break in-between” did not stir up my enthusiasm. Same goes for reading the official book.

Then I happened to notice on the Pragmatic Programmers website that they had a book out on the same topic called “Pomodoro Technique Illustrated” by Staffan Nöteberg.

Pomodoro Technique Illustrated book

I have a high degree of trust in the quality of the PragProg books, so I blindly bought the ebook, downloaded and read it. It turned out to be one of the best books I have ever read.

There are plenty of reasons why I loved the book, and having written a couple of books myself, I wish I could write a book like this one – it has a fabulous approach of one page per topic which forced the author to be concise yet insightful, it is backed by extensive research as indicated by the references to other books in the footnotes, it has an engaging experience via the usage of sketches which presents the topic at hand in a fun spunky manner, and generally speaking, I really liked it’s whole “no fluff, just stuff” approach to topics.

And I have not even mentioned the content of the book itself. The second chapter “Context” alone is worth reading this book for. It explains a lot of the psychology on why the Pomodoro technique is designed the way it is. It was a powerful motivator for me to try out the technique and consequently experience the benefits.

First, let’s explain the name “Pomodoro”, it’s the Italian word for “tomato.” This name was used because Francesco Cirillo, the creator of this technique, used his kitchen timer which was in the shape of a tomato.

Now back to the book… let’s take what’s wrong with the simple ‘time tracking’ approach mentioned at the start of this article and add a few extra steps that the Pomodoro technique has and show how it provides benefits.

The first problem with simple time tracking is fizzling out of energy because of pressure on oneself to work for long uninterrupted hours. Our lizard brain just cannot keep doing that for long, so you split time into units of 25 minutes with breaks:

  1. Have list of things to do (the “Activity Inventory” sheet).
  2. Pick one to work on. Start clock.
  3. Stop after 25 minutes (one pomodoro). Relax your body and mind, for 5 minutes (break).
  4. After 4 pomodori, take a longer break of 15-30 minutes.

As Staffan notes in the book (Page 56):

During your breaks, you’re not allowed to think about the previous Pomodoro or about the next Pomodoro. Don’t make important phone calls or start writing important emails. Your brain needs to absorb the last 25 minutes of challenging thinking.

If your stress system is never neutralized by mental recreation, you’ll notice a number of symptoms. The thinking system in the brain stem is affected, as well as the senses of the limbic system and in the end your biological rhythms. For example, your sleep might be affected.

At chronic stress levels, the capacity of your working memory and your ability to concentrate will fall. The joy of working will be transformed into anxiety – inspiration is altered to irritation.

This rhythm of 25 minute units leads to a sustainable pace (Page 74):

Sustainable Pace

Overview and control are the opposite of flow and deep creative-thinking processes. You can’t see the big picture and focus on details at the same time. Your focus will benefit from a process where you minimize the points where you have to sort and allocate priorities. But you need to do both. And you also need recreation time on a regular basis in order to absorb and recharge. So, you have three mental states to switch between. You alternate between them, but what triggers the mental state change?

I use three hats: the recreation hat, which is a jester’s hat; the working hat, which transforms me into the lion who is 100 percent focused on hunting the antelope; and the strategy hat, which makes me feel like a king when I’m sorting and deciding what to do during the next work iteration.

I come to work wearing the recreation hat. I put on the strategy hat and choose what activity to focus on. Then I put on the work hat, wind up the clock, and begin to focus. The clock rings after 25 minutes, which reminds me to put on the recreation hat. After a short break, I put on the strategy hat, and so on.

This timebox schedule that interleaves to focus, to prioritize, and to rest gives me a sustainable pace.

The second problem is that this a bit too lax in that there is no race to finish something, there is no goals. So let’s start every day with a subset of the todo list and make a commitment to oneself to finish that subset on that day with the caveat that it is okay if we don’t accomplish it:

  1. Have list of things to do (the “Activity Inventory” sheet).
  2. Consult your priorities and make a list on what to work on today (the “To Do Today” sheet)
  3. Pick an activity from the To Do Today sheet to work on. Start clock.
  4. Stop after 25 minutes (one pomodoro). Relax your body and mind for 5 minutes (break).
  5. After 4 pomodori, take a longer break of 15-30 minutes.

As Staffan says in the book (Page 51):

Pomodoro to do today sheet

Distinguishing between the Activity Inventory (a traditional to-do list) and the To Do Today (an extracted commitment) is a compulsory strategy for doing the right thing, getting started now, and putting optimum effort into your work. It gives you clear goals and personal control.

The third problem is that there is frustration when a task is not finished on a given day because the task is so big. So we break down how long the task will take and focus on that as well as finishing the task:

  1. Have list of things to do (the “Activity Inventory” sheet) plus number of pomodori you estimate for each task.
  2. Consult your priorities and make a list on what to work on today (the “To Do Today” sheet)
  3. Pick an activity from the To Do Today sheet to work on. Start clock.
  4. Stop after 25 minutes (one pomodoro). Mark one pomodoro completed for the task on the To Do Today sheet. Relax your body and mind for 5 minutes (break).
  5. After 4 pomodori, take a longer break of 15-30 minutes.

This gives the physical pleasure of marking a X on successful completion of a pomodoro. This also means it can help measure our progress on whether we are on track to finish the task in the estimated number of pomodori.

As Staffan says (Page 95):

Planning based on estimates makes your commitment for the day more realistic, and as a result, your motivation will improve. Recording the number of completed Pomodoro every day gives you a good understanding of your Pomodoro velocity.

So far so good, but how do I know whether I’m improving myself day over day? Now we shall add tracking to the technique:

  1. Have list of things to do (the “Activity Inventory” sheet) plus number of pomodori you estimate for each task.
  2. Consult your priorities and make a list on what to work on today (the “To Do Today” sheet)
  3. Pick an activity from the To Do Today sheet to work on. Start clock. Mark every internal interruption with an apostrophe next to the task name and mark every external interruption with a dash.
  4. Stop after 25 minutes (one pomodoro). Mark one pomodoro completed for the task on the To Do Today sheet. Relax your body and mind for 5 minutes (break).
  5. After 4 pomodori, take a longer break of 15-30 minutes.
  6. At the end of each day, note down statistics that you are interested in w.r.t. your performance for today in the Records sheet.

Of course, this tracking only works if you make sure that each pomodoro is atomic (Page 61):

Never switch activities in the middle of a Pomodoro. If you finish an activity halfway through a Pomodoro, spend the rest of the time over-learning. For example, if I finish early, I review what I have done, I repeat what I have learned, I see whether I can enhance my work, or I note new conclusions on paper—until the kitchen timer rings.

So, you’re not allowed to impulsively switch activities in the middle of a Pomodoro. In fact, just having the option to switch in the middle is a recurring disturbance. You can’t just stop in the middle of a Pomodoro and take a break either. Then you will lose the rhythm. And since the stopped Pomodoro was shorter, it will not be compatible – in terms of tracking – with other Pomodori.

Examples of statistics include basic things like number of pomodori you committed to at the start of day versus the actual number of pomodori spent.

It can go as comprehensive as you wish, for example take interruptions we tracked during each pomodoro – we can track the average number of internal interruptions (your mind wanders) per pomodoro, the average number of external interruptions (somebody at work asks you something or you get a call) per pomodoro, what time of the day you get most interruptions, how long into each pomodoro you get your first distraction, and so on.

Pomodoro interruptions tracking

The point is to keep it simple and measurable. And something that motivates you to be productive each day. You should have a little ceremony but not too much otherwise it becomes self-defeating.

There is a LOT more to this than meets the eye and this is where Staffan’s book makes a difference. I would highly recommend reading this book. I’m making a mental note to myself to make this book one of the most important books that I will make my kids read and practice when they are in school. It is a valuable life survival tool that I feel they must learn at an early age (the next generation is going to be even more competitive!).

The best part is that I can fit GTD and Pomodoro techniques together. I remember reading a comment somewhere which said “GTD helps you answer what to do. Pomodoro helps you answer how to do it.”

Last, but not the least, the important thing to keep in mind is that Pomodoro technique forces you to adopt good habits. In more technical terms, “conditioned reflexes are key.” The act of marking X against an action, the act of crossing an action item when it is done, the act of making your brain instantly focused at the start of a Pomodoro (as well as the ticking sound of the clock, if you’re inclined), etc. they all help you adopt good habits. And I personally believe that good habits are the secret behind most successful people.

As Staffan says in the book (Page 48):

First prioritizing and then focusing on the most important activity will make you feel safe and sound. Otherwise, your focus will constantly be disturbed by questions like “Am I really doing the most important thing now?” At the start of my day, for instance, I first look at the whole backlog and pick the most important activity. Then I stick to it for a short timebox, before I reevaluate whether it’s still the most important one. In my mind I replace “I must finish” with “Where can I start?” and I replace “This project is so big and important” with “I can take one small step.”

Without the Pomodoro technique, figuring out how to start each workday can be hard. You might feel like you have a billion things and you can’t possibly do everything simultaneously. So, you never really start, and suddenly it’s lunch time.

Pomodoro itinerary

On a related note, there are variants to this technique, they can be called Kanban or they can be called GTCD but I hope you get the gist of why this technique works.

If you’re looking for tools, I would suggest these two:

  • For Linux and Windows – Focus Booster app
  • For Mac – The Pomodoro tray item – I like this one because it uses the Mac’s built-in voice feature to make announcements of the start and end of a Pomodoro.

Just in case you were curious, I revised the book this time in 5 pomodori, and wrote this blog post in 5 pomodori :-)

So what are you waiting for, go read the book now! And do write in about how the Pomodoro technique has helped you.


Update : “We believe what we want to believe, so it’s better to get data” — B J Fogg in an interview with Ramit Sethi – I guess this is the most succinct answer to when people ask me why use the Pomodoro technique :-)

My Bash and Vim setups

Monday, December 6th, 2010

I find it surprising on how little time coders spend on their development environment (the “dev env”). And especially, I find it amusing that I can find, refactor and test code way faster than the Netbeans IDE users in my office, with just a shell and Vim setup.

So why is a good dev env necessary? Because we do searching, refactoring, editing and updating of code much more than appending fresh code, and this also applies to code that you wrote half an hour ago, because you will want to quickly refactor it when a new constraint, a new requirement, a new design or a new idea comes to your mind.

I learned this lesson while I was writing my Vim book. Since then, I have been investing quite a bit of time on my vimrc file, heavily customized to my liking.

To give one very quick example – I like the cursor to always be at the middle of the window (as opposed to at the bottom of the screen when you’re scrolling down), so that I can see the lines of code before and after the current line. To achieve this, you simply set scrolloff=999 and you’re done. A one-line setting, but it makes a world of difference in usage.

Extrapolate this to dozens of customizations and you have just optimized your environment for lesser time at the keyboard, lesser time fighting the editor, and more time on the actual code. You do not want to break your flow of thought because you’re unable to quickly switch between the right files (say, between the controller and the view files), and so on. [1]

These customizations are stored in .vim and .bashrc files, collectively referred to as “dotfiles”. I have been asked quite a few times by readers of my book to share my dotfiles, but I was not comfortable to share it because I felt it was too hacked up and did not have a good “base”.

So when I came across bash-it and vim-addon-manager, I knew they were good foundations and a good excuse for me to overhaul my bash and vim setups.

And lo, behold, my dotbash and dotvim repos (on GitHub).

These are my actual working environments at office and on my personal laptop, so if you don’t agree with some of my defaults, fork away.

Now, on to what is interesting about my setup…

What bash-it provides

bash-it provides great defaults and aliases, right from .. as a shortcut for cd .. and ... for cd ../.. to bash completion setups for git, rake, etc., and of course, a gorgeous theme to use:

Bash prompt

The best part though is it’s neat organization into aliases, completion, custom, lib, plugins, themes and template folders. That makes a big difference in the long run, for the same reasons why a cleanly modularized codebase is better than one giant script.

And it will get various new features over time contributed by the community, example, completion of server names for ssh.

What vim-addon-manager provides

vim-addon-manager provides a super-simple way to install plugins into separate folders and then use them all, instead of lumping all of them together into a .vim folder. Just add the name of a new Vim plugin to the list of plugins you want to load, and it will automatically fetch the plugin and install it for you! This makes it easy to play around with new plugins as well as a simple way of having the latest version of the Vim plugins.

I use vim-addon-manager, but there are alternatives – others prefer pathogen.vim and there is also Vimana which gives you an apt-get-like command to search for Vim plugins. Choose your weapon.

There are caveats to vim-addon-manager, mainly that all plugins don’t seamlessly work with it. For example, I couldn’t get pyflakes.vim to work with it, so I had to unzip pyflakes into my regular .vim directory to use it.

My Bash customizations

Ever since I saw gemedit, I wanted something like that for Python eggs, and I realized that it was easy because Python modules have a __file__ attribute that I can use, and I created my own egg_edit command to do the same trick. Similarly, I have my own sync command with the settings that I prefer, etc.

tmux setup

tmux is a modern alternative to GNU Screen which is a common arsenal in any Unix coder’s war-chest. I prefer to use tmux because it makes it easy to script sessions which makes it super-easy to start a new session working on a project. For example:

Put this as flask-boilerplate-tmux.bash into the custom folder of your bash-it/dotbash folder, and then you can run flask-boilerplate-tmux any time to start a new session to work on the flask-boilerplate codebase! ( Update : Check out Teamocil which will allow you to do the same with a simple yaml config file )

I have a highly customized tmux configuration which sets many good default settings, especially starting the numbering of the windows from 1 (switching between 0 and 1 is painfully because they are at the opposite ends of the keyboard).

autojump

A good Bash plugin to use is autojump which monitors which directories you spend most of your time in, and then makes it easy to jump to your most favorite directories using a simple j command.

Don’t forget to use jumpstat to see which are those directories. Also, bash-it/dotbash provides a command called rh that does something similar.

Note that I have started using autojump only recently, so I don’t have as much experience using it as the other tools.

My Vim customizations

I have a fairly customized vimrc, right from changing the status line to providing shortcuts like :A to copy the full buffer to the clipboard and :B for vice-versa, which I find it very useful in situations such as I am writing this article in Vim and can quickly copy/paste into WordPress when I am done with the draft. I also have a \o shortcut to open a URL that the cursor is on, and many other goodies.

Vim plugins I use

There are three Vim plugins which are must-have for me:

First is command-t.vim which is a “fuzzy finder” to quickly jump to another file under the current directory.

command-t.vim

Second is ack.vim which allows you to intelligently grep your source code for patterns and then jump to each occurrence in a split-window fashion.

My favorite feature is that I can search my code with :Ack --python or :Ack --ruby and it will ignore all the JavaScript libraries which can have the same variable or function names.

ack.vim

Third is conque shell which allows you to to create a split window which can be any interpreter prompt.

The best part is that you can use a shortcut \e (assuming the default mapleader) to send the visually selected text to the interpreter prompt as if it was copy-pasted and it will execute it! This is incredibly helpful when you want to iterate the development of a multi-line function or fragment of code and you find extracting that code to a separate file and editing that file to be a pain (The interpreter prompts are designed for playing around with one-liners, they are simply not built for multi-line code).

conqueshell.vim

I have the following lines in my vimrc to quickly create ConqueShell sessions:

command Shell :set nolist | ConqueTermSplit bash
command PythonShell :set nolist | ConqueTermSplit python

So, I quickly run PythonShell to create a new session.

Setups by others

For other Vim setups, see the Janus repo on GitHub which is used by Yehuda Katz himself. You’ll find many more on the dotfiles website.

Summary

I’m hoping this article will help Vimmers and Bash users to broaden their usage and help them be more productive, the same intention behind my Vim book:

“I used to play with vim for years. I think this book would have to save me much time if it was written 10 years ago! Anyways, thank you for this amazing work you are doing.”

– turky_samy (at) hotmail (dot) fr

If you like what you have read so far, then go ahead and install dotbash and install dotvim.

Bottom line:

“Give me six hours to chop down a tree and I will spend the first four sharpening the axe.”

– Abraham Lincoln



[1] The flip side though is that I have been told “You’re the most mysterious guy in this office. No one understands what you’re doing when we see you coding.” Heh. Hopefully, it is not as mysterious after this article.

Book Review: The Checklist Manifesto

Saturday, August 21st, 2010

I recently read the book The Checklist Manifesto by Atul Gawande – a respected surgeon, noted author, MacArthur fellow, New Yorker staff writer, and a professor at Harvard Medical School.

The premise of the entire book is the author’s dive into the concept of a checklist and how they have dramatically improved the efficiency and reliability of professionals in the medical profession, the aeronautical industry, the architecture industry and even the venture capital industry.

So what is a checklist? It is the minimum set of critical steps for any task to be achieved.

Why are they useful? Because checklists protect against many kinds of dangers. For example:

  1. “Faulty memory and distraction are a particular danger in what engineers call all-or-none processes – if you miss just one key thing, you might as well not have made the effort at all (whether it is buying ingredients for a cake or preparing an airplane for takeoff).”
  2. “People can lull themselves into skipping steps even when they remember them. Especially in busy and stressed workplaces (such as hospitals). In complex processes, certain steps don’t always matter, may be it affects only 1 out of 50 times. But when it does, it can be catastrophic.”

One of my favorite passages in the book is as follows (it’s a longer excerpt than I would have liked, but all the parts were really important, so please read the whole passage to understand what’s going on):

Checklists remind us of the minimum necessary steps and make them explicit. They not only offer the possibility of verification but also instill a kind of discipline of higher performance. Which is precisely what happened with vital signs – thought it was not doctors who deserved the credit.

The routine recording of the four vital signs did not become the norm in Western hospitals until the 1960s, when nurses embraced the idea. They designed their patient charts and forms to include the signs, especially creating a checklist for themselves.

With all the things nurses had to do for their patients over the course of a day or night – dispense their medications, dress their wounds, troubleshoot problems – the “vitals chart” provided a way of ensuring that every six hours, or more often when nurses judged necessary, they didn’t forget to check their patient’s pulse, blood pressure, temperature and respiration and assess exactly how the patient was doing.

In most hospitals, nurses have since added a fifth vital sign: pain, as rated by patients on a scale of one to ten. And nurses have developed yet further such bedside innovations – for example, medication timing charts and brief written care plans for every patient. No one calls these checklists but, really, that’s what they are. They have been welcomed by nursing but haven’t quite carried over into doctoring.

Charts and checlists, that’s nursing stuff — boring stuff. They are nothing that we doctors, withour extra years of training and specialization, would ever need or use.

In 2001, though, a critical care specialist at Johns Hopkins Hospital named Peter Pronovost decided to give a doctor checklist a try. He didn’t attempt to make the checklist encompass everything ICU teams might need to do in a day. He designed it to tackle just one of their hundreds of potential tasks, the one that nearly killed Anthony DeFilippo: central line infections.

On a sheet of plain paper, he plotted out the steps to take in order to avoid infections when putting in a central line. Doctors are supposed to (1) wash their hands with soap, (2) clean the patient’s skin with chlorhexidine antiseptic, (3) put sterile drapes over the entire patient, (4) wear a mask, hat, sterile gown, and gloves, and (5) put a sterile dressing over the insertion site once the line is in. Check, check, check, check, check. These steps are no-brainers; they have been known and taught for years. So it seemed silly to make a checklist for something so obvious. Still, Pronovost asked the nurses in his ICU to observe the doctors for a month as they put lines into patients and record how often they carried out each step. In more than a third of patients, they skipped at least one.

The next month, he and his team persuaded the Johns Hopkins Hospital administration to authorize nurses to stop doctors if they saw them skipping a step on the checklist; nurses were also to ask the doctors each day whether any lines ought to be removed, so as not to leave them in longer than necessary. This was revolutionary. Nurses have always had their ways of nudging a doctor into doing the right thing, ranging from the gentle reminder (“Um, did you forget to put on your mask, doctor?”) to more forceful methods (I’ve had a nurse bodycheck me when she thought I hadn’t put enough drapes on a patient). But many nurses aren’t sure whether this is their place or whether a given measure is worth a confrontation. (Does it really matter whether a patient’s legs are draped for a line going into the chest?”) The new rule made it clear: if doctors didn’t follow every step, the nurses would have backup from the administration to intervene.

For a year afterward, Pronovost and his colleagues monitored what happened. The results were so dramatic that they weren’t sure whether to believe them: the ten-day line-infection rate went from 11 percent to zero. So they followed patients for fifteen more months. Only two line infections occurred during the entire period. They calculated that, in this one hospital, the checklist had prevented forty-three infections and eight deaths and saved two million dollars in costs.

If that, my friends, does not explain the power of a simple checklist, I don’t know what can.

And yet, despite these results, people were reluctant to adopt checklists. In fact, I know you are dismissing the idea right now. Try writing down 5 reasons why checklists are stupid and won’t work for you. Now write 5 reasons why it will work. Think over it. I bet most people find the 5 reasons against checklists, easier to write, but will be convinced about it after writing the 5 reasons for it.

(more…)

Creativity x Organization = Impact

Monday, June 7th, 2010

81 people have asked me about “Innovation – ways to make people innovate.”

That’s a hard question. Especially because I’m always wary of using such an ambiguous term. And more so, when there are far more qualified people to answer out there.

Since I have been asked the question, I am jotting down my thoughts on the subject here (the usual disclaimers apply):

I think the question really is about how impactful can a person be, rather than this nebulous word called “innovative.” In fact, I hate the word “innovation”, because the focus should be about problem solving.

Innovation (regardless of its definition) is almost always the by-product of a successfully executed product. You don’t start by wanting to be innovative. You start by looking at interesting hard problems. You only end up being innovative. So, Solve the Problem first.

For example, I always find it amusing to see the feedback on isbn.net.in – people have said “It’s awesome! It’s wonderful!” I replied “It’s just a bunch of regexes!” … But it just goes to show that what matters is how much the user values it, not how it is implemented.

Now, back to topic: If you want to be able to attack interesting hard problems, then my honest opinion is that you need to keep this equation in mind:

Creativity x Organization = ImpactScott Belsky at the 99% Conference

Regarding Creativity / Ideas:

  1. “If you think you don’t have any good ideas, that’s because you don’t really have bad ideas. You get one good idea only after you get a hundred bad ideas.” — paraphrasing Seth Godin in his latest book Linchpin.
  2. Frequent Inspiration helps. A lot. Keep reading Springwise, Yanko Design, Quirky everyday and you’ll be inspired to “innovate” as well.
  3. Observe. “If you’re looking for problems to solve, you’re better off to be around real people whose problems can be solved via your trade (such as software).” — RWW article
  4. Follow the Trends, such as Gartner Identifies the Top 10 Consumer Mobile Applications for 2012 and 10 Tech Trends for 2010 — Time , and more importantly the kinds of technology and products that are being created, follow those “cutting edge” technologies that we love to adore and wonder “Wow, how did they come up with this stuff?

But you have to be careful when ideating, because it is very easy to get into “analysis paralysis”:

Another important thing is to not get so carried away by the shiny new things that you forget the basics:

Regarding Organization / Discipline

  1. There is this guy in Adobe Bangalore office who is a “patent machine.” He files for a patent every two weeks. No kidding. And these weren’t only trivial ones either. What was his trick? He spent a dedicated half hour every single day on thinking up new ideas or solving problems. It’s as simple as that. This is called the Seinfeld “Unbroken Chain” philosophy.
  2. Body and Mind need a predictable routine and that’s when it’s optimal. And once it has a routine, it is hard for the body and mind to accept any other way. That’s why smokers find it so hard to get out of their addiction, because body and mind is used to it and is craving for it. Same goes for coffee, same goes for writing code, same goes for creating new ideas. It is so ironic that discipline breeds creativity. It’s a truth that we don’t want to accept, because it makes us sound less “human”.
  3. Don’t judge an idea to be good or bad until you have tried to manually solve it yourself once or prototyped it. After your first attempt at solving the problem, if you still feel good about it and feel that some pain point has been relieved, then it is a good idea. Take Jack Dorsey’s simple approach to creating as an example: draw out the idea, gauge the right timing, and iterate like mad.

To summarize:

  1. Focus on the problem, not the solution. As Dave McClure says: “problem, not solution. customer, not technology. UX, not code. distribution, not PR. acq cost, not revenue projections.”
  2. As Seth Godin would say, “Artists who ship” have the most impact. Read Linchpin to internalize it.
  3. What is your impact? Can you qualify it? Can you quantify it? Measure it every month – Within 6 months, you will know whether you are “innovative.”

Update #1: Related Reading, as pointed out by Srikanth in the comments: The Discipline of Innovation by Peter Drucker. Looks like I keep reinventing what Drucker has already said.

Update #2: See 10 Laws of Productivity by Behance team.

About Deep Procrastination

Wednesday, May 5th, 2010

Cal Newport, one of my favorite bloggers ever, wrote about the upside of deep procrastination last week. I had a few thoughts on the subject.

So what is deep procrastination? You know you’re in it when “No matter how dire the stakes, starting work becomes an insurmountable prospect.”

I remember this starkly happen to me when I transitioned from 2nd PUC to B.E.

I had the fortune of studying in a school which exposed us to computers very early. I remember playing a lot with Logo and fascinated that you can draw circles and rectangles on a screen. I knew back then that I wanted to study computers.

So in PUC, I had chosen to study computer science (PCMCs) and not choose biology at all, compared to most of my peers who wanted to “keep their options open”. No sirree, computers was for me.

I couldn’t wait to get to “B.E. in Computer Science” so that all I would do was learn about computers.

Uh oh.

I found myself studying about “strength of materials”, about the different materials used in construction of a building, about the calculation of the weight that a pillar has to support, blah blah. WTF.

I was disgusted. I was very demotivated. I was in deep procrastination. I had stopped studying. And I didn’t care.

I have usually stood in the top 2-3 ranks of my class throughout my school and pre-university days (well, geeky was the word used to describe me…). In engineering days, I was given a rap for having attendance shortage.

But something happened. I soon started to enjoy it.

I explored a lot in those days – from lots of trekking (which meant travelling outside the city with friends! Whoa!) to reading tons about technology.

Because I studied well in PUC and got a good rank in CET (463, out of lakhs of people), my grandpa surprised me with a gift of 5000 rupees (don’t remember the exact amount). I had never seen so much money in my life (back then).

I blew it all up by sitting in a cybercafe. I used to download web pages, put it in floppy disks, come back home and read them on the home computer. I fondly remember reading about a lot of open source projects and a lot of Tim O’Reilly’s essays.

Those were amazing days. And legend has it, that it all began with a few good seniors who taught us Linux and open source, and I eventually ended up writing a book (stop yawning alright!).

Fast forward by 5 years… As a good friend likes to say: “There are only two times you innovate in your life – 1. when you’re in college 2. when you retire.” True enough, I don’t think I have ever read deep tech stuff since then. Nowadays, reading the LLVM Blog makes my brain hurt. Sigh.

The point of my story is this: Since I stopped focusing on studies in college, I let my curiosity guide me. All that curiosity has led me places and I’m forever grateful for that.

My Advice: The key to get out of deep procrastination is to have a constant balancing act between hard focus and curiosity. Leaning towards either for an extended period of time can be completely demotivating.

I believe that working on projects that will have long-lasting impact and simultaneously priming your curiosity, and engaging with the unlimited number of topics to explore out there, will keep you on an even keel and a good frame of mind. Maybe even a happy frame of mind.


The point of being Done

Monday, February 1st, 2010

Listening to Seth Godin say “What you do for a living is not be creative, what you do is ship” reminded me of the The Cult of Done manifesto:

The Cult of Done Manifesto

If you find the image inconvenient to read, here’s the text:

  1. There are three states of being. Not knowing, action and completion.
  2. Accept that everything is a draft. It helps to get it done.
  3. There is no editing stage.
  4. Pretending you know what you’re doing is almost the same as knowing what you are doing, so just accept that you know what you’re doing even if you don’t and do it.
  5. Banish procrastination. If you wait more than a week to get an idea done, abandon it.
  6. The point of being done is not to finish but to get other things done.
  7. Once you’re done you can throw it away.
  8. Laugh at perfection. It’s boring and keeps you from being done.
  9. People without dirty hands are wrong. Doing something makes you right.
  10. Failure counts as done. So do mistakes.
  11. Destruction is a variant of done.
  12. If you have an idea and publish it on the internet, that counts as a ghost of done.
  13. Done is the engine of more.

My favorite is Point 6.

iPhone for productivity

Wednesday, August 19th, 2009

I was reading the The Favorite iPhone Apps of Five Geek Rock Stars and did not find it useful, because it was mostly about games or things that apply to people only in USA. So I was wondering if I had my own list.

Stanza

My most favorite application is the Stanza app for reading ebooks.

It’s because of Stanza that I actually started to read more! Mostly because I can read a book anywhere and any time I want to. I also discovered some great books such as Siddhartha by Hermann Hesse because I could explore and download in a few clicks.

Maps built-in application

Google started giving driving directions in India a few months back and it rocks!

RunKeeper

The ability to see your pace at exactly every moment during a run is very handy. And I don’t have to carry any extra device because I’m already carrying my iPhone which also happens to be my iPod which I listen to while running. And the best part of the RunKeeper Pro app is that it announces by voice the distance and speed every 5 minutes which gives me the boost I need if I slowed down.

RememberTheMilk and Evernote

The RememberTheMilk app is one of the slickest iPhone apps I’ve used, but I started making daily todo lists which is a bad idea, so I wanted to think in terms of notes instead of lists, so I started using the Evernote app which was exactly what I was looking for.

The best part about Evernote is that I always have a notepad to jot things down whenever I have a thought. And after I started using Evernote, I realized this happens more often than you think! And it has gotten more useful with the 3.0 version of the app. For example, imagine searching for notes by the location where you created the note! Or make voice notes. Or saving photos of an article in a magazine and searching for the text in that article inside Evernote. Or sending a link to Evernote via email. And so on.

There is also the official WordPress app for writing blog posts or tinkering with drafts.

MobileStudio and Dropbox

Whenever I need some files that I might need to use on-the-go, I transfer it via FTP to the MobileStudio app and then access it on my iPhone.

For example, in one incident, I was able to quickly open the tickets I had saved as a PDF on my phone since I didn’t have the actual printout.

Oh, and having Dropbox access online via the browser means I have all my files accessible any time.

TimeJot

See my earlier time tracking article.

tv.burrp.com

If you thought there was never interesting on TV, just visit tv.burrp.com and find out what’s on TV right now. It’s very very useful.

burrp.com

Find restaurants on-the-go. Once, a friend and myself were in Koramangala looking for a place to eat, and we discovered Fiorano Ristorante via burrp, and had nice authentic Italian food.

Reach people

I never have to worry about how to reach a person any more, I have all the methods – phone call, SMS, email, Skype, IM, Twitter. You name it, we got it.

TED Talks at night

It’s hard to turn off the music or movie and force myself to sleep. So I end up taking my iPhone to bed and watching a TED talk or two before sleeping.

Ambiance

There’s actually an app for listening to rain sounds or the crackling of a campfire or sounds of that sort. It comes in really handy when you just want to shut out all the noises outside and you’re not in a mood to listen to music. It gives you the background noise that you always wanted.

WordBook

Having a very handy dictionary on your fingertips is handy when you want to check if the word that you’re using means what you think it means.

Torch

Yeah, the Torch app comes in handy these days because of the frequent power cuts in Bengaluru.

Wishlist: ngpay

The one app that is missing on the iPhone is an ngpay app. I once called up their customer support and asked if they had plans for an iPhone app and they told me that “Sorry sir, the iPhone doesn’t support third-party applications.” I was speechless.

There’s an app for that

There are a lot of apps out there to use.

I’m just glad that I finally got a kinda-PDA device that I always wanted. Now I never get bored waiting for someone because I can actually spend that time finding out the latest news and I can check Wikipedia for the members of a rock band during a discussion with friends :)

Twitter vs. Why we can’t concentrate?

Saturday, August 15th, 2009

Attention Span

I started using Twitter as an experiment, and it was the first and only social network I really participated in. It was great because I actually made new friends that I went on trips with, got the opportunity to follow the thoughts of interesting people, and whenever I was in a quandary, I just had to holler a question and would get plenty of answers and advice in return.

But I was uneasy because I was feeling jaded. I thought it was because of the typical “overdoing it” reason, but there was more to it. It was affecting my ability to think critically/deeply about a subject.

Why am I thinking so much about a social network? As David Allen once said, “Pay attention to what has your attention.” And clearly, Twitter had more of my attention than it should have.

Since my attention span was reducing from books to blogs and then blogs to tweets, I was being converted from “from a thinker to a clicker”.

So I’ve gone back and started reading books and paying more attention to offline friends. And I’m not alone on this, many people have expressed similar opinions.

Getting your Fix

I think of this situation as getting your fix. Think smoking vs. coffee. Both are stimulants. Both are legal. But since smoking actually affects others, people have to go outside to indulge in it. Hence, it is less convenient. Probably that’s why there are more people addicted to coffee. Because it is more convenient. There is a sufficient barrier to smoking. Even though this analogy may not be true, consider reading blog posts vs. reading books. There is a sufficient barrier of attention to the latter, that is why more people prefer reading blog posts. It is more convenient. The same for reading blogs vs. tweets. The latter is more convenient. Then, going down this path, your ability to think becomes restricted to 140 characters. Twitter gives you that instant high that you published or read something, which means you lose persistence which is required for longer reading, hence tend to think a lot less and quick wins prevent you from going after bigger wins.

The problem with the shorter fix is that you will indulge in it more often and it will have lesser stimulation in the long run. Consider the difference between, say, having a 5-day 9-hour work week with 2-day weekends vs. having 6-hour work everyday with no weekend and no holidays. Which one would you prefer? This is how I argue that a book once in a while will give you more stimulation than a hundred tweets. For example, consider the signal-to-noise ratio – only tools like filtrr.com can filter out #ipl talk, etc. whereas a book would give a broad understanding about a particular subject. In the long run, it is more enriching to go deeper into subjects, not to be “restricted” to a buffet of subjects.

As a sort-of substitute for Twitter, I’ve shifted to a del.icio.us network. After all, most of Twitter is sharing links and delicious doesn’t have the downside of frivolous tweets. Also, delicious shows how many people have bookmarked a link giving another indicator whether something is worth reading or not, and even better, they are tagged appropriately so I immediately know the topic to expect for an article, instead of “This is cool <insert link>.”

The Attention Psychology

Let’s think about attention in terms of psychology, which I am trying to understand a little about from The Mouse Trap blog:

Maximizing utility

U = E x V (where U is utility of act; E is expectancy as to whether one would be able to carry the act and if so whether the act would result in desired outcome; and V is the Value (both subjective and objective) that one has assigned to the outcome.

Maximizing Predictability

While selecting an action we maximize reward and minimize punishment, basically we choose the maximal utility function; while choosing which stimuli to attend to we maximize our foreknowledge of the world and minimize surprises, basically we choose the maximal predictability function; we can even write an equivalent mathematical formula: Predictability P = E x R where P is the increase in predictability due to attending to stimulus 1 ; E is probability that stimulus 1 correctly leads to prediction of stimulus 2; and R is the Relevance of stimulus 2(information) to us. Thus the stimulus one would attend, is the one that leads to maximum gain in predictability. Also, similar to the general energy level of organism that would bias as to whether, and how much, the organism acts or not; there is a general arousal level of the organism that biases whether and how much it would attend to stimuli.

As per my understanding, the first part means that because we expect much utility about something, it’s perceived utility is higher, making it’s value higher. And because Twitter gives that dash of randomness that we desire, it’s utility is much higher than it really is.

The second part means that we want to know more about the world in order to have lesser surprises, and hence we tend to read more and more, especially if it is information that we perceive as relevant to us.

Bottom line: I question whether more and more information and more and more immediacy is really necessary/required for us?

Think of all the great things that have been achieved whether it is a motor engine or a music stereo, would it have been created if the to-be-creator was constantly distracted and with low attention span? Where is the time to get inspired if we’re always mentally tired?

Why Can’t We Concentrate?

I will finish up with excerpts from this excellent article on Salon called “Why Can’t We Concentrate?”:

(more…)