wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes What is Pair Programming? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "What is Pair Programming?" Watch "What is Pair Programming?" New topic
Author

What is Pair Programming?

Sanjeev Arya
Ranch Hand

Joined: Feb 13, 2001
Posts: 58
Hi all,
I was confused by Beck's explanation of pair-programming in XPE (haven't read the book, just browsed a few pages). He seems to imply that it is...
1. neither one person coding and the other watching,
2. nor two persons coding different modules and later integrating their modules.
... but something else. What is it? I am sure I missed something... It seems like it has tons of benefits.
Sanjeev
Avijeet Dash
Ranch Hand

Joined: Jan 21, 2001
Posts: 148
I guess, the idea is one person codes and thinks about the syntax, logic etc. and the other person watches to see any spelling errros , and think fast and do a pre compilation in mind to see wheather the code with compile and run or not.
so the 2 people will keep talking, discussing and coding. The positive part of it is you don't get bored of coding alone. And If you like your companion, life is great. In a movie kind of plot the programmers can get married and have a great career.
Sanjeev Arya
Ranch Hand

Joined: Feb 13, 2001
Posts: 58
Originally posted by Avijeet Dash:
I guess, the idea is one person codes and thinks about the syntax, logic etc. and the other person watches to see any spelling errros , and think fast and do a pre compilation in mind to see wheather the code with compile and run or not.
so the 2 people will keep talking, discussing and coding.

You contradicted yourself and confused me again ...
You say "...one person coding..." at one place, and then "...2 people talking... coding." at another? Is it one person writing his own code and checking the logic of the partner's code? In that they are working on different modules/methods.



The positive part of it is you don't get bored of coding alone. And If you like your companion, life is great. In a movie kind of plot the programmers can get married and have a great career.

Hmm... just heard yesterday that Narayanmurthy's wife (INFOSYS founders) used to type the code for him. What a timely example of pair-programming
Sanjeev
Avijeet Dash
Ranch Hand

Joined: Jan 21, 2001
Posts: 148
the 2 people may exchange roles, and code alternatively.
we have done it in college when there was one machine and more people.
at times it was annoying when the other person standing over your shoulder keeps finding your mistakes.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4445
    
    5

Originally posted by Avijeet Dash:
I guess, the idea is one person codes and thinks about the syntax, logic etc. and the other person watches to see any spelling errros , and think fast and do a pre compilation in mind to see wheather the code with compile and run or not.

Nooooo... it goes much deeper than watching for spelling errors and syntax.
The second person's (the one not "driving") role is that of a navigator. He has the high-level view of things, thinking more strategically/tactically. The person driving focuses on the programming mechanics. True, the navigator may notice a spelling error or two or suggest a better name, but he/she is really more focused on things like thinking of ways to test, ways in which the current direction the design is taking will affect future flexibility, and making sure that the driver doesn't go on to any sideroads that don't address the current problem at hand. The navigator also may watch for opportunities to refactor which the driver may not immediately see. IOW, the navigator tries to keep the driver focused with respect to the bigger picture and the task at hand.
Then, if the driver gets stuck, they can switch roles.
Junilu

Junilu - [How to Ask Questions] [How to Answer Questions]
Sanjeev Arya
Ranch Hand

Joined: Feb 13, 2001
Posts: 58
Originally posted by JUNILU LACAR:
Nooooo... it goes much deeper than watching for spelling errors and syntax.
The second person's (the one not "driving") role is that of a navigator. He has the high-level view of things, thinking more strategically/tactically. The person driving focuses on the programming mechanics. True, the navigator may notice a spelling error or two or suggest a better name, but he/she is really more focused on things like thinking of ways to test, ways in which the current direction the design is taking will affect future flexibility, and making sure that the driver doesn't go on to any sideroads that don't address the current problem at hand. The navigator also may watch for opportunities to refactor which the driver may not immediately see. IOW, the navigator tries to keep the driver focused with respect to the bigger picture and the task at hand.
Then, if the driver gets stuck, they can switch roles.
Junilu

