sameer iyengar

internet, technology, entrepreneurship, productivity, travel…

Entries Tagged as 'productivity'

Pair Programming is Awesome

November 9th, 2009 by sameer
Respond

I’ve been meaning to write about this for a while.  Pair programming is awesome.  I was a huge skeptic when it was first pitched to our team, but after trying it a few times, I was completely sold.  It makes you more productive, produces better code and is just more fun all around.

I’m know there has been tons of stuff written about this, but when I read it, I was so skeptical that I thought all those authors were crazy.  But you know I’m not crazy.  So I’m going to tell you why its great.

Pear by hassi on Flickr

Photo from hassi on Flickr.

Benefits of pair programming

Not convinced?  How come?  I already said it was awesome (and I put it in bold).  Here are some benefits –

  1. It keeps you focused. If you’re anything like me, you probably have a tendency to drift when you hit a stopping point.  Maybe check some e-mail or read your favorite blog.  Not anymore.
  2. It helps when you get stuck. Its easy to spend a lot of time trying to figure out something that you’re unfamiliar with.  It always helps to have someone to discuss it with without having to feel bad for interrupting your co-workers all the time.
  3. It avoids stupid mistakes. Have you ever spent 30 frustrating minutes trying to figure out why your change isn’t showing up in the output, only to realize that you forgot to hit save?  Yes, yes, you have.  Your partner is likely to notice those things before you spend unnecessary time pulling your hair out.
  4. It produces better code. It’s less tempting to take shortcuts, write unreadable code and  ”forget” to test things when you’re working with someone.
  5. Its the best way to learn a new code base. The best way to get someone up to speed on a project is to have someone pair program with them.  They’ll spend less time digging around outdated documentation and more time contributing.  I’ve effectively pair programmed with people outside my team who knew absolutely nothing about the project coming in.
  6. Its more fun. This one really depends on the people you’re working with, but its definitely a big upside.

How to set up a pair programming workstation

The set-up is really, really important.  Both people need equal access.  You’ll need:

  • Two keyboards
  • Two mice
  • A long, straight desk (no weird angles)
  • A giant monitor

Its key for each person to have their own keyboard and mouse so that no one is just sitting there passively watching the other person type.

How to pair program

Now that you’ve got a sweet workstation set up, its time to actually do it.  This part is easy, just start writing code.  Switching off can be a bit tricky at first, but soon it’ll become seamless.

If you’re using Test-Driven Development (writing a test before writing a feature), you could have one person write a test that fails, then have the other person make the test pass and write the next test.  Its an easy way to make sure you’re switching off regularly.

One of the big advantages is that its easier for something to do or fix something than to spend time explaining it.  Notice that something is spelled wrong?  Fix it, you have your own keyboard.  Have an idea for how to do something?  Just write it and let the code speak for itself, instead of trying to explain what you’re trying to do.  You can always delete or edit it as necessary.

Potential Downsides

  1. It could take longer than two people working independently. This is true, but I’d argue only if both people know exactly what they’re doing.  More often than not, when you’re working on something new or complex, pair programming will be faster.
  2. You could end up hating your co-worker after spending so much time with them. This is true too.  Definitely switch things up often to avoid this.

Love pair programming? Still not convinced?  Leave a comment.

Category: productivity  programmingNo Comments.

Happy

November 7th, 2009 by sameer
Respond

Love this image that I found over at Minimal.  I think it looks even better with the colors inverted:

happy

Category: productivityNo Comments.

Being Effective

June 15th, 2009 by sameer
Respond

There’s a lot of things about being effective at work that college doesn’t teach you.  At the risk of sounding like a corporate drone (but a highly efficient corporate drone!), here are some that I’ve found useful.

Document everything. Have easily-accessible references for everything you’ve done (plans, presentations, decisions, notes, designs, etc.).   It helps you stay focused and helps other people understand what you’re doing.  Next time someone asks you a question about your project, you’ll already have plenty of things to point them to.

Communicate. I’ve found it better to err on the side of over-communication, its helpful to everyone you work with.  Similarly, being responsive is also important: a short reply like “I’m looking into it” or “Looks good to me” is better than leaving the person wondering if you even got their e-mail.

Know key metrics and industry trends. This one will be useful when you least expect it.  Understanding some numbers (at least to an order of magnitude) can help you prioritize and make better decisions.

Make an agenda. Everyone has attended plenty of directionless and inefficient meetings.  Don’t be the reason they have to attend one more.

Try it. It’s easier to evaluate an idea when you have a public proof-of-concept that people can give you feedback on.

Know your priorities and your accomplishments. This one is more important than I thought.  When you work on something every day,  it’s easy for it to seem routine and to lose sight of (for lack of a better phrase) “the big-picture”.  Having your priorities top of mind helps you ensure that you’re making an impact.  Knowing your accomplishments helps people understand what that impact is.

Have suggestions of other things that work for you?  Think I should write a post with fewer corporate buzzwords?  Leave a comment.

Category: productivityNo Comments.

Resolution Debt

May 24th, 2009 by sameer
Respond

Space Needle

Sometime in December, I hand-wrote a list of New Year’s resolutions and then promptly forgot about them.  Though they were in no order of importance, the first one was a seemingly-reasonable goal to “blog on sameeriyengar.com 1 post/wk”.

By my (completely non-scientific) count, I have posted exactly zero entries since that time (though, thanks to bots that can fill out forms, I have received hundreds of spam comments).  In fact, my most recent entry which contains greater than one complete sentence was over one year ago.

This being the end of May, I am now in debt twenty entries.  However, instead of breaking my own knee caps, I’ve graciously allowed myself to submit those entries a bit late and see if its still possible to reach an average of 1 post per week by the end of the year.

There’s no shortage of articles with tips for achieving your goals, which is no surprise considering its a common metric for measuring success.  One idea that has resonated with me is to think about two things:

  1. Why do you even care about doing this?
  2. How is the process of achieving this goal going to impact me?

My theory is that its easier to commit to a goal if the reason and the impact are something you actually care about.  It should probably be something slightly more compelling than “well, it would be kinda cool”.  For example, I like the idea of having a blog because it will force me to:

  • Practice writing.  Presenting ideas in a structured way and writing things that people might actually want to read are useful skills.
  • Read.  Writing something coherent requires that you’ve at least done a little research on the topic.
  • Have something more than a photo of half dome come up when you Google for my name.

Since most goals aren’t easy to achieve, it’s also important to consider (and accept!) the consequences of pursuing that goal.  For example, some of the things I am willing to accept are:

  • Public ridicule.  It’s actually a scary thought to post potentially ridiculous things for all to see but that’s part of having a blog.  I’m okay with the fact that I’m going to sound stupid sometimes (hopefully not all the time).
  • Less TV time.  I’m am (somewhat reluctantly) willing to miss some re-runs of Family Guy to spend time writing.

If you see more posts on this blog, you’ll know that, at the very least, these ideas seem to be working for me.  And, if not, at least I will have accomplished a respectable 1.9% of my goal.

If you’ve got other goal setting tips, leave a comment!  At least I’ll know the spam-bots aren’t the only ones reading this.

Category: productivity8 Comments