Dive into Programming

From Programmer 97-things

Jump to: navigation, search

You may be surprised by how many parallels between two apparently different activities like scuba diving and programming can be found. The nature of each activity is inherently complex, but is unfortunately often reduced to making bubbles or creating snippets of code. After successfully completing a scuba course and receiving a diving certificate, would-be divers start their underwater adventure. Most divers apply the knowledge and skills they acquired during the course. They rely on the exact measurements done by their diving computers and follow the rules which allow them to survive in the hazardous underwater environment. However, they are still newbies lacking experience. Hence, they break the rules and frequently underestimate threats or fail to recognize danger, putting their own lives — and very often the lives of others — at risk.

To create good and reliable designs, programming also requires a good theoretical background supported by practice. Although most programmers are taught how to follow a software process appropriately, all too often they undervalue or overlook the role of testing while designing and coding the application. Unit and integration tests should be considered inseparable parts of any software module. They prove the correctness of the unit and are sovereign when introducing further changes to the unit. Time spent preparing the tests will pay off in future. So, keep testing in mind from the very start of the project. The likelihood of failure will be significantly reduced and the chances of the success will increase.

The buddy system is often used in diving. From Wikipedia:

The "buddies" are expected to monitor each other, to stay close enough together to be able to help in an emergency, to behave safely and to follow the plan agreed by the group before the dive.

Programmers should also have buddies. Regardless of organizational process, one should have a reliable buddy, preferably an expert in the field who can offer a thorough and clear review of any work. It is essential that the output of every cycle of software production is evaluated because each of these steps is equally important. Designs, code, and tests all need considered peer review. One benefit of peer review is that both sides, the author and the reviewer, can take advantage of the review to learn from one another. To reap the benefits of the meeting both parties should be prepared for it. In the case of a code review, the sources ought to be previously verified, e.g., by static analysis tools.

Last, but not least, programming calls for precision and an in-depth understanding of the project's domain, which is ultimately as important as skill in coding. It leads to a better system architecture, design, and implementation and, therefore, a better product. Remember that diving is not just plunging into water and programming is not just cranking out code. Programming involves continuously improving one's skills, exploring every nook and cranny of engineering, understanding the process of software creation, and taking an active role in any part of it.

By Wojciech Rynczuk

This work is licensed under a Creative Commons Attribution 3

Personal tools