Skip to content

youShallNotCode/CodeSamplesForCodeSmell

Repository files navigation

Code Smells Examples and Fixes

Welcome to this repository!

The code examples contained in these files are designed to demonstrate common code smells-patterns in code that often indicate deeper problems affecting readability, maintainability, or performance. Each example highlights a specific code smell and provides a corresponding refactored version to show how to effectively fix or improve the code.

NOTE: This repository contains intentionally poor code examples These are used for educational purposes as part of a Code Smells and Refactoring workshop.

Purpose

The goal of this repository is to help developers learn how to identitfy, discuss, and refactor various code smells that reduce code quality, manitaninability, and readability.

  • Illustrate typical code smells encountered in real-world programming.
  • Provide clear, practical examples of how to identify these smells.
  • Showcase best practices and techniques to refactor and improve code quality.

Key Points

  • No sensitive or production code is used.
  • All examples are educational.

Usage

  • Browse through the example files to learn about different code smells.
  • Compare the "before" (smelly) and "after" (clean) versions to understand the improvements.
  • Use these examples as a learning tool to recognize and fix code smells in your own projects.

Participants or reviewers can clone this repository to explore .

Feel free to fork or share for learning purposes.

Additional Resources:

Feel free to explore, learn, and contribute! If you find new smells or better fixes, your pull requests are welcome.

Happy coding! 🚀

License

See LICENSE

About

Intentionally bad code examples for educational use in a code smells workshop

Resources

License

Stars

Watchers

Forks

Languages