Clean Code

from Wikipedia, the free encyclopedia

Clean Code is a term from software engineering that originated in the book of the same name by Robert Cecil Martin . Software developers primarily describe source code as “clean” , but also documents, concepts, rules and procedures that are intuitively understandable. Anything that can be correctly understood with little effort and in a short time is considered to be intuitively understandable. The advantages of clean code are more stable and efficiently maintainable programs; H. Shorter development times when expanding functions and correcting errors. The importance grows with the observation that on average 80% of the service life of a software is due to the maintenance period.

Difficulties in developing clean code lie

  1. often in initially unclear or contradicting requirements,
  2. partly due to lack of experience in developing clean code,
  3. in lack of discipline in programming and
  4. in the effort of subsequent source code adjustments (so-called refactoring ).

The need to clean “dirty” areas of code after development is often not recognized or not approved by management as soon as the program is performing its intended function. Writing “clean” code directly is nearly impossible, but it can be improved by carefully using the principles and practices of clean code.

Closely related to the term clean code are measures that lead to “clean” program code in the development of software. As numerous as the reasons for "unclean" code are, as diverse are the rules proposed in the catalogs of measures drawn up. This includes:

In addition, there has been a clean code developer movement for a number of years, which aims to make developers aware of a uniform and comprehensive set of rules in a didactically appealing way and thus to promote the discipline that clean code Actually apply measures in everyday programming. Katas are provided as a means of practicing this procedure .

See also

literature

  • Robert C. Martin : Clean Code: Refactoring, Patterns, Testing, and Clean Code Techniques . mitp-Verlag, ISBN 978-0-13-235088-4 .
  • Andreas Wintersteiger: Clean Code . In: The Developer . June 12, 2012 ( [1] [accessed March 16, 2018]).
  • Hendrik Lösch: Clean Code vs. Dependencies . In: Informatik Aktuell . June 20, 2017 ( [2] [accessed March 16, 2018]).
  • Juliane Conte: Clean Code Developer from a company perspective . In: Heise Developer . December 5, 2011 ( [3] [accessed March 16, 2018]).

Web links