Getty Images/iStockphoto


Collaborative coding basics and best practices

Successful collaborative coding includes teamwide situational awareness, highly effective communication, strong project management practices and strict version control.

Every development organization has three basic goals: produce better code, produce it faster, and develop their architects and programmers professionally. All three goals can be advanced through collaborative coding, but launching a project requires care and the right tools.

Collaborative coding is more than dividing development tasks among programmers. Programmers and software architects work together on the codebase to create modules and snippets for reuse, define practices, review each other's work and define test procedures.

There are multiple approaches to collaborative coding, ranging from peer programming to mob programming, and in all of them, the number of programmers and architects and their specific tasks vary. It's important to keep this in mind when reviewing practices and tools, but remember that organizing a collaborative project is exponentially more difficult as the number of collaborators increases, no matter what tools and practices you use.

Making any collaborative programming model work requires four basic steps:

  1. Establish teamwide situational awareness.
  2. Create highly effective team communication.
  3. Develop strong project management practices.
  4. Enforce version control and the repository strategy.

Although these steps might seem relatively straightforward, there's more to them than meets the eye. Let's dig in.

Establish teamwide situational awareness

A software project is a complex undertaking, and you can't hope for effective collaboration unless everyone on the team understands the overall structure of the software and the division of functionality. That means that software architects must produce effective diagrams and descriptions.

Unified Modeling Language (UML) is a popular way to define software architecture in a language-independent way. The development of the high-level functional model and associated UML should be handled in team meetings so everyone understands the approach. When that's been established, you can divide the team into smaller working units who work on related functional elements. These smaller teams should also develop their high-level model in group meetings so people understand how each element fits and can work together effectively.

UML standard diagram categorization
The UML standard defines 14 types of diagrams, categorized as either structural or behavioral. The behavioral diagrams include a subset of diagrams referred to as the interaction diagrams.

A key goal in this initial team building is to identify common elements of code. Generally, it's best to advance the state of these common elements first before a translation of design to code begins for project work. This ensures that everyone understands which functional tools are available and frames their own work in terms of using them.

Code-sharing tools and playgrounds, such as Microsoft's Visual Studio Live Share, CodePen and AWS' Cloud9 are good examples, and JetBrains' Code With Me is a popular approach that can be run in-house or as a service. Repositories, such as GitHub Codespaces, are essential to enable team access, but you want to build practices around them to get the most out of them.

Create highly effective team communication

Team communication keeps collaborative development on track. Most successful collaborative development combines regular meetings with ad hoc communications. Some teams prefer to use a text chat capability that can be integrated into the IDE, and others like to use simple audio or video tools, which are sometimes offered as part of code-sharing toolkits.

Because virtual group meetings are easiest to conduct using tools such as Microsoft Teams or Zoom, many organizations like to use these same tools for impromptu collaboration of team members.

Develop strong project management practices

Project management practices should generally be framed around the result of the two steps above. Overall project design work lays out elements to be generated, which creates activities to be managed. Team communication is the means whereby project management and managers are aligned with the ongoing activity.

Most organizations that use collaborative coding don't indicate that it requires specialized project management tools. Organizations large enough to consider collaborative coding are almost certain to have their own tools in place already. However, there are aspects of collaborative coding that require special attention, generally related to permissions management. These are related more to the coding tools and practices than the project overall and so should be a part of the coding toolkit.

What's most important with permissions management is ensuring that everyone expected to participate in the collaboration has appropriate access privileges, meaning read-only or edit/run. Also, it's helpful to be able to manage which users can advance a project to another stage, such as testing, or assign code to a particular playground or sandbox.

Enforce version control and the repository strategy

The final piece of the collaborative coding puzzle is version control and the repository strategy. Even if software development is handled by collecting the work of individual programmers, software elements can have changing dependencies as the project matures, and the relationship between elements can be maintained only if there is strict versioning. With collaborative coding, there's a significant risk of losing version discipline, given that multiple players are working on multiple software components at the same time.

Many version control strategies are tuned to software changes rather than general development, which also includes from-scratch work, but the tools are almost always capable of supporting both. As such, a company should generally expect to use its current repository and version control tools to support collaborative development. However, it might make sense to evaluate current tools when implementing a major software initiative. Effective collaborative development tends to produce highly modular elements designed for container or even microservices deployment. Thus, mechanisms to establish a single operation and coding source of truth are essential, and GitOps strategies might be required.

Collaborative coding can be helpful or messy, depending on whether you properly tune your practices and tools to your goals. Even the best tools won't ensure success, so be sure to establish work practices such as those recommended here to get the benefits you seek.

Dig Deeper on Software design and development

Cloud Computing
App Architecture