Software Development Best Practices
This page contains my thoughts and experiences on software development practices.
Mentorship and leadership require teaching skills. The role of a senior developer is not simply to write software well, but also to help others write software well. But it is not sufficient to explain technology and hold code reviews. To guide the learning process, a mentor must understand the mistakes junior developers make, and see from their viewpoint. Only then can they adequately guide them through the learning process. To maintain a productive workplace, a senior developer must anticipate technical pitfalls, and correct them as they happen. Lastly, in order to be respected, they need to apply the same critical eye to their own work as they do to others. A mentor should be able to pair program effectively.
A team lead is the most difficult position in any business. A lead must be able to communicate effectively with business and management, while maintaining the technical respect of the development team. This duality requires intelligence and discipline. To be seen as a leader by the technical staff, they must have expert knowledge in their field, and a top-notch problem solver. They must be able to provide direction to a technical team in any situation, even if they do not know the solution. To be seen as effective by the business, they must be effective at estimating and planning the team's technical needs. Most importantly, a team lead must maintain and demonstrate an exacting standard toward the development process.
Pair programming is an excellent way for both junior and senior developers to learn and code effectively. At first, pair programming may seem to waste a developer. But experience shows otherwise. Pair programming between two developers of different skill levels is effective, efficient, promotes teamwork, and gives senior developers opportunity to mentor.
Junior developer alone
A junior developer is likely to complete a coding task, but may unintentionally introduce bugs, or deviate from best practices. Code reviews catch many of these problems, but they are tedious, and require multiple meetings and refactorings to be effective. The result may be a frustrated developer, and a group of frustrated code reviewers.
Senior developer alone
Senior developers should produce good quality code. However they usually have their own style and approach. This gives them a tendency to do things their own way, and a bit of arrogance can lead to foolish mistakes. Worse yet, the code may be perfect, and noone was around to learn from the endeavor!
Junior developer - junior developer
Pairing two junior developers can increase their confidence level. They will see that they are not the only ones who run into bugs and difficulties. Together, they are likely to find and solve problems faster than they would alone, however, they still need a mentor to guide their approach and answer questions. This pairing is mildly effective.
Senior developer - senior developer
This pairing can result in synergy, learning, and excellent quality code. However, this pairing widens the gap between senior and junior developers, since the junior developers are not learning as quickly. The senior developers may become disenfranchised, and lose perspective with the junior developers. This widening of the experience gap is harmful in the long term. The senior developer may eventually refuse to be paired with anyone other than their favorite partner.
Senior developer - junior developer
This is the most effective pair. They can write code nearly as efficiently as the senior - senior pair, but the learning opportunity will result in better long-term efficiency gains. For this to work, the junior developer must be the coder, with the senior developer in the back-seat position. If the senior developer has control of the keyboard and mouse, then the junior developer will likely fall into a "spectator" role, just trying to keep-up with what is going on. They will not learn, and they will not contribute. This back-seat position can be frustrating to the senior developer if they know they can go faster, but this will teach them patience and team them to anticipate problems and guide the junior developer.