Archived

This topic is now archived and is closed to further replies.

pair programming

This topic is 5333 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

someone started a discusssion about extreme programming in another thread, so i just created a new one. we used to do pair programming at work, but it was a horrible idea. maybe it depends on the people in the team and the actual project, i don''t know. i think pair programming is bad, because a "normal" programmer just doesn''t like being watched. the other person sitting next basically "does nothing", except maybe complaining about trivial lines of code. most of the time the programmer gets corrected for things he would have fixed in a few seconds anyway ("there''s a typo, hahaha!"). it''s psychologically dangerous, because there are 2 types of people; the introverted one, just saying "yes" to anything because he won''t dare to bring in his own ideas, and the other one being extroverted, taking over control. if the introverted is the coder, he does what he''s instructed to do, without complaining. if he''s the guy sitting next, he gets bored and plays with his ball-pen. if both are introverted, the project will not be finsihed in 10 years. if both are extroverted they start to fight over every single "if" statement i''m more of an introverted person, so i either got bored or i felt uncomfortable with the situation. we then dropped pair programming after a few days. in my opinion it is just better to sit down with another guy, throw out a design of the project/module, and then each programmer writes code seperately. (that''s what object-oriented design and especially interfaces are for). the bottom line is, i don''t want to do pair programming again, i just think it''s horrible. any comments?

Share this post


Link to post
Share on other sites
JimH made some very good points about pair programming on the other thread. I fully agree with you/him, PP would be no option for me. As JimH said, I wouldn''t be able to get into the "flow state", a state of mind where I can immerse my mind into the code. Psychological ego-trips and lone-ranger ideas aside, I don''t think that PP is a good idea.

More conventional code review, on the other hand, can be beneficial. I just get uncomfortable, if someone peeks over my shoulder, while I''m programming. But discussing the code with the rest of the team in regular intervals is perfectly fine.

BTW, shouldn''t that be in the software engineering forum ?

Share this post


Link to post
Share on other sites
I couldn''t handle it either. I just don''t bear up well under intense scrutiny, and prefer to be left alone most of the day.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]

Share this post


Link to post
Share on other sites
I was once writing some code and my manager was standing over my shoulder. It was only for a few seconds, but I felt like I was being "watched" (I literally was) and I couldn''t get into the programming mood. I can only imagine if someone was next to me all the time. That, and I wouldn''t be able to write funny little comments to myself without my partner going, "Dude, what the heck is that?"

Share this post


Link to post
Share on other sites
I program by myself since only one other person besides me knows enough about C++/Win32/OpenGL to do anything constructive, and that other person is learning the finer points of PHP. He is a senior also, so... really I''ll be alone once he leaves. Oh well, more gloating time for me.

Share this post


Link to post
Share on other sites
I don''t understand how PP can be very productive but I would like to disagree about how you can''t get into the ''zone''. I agree that when my manager comes over and watches me code I get very nervous. I will even start opening random files and adding in code that wont do anything just to look more productive since alot of my time coding is spent searching through files to debug which doesn''t look as productive as coding.

Although this is the case for my manager looking over at me but when I am working on a personal project at home with my room mate I think it is a different story. Both my room mate and I know the problem and will get immersed in the code trying to solve the particular problem. I feal that with equal coding abilities and a problem on the screen I can get just as immersed in the code with or without a buddy. I just don''t like it when someone who doesn''t know the problem at hand stands over me watching me code.

Share this post


Link to post
Share on other sites
I tend to like it. When I read a regular text, I''m the kind of person who always checks if the arithmetic works, or if the percentages sum up to 100%. I can''t help it. When I read someone else''s code while he''s writing it, I focus a lot more on the mistakes than when I''m typing. When I''m coding, I think of what''s next, instead of what I''ve just coded.

Of course, some people don''t like it. The problem with XP is that it forces a methodology on people. In any team of reasonably intelligent people, they should be given the choice to work as they see fit. Managers should not impose a methodology.

Cédric

Share this post


