C3 Programming

C3 programming is a process for fostering better communications between developers and other stakeholders.


October 29, 2008
URL:http://www.drdobbs.com/open-source/c3-programming/211601360

Shimon is the founder of Great Budget Software. He can be contacted at [email protected].


Most software projects fail because they don't meet stakeholder's minimum requirements, come in significantly over budget, or delivered significantly late. What these reasons for failure have in common is miscommunication that occurs when business analysts transfer business requirements to programmers, and programmers define for quality assurance when the software will be ready for testing.

To foster better communication, programmers need to take responsibility for ensuring that business requirements are correctly interpreted into software. C3 programming addresses this issue by explicitly assigning responsibility to the programmer. On a macro level, this is analogous to a function call, input, operations, and output. The inputs are a contract of expectations by business, and the output is expected results. Coding is the operation.

As Figure 1 illustrates, the software development lifecycle (SDL) is broadly broken up into four roles—business analysis, programming, quality assurance, and stakeholder acceptance—and every major SDL model (CMMI, Waterfall, TDD, Agile, and XP) encompasses these roles in this order:

[Click image to view at full size]

Figure 1: Software development lifecycle roles.

C3 programming is a process for fostering better communications among these roles. As Figure 2 illustrates, C3 programming specifies how to successfully write software by defining programming in terms of three phases:

[Click image to view at full size]

Figure 2: The three C's — contract, code, and close

Additionally, C3 programming defines two components in the programming role: Backward facing (that is, working with business analysis), and forward facing (working with quality assurance). These components focus on interfacing with other roles because better communication between roles results in fewer defects. The programmer reflects back to the business analyst the perceived business need as implemented with software, and before coding, the programmer defines for quality assurance the conditions under which the code is ready for testing. Interfacing with quality assurance is often implemented with Test-Driven Development (TDD). Ironically, the significantly more expensive errors are between the business analyst and programmer.

C3 Programming

C3 programming focuses on the three components of the programming phase—contract, code, and close—and the two interfaces. The coding phase is the most practiced and most familiar to programmers and software development teams. The contract component represents the interface with business analyst, and the close component represents the interface with quality assurance. Together, the three components define the role of "programmer".

Each of the C3 programming components could happen in any order, even simultaneously. Most commonly there is some contract component prior to coding or close. TDD emphasizes the close component prior to coding. Programmers are proficient in coding, and programming tools and development environments have been designed to facilitate writing code. Moreover, there exist add-on modules to facilitate closing and tools to create contracts, but the bulk of programming effort is in coding. This balance needs reevaluation.

The contract phase defines a binding agreement between business and programming. Business provides requirements in some format—spreadsheet lists, business use case diagrams, or process diagrams. The process of transferring the business requirements to a software "plan of action" is informally the contract phase. This phase needs be formally framed. The contract reflects back to the business what the programmer will provide. The contract defines, from a programming perspective in programming/business jargon, how the programmer understands the business needs. The programmer then works from this document in developing the code. The code component is the most familiar component to programmers because it focuses on the functional requirements, architecture, software interface design, algorithms, and coding of instructions that make up software. Existing programming tools have focused almost exclusively on this component of programming. Code generators, debuggers, and code-analysis tools all contribute to reducing defects in code and have done well in this domain.

But when there is no clear, unambiguous finish line, the software is never complete and incomplete software does not get delivered. For this reason, the close phase must be clearly demarcated for programmers. Most of the time the finish line is implied and as rules in business change, the finish line gets moved. The solution to control shifting finish lines is an explicit set of objectives that need be reached to conclude that the software is complete. TDD controls this by requiring that programmers formally state the tests that the software shall pass to qualify the software as finished.

C3 and the Software Development Lifecycle

C3 integrates seamlessly and complements the software development lifecycle. C3 more finely defines the interface and expectations in the hand-off between different roles in the cycle. While the roles of contract and close can be assigned to others on behalf of the programmer—business analysis can take responsibility for contract and quality assurance for close—the value of having the programmer fill these roles is valuable because it both crystallizes the solution in the mind of the programmer and reduces risk of misunderstandings. It's analogous to asking a person to repeat, in their own words, what is understood.

Peer review is a common method to reduce error and resolve uncertainty. C3 improves on peer review by providing a view from a different perspective. Individuals in the same organization performing similar tasks tend to follow similar routines and overlook similar events. By bringing programmers to overlap with the sphere of business analysis and quality assurance, you get an orthogonal view to a proposed solution. This alternative perception can strengthen both sides of the interface—the input from business analysis and quality assurance can to guide the programmer in focusing on core requirements and ignoring noncritical and nontestable features.

Summary

C3 programming is a more fine-grained implementation of the programming phase and can be implemented in any software development lifecycle model. It adds necessary responsibility to programmers to ensure that they understand the scope of the business problem, yet limits the programmer to solving only the problem. An additional value is that the programmer perspective on business requirements and quality assurance provides observations not generally made by those dedicated to those roles. This perspective can identify areas of ambiguity and opportunities where programming can provide additional added value.

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.