Wonderfully explained! Beck should paraphrase you in the next edition
I am excited as I will have a chance to apply it today itself...
later
Sanjeev
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
Sanjeev , I think there is a lot of discussion about this in " Process Forum ". Pleas see the various threads in that forum.
I think this topic can be best discussed in that forum.
Plus , you are reading Kent Beck's book. you will get good info. in that.
Your Friendly Bartender
Shailesh.
Sanjeev Arya
Ranch Hand

Joined: Feb 13, 2001
Posts: 58
Originally posted by shailesh sonavadekar:
Sanjeev , I think there is a lot of discussion about this in " Process Forum ". Pleas see the various threads in that forum.
I think this topic can be best discussed in that forum.
Plus , you are reading Kent Beck's book. you will get good info. in that.
Your Friendly Bartender
Shailesh.

Shailesh, thanks for the input.
Let me clarify. I asked this question here because I felt Beck left me unsatisfied with his introduction to pair-programming (see my first post to this thread). Plus, I had checked the process thread before posting here... that thread is woefully short on action (something like 2 replies in the past 30 days ).
My suggestion to you is to move the powers to have XP included in this forum (where it rightfully belongs ) along with Patterns, Refactoring etc. Maybe have the whole Process thing move here as "Process". If you look at the other threads or discussions in this forum I am sure you'd find XP etc discussed here more than in the other forum. This just seems more natural.
cheers
Sanjeev
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
I think Sir Paul Wheaton has given sufficient thought to keep OOPS & Process Forum separate. In Process Forum , we are not only discussing XP , but other processes also. It will be better to keep separate forum for them separate so that discussion can be more focussed.
Thank you for your suggesstion. I will definitely ask Paul Wheaton about this. But , my viewpoint is to keep them separate.
What other guys think ? Good or bad ?
Your Friendly Bartender
Shailesh.
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Hi all,
I still have "miles to go before I.." reach XP .
Pair Programming(PP) sounds some what familiar to me.I had used PP extensively, but never knew that there would be a technical jargon attached to it.
As regards, process and OO, I agree with Shailesh, that it should be kept seperate.From whatever little knowledge I have, XP is just one of the process..There are others like RUP, etc.It is a huge topic by itself.So Sanjeev, let us follow the basic principle of OO here "Divide the complexity in smaller components" - OO as one forum and Process as another .
BTW, Sanjeev is right on the fact that Shailesh's forum is not attracting many JavaRanchers (less than 500 posts in that forum ).This could be because there would be many Ranchers like me who are not aware of its actual use, or probably the Processes discussed there has not made a widespread impact in the industry.In either case, Shailesh and Co. would need to do some brainstorming to bring JavaRanchers to that forum and educate them more on those processes.
Shailesh, I would be there in the forum, once I am pass Test 486.
Best Regards,
Sandeep
[This message has been edited by Desai Sandeep (edited May 27, 2001).]


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
Sandeep , Process is the topic which is very difficult. How many people working in s/w industry are aware of the things like S/w engineering. How many organisations are having processes ?
What is the real meaning of Process ? There are many such probing questions.
Unless & until , you are exposed to that level , you can not speak about that. People just move from one language to another language , what is hot ? at that particular point of time.
Just seems to be little imaptient. Foundation remains shaky. Unless & untill foundation become strong , the problem s/w industry is facing will not get solved.
We require quality discussions . Not just superficial talks. The subject itself is that important. Students of C.S. must be aware of All these Important subjects like software engineering , Processes etc. The processes are not successful in s/w industry , because of lack of clear cut knowledge. some have created marketing hype. But , Still processes are important.
So , even if right now there is not much traffic there ,there is no problems. That awareness will come. Everything takes its own time. It can not be expedited.
Hope to have People like you , Sanjeev , Great people like Andy & dave here in Process Forum & Bring others with you. We can have great discussion on XP , RUP & All other methodologies all around the world & discuss utility of them.
We can come up with " Javaranch Methodology / Process ". Who knows ?
So , thanks for the support. Waiting to see you in Process Forum. Hope to see a lot of activities in Process Forum.
BTW , it is not Shailesh's forum. Ranch is owned by Sir Paul Wheaton. Actually you devout javaranchers ,are the owners of ranch to make this site become the friendliest palce .
Your Friendly Bartender
Shailesh.

