Skip to content

A practical, example-driven guide to writing clean, readable, and maintainable code. Learn best practices, refactoring techniques, and coding standards through real-world before-and-after examples.

Notifications You must be signed in to change notification settings

just-praize/clean-code-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧼 Clean Code Tutorial

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
— Martin Fowler

Welcome to my Clean Code Tutorial . With inspiration from Maximillian Schwarzmuller's Udemy Course on Clean Codes, this repo shows badly written code alongside its clean code equivalent. This is a practical, example-driven guide to writing better, more maintainable, and readable code. This repository is designed for developers who want to move beyond just "working code" and start writing professional-grade code that is clean, understandable, and easy to maintain.


📚 What You'll Learn

  • Clean coding practices and naming conventions
  • Writing readable functions and modular code
  • Refactoring techniques
  • Writing self-documenting code
  • Real-world before & after code examples

📁 Repository Structure

clean-code-tutorial/
├── py/            # Sample of bad and clean python codes
├── js/            # Sample of bad and clean javascript codes
├── cpp/           # Sample of bad and clean C++ codes
├── c/             # Sample of bad and clean C codes
├── rust/
├── matlab/
└── README.md      # This file (apparently)

🚀 Getting Started

  1. Clone the repo:
git clone https://github.com/bakel-bakel/clean-code-tutorial.git
cd clean-code-tutorial
  1. Explore examples:
cd py/

✍️ Conventions Followed

  • PEP 8 for Python formatting
  • Clear, descriptive variable and function names
  • Functions with single responsibilities
  • Minimal comments (code should be self-explanatory)
  • No magic numbers — constants used instead
  • DRY (Don't Repeat Yourself)
  • KISS (Keep It Simple, Stupid)

🧠 Who Is This For?

  • Junior developers who want to write professional code
  • Students learning software development best practices
  • Professionals trying to improve code quality and readability
  • Anyone tired of messy legacy codebases

🙌 Contributing

Please, contributions are welcome! If you want to add new examples, improve existing ones, or share clean code tips:

  1. Fork the repo
  2. Create a new branch
  3. Submit a pull request

📜 License

This project is licensed under the MIT License.


Happy cleaning! ✨

About

A practical, example-driven guide to writing clean, readable, and maintainable code. Learn best practices, refactoring techniques, and coding standards through real-world before-and-after examples.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 88.1%
  • Python 11.9%