Cargando…

Clean code in C# : refactor your legacy C# code base and improve application performance by applying best practices /

Questions -- Further reading -- Chapter 3: Classes, Objects, and Data Structures -- Technical requirements -- Organizing classes -- A class should have only one responsibility -- Commenting for documentation generation -- Cohesion and coupling -- An example of tight coupling -- An example of low cou...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Alls, Jason (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham, UK : Packt Publishing, Limited, 2020.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • Cover
  • Title Page
  • Copyright and Credits
  • Dedication
  • About Packt
  • Contributors
  • Table of Contents
  • Preface
  • Chapter 1: Coding Standards and Principles in C#
  • Technical requirements
  • Good code versus bad code
  • Bad code
  • Improper indentation
  • Comments that state the obvious
  • Comments that excuse bad code
  • Commented-out lines of code
  • Improper organization of namespaces
  • Bad naming conventions
  • Classes that do multiple jobs
  • Methods that do many things
  • Methods with more than 10 lines of code
  • Methods with more than two parameters
  • Using exceptions to control program flow
  • Code that is difficult to read
  • Code that is tightly coupled
  • Low cohesion
  • Objects left hanging around
  • Use of the Finalize() method
  • Over-engineering
  • Learn to Keep It Simple, Stupid
  • Lack of regions in large classes
  • Lost-intention code
  • Directly exposing information
  • Good code
  • Proper indentation
  • Meaningful comments
  • API documentation comments
  • Proper organization using namespaces
  • Good naming conventions
  • Classes that only do one job
  • Methods that do one thing
  • Methods with less than 10 lines, and preferably no more than 4
  • Methods with no more than two parameters
  • Proper use of exceptions
  • Code that is readable
  • Code that is loosely coupled
  • High cohesion
  • Objects are cleanly disposed of
  • Avoiding the Finalize() method
  • The right level of abstraction
  • Using regions in large classes
  • The need for coding standards, principles, and methodologies
  • Coding standards
  • Coding principles
  • Coding methodologies
  • Coding conventions
  • Modularity
  • KISS
  • YAGNI
  • DRY
  • SOLID
  • Occam's Razor
  • Summary
  • Questions
  • Further reading
  • Chapter 2: Code Review
  • Process and Importance
  • The code review process
  • Preparing code for review
  • Leading a code review
  • Issuing a pull request
  • Responding to a pull request
  • Effects of feedback on reviewees
  • Knowing what to review
  • Company's coding guidelines and business requirement(s)
  • Naming conventions
  • Formatting
  • Testing
  • Architectural guidelines and design patterns
  • Performance and security
  • Knowing when to send code for review
  • Providing and responding to review feedback
  • Providing feedback as a reviewer
  • Responding to feedback as a reviewee