Menu

best_practices

Katherine E. Lightsey

Best Practices

An experienced engineer takes a job with another company. After completing the draft of her first design, a boiler to be used in a steam plant, she presents it to the chief engineer who informs her that she has used steel plate heavier than that which is necessary for the boiler. She quickly checks her figures and assures the chief engineer that she has made the right selection. Shaking his head, he pulls a chart from a drawer and hands it to her. He explains that, having worked for the company for more time than she has, he has a better understanding of its business practices and has thus been able to determine that F=ma can be modified as shown. For the product type in question the correct formula, according to the chief engineer, is F=0.63ma. Other products are listed with "k" factor values ranging from 0.23 to 1.00. If a product is not listed, he explains, she is to come to him for advice. With his superior knowledge of the business practices of the company he will be able to determine the correct value of "k". Further, if a project is under time or cost pressure, she is to divide each of these values by "1.57".

The first professional engineer certification boards were setup to combat just this practice. In the early part of the last century boilers were failing at the rate of sometimes several times per week, with hundreds and sometimes thousands of people each week killed or maimed in the US.
The Pennsylvania was a side wheeler steamboat which suffered a boiler explosion in the Mississippi River and sank at Ship Island near Memphis, Tennessee, on June 13, 1858..

The Pennsylvania was a side wheeler steamboat which suffered a boiler explosion in the Mississippi River and sank at Ship Island near Memphis, Tennessee, on June 13, 1858. Of the 450 passengers on board more than 250 died, including Henry Clemens, the younger brother of the author Mark Twain.

As software engineers we don't have the luxury of having professional certification nor indeed do we have formula which are so readily understandable by the average person. Instead we must rely on best practices and obscure statements such as;

"Every non-prime attribute is non-transitively dependent on every candidate key in the table. The attributes that do not contribute to the description of the primary key are removed from the table. In other words, no transitive dependency is allowed. E.F. Codd Third Normal Form."

This does not mean that the best practices and software engineering theory that we use are, within the context of our current body of knowledge, any more mutable than the physical laws used by engineers in other professions. Just as an experienced engineer is required to implement and understand the reactions of components within a mechanical, electrical, or chemical system, so is an experienced software engineer required to implement and understand the reactions of components within a software architecture. Just as best practices and formula are followed rigorously within our sister professions and are only altered or ignored under strict review, so should we follow the best practices and design theory which we have available, altering or ignoring them only under strict review. Choosing to, for example, ignore the rules of normalization simply because the "business rules" don't require it is as asinine a decision as the decision to ignore Newtons second law because "business rules" don't require it.

Newtons second law, F=ma, is an incredibly simple tool known to every high school student and to every scientist and engineer for five centuries. The engineer who understands the second law looks at the world around her and sees both the facade and the beauty of the underlying structure. Carnival rides become exercises in basic mathematics as forces on bolts are evaluated and appraised. Sports cars become learning experiences as suspension components are analyzed. Skyscrapers become objects of entertainment as she looks in awe at the flexibility of steel and concrete coupled with the dynamics of suspended systems to counter natural forces.

I remember following the restoration of the Statue of Liberty with fascination as a young engineer in the 1980's. Only rarely do we have the opportunity to see in such detail the beauty of the mechanics underlying art. I remember hearing of the Challenger Disaster.
The Challenger Crew

As a young Product Engineer I was actually working on a design for a hub oil seal at the time for Stemco, a division of Colt Industries. The design was for an experimental variation of their standard product which would use an o-ring rather than a flat gasket. When it became known that the failure was precipitated by a failure in the design of an o-ring, I remember pulling my o-ring design manual down from my bookshelf to verify that I wasn't remembering incorrectly. I wasn't. There in clear words and diagrams were simple instructions on how to design a cavity for an o-ring.
O-ring design

The failure of the engineers at NASA to follow this simple, commonly known and readily available best practice had resulted in the deaths of seven American heroes and led to mourning throughout the nation.

My men are not expendable. And I don't do this kind of work. - Arnold Schwarzenegger (Dutch) - Predator

Simplicity itself could be defined as the formula F=ma, yet its result has been structures and achievements of grandeur that were only flights of fantasy a mere fraction of time in the past as measured by our becoming an organized species that dreamed of building permanence. Many physical or mathematical laws are not as simple. The Confidence Interval for example, one of my favorite formulas (and one I think all engineers from any discipline should be familiar with) is so complex that it can't even be printed without the use of special characters and formatting.
Confidence Interval

The thought that the simple laws are more important than the complex laws is the rationalization of the fool. Quite frequently we find that the simple laws must be used only with the filter of other laws applied! Measuring the force required to break a steel beam one time and then declaring that to be the strength of that type of beam would, for example, be ridiculous. To produce the desired result one must pass the results of multiple tests through the filter of the confidence interval in order to get a usable result.

It takes a craftsman to use even a simple tool to produce beauty. In truth we frequently find that the more simple the tool, the more skill required to understand and use it, while the more complex the tool, the more training and experience required to use and understand it. Try using a carpenters plane to produce a clean, smooth, flat surface. More experience and more talent goes into the use of that simple tool than be found in even a small group of the average persons. Try using a chain saw. More training and experience is required to manage the power of that instrument (without removing one of your own appendages) than most of us gather in a lifetime.

A skilled engineer has a deep and broad understanding of the laws, rules, and best practices of her chosen field, is familiar with the basic laws and practices of other supporting and related disciplines, and maintains a healthy respect for all of these.

Steel can be any shape you want if you are skilled enough, and any shape but the one you want if you are not. Robert M. Persig

What Management Does



Reference: http://blog.sqlauthority.com/2007/06/06/sql-server-database-coding-standards-and-guidelines-complete-list-download/



copyright Katherine Elizabeth Lightsey 1959-2013 (aka; my life)

"Men acquire a particular quality by constantly acting a particular way... you become just by performing just actions, temperate by performing temperate actions, brave by performing brave actions." - Aristotle




Related

Wiki: engineering_as_an_art_form
Wiki: faq
Wiki: normalization

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.