One of the parameters for evaluating the code is its purity. The creator of the UML modeling language Grady Booch (Grady Booch)
wrote :
“Clean code is simple and clear. Clean code is read as a well-written work. Clean code never hides the creator’s intentions, but, on the contrary, is full of clear abstractions and simple transmission lines of control. ”
Today we have compiled for you a
list of books and articles on this topic that Hacker News, Stack Exchange and other specialized platforms recommend reading.
/ Flickr / Robert Gourley / CC')
Literature
- "Perfect Code" by Steve McConnell
This book appears most often in
conversations about the purity of the code. It is even
called the "Software Development Bible." Work saw the light in 1993. The book can be considered the most complete practical design guide due to the emphasis on design and code planning — the author assigns the most important role to these stages of development.
- “Programmer pragmatist. The journey from apprentice to master "
Andrew Hunt (Andrew Hunt), David Thomas (David Thomas)
Another
popular among developers work, known for ease of narration. For example, cautioning readers against errors and inaccuracies in the code, the authors resort to the theory of "
broken windows ". The book covers a variety of topics - from personal responsibility and career growth to architectural techniques that give programs flexibility.
- "Way of Thinking - Fort" by Leo Brodie (Leo Brodie)
The fort is a programming language that was widely used in astronomy in the 70s of the last century. Despite the narrow theme, the developers
will find in the book the basics of building code. Even for those who are not going to study the Fort, the “Fortan” way of thinking will help to take a different look at refactoring. Reprinted in 2004 version provided by the author Leo Brodie (Leo Brodie) in general use.
- “Ruby. Object-Oriented Design » Sandy Metz (Sandi Metz)
Sandi Metz (Sandi Metz) has prepared a practical guide to object-oriented design with an eye on developers who are familiar with the basics, but have not yet formed a code philosophy. The author uses clear and real-life examples. Sandy is a fan of cost-effective tests and sensible approaches. Her website says: “If the code finishes you, and there is no joy left, this book is your solution.”
- “Refactoring. Improving existing code
Martin Fowler, Kent Beck, John Brant and others.
Another ageless folio, which appeared in the late 90s. The list of authors of “Refactoring” is headed by Martin Fowler, who, together with Kent Beck, is at the heart of the methodology of extreme programming. This is a completely new look at the development process, which shows how the code should be and how it should be created. The book contains examples of refactoring with a detailed description. Many of them have not lost their relevance, and some have been automated and are now used in modern development.
- "The Art of Unix Programming" by Eric Raymond
The name of the book is not in vain echoes the fundamental work of Donald Knuth (Donald Knuth) in 1968 "The Art of Programming." On the pages of his book, Eric Raymond (Eric Raymond) is trying to convey not only practical recommendations, but also the philosophy - understanding of code in Unix. He does this with many examples. They show respect for the fruits of the work of talented people who worked on Unix, and the philosophy of "clean code".
- "Programming Practice"
Brian Kernighan, Rob Pike
Eric Raymond, in his work, called "The Practice of Programming" "recommended reading for connoisseurs of C (more precisely, for all programmers)." Therefore, the book can be called a classic of pure development. Here are the principles of practical professional programming, which include the design and the correct choice of algorithms.
- “Clean code. Creation, analysis and refactoring » Robert C. Martin (Robert Martin)
"Clean Code" is a look at the development process from the perspective of the 21st century. The book is replete with specific examples of programs. Author Robert is not trying to form a philosophy around the development, but shows how the code works "in life."
- “Game Programming Templates” by Robert Nystrom
“This is a book that I would like to read when I started creating games,” the author himself describes it. At first glance, “Templates” is a highly specialized literature for game devs from a veteran Electronic Arts. However, upon closer inspection, the book allows you to rethink the work with the code and make it cleaner. Someone from the users of Reddit even
decided to study C ++ after reading the book.
- "Readable code, or programming as art"
Dustin Boswell (Dustin Boswell), Trevor Foucher (Trevor Foucher)
According
to Nicholas C. Zakas, author of JavaScript, “the book immerses itself in the process of code hygiene like nothing else.” The book explains how naming variables, functions, and classes helps development teams. Key accents: structuring code and comments, balancing between efficiency and readability.
References to the literature
/ Maxpixel / Code Data Programming / CCSeveral articles, blogs and tools
- The article "How to write an unsupported program code" is a kind of classic. In the format of "bad advice" the reader is invited to find out what code can not be considered clean.
- Clean code has some formal attributes. You can check whether the code "bad smell" , you can use the table of Professor Mika Mäntylä (Mika Mäntylä). Signs of good code can be found on the Coding Horror blog .
- As Quora users advise , in order to comprehend the art of clean code, it is worthwhile to read good code as much as possible. For this fit platforms such as GitHub , Codeplex , Google Code . By the way, various platforms provide ready-made tools to improve the code. For example, GitHub Code Review .
- The process of cleaning code can be partially automated. There are tools for statistical analysis. In the case of C, C ++, PC-lint was developed for this. Simplify the code allows SourceMonitor .
- Recommendations on code structuring are also often given by platform developers. For example, Microsoft has such a document for C #.
PS Our digests:
PPS What else do we write in our blog: