Programming Perfection: Noble Quest or Fool's Gold?
The topic of perfection is a common discussion at the programming dinner table. Is it good? It is bad? It is healthy? Is it possible? Is it realistic? As expected, a topic with this many questions has a wide variety of entrenched opinions. Some advocates state perfectionism incubates higher code quality which directly results in lower bug counts and a more stable solution. The diametric opinions typically cite wasted time and/or effort and speak to an unqualified need for the ideal, additionally stating that clean, concise code is optional and in the eye of the beholder. Which side is right? Is there a right side? Or, does either argument hold water?
Perfectionism is defined as a personality trait characterized by a person's striving for flawlessness and setting excessively high performance standards. Unfortunately, the definition of perfectionism contains negative connotations through the use of lively words such as "flawlessness" and "excessive." Additionally, the increased visibility of psychological disorders such as obsessive compulsive disorder (OCD) have brought health and mental concerns to the forefront. This should not be confused with those setting the bar intentionally high, but within reason. Having high standards/expectations can be a positive attribute. This goal can help someone become a better person. With that in mind, the following section outlines the benefits and pitfalls of perfectionism in software development:
- Cleaner code is easier to manage and maintain
- Higher quality code translates to less bugs found by QA and in production
- Seeking out higher quality increases one's knowledge and ability
- Code is well structured for future development or refactoring
- Taking too much unscheduled time to complete a task can cause project delays
- Continuous refactoring can lead to excessive retesting
- Changing unrelated code such as variable or function names can introduce bugs into existing functionality
- Using perfectionism as an excuse or a crutch
Brene Brown, a research professor at the University of Houston Graduate College of Social Work stated, "Perfectionism is not the same thing as striving to be our best. Perfectionism is not about healthy achievement and growth; it's a shield." Although perfectionism is a double-edged sword, it should not be labeled as good or evil. It should be categorized as innocuous. Perfection on its own merit is worth a second look, but the power it wields depends on the source.
As with most personality traits, moderation is important. Properly balancing high quality against project needs, timelines, and goals is an area that should be kept in check. Missing a deadline that directly impacts profitability may have dire consequences. Additionally, be sure to recognize that perfectionism is not a trait held by all. Holding everyone to the same standard may create excessive friction between team members. Setting (or asking for) expectations/limits in a project or task can also help frame expectations. For those with the perfectionism trait, do not get discouraged when perfection is not chosen as the top priority. Use this information as fuel to continue championing it. For those without the perfectionism gene, do not suppress, box-in, or invalidate those who strive towards perfection. Work with them to find a manageable balance between perfection and priority.