Packt
Writing Clean Code: 20 Code Smells & How to Avoid Them

Ce cours n'est pas disponible en Français (France)

Nous sommes actuellement en train de le traduire dans plus de langues.
Packt

Writing Clean Code: 20 Code Smells & How to Avoid Them

Inclus avec Coursera Plus

Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

1 semaine à compléter
à 10 heures par semaine
Planning flexible
Apprenez à votre propre rythme
Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

1 semaine à compléter
à 10 heures par semaine
Planning flexible
Apprenez à votre propre rythme

Ce que vous apprendrez

  • Master strategies for recognizing and refactoring common code smells that affect code readability and scalability

  • Understand the SOLID principles and how they improve software design and maintainability

  • Learn best practices for handling complex data structures, eliminating redundancy, and reducing technical debt

  • Gain the skills to simplify and streamline your codebase, making it more intuitive, flexible, and easier to maintain

Compétences que vous acquerrez

  • Catégorie : Maintainability
  • Catégorie : Scalability
  • Catégorie : Programming Principles
  • Catégorie : Debugging
  • Catégorie : Object Oriented Design
  • Catégorie : Code Review
  • Catégorie : Software Design
  • Catégorie : Software Architecture
  • Catégorie : Software Design Patterns

Détails à connaître

Certificat partageable

Ajouter à votre profil LinkedIn

Récemment mis à jour !

mai 2025

Évaluations

23 devoirs

Enseigné en Anglais

Découvrez comment les employés des entreprises prestigieuses maîtrisent des compétences recherchées

 logos de Petrobras, TATA, Danone, Capgemini, P&G et L'Oreal

Il y a 24 modules dans ce cours

In this module, we will introduce the course and outline its goals. You will learn how identifying and removing code smells can drastically improve the quality and maintainability of your codebase, laying the groundwork for better software design practices.

Inclus

1 vidéo1 lecture

In this module, we will dive into essential software design principles, focusing on the SOLID principles. You'll explore how these principles can be applied to create cleaner, more maintainable, and scalable software architecture. We’ll also cover techniques for structuring modules effectively to improve code quality.

Inclus

7 vidéos1 devoir

In this module, we will guide you on how to read and comprehend large codebases effectively. You’ll learn techniques for navigating code efficiently and identifying areas where code smells can be improved or refactored for better clarity and maintainability.

Inclus

1 vidéo1 devoir

In this module, we will introduce the repeated switch code smell and discuss its negative impact on code readability and maintainability. You will learn how to recognize and refactor repeated switch statements for cleaner, more maintainable code.

Inclus

3 vidéos1 devoir

In this module, we will explore the primitive obsession code smell, focusing on how overusing primitive data types can complicate your code. You will learn how to replace these with domain-specific objects, improving abstraction and readability.

Inclus

3 vidéos1 devoir

In this module, we will address inefficient loop structures, one of the most common code smells, and discuss their impact on both performance and readability. We’ll provide best practices for refactoring loops to make them more efficient and easier to understand.

Inclus

3 vidéos1 devoir

In this module, we will cover the long parameter list code smell and how excessive parameters can complicate function signatures. You will learn strategies for simplifying these lists, such as using objects or default values to enhance readability and maintainability.

Inclus

3 vidéos1 devoir

In this module, we will address the knowledge duplication code smell, explaining how repeated logic across the codebase can lead to inconsistencies and higher maintenance costs. You will learn techniques for refactoring and removing redundancies to improve the maintainability of your software.

Inclus

3 vidéos1 devoir

In this module, we will explore how uninformative comments can clutter your code and reduce clarity. You will learn how to write useful, concise comments and improve code readability by eliminating redundancy.

Inclus

3 vidéos1 devoir

In this module, we will dive into the shotgun surgery code smell, where changes in one part of the system require modifications across multiple classes. You will learn strategies for refactoring to reduce the complexity of these scattered changes and improve maintainability.

Inclus

3 vidéos1 devoir

In this module, we will discuss the problem of alternative classes with inconsistent interfaces, which can lead to confusion and usability issues. You’ll learn how to refactor classes to unify interfaces and improve code consistency.

Inclus

3 vidéos1 devoir

In this module, we will explore the refused bequest code smell, which occurs when a subclass inherits functionality that it does not use. You’ll learn how to refactor your code to reduce misuse of inheritance and prefer composition to improve flexibility and maintainability.

Inclus

3 vidéos1 devoir