Link to post
Share on other sites
I''ve just finished my final year group project at uni. It was supposed to be a whole year project, but we didn''t even start till the final week. We managed to write 5000 lines of code in 5 days, as well as doing the documentation (almost filled up an A4 ring binder folder).

There were very few bugs.
We did use pair programming.

Whilst I agree that it is nice to code by yourself, I completely disagree that you cannot enter ''the zone'' when someone else is there.

It''s my opinion that without pair programming, many more bugs would have been introduced than with a partner sitting a closely following the code and picking up logic and syntactical errors.

On the subject of extroverts vs. introverts: Being somewhat extrovert myself, I''d say that if i find that a pair programming partner is introvert, i''ll try to encourage them to make suggestions and ask them if what i''m doing is right - especially if i know what i just did was stupid. It helps break the ice and put you on the same level. I also make a point of not hogging the keyboard and make sure that the other person gets a chance to bash away for a while too. I think the main thing is not to tell the other person that they did something wrong and get them to change it, but to ask why they did it that way and get them to explain it to you. In some cases, it may be you who is wrong.

I think alot of people are very proud of their own code and don''t like other people fiddling with it. This is one of the main reasons why i see pair programming failing - people get moody when other people touch their code. While to a certain extent I''m the same, if someone can explain to me why their way is better then I''ll be happy to use it. It''s only the same as you finding a better way of doing something on the net and using it in your code from then on...

anyways, gotta head back up to uni to revise for my finals... that was my $0.02 for the day...

jx

Share this post


Link to post
Share on other sites
quote:
Original post by morebeer
it''s psychologically dangerous, because there are 2 types of people
You''d make a great psychologist, I bet!

I did pair programming with my friend and it worked fine. The one who wasn''t typing usually spent more time thinking of what to do next. Or occasionally gave suggestions about code style or about breaking some functions into smaller ones. The resulting code was something we both understood well, and I think doing it with another person increased the likelyhood that others would understand it as well. I can say with certanity that neither of us could''ve made the code as good by working alone. It was also very fun, but not so productive at times (we occasionally ended up joking or talking about something completely unrelated). On the other hand, had I worked alone, I would''ve been more tempted to stop what I''m doing every once in a while and come to Gamedev to post something useless. Having the other fellow there didn''t give me the chance.

Share this post


Link to post
Share on other sites
Two heads are better than one.

I have had mostly success with pairwise programming. Though I do agree with some of the combinations presented in the first post, some I do not. The last one about two extroverted programmers is definitely true. I am experiencing that right now, working on a game with 5 others and being an extroverted one myself. The first one is also very true, but isn''t that what you were hoping to accomplish? There is no complaining and the job gets done, though slowly.
I completely disagree with what was said about that second scenario though. I worked pairwise writing a compiler for a course with a programmer who was quite introverted but everything worked well. I was the one doing the actual coding and he sat right next to me. As I was writing in the code, I was verbally explaining to him exactly what I was doing and why I was doing it that way. He would make occasional suggestions along the way about modifications I could make and I would either do it or we would discuss whose way is more efficient. The best part though was that if I reached a roadblock, I had someone right there who also understands the code written to that point to make suggestions to make things work. Another thing we did that was very effective was that when I was coding some tedious function, he would be planning and writing out test cases that may break our code, which found and eliminated a majority of our bugs. In the end, our compiler passed 97% of the test cases.
The key, I believe, to making pairwise programming work (or any kind of group programming, for that matter) is communication. The extroverted programmer can handle the actual coding but he/she must be keeping the introverted one involved by constantly telling the other what he/she is doing, bouncing ideas off each other, and letting them handle the testing.

Share this post


Link to post
Share on other sites
quote:
Original post by ph33r I agree that when my manager comes over and watches me code I get very nervous. I will even start opening random files and adding in code that wont do anything just to look more productive since alot of my time coding is spent searching through files to debug which doesn''t look as productive as coding.

in such a situation, i just spin my chair around and stare at them with glassy eyes, as if i were waiting for them to say something. it usually works

Share this post


Link to post
Share on other sites