9

At the company I work for we have just started mob programming, where the team of three that I am a part of all write the code for our project together at one keyboard, and we only proceed if we all agree on the path forward.

It has been commented that we always take my path, and not a path put forward by anyone else and I agree, I think we do. This is something I want to change but I also don't want to put code that I think is bad into production, so I don't just want to concede when I'm not convinced the other person is correct.

For example someone might say:

let's make a method that does A and B, and I might say: Why don't we make a method that does A and a method that makes B? That way each method does only one thing, which is often considered better.

and usually everyone will agree and we will take that approach. The problem is that while we all agree the code is now better we have once again gone down my suggestion and I have 'shot down' someone else's suggestion. This is leading to some resentment from the other members of the team as even my manager has commented that some have said we always do it 'my way'.

Is there some approach I can take where I can guide the team towards a better solution without it looking like it's all my ideas and none of theirs, without sacrificing code quality?

Edit:

Not relevant to the question, but there is some discussion about mob programming so I will leave a short snippet that convinced the team to experiment with it:

this is an evolutionary step beyond the Extreme Programming [EXT] concept of pair programming. We strive to accentuate and amplify concepts such as face-to-face and side-by-side communication, team alignment, collaboration, whole team involvement, continuous code review, and the "self-organizing-team", to name a few.

Read more here: https://www.agilealliance.org/wp-content/uploads/2015/12/ExperienceReport.2014.Zuill_.pdf

Note that I do not want this to be a question discussing the pros and cons of mob programming, substitute mob programming for pair programming or even code review and the question should still remain roughly the same.

  • I'm new to Workplace so please also help me improve my question if you have suggestions. Feedback welcome, thanks. – Jamie Twells Oct 29 '18 at 14:06
  • 3
    Is this "mob programming" really a thing?!? Sounds like the sort of exercise you'd give to a bunch of interns or students ... – brhans Oct 29 '18 at 14:09
  • @brhans it is, think pair programming but with 3-5 people. Typically, it will waste more time than its worth. – SaggingRufus Oct 29 '18 at 14:10
  • 1
    @AffableAmbler its actually supposed to produce functional code. It does, its just really slow. – SaggingRufus Oct 29 '18 at 14:35
  • 1
    When I pair with people and they put an idea forward I either try to lead them onto what I think is the right answer, or try to improve their answer. If someone suggests to resolve a problem by "doing A" you can say that you think A is a good idea but could be made better by doing A and B. Or by making leading statements that suggest you think there may be problems with A, without stating B, to let someone else come up with it. That way everyone is thinking about the problem as a whole and contributing and you're not giving them the answer, but trying to make them come up with it. – adamcooney Oct 29 '18 at 15:42
10

This may not be the answer you are looking for, but don't stop.

This is one of the good (and bad) things about mob programming. You are simultaneously teach while coding. Because you are the teacher, right now, all of the ideas are yours. It shouldn't stay that way, take the example you gave above:

let's make a method that does A and B

After hearing your solution, the next time someone suggests it, someone else should speak up because last time you all agreed it was the right approach.

I think you are doing the right things. You should strive to put the best code into production. As long as there is not friction between the programming unit, there is no problem. Over time they will learn and start suggesting what unit agrees is the correct approach.

Be slow to answer. Give other people a chance to come to the conclusion on their own. A good teacher can bring the student to an answer without actually answering the question. Try saying something like:

That will work, but I think we can come with something better

Then let the discussion go on from there. Lead them in the direction you want without just saying the answer. This will allow other people to "come up with" the solution you wanted from the start without you getting credit for it.

  • I've had similar thoughts to this myself. Can you give an example of how you might: 'lead them in the direction without saying the answer'? I definitely need to be slower to answer though, you're quite correct there. It is something I will work on. Thanks for your input. – Jamie Twells Oct 29 '18 at 14:38
  • 1
    It kind of depends on the specific example, but for the example you gave, I might say "Is there anyway we can make it more reusable?" or "how can make method not dependent on another this specific thing" – SaggingRufus Oct 29 '18 at 14:46
  • So a more socratic method of teaching? That sounds difficult but worthwhile. – Jamie Twells Oct 29 '18 at 14:48
  • 3
    Just pretend you're smart enough to know there's a better way, but you aren't smart enough to know what it is. That usually works for me. – SaggingRufus Oct 29 '18 at 15:03
  • @JamieTwells while I appreciate that you accepted this answer, you may want to hold off. There are a ton of people here with a wealth of knowledge that may have a much better answer. Give it a day or so. – SaggingRufus Oct 29 '18 at 15:15
5

Have you considered offering a coaching style to your colleagues rather than just giving them the answer?

Ask them to consider the problems and ask lots of open ended questions like who?, why?, where?, when? questions, a bit like a rhetorical question. Often people will know the answer and you can encourage them to try out their suggestions. Its about getting out of the mind set of needing to find the 'right' answer. Often there are lots of ways to get something right, its just about perception.

Give it a go or research coaching in leadership if you need more info. It will empower your colleagues and get you all thinking as more of a team.

  • Thanks for your answer. I will look for resources on coaching in leadership. Do you have a recommendation to get me started? It doesn't matter if not. – Jamie Twells Oct 29 '18 at 14:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.