Pair programming with an odd number of team members?

Recently, we have encountered a problem at work, where, if one person works on some code, he seems to go out with other team members who look at it and go, “Ah? It's ugly, uncontrollable, I need to rewrite that "

In fact, lately I had to re-compose something that was written a week before, so that I could add to my (related) function.

I know that programming in pairs is a way to go for it, but we have an uneven team (3 participants). Since at the moment our team is very difficult, we really do not have time for Peer Reviews (although we can do programming in pairs, since we are allowed to evaluate this in our assessments of tasks)

I'm just wondering how people will offer us to overcome these problems with bad code.

+6
scrum agile pair-programming
source share
9 answers

When you work alone and create code that your colleagues consider ugly and unmanageable and needs to be rewritten, follow these steps:

(a) agree with them when you look at him a second time,

(b) disagree?

If (a), then the problem is that at your discretion, you do not fully specify your code when you write it. Since pair programming is the only thing that forces you to write decent code, I suggest that I recommend that the "weird one" should work on tasks that are not related to writing long paths with bad code: bug-hunting; perhaps by writing test code, as this tends to be a little less cruel. In the meantime, working to improve your writing skills for the best code may possibly conduct several reviews of your own code several times and take notes on what's wrong with it.

If (b), then the problem is you have incompatible ways of expressing your ideas. The code may not be bad by your standards, but it is mutually incomprehensible, which in corporate settings means bad code. Pair programming means what you write is a trade-off that 2 out of 3 you understand, but it's not really a solution. You need to come to a few mutual agreements about what you find the most difficult with respect to each other's code, and stop doing this. And you all urgently need to think about the "quality of the code" in terms of "my two colleagues will like this code," rather than "I like this code."

In any case, you all need to work on writing code for the purpose of reading, and not for the purpose of working immediately, as soon as you can. Personally, I did this, trying to express things the way I think that other people can express and understand them, and not just what makes sense to me at that time. In the end, it becomes familiar. When I write code, I write it for a public audience, just like I write this post for a public audience. Well, that’s why on my personal projects it’s an audience of people who also love me, while at work it’s an audience that thinks like my colleagues. But the principle is to write code as if someone is reading it. You explain yourself to them, not to the compiler.

Not that my code was the best in the world, but I think that I won that my first job was in a company with 30 strange programmers, so I saw a wide range of ways to think about things. There are also some examples of “what not to do”, where one programmer did something that no one could easily understand, and therefore it can finally be said that this is bad. With only 3 people, it is unclear whether the difference of opinion means 2 v. 1, that 1 is a freak or a sensible minority. When I did something, and 4 or 5 people could look at it and immediately say “eeew, do not do this,” then I began to truly believe that it was just a stupid idea in the first place.

I would also recommend if you are not allowed to schedule code review, lie and cheat. If you strongly rewrite the code of another user, you still do not waste time reviewing it, you simply do not provide feedback, which is an important part of the code review. So go through the review under the radar - write a function or three, then ask a colleague to look at it and give you instant feedback on whether this makes sense to them. This helps to conduct a conversation, as soon as you do this, with the code on the monitor, but try not to interrupt people when they have a "stream", or are drawn into long arguments. This is not a programming pair, and this is not a formal code review, but it can help you understand what you are doing on your own, which is so bad.

+14
source share

I am surprised that you do not have time to view reviews, but you have time for pair programming. Is the latter not a lot of time?

We also have three developers only in our company, and, surprising, surprising, at the moment we are being pushed. I am almost sure that my boss will laugh at me if I offer pair programming, because it will be considered as doubling the number of man-hours for the task, although in practice this is not the result that he should produce. Our expert reviews are no more than an hour, and this is an extreme case. On average, I would say that they are probably about 10 minutes, and for one developer - only once or twice a day.

IMO, you should try your feedback. You often find that abusive people (i.e., people who write lower-quality code) eventually realize that they need to make more efforts, and quality improves over time.

+6
source share

If you have three developers, and each of you thinks that the code of the others is not very good, you urgently need reviews.

+3
source share

So:

  • you are being pushed hard.
  • your code is poor quality

Do you think these two can be related? The answer is to fix the schedule.

+2
source share

Connect all three at once.

Set some coding standards.

Use the dunce cover to unlock developers.

Perform daily summits to make progress.

Also try reviewing twice a week, for example, on Tuesday and Friday.

+1
source share

Pair programming does not have to be all day long to be effective. I saw good results even after an hour or two, working together every week. One way is to pair A and B for a while, then A and C, then A and B ... with a lot of individual time between them.

It also depends heavily on the personalities and chemistry of team members. Two out of three can work exceptionally well together, and you want to capitalize on that.

+1
source share

You still need a couple. Set up sessions say 1 day a week and rotate pairs. This should keep your manager happy and improve the quality of the code, improve communication. If you save error counts in pair or single coding, you should start to see benfit and display it for your manager,

For example, this took x man-hours, but on average it was fixed when fixing defects. In addition, the code is clean and takes less time to change it, and then the next time we touch it.

From there, you will have tough statistics, and you can start the code more.

Basically, your story seems to be the same as mine.

  • Nothing to do.
  • Mistakes happen.
  • Rush to fix it (takes more time)
  • Go to 1

You need to stop the rot.

0
source share
  • Code Review
  • Enable Stylecop, which will force you to write readable, standardized, and manageable code.
0
source share

We use code reviews. In addition, there is one task: to change the diagram, to establish some things ...

0
source share

All Articles