Skip to content

safinayah/solid_principle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task: Understanding the Importance of SOLID Principles in Coding

Part 1: Working with Non-SOLID Code

  1. Review the Provided Code: In non_solid.py you'll find a basic implementation of a user management system that does not follow SOLID principles:

  2. Add a New Feature:

    • Task: Add a feature to update a user's email.
    • Steps:
      1. Add a method in UserManager to find a user by name and update their email.
      2. Test your implementation.
  3. Document Your Experience:

    • How difficult was it to add the new feature?
    • What challenges did you encounter?

Part 2: Working with SOLID Code

  1. Review the Refactored Code: In solid.py you'll find the same user management system, refactored to follow SOLID principles:

  2. Add the Same Feature:

    • Task: Add a feature to update a user's email.
    • Steps:
      1. Use the update_user_email method in UserManager to update the user's email.
      2. Test your implementation.
  3. Document Your Experience:

    • How easy was it to add the new feature compared to the first part?
    • What differences did you notice in terms of effort and code maintainability?

Part 3: Comparison and Reflection

  1. Compare Both Experiences:

    • Time taken to implement the feature in both codebases.
    • Ease of understanding and modifying the code.
    • Potential for introducing bugs or errors.
  2. Reflect on the Importance of SOLID Principles:

    • Discuss how adherence to SOLID principles impacted your experience.
    • Provide examples of how these principles made the code more maintainable and extensible.

By completing this task, you will gain firsthand experience of the benefits of adhering to SOLID principles in software development.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages