Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
Skip header Section
Clean Code: A Handbook of Agile Software CraftsmanshipAugust 2008
Publisher:
  • Prentice Hall PTR
  • Upper Saddle River, NJ
  • United States
ISBN:978-0-13-235088-4
Published:11 August 2008
Pages:
448
Skip Bibliometrics Section
Bibliometrics
Skip Abstract Section
Abstract

Even bad code can function. But if code isnt clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesnt have to be that way.Noted software expert Robert C. Martin, presents a revolutionary paradigm with Clean Code: A Handbook of Agile Software Craftsmanship. Martin, who has helped bring agile principles from a practitioners point of view to tens of thousands of programmers, has teamed up with his colleagues from Object Mentor to distill their best agile practice of cleaning code on the fly into a book that will instill within you the values of software craftsman, and make you a better programmerbut only if you work at it.What kind of work will you be doing? Youll be reading codelots of code. And you will be challenged to think about whats right about that code, and whats wrong with it. More importantly you will be challenged to reassess your professional values and your commitment to your craft. Clean Code is divided into three parts. The first describes the principles, patterns, and practices of writing clean code. The second part consists of several case studies of increasing complexity. Each case study is an exercise in cleaning up codeof transforming a code base that has some problems into one that is sound and efficient. The third part is the payoff: a single chapter containing a list of heuristics and smells gathered while creating the case studies. The result is a knowledge base that describes the way we think when we write, read, and clean code.Readers will come away from this book understandingHow to tell the difference between good and bad codeHow to write good code and how to transform bad code into good codeHow to create good names, good functions, good objects, and good classesHow to format code for maximum readability How to implement complete error handling without obscuring code logicHow to unit test and practice test-driven developmentWhat smells and heuristics can help you identify bad codeThis book is a must for any developer, software engineer, project manager, team lead, or systems analyst with an interest in producing better code.

Cited By

  1. ACM
    Hong J and Ryu S (2024). Don’t Write, but Return: Replacing Output Parameters with Algebraic Data Types in C-to-Rust Translation, Proceedings of the ACM on Programming Languages, 8:PLDI, (716-740), Online publication date: 20-Jun-2024.
  2. ACM
    Aman H, Amasaki S, Yokogawa T and Kawahara M A Quantitative Investigation of Trends in Confusing Variable Pairs Through Commits: Do Confusing Variable Pairs Survive? Proceedings of the 28th International Conference on Evaluation and Assessment in Software Engineering, (90-99)
  3. ACM
    Romano S, Toriello G, Cassieri P, Francese R and Scanniello G A Folklore Confirmation on the Removal of Dead Code Proceedings of the 28th International Conference on Evaluation and Assessment in Software Engineering, (333-338)
  4. ACM
    Sun W, Fang C, Chen Y, Zhang Q, Tao G, You Y, Han T, Ge Y, Hu Y, Luo B and Chen Z (2024). An Extractive-and-Abstractive Framework for Source Code Summarization, ACM Transactions on Software Engineering and Methodology, 33:3, (1-39), Online publication date: 31-Mar-2024.
  5. Toosi F (2023). Source Code Features and their Dependencies, Applied Computer Systems, 28:2, (221-231), Online publication date: 1-Dec-2023.
  6. Noei S, Li H, Georgiou S and Zou Y (2023). An Empirical Study of Refactoring Rhythms and Tactics in the Software Development Process, IEEE Transactions on Software Engineering, 49:12, (5103-5119), Online publication date: 1-Dec-2023.
  7. Tigina M, Birillo A, Golubev Y, Keuning H, Vyahhi N and Bryksin T Analyzing the Quality of Submissions in Online Programming Courses Proceedings of the 45th International Conference on Software Engineering: Software Engineering Education and Training, (271-282)
  8. Nurollahian S, Rafferty A and Wiese E Improving Assessment of Programming Pattern Knowledge through Code Editing and Revision Proceedings of the 45th International Conference on Software Engineering: Software Engineering Education and Training, (58-69)
  9. Reich P and Maalej W Testability Refactoring in Pull Requests: Patterns and Trends Proceedings of the 45th International Conference on Software Engineering, (1508-1519)
  10. Liang J, Arab M, Ko M, Ko A and LaToza T A Qualitative Study on the Implementation Design Decisions of Developers Proceedings of the 45th International Conference on Software Engineering, (435-447)
  11. ACM
    Romano S, Zampetti F, Baldassarre M, Di Penta M and Scanniello G Do Static Analysis Tools Affect Software Quality when Using Test-driven Development? Proceedings of the 16th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement, (80-91)
  12. ACM
    Cassieri P, Romano S, Scanniello G, Tortora G and Caivano D Do Developers Modify Dead Methods during the Maintenance of Java Desktop Applications? Proceedings of the 26th International Conference on Evaluation and Assessment in Software Engineering, (120-129)
  13. ACM
    Bhattacharjee A, Roy B and Schneider K Supporting program comprehension by generating abstract code summary tree Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging Results, (81-85)
  14. ACM
    Hernandez A, Nassif M and Robillard M DScribe Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings, (56-60)
  15. ACM
    Liu F, Li G, Fu Z, Lu S, Hao Y and Jin Z Learning to recommend method names with global context Proceedings of the 44th International Conference on Software Engineering, (1294-1306)
  16. ACM
    Alsuhaibani R, Newman C, Decker M, Collard M and Maletic J An approach to automatically assess method names Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension, (202-213)
  17. Digkas G, Chatzigeorgiou A, Ampatzoglou A and Avgeriou P (2022). Can Clean New Code Reduce Technical Debt Density?, IEEE Transactions on Software Engineering, 48:5, (1705-1721), Online publication date: 1-May-2022.
  18. Zabardast E, Ebo Bennin K and Gonzalez‐Huerta J (2022). Further investigation of the survivability of code technical debt items, Journal of Software: Evolution and Process, 34:2, Online publication date: 9-Feb-2022.
  19. ACM
    Sundelin A, Gonzalez-huerta J, Wnuk K and Gorschek T (2021). Towards an Anatomy of Software Craftsmanship, ACM Transactions on Software Engineering and Methodology, 31:1, (1-49), Online publication date: 31-Jan-2022.
  20. ACM
    Gresta R, Durelli V and Cirilo E Naming Practices in Java Projects: An Empirical Study Proceedings of the XX Brazilian Symposium on Software Quality, (1-10)
  21. Gomes P, Garcia R, Eler D, Correia R and Junior C Software Quality as a Subsidy for Teaching Programming 2021 IEEE Frontiers in Education Conference (FIE), (1-9)
  22. ACM
    Caivano D, Cassieri P, Romano S and Scanniello G An Exploratory Study on Dead Methods in Open-source Java Desktop Applications Proceedings of the 15th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), (1-11)
  23. Soomlek C, van Rijn J and Bonsangue M Automatic Human-Like Detection of Code Smells Discovery Science, (19-28)
  24. Latifaj M, Ciccozzi F, Anwar M and Mohlin M Blended Graphical and Textual Modelling of UML-RT State-Machines: An Industrial Experience Software Architecture, (22-44)
  25. ACM
    Preschern C A Pattern Story about C Programming Proceedings of the 26th European Conference on Pattern Languages of Programs, (1-9)
  26. ACM
    Batdalov R and Nikiforova O Patterns for Assignment and Passing Objects Between Contexts in Programming Languages Proceedings of the 26th European Conference on Pattern Languages of Programs, (1-9)
  27. ACM
    Buffardi K and Aguirre-Ayala J Unit Test Smells and Accuracy of Software Engineering Student Test Suites Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education V. 1, (234-240)
  28. Basile D and ter Beek M A Clean and Efficient Implementation of Choreography Synthesis for Behavioural Contracts Coordination Models and Languages, (225-238)
  29. Basile D, ter Beek M, Degano P, Legay A, Ferrari G, Gnesi S and Di Giandomenico F Supervisory Synthesis of Configurable Behavioural Contracts with Modalities Formal Techniques for Distributed Objects, Components, and Systems, (177-181)
  30. Alsuhaibani R, Newman C, Decker M, Collard M and Maletic J On the Naming of Methods Proceedings of the 43rd International Conference on Software Engineering, (587-599)
  31. Digkas G, Ampatzoglou A, Chatzigeorgiou A, Avgeriou P, Matei O and Heb R (2020). The Risk of Generating Technical Debt Interest: A Case Study, SN Computer Science, 2:1, Online publication date: 1-Feb-2021.
  32. ACM
    Andrä L, Taufner B, Schefer-Wenzl S and Miladinovic I Maintainability Metrics for Android Applications in Kotlin Proceedings of the 2020 European Symposium on Software Engineering, (1-5)
  33. Nascimento M, Araújo E, Serey D and Figueiredo J The Role of Source Code Vocabulary in Programming Teaching and Learning 2020 IEEE Frontiers in Education Conference (FIE), (1-8)
  34. Kanade A, Maniatis P, Balakrishnan G and Shi K Learning and evaluating contextual embedding of source code Proceedings of the 37th International Conference on Machine Learning, (5110-5121)
  35. ACM
    Preschern C Patterns for Organizing Files in Modular C Programs Proceedings of the European Conference on Pattern Languages of Programs 2020, (1-15)
  36. ACM
    Spadini D, Schvarcbacher M, Oprescu A, Bruntink M and Bacchelli A Investigating Severity Thresholds for Test Smells Proceedings of the 17th International Conference on Mining Software Repositories, (311-321)
  37. ACM
    Krueger R, Huang Y, Liu X, Santander T, Weimer W and Leach K Neurological divide Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering, (678-690)
  38. Bessghaier N, Ouni A and Mkaouer M On the Diffusion and Impact of Code Smells in Web Applications Services Computing – SCC 2020, (67-84)
  39. Aman H, Amasaki S, Yokogawa T and Kawahara M (2019). Empirical study of abnormality in local variables and its application to fault‐prone Java method analysis†, Journal of Software: Evolution and Process, 32:4, Online publication date: 1-Apr-2020.
  40. Wan Y, Shu J, Sui Y, Xu G, Zhao Z, Wu J and Yu P Multi-modal attention network learning for semantic source code retrieval Proceedings of the 34th IEEE/ACM International Conference on Automated Software Engineering, (13-25)
  41. ACM
    Krüger J Tackling knowledge needs during software evolution Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, (1244-1246)
  42. ACM
    Preschern C Patterns to escape the #ifdef hell Proceedings of the 24th European Conference on Pattern Languages of Programs, (1-12)
  43. ACM
    Euler S Automatic Evaluation of the Quality of Solutions for an Open Programming Task Proceedings of the 2019 ACM Conference on Innovation and Technology in Computer Science Education, (237-238)
  44. Nielebock S, Krolikowski D, Krüger J, Leich T and Ortmeier F (2019). Commenting source code, Empirical Software Engineering, 24:3, (1418-1457), Online publication date: 1-Jun-2019.
  45. Wiese E, Rafferty A and Fox A Linking code readability, structure, and comprehension among novices Proceedings of the 41st International Conference on Software Engineering: Software Engineering Education and Training, (84-94)
  46. Bafatakis N, Boecker N, Boon W, Salazar M, Krinke J, Oznacar G and White R Python coding style compliance on stack overflow Proceedings of the 16th International Conference on Mining Software Repositories, (210-214)
  47. Liu K, Kim D, Bissyandé T, Kim T, Kim K, Koyuncu A, Kim S and Traon Y Learning to spot and refactor inconsistent method names Proceedings of the 41st International Conference on Software Engineering, (1-12)
  48. Tanveer B, Vollmer A, Braun S and Ali N (2019). An evaluation of effort estimation supported by change impact analysis in agile software development, Journal of Software: Evolution and Process, 31:5, Online publication date: 20-May-2019.
  49. Rajlich V (2018). Five recommendations for software evolvability, Journal of Software: Evolution and Process, 30:9, Online publication date: 17-Sep-2018.
  50. ACM
    Wan Y, Zhao Z, Yang M, Xu G, Ying H, Wu J and Yu P Improving automatic source code summarization via deep reinforcement learning Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering, (397-407)
  51. Aniche M, Bavota G, Treude C, Gerosa M and Deursen A (2018). Code smells for Model-View-Controller architectures, Empirical Software Engineering, 23:4, (2121-2157), Online publication date: 1-Aug-2018.
  52. ACM
    Batdalov R and Nikiforova O Three Patterns of Data Type Composition in Programming Languages Proceedings of the 23rd European Conference on Pattern Languages of Programs, (1-8)
  53. ACM
    Zarras A, Mamalis G, Papamichail A, Kollias P and Vassiliadis P And the Tool Created a GUI That was Impure and Without Form Proceedings of the 23rd European Conference on Pattern Languages of Programs, (1-8)
  54. ACM
    Blasquez I and Leblanc H Experience in learning test-driven development: space invaders project-driven Proceedings of the 23rd Annual ACM Conference on Innovation and Technology in Computer Science Education, (111-116)
  55. ACM
    Su F, Bell J, Kaiser G and Ray B Obfuscation resilient search through executable classification Proceedings of the 2nd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages, (20-30)
  56. O'Neill B (2018). Curriculum changes to improve software development skills in undergraduates, Journal of Computing Sciences in Colleges, 33:6, (86-96), Online publication date: 1-Jun-2018.
  57. ACM
    dos Santos R and Gerosa M Impacts of coding practices on readability Proceedings of the 26th Conference on Program Comprehension, (277-285)
  58. ACM
    Schankin A, Berger A, Holt D, Hofmeister J, Riedel T and Beigl M Descriptive compound identifier names improve source code comprehension Proceedings of the 26th Conference on Program Comprehension, (31-40)
  59. ACM
    Krüger J, Wiemann J, Fenske W, Saake G and Leich T Do you remember this source code? Proceedings of the 40th International Conference on Software Engineering, (764-775)
  60. ACM
    Tanveer B, Vollmer A and Braun S A hybrid methodology for effort estimation in Agile development Proceedings of the 2018 International Conference on Software and System Process, (21-30)
  61. ACM
    Kery M, Radensky M, Arya M, John B and Myers B The Story in the Notebook Proceedings of the 2018 CHI Conference on Human Factors in Computing Systems, (1-11)
  62. van Schelven K Clef Design Proceedings of the 11th European Lisp Symposium on European Lisp Symposium, (94-102)
  63. ACM
    Mosqueira-Rey E, Alonso-Ríos D and Moret-Bonillo V A heuristic evaluation of the user and programming interfaces of a sleep medicine application Proceedings of the 33rd Annual ACM Symposium on Applied Computing, (648-655)
  64. ACM
    Buchwald H Subject-Orientation and Agility Proceedings of the 10th International Conference on Subject-Oriented Business Process Management, (1-7)
  65. ACM
    Gestwicki P Design and Evaluation of an Undergraduate Course on Software Development Practices Proceedings of the 49th ACM Technical Symposium on Computer Science Education, (221-226)
  66. ACM
    Börstler J, Störrle H, Toll D, van Assema J, Duran R, Hooshangi S, Jeuring J, Keuning H, Kleiner C and MacKellar B "I know it when I see it" Perceptions of Code Quality Proceedings of the 2017 ITiCSE Conference on Working Group Reports, (70-85)
  67. Bach T, Andrzejak A, Pannemans R and Lo D The impact of coverage on bug density in a large industrial software project Proceedings of the 11th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, (307-313)
  68. Green R (2017). Focus driven development, Journal of Computing Sciences in Colleges, 33:1, (72-76), Online publication date: 1-Oct-2017.
  69. ACM
    Uhnák P and Pergl R Ad-hoc Runtime Object Structure Visualizations with MetaLinks Proceedings of the 12th edition of the International Workshop on Smalltalk Technologies, (1-10)
  70. Cheresharov S, Krushkov H, Stoyanov S and Popchev I (2017). Modules for Rapid Application Development of Web-Based Information Systems (RADWIS), Cybernetics and Information Technologies, 17:3, (109-127), Online publication date: 1-Sep-2017.
  71. ACM
    Van Heesch U, Theunissen T, Zimmermann O and Zdun U Software Specification and Documentation in Continuous Software Development Proceedings of the 22nd European Conference on Pattern Languages of Programs, (1-13)
  72. ACM
    Sauermann V and Frey F Architecture Management in Software Development Organizations Proceedings of the 22nd European Conference on Pattern Languages of Programs, (1-14)
  73. Avidan E and Feitelson D Effects of variable names on comprehension an empirical study Proceedings of the 25th International Conference on Program Comprehension, (55-65)
  74. Valdecantos H, Tarrit K, Mirakhorli M and Coplien J An empirical study on code comprehension Proceedings of the 25th International Conference on Program Comprehension, (275-285)
  75. Beniamini G, Gingichashvili S, Orbach A and Feitelson D Meaningful identifier names Proceedings of the 25th International Conference on Program Comprehension, (45-54)
  76. ACM
    Wiese E, Yen M, Chen A, Santos L and Fox A Teaching Students to Recognize and Implement Good Coding Style Proceedings of the Fourth (2017) ACM Conference on Learning @ Scale, (41-50)
  77. ACM
    Lindell R Design in Ecology of Other Artefacts Proceedings of the Audio Mostly 2016, (240-244)
  78. ACM
    Ó Cinnéide M, Yamashita A and Counsell S Measuring refactoring benefits: a survey of the evidence Proceedings of the 1st International Workshop on Software Refactoring, (9-12)
  79. Lee J, Kim D, Kim S and Park S (2016). Decomposing class responsibilities using distance-based method similarity, Frontiers of Computer Science: Selected Publications from Chinese Universities, 10:4, (612-630), Online publication date: 1-Aug-2016.
  80. ACM
    Bernstein M Storyspace 3 Proceedings of the 27th ACM Conference on Hypertext and Social Media, (201-206)
  81. ACM
    Sharma T, Fragkoulis M and Spinellis D Does your configuration code smell? Proceedings of the 13th International Conference on Mining Software Repositories, (189-200)
  82. ACM
    Politowski C, Fontoura L, Petrillo F and Guéhéneuc Y Are the old days gone? Proceedings of the 5th International Workshop on Games and Software Engineering, (22-28)
  83. ACM
    Romano S, Scanniello G, Sartiani C and Risi M A graph-based approach to detect unreachable methods in Java software Proceedings of the 31st Annual ACM Symposium on Applied Computing, (1538-1541)
  84. ACM
    Patrick M, Elderfield J, Stutt R, Rice A and Gilligan C Software testing in a scientific research group Proceedings of the 31st Annual ACM Symposium on Applied Computing, (1454-1459)
  85. ACM
    Gestwicki P and McNely B (2016). Interdisciplinary Projects in the Academic Studio, ACM Transactions on Computing Education, 16:2, (1-24), Online publication date: 28-Mar-2016.
  86. ACM
    Ott C, Robins A and Shephard K (2016). Translating Principles of Effective Feedback for Students into the CS1 Context, ACM Transactions on Computing Education, 16:1, (1-27), Online publication date: 26-Feb-2016.
  87. Costa B, Pires P, Delicato F and Merson P (2016). Evaluating REST architectures-Approach, tooling and guidelines, Journal of Systems and Software, 112:C, (156-180), Online publication date: 1-Feb-2016.
  88. Gestwicki P (2015). Teaching game programming with PlayN, Journal of Computing Sciences in Colleges, 31:1, (90-97), Online publication date: 1-Oct-2015.
  89. ACM
    Mitrović D, Ivanović M and Budimac Z Test-driven development of web and enterprise agents Proceedings of the 7th Balkan Conference on Informatics Conference, (1-5)
  90. ACM
    Allamanis M, Barr E, Bird C and Sutton C Suggesting accurate method and class names Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, (38-49)
  91. ACM
    Preschern C Idioms for error handling in C Proceedings of the 20th European Conference on Pattern Languages of Programs, (1-10)
  92. Ouni A, Kessentini M, Bechikh S and Sahraoui H (2015). Prioritizing code-smells correction tasks using chemical reaction optimization, Software Quality Journal, 23:2, (323-361), Online publication date: 1-Jun-2015.
  93. ACM
    Hill J and Feiock D (2014). Pin++: an object-oriented framework for writing pintools, ACM SIGPLAN Notices, 50:3, (133-141), Online publication date: 12-May-2015.
  94. ACM
    Stegeman M, Barendsen E and Smetsers S Towards an empirically validated model for assessment of code quality Proceedings of the 14th Koli Calling International Conference on Computing Education Research, (99-108)
  95. Dibble C and Gestwicki P (2014). Refactoring code to increase readability and maintainability, Journal of Computing Sciences in Colleges, 30:1, (41-51), Online publication date: 1-Oct-2014.
  96. ACM
    Hill J and Feiock D Pin++: an object-oriented framework for writing pintools Proceedings of the 2014 International Conference on Generative Programming: Concepts and Experiences, (133-141)
  97. Dillon S, Rastrick K, Stahl F and Vossen G (2014). Cases for the Web in Your Pocket WiPo, International Journal of Information Technology and Web Engineering, 9:3, (40-54), Online publication date: 1-Jul-2014.
  98. ACM
    Steidl D and Eder S Prioritizing maintainability defects based on refactoring recommendations Proceedings of the 22nd International Conference on Program Comprehension, (168-176)
  99. ACM
    Tian E Journey to agility for a large scale telecom system Proceedings of the 2014 International Conference on Software and System Process, (191-192)
  100. ACM
    Heinonen K, Hirvikoski K, Luukkainen M and Vihavainen A Learning agile software engineering practices using coding dojo Proceedings of the 14th annual ACM SIGITE conference on Information technology education, (97-102)
  101. Greiler M, Zaidman A, Deursen A and Storey M Strategies for avoiding text fixture smells during software evolution Proceedings of the 10th Working Conference on Mining Software Repositories, (387-396)
  102. ACM
    Schulze S, Richers O and Schaefer I Refactoring delta-oriented software product lines Proceedings of the 12th annual international conference on Aspect-oriented software development, (73-84)
  103. ACM
    Gestwicki P and McNely B Empirical evaluation of periodic retrospective assessment Proceeding of the 44th ACM technical symposium on Computer science education, (699-704)
  104. ACM
    Luukkainen M, Vihavainen A and Vikberg T Three years of design-based research to reform a software engineering curriculum Proceedings of the 13th annual conference on Information technology education, (209-214)
  105. ACM
    McNely B, Gestwicki P, Burke A and Gelms B Articulating everyday actions Proceedings of the 30th ACM international conference on Design of communication, (95-104)
  106. ACM
    Kruchten P, Nord R, Ozkaya I and Visser J (2012). Technical debt in software development, ACM SIGSOFT Software Engineering Notes, 37:5, (36-38), Online publication date: 7-Sep-2012.
  107. ACM
    Luukkainen M, Vihavainen A and Vikberg T A software craftsman's approach to data structures Proceedings of the 43rd ACM technical symposium on Computer Science Education, (439-444)
  108. ACM
    Cukier D and Yoder J The artist in the computer scientist Proceedings of the 10th SIGPLAN symposium on New ideas, new paradigms, and reflections on programming and software, (129-136)
  109. ACM
    Kurhila J and Vihavainen A Management, structures and tools to scale up personal advising in large programming courses Proceedings of the 2011 conference on Information technology education, (3-8)
  110. ACM
    Smith A and Kulkarni P Localizing globals and statics to make C programs thread-safe Proceedings of the 14th international conference on Compilers, architectures and synthesis for embedded systems, (205-214)
  111. ACM
    Ozkaya I, Kruchten P, Nord R and Brown N (2011). Managing technical debt in software development, ACM SIGSOFT Software Engineering Notes, 36:5, (33-35), Online publication date: 30-Sep-2011.
  112. ACM
    Vihavainen A, Paksula M, Luukkainen M and Kurhila J Extreme apprenticeship method Proceedings of the 16th annual joint conference on Innovation and technology in computer science education, (273-277)
  113. ACM
    Ozkaya I, Kruchten P, Nord R and Brown N Second international workshop on managing technical debt (MTD 2011) Proceedings of the 33rd International Conference on Software Engineering, (1212-1213)
  114. ACM
    Brown N, Cai Y, Guo Y, Kazman R, Kim M, Kruchten P, Lim E, MacCormack A, Nord R, Ozkaya I, Sangwan R, Seaman C, Sullivan K and Zazworka N Managing technical debt in software-reliant systems Proceedings of the FSE/SDP workshop on Future of software engineering research, (47-52)
  115. ACM
    Do Vale Pereira D and Kulesza U Refactoring a web academic information system using design patterns Proceedings of the 8th Latin American Conference on Pattern Languages of Programs, (1-14)
  116. ACM
    Kratzer K and Böttcher A Using an RTSJ-compatible MVC pattern as basis for configurable event-driven real-time software Proceedings of the 8th International Workshop on Java Technologies for Real-Time and Embedded Systems, (8-15)
  117. Nicolaysen T, Sassoon R, Line M and Jaatun M (2010). Agile Software Development, International Journal of Secure Software Engineering, 1:3, (71-85), Online publication date: 1-Jul-2010.
Contributors
  • Meritor, Inc.

Reviews

Fernando Berzal

As Martin Fowler once wrote, "any damn fool can write code that a computer can understand, the trick is to write code that humans can understand" [1]. Without this reason, we could still be writing code in assembly, and nobody would really complain. But, since maintenance, which obviously includes code reading, takes up a big chunk of the software development budget, it is not enough for code to work. It must also be clean. So, what exactly do professional programmers understand "clean code" to mean__?__ Martin conducted a small survey, asking some of the most renowned programmers for their thoughts on the subject. As you might expect, these experts mentioned elegance, efficiency, readability, modifiability, minimality, testability, simplicity, expressiveness, and abstraction. In this book's introduction, you will find their complete responses, along with Martin's commentary. Once the stage is set, the book proceeds in three complementary directions, which form the basis of its three constituent parts. The first part, chapters 2 to 13, covers the principles, patterns, and practices of writing clean code, from the point of view of Martin and six of his colleagues at Object Mentor Inc. Here, the authors deliberately "use the popular paperback model whereby the author is responsible for making himself clear and not the academic model where it is the scholar's job to dig the meaning out of the paper." These chapters, therefore, are written with an opinion column style. They are to be read more as informal blogging rants than as the final word on the topic. Written by seven different authors, you might find some general disorder, some lack of depth in many topics, and also many loose ends to be pondered. But, even when you might not agree with everything they say, you will still find many commonsense coding guidelines and some witty aphorisms, which are so dear to many agile zealots. The second part of the book, chapters 14 to 16, includes three particular case studies that illustrate how even well-written code can always be refactored and cleaned using test-driven development (TDD) [2]. The premise behind TDD is that code should be continually tested and refactored. Its motto is: first, make it work (pass the automated tests); then, make it right. This part of the book is particularly interesting for inexperienced programmers because it presents refactoring as an iterative process that is full of trial and error-far apart from the typical textbook examples, which are usually polished before publishing and provide the false impression of a perfect first draft. In this book, however, extensive code listings are provided as the author performs tiny steps to improve the code (keeping the tests passing between each pair of consecutive steps, of course). The final chapter of the book contains a list of 66 smells and heuristics that the author compiled by walking through different programs and refactoring them. Each time he changed anything, he asked himself why he had made that change, and then wrote the reason down. This resulted in a list that, even though it could hardly be said to be complete, implies "a value system"-the set of values at the heart of Object Mentor's "school of thought." Whether you find these kinds of expressions and analogies fortunate or not, you can always find some food for thought from Martin's incisiveness and insight. In short, this book makes common sense explicit in the form of coding guidelines, provides three interesting case studies that illustrate the iterative refactoring process needed to produce really maintainable code, and compiles, in a single chapter, many of the underlying heuristics that guide this process. It should be noted, however, that this book is virtually useless for novice programmers, since it assumes some knowledge of automated testing; refactoring; test-driven development; principles, patterns, and practices (PPP); and design patterns, not to mention the need to be able to appreciate the importance of writing clear and maintainable code, something you do not really understand until you have worked on actual projects (lip service in introductory programming classes is not enough). From my point of view, although this book is far inferior to Martin's excellent PPP book [3], it could still be beneficial as an instrument to spark interesting discussions within your own development team, polish your differences until you achieve a consensus, and, in agile terms, develop your own "value system." Online Computing Reviews Service

Ghita Mostéfaoui

If you have been involved in developing on top of legacy code, you have probably felt the pain of working with poorly designed code and a lack of documentation. This situation is simply a source of frustration and a definite cause of errors and project delays. Legacy code is not the only problem; our own code, when badly written, may lead to the same frustration, when used by others or even when extended or customized by the original developer. Writing elegant and maintainable code is, for many developers, an art, rather than a skill we can learn. This is probably due to the lack of training on the subject, as part of the developer's curriculum. However, we must all agree that some developers are more gifted than others in writing clean code, just by looking at the way they name variables and structure methods. Experience is definitely the best way to acquire this skill. Nevertheless, a more productive way is to gather all the tips and tricks in a pedagogical guide, so that budding developers can increase their experience with these best practices in mind. This is what this handbook is all about. Martin provides a synthesis of his experience in software development in the form of a very pedagogical manual for building clean code. The book is based on the Java language and is divided into 17 chapters. Chapter 1 is a general introduction to the book. The introduction is followed by specific advice on how to give meaningful names to variables and functions. Next is a description of best practices in documenting code with comments. The book also discusses code formatting, the only way to improve code readability. Three chapters list guidelines on organizing bigger chunks of code, focusing on data structures, error handling, and the use of third-party code, respectively. One chapter gathers best practices in writing unit tests. The book also discusses class organization and coarse-grained code, including systems and how to build them in a way that decreases complexity, making them easier to maintain. Chapter 12 provides a compact report that depicts simple design rules; these include continuous code refactoring and avoiding duplication. This is followed by an example case study that goes through a refinement process, in order to obtain cleaner code. Another case study is presented to expose bad code design. The final chapter gathers all code heuristics that expose code "smells" and shows how to correct them. While reading the book, I particularly enjoyed the ironic and confident style of the author. His extensive experience as a software developer is definitely the reason behind this confidence. The information is concise, clear, and exemplified with code samples. I also liked the illustrations at the beginning of each chapter, as they gracefully fill out the chapter material; they provide a summarized picture of the story that follows. The book is perfectly suitable for beginners with an elementary knowledge of the Java language. Most of the material is also applicable to any other object-oriented language. I highly recommend the book as a companion to any course on programming languages or software engineering, and even as a reference for more experienced developers. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Recommendations