In this module, we will address the data clumps code smell, where related data is grouped together inappropriately. You will learn how to refactor these data structures to improve organization and encapsulation for better maintainability.

Inclus

3 vidéos1 devoir

In this module, we will examine the middle-man code smell, where unnecessary classes add complexity by simply delegating functionality. You’ll learn how to refactor your code by removing unnecessary abstraction layers to simplify your codebase.

Inclus

3 vidéos1 devoir

In this module, we will explore mutable data and how uncontrolled changes to state can lead to bugs and inconsistencies. You’ll learn how to refactor your code to manage data immutability effectively for better reliability and predictability.

Inclus

3 vidéos1 devoir

In this module, we will address the feature envy code smell, where methods tend to focus too heavily on data from another class. You’ll learn how to refactor your code to improve object boundaries and move behavior to the class where it logically belongs.

Inclus

3 vidéos1 devoir

In this module, we will explore the divergent change code smell, where a module requires frequent modifications for unrelated reasons. You’ll learn how to refactor your code to minimize the risk of frequent changes causing instability or regressions.

Inclus

3 vidéos1 devoir

In this module, we will explore the issue of large interfaces and how they can make code difficult to maintain and extend. You’ll learn how to refactor large interfaces into smaller, more manageable ones that are easier to maintain and scale.

Inclus

3 vidéos1 devoir

In this module, we will address the multitasker code smell, where classes or methods take on too many responsibilities. You’ll learn how to apply the Single Responsibility Principle to refactor your code and improve its clarity and maintainability.

Inclus

3 vidéos1 devoir

In this module, we will focus on the importance of clear, intuitive naming conventions. You will learn how unclear names can cause confusion and how to adopt best practices for naming variables, functions, and classes for improved readability.

Inclus

3 vidéos1 devoir

In this module, we will discuss speculative generality and how over-engineering can make code unnecessarily complex. You’ll learn how to simplify code by removing premature abstractions and focusing on current requirements.

Inclus

3 vidéos1 devoir

In this module, we will explore the unnecessary exceptions code smell, where the excessive use of exceptions makes error handling more complicated than needed. You will learn how to simplify exception handling for clearer and more robust code.

Inclus

3 vidéos1 devoir

In this module, we will discuss the shallow module code smell, where modules contain little functionality relative to their complexity. You will learn how to refactor these modules to provide more meaningful functionality and enhance reusability.

Inclus

3 vidéos1 devoir

In this final module, we will summarize the key takeaways from the course, reinforce the importance of clean code practices, and offer guidance on how to continue improving your software design skills for better maintainability and scalability.

Inclus

1 vidéo1 devoir

Obtenez un certificat professionnel

Ajoutez ce titre à votre profil LinkedIn, à votre curriculum vitae ou à votre CV. Partagez-le sur les médias sociaux et dans votre évaluation des performances.

Instructeur

Packt - Course Instructors
Packt
751 Cours119 808 apprenants

Offert par

Packt

Pour quelles raisons les étudiants sur Coursera nous choisissent-ils pour leur carrière ?

Felipe M.
Étudiant(e) depuis 2018
’Pouvoir suivre des cours à mon rythme à été une expérience extraordinaire. Je peux apprendre chaque fois que mon emploi du temps me le permet et en fonction de mon humeur.’
Jennifer J.
Étudiant(e) depuis 2020
’J'ai directement appliqué les concepts et les compétences que j'ai appris de mes cours à un nouveau projet passionnant au travail.’
Larry W.
Étudiant(e) depuis 2021
’Lorsque j'ai besoin de cours sur des sujets que mon université ne propose pas, Coursera est l'un des meilleurs endroits où se rendre.’
Chaitanya A.
’Apprendre, ce n'est pas seulement s'améliorer dans son travail : c'est bien plus que cela. Coursera me permet d'apprendre sans limites.’
Coursera Plus

Ouvrez de nouvelles portes avec Coursera Plus

Accès illimité à 10,000+ cours de niveau international, projets pratiques et programmes de certification prêts à l'emploi - tous inclus dans votre abonnement.

Faites progresser votre carrière avec un diplôme en ligne

Obtenez un diplôme auprès d’universités de renommée mondiale - 100 % en ligne

Rejoignez plus de 3 400 entreprises mondiales qui ont choisi Coursera pour les affaires

Améliorez les compétences de vos employés pour exceller dans l’économie numérique

Foire Aux Questions