Python Thursday Group Adventure
One of great things great things about coding is that is it fun to do alone and it is even more fun to do as a team. Being a productive team in a larger, friendly community is a great experience.
As developers we have created tools to foster this experience work together seamlessly as we know how to. There are a wide variety of tools available to help coders be more productive and collaborative. One of the most ubiquitous of these tools is git.
As a command line tool, git can be somewhat daunting at first. Often, people first experience git as a tool to save personal code history, but it is so much more than that when used in a group setting.
I am a Git Group Newbie
I have been using git for quite a while. I would save my coding projects, documents and even scans in git. Using it as both source code repository and backup tool. But I had never merged code, made a pull request or experienced the joy of a successful rebase.
In short, I had used git solo, but hadn’t worked with a team using git. This was about to change.
CodeNewbie Python Text Adventure
This year, I started learning Python. Around mid-year I discovered CodeNewbie.org. CodeNewbie is a friendly community of developers that span a variety of languages and skill levels from brand newbies to newbies with more experience. What we all share is a desire to up our game and learn more.
At CodeNewbie, everyday is a Python day, but Thursdays are the days that Team Python meets and before long our team started working on a group coding project. We decided to make a Text Adventure Game in Python with a sprawling bacon scented plotline. Nearly as importantly we were going to make it using the Git Feature Branch Workflow. This would give us all experience using git in a group setting.
As part of the project launch we were treated to a walkthrough of the git feature branch flow by Saron. This was simply amazing and really helped to clarify how the flow worked and what commands to use. More than that, she also explained why the flow worked the way it did. It was a real “ah-a moment” for me.
After this preparation, we filled up the issue log with features to add to our empty git repo and started to code.
Getting Hands On
Working on features that were being built on to a game that didn’t exist yet was a challenge. Yet it was a challenge that we were up to. We claimed issues and started working on them. These new features were made on their own feature branch. When they were completed, we created a pull request for code review and socialization. Once approved we rebased the branch and merged it back into the main code.
Communication was key during this process. It was important to make sure that everyone was aware of what was going on, sharing solutions to issues that we were having as well as their potential solutions. The slack channel in conjunction with a face-to-face weekly video hangout served this purpose well.
We were really doing it, a group of CodeNewbies working together and making our very own text adventure game. Everything was going along well until it happened. The merge conflict of doom.
The Merge Conflict of Doom
It happened to me when I was moving along at high speed. I felt confident. I felt like I had mastered this git thing. Then I rebased and it seemed like an endless stream of merge conflicts started spewing out from git.
I am not gonna lie, I panicked.
I thought I might have broken everything.
I might have lost a lot of work.
-- Deep breath --
I thought back on the git walkthrough we had and remembered that Saron had shown us how to resolve the conflicts. Just as importantly, she had given us a key piece of advice to navigate the merge conflict, “When in doubt, use git status to see what needs to be done”
It took a little time, but before long the merge conflict was resolved and it was all back on track.
Back on the Horse
So that happened.
So did something else. I realized that I had gained confidence in using git in a team environment. I now understand how to use merges, pull requests and rebasing. Just as importantly, I faced the merge conflict of doom and emerged on the other side unscathed.
I am pretty sure that most, if not all, of the rest of the team faced their own merge conflict fiasco and I am happy to say that they got through it just fine as well. In the end we delivered out bacon scented game and are ready to take on our next challenge, together.