What is peer programming?
Peer (or pair) programming is a particular software development technique where two developers (or a small group) code together. Usually, one person would be the "navigator" and help lead the other person, the "coder," to write the actual code.
Benefits of Peer Programming
Here are 3 benefits of peer programming based off of my experience so far.
1. You learn new ways to code
I was working on a project with a web dev friend and she taught me how to shorten certain lines of code. For example, let's take my Baking Unit Converter project.
I learned how to shorten the following code:
I originally had,
cups = cups * 8 as my code. But then, my friend taught me a shorter way to write it:
cups *= 8. This is a much more concise way to write it!
2. You learn how to problem-solve reading other people's code
Peer programming is a great opportunity to see how other people problem-solve and code!
It's important to expose yourself to other people's code and to not get used to always coding from "scratch." It's most likely that you'll have to read and understand existing code to fix or recognize certain problems. Peer programming is a great way to practice this! Share each other's code and learn from one another.
Online coding challenges are another great way to practice problem-solving. Check out the following resources:
3. Fewer errors/mistakes
It can be as simple as a spelling error. Having someone to go over the code is a great way to catch mistakes immediately before deploying a project. It's always good to have a second pair of eyes to double check your work!
Downsides of Peer Programming
Even though I do enjoy peer programming, there are some downsides to this kind of technique.
1. Alone study-time is how I study best
With the way I study, I do need alone time time to understand more complex concepts. I usually do some alone time studying and then apply what I learn to various projects. If I get stuck, I use Google and message a few friends for help and then if needed, do some peer programming.
2. Differing skill levels
It's normal to be jealous of other developers who seem like they just "get everything." I experience that sometimes, but I don't let that stop me from learning. There are moments when I get overwhelmed if someone shows me too many things at once, and so I think it's important to peer program with someone you feel comfortable with and can explain things in simple terms.
I think peer programming is a great way to experience what it's like to work with other developers. You get to learn how to read other people's code and communicate effectively with your coding buddy. If you want to see if concepts are sticking in your head, try to teach them to others and ask for feedback!
Overall, peer programming can be beneficial! It just truly depends on how you learn and what works for you!
Thanks for reading my blog! Many thanks friend!
Follow me on Twitter and join my Timeout Tuesday: twitter.com/izaye_visuals