Skip to content

A repository contains a bunch of code snippets to demonstrate code smells and the refactored clean code written in JavaScript

License

tapascript/code-smell-to-clean-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

code-smell-to-clean-code

A repository contains a bunch of code snippets to demonstrate code smells, and the refactored, clean code written in JavaScript

What is Code Smell? 👃

A Code Smell means something in your code looks or feels wrong. Even if it still works. It’s a symptom of deeper problems, such as poor structure, duplication, or complexity, that make the code harder to read, change, or maintain in the future. Think of it like: Your code runs fine today, but it has a “bad smell” that warns you that, “If you keep building on top of this, it might break later.”

What is Clean Code? 🧹

Clean Code is code that’s easy to read, understand, and modify, not just by you, but by any developer. It focuses on clarity, simplicity, and purpose, rather than cleverness. Think of it like A well-organised kitchen where everything is in its place, and anyone can walk in and cook without confusion.

  • 🔴 Code Smell = Warning sign of messy design.
  • 🟢 Clean Code = Code that communicates clearly and scales safely.

Support and Show Your LOVE ❤️

Your support means a lot.

  • Please SUBSCRIBE to tapaScript YouTube Channel if not done already. A Big Thank You!

  • Liked my work? It takes months of hard work to create quality content and present it to you. You can show your support for me with a STAR(⭐) to this repository.

    Many Thanks to all the Stargazers who have supported this project with stars(⭐) Stargazers repo roster for tapascript/code-smell-to-clean-code

How to Use this Repository 💻

  • You can navigate to the src/ directory to find all the source code.
  • Under that, the session/ directory contains numerous examples of code smells and how to refactor them.
  • Under the tasks/ directory, you will find a clean and smell folder. The do.js file inside the smell folder contains a few tasks for you to try.

A Cheatsheet for you to keep handy 👏

Did you know that you can learn about code smell and clean code from an intuitive cheatsheet? Yep, click here or on the image below to view and download it.

image

Made with ❤ and Passion by tapaScript

About

A repository contains a bunch of code snippets to demonstrate code smells and the refactored clean code written in JavaScript

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published