tag:blogger.com,1999:blog-15558048.post1693228292114479069..comments2023-10-12T09:10:31.269-04:00Comments on Modern Software Development Fun: Readability and pair programmingAnonymoushttp://www.blogger.com/profile/10695648911502574065noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-15558048.post-20181419774610005282011-03-28T15:35:59.376-04:002011-03-28T15:35:59.376-04:00Hey Aman,
That's a very good practice. The pr...Hey Aman, <br />That's a very good practice. The principle is that the new person in the pair should be able to easily read the code by herself, if not, refactoring is needed.Anonymoushttps://www.blogger.com/profile/10695648911502574065noreply@blogger.comtag:blogger.com,1999:blog-15558048.post-87356700545979793732011-03-26T09:14:54.254-04:002011-03-26T09:14:54.254-04:00Good observation. I was talking about this with my...Good observation. I was talking about this with my pair the other day.<br /><br />My recommendation (and something I usually do) is this:<br /><br />If you're the anchor on the story and new person switches in, start by opening the story card in Mingle (or wherever) and share context around acceptance criteria. Then open the classes and tests written so far for the story. And stop. Let the pair read through the code, and understand it without your inputs. Whenever she asks a question, ask a question back to clarify what is unclear. Then in response, refactor the code right there and check again if the changed code explains the intent better. Rinse and repeat.<br /><br />Similarly when you're the new person switching in, read through code yourself without asking too many code-related questions. If you do feel like asking questions, get those answered, and then collectively refactor with your pair till you both are satisfied wrt expressing intent. Rinse and repeat.<br /><br />The above may seem idealist and as if it'd take longer than simply asking and answering questions, but in practice I haven't seen it take long (sometimes it even shortens unnecessary conversation!), and the benefits are well worth it.Aman Kinghttp://www.wikyblog.com/AmanKingnoreply@blogger.com