[This message has been edited by shailesh sonavadekar (edited May 27, 2001).]
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157

Originally posted by Shailesh Sonavadekar:
Sandeep , Process is the topic which is very difficult. How many people working in s/w industry are aware of the things like S/w engineering. How many organisations are having processes ? What is the real meaning of Process ? There are many such probing questions.

Shailesh, to be very frank with you, I hate the word "difficult".We (people in the software industry) have never tried to explore these areas and hence it is more than anything lack of knowledge and unwillingness to learn more than what is required,which make such topics a daunting task.
Most of us live in a paradigm of software languages.We like to master the language, but unfortunately never like to explore beyond the boundaries of language - processes, analysing and designing systems, etc.
How many of us really spend time reading a solid book on such topics?I have seen people going through a technical book on Java or some other language.
Talk to a Developer about Processes and OO, he will say "Yeah, it looks good buddy..but let me master an OO language first.My job demands that.Then I will refine my knowledge with these stuffs".I am sure you will agree with me that the time for refinement never ever comes!!
One of the main reasons, why people do not get involved in processes has got to do with the kind of work most s/w firms take.They are essentially into contracting and services; very few are into Product Development.Take the big ones in India - Infosys, Wipro - their main revenues come from services rather Product Development.Until companies start moving up the value chain and get into developing products, very few people will be interested in such topics.
I believe, motivating JavaRanchers to come to forums on Processes/OO will always remain a challenge at least for couple of years now.We need to find out of alternatives of how to increase the traffic (more promotional schemes will help!) in such forums.
Glad to see that posts in this forum is increasing.Hope we witness the same in yours, mine and Sir Paul Wheaton Process forum too.However, I would like to see the posts in these forums compete with Java specific forums like "Servlets and JSP".When that happens, only then we can say that people have started understanding/taking interest in these important aspects of Software Engineering/Development.
Thanks,
Sandeep
[This message has been edited by Desai Sandeep (edited May 27, 2001).]
Sanjeev Arya
Ranch Hand

Joined: Feb 13, 2001
Posts: 58
Originally posted by shailesh sonavadekar:
I think Sir Paul Wheaton has given sufficient thought to keep OOPS & Process Forum separate. In Process Forum , we are not only discussing XP , but other processes also. It will be better to keep separate forum for them separate so that discussion can be more focussed.
Thank you for your suggesstion. I will definitely ask Paul Wheaton about this. But , my viewpoint is to keep them separate.
What other guys think ? Good or bad ?
Your Friendly Bartender
Shailesh.

Shailesh, thanks for taking it lightly. I do not want to create a big fuss about it. Just thought of this after having been a little disappointed by responses in Processes. Maybe I should wait a while till that matures.
Still, in my honest opinion, the design of these two forums needs some refactoring... Process on one hand, and OO, Patterns,and Refactoring. In fact, what is OO? We should have OOP, or OOD, or OOAD or whatever the jargon is.
Whatever the logic has been till now, it seems clear to me at least that there are strong cross-linkages between patterns, refactoring, and processes. Until the merger happens, we would keep:
1. missing good responses by experts to queries posted in one forum but not visited by gurus.
2. having redundancy by discussing similar stuff across forums (say, people discussing refactoring in Processes, or XP in this forum). This will definitely frustrating and does not follow OO principles of reuse .
The result: one forum wasted at the expense of another!
cheers
Sanjeev
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4445
    
    5

I'm with Sanjeev on this. Apply a variation of the Inline Class refactoring to the Process forum. The traffic in the Process forum is low (only picks up when luminare like Martin Fowler are around anyway) and the topics are closely related to OO and refactoring anyway. We've seen a few threads about XP and pair programming here already and that's a sign of "feature envy" and that again calls for some refactoring
Junilu
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is Pair Programming?
 
Similar Threads
Pair Programming Case study
Pair programming
Invoke thread at specific time ... ?
Some developers hate XP - do they???
blog of Kathy - Pair Programming is NOT always a choice