Giter Club home page Giter Club logo

tomerater's People

Contributors

carrancho avatar

Watchers

 avatar

tomerater's Issues

TomeRater Project Review

Rubric Score

Criteria 1: Valid Python Code

  • Score Level: 1 (Does Not Meet Expectations)
  • Comment(s):
  • In get_average_rating, watch out if the User object has no ratings yet! If the user has no ratings and you call user.get_average_rating() you will get a division by 0 error. The same things happens for get_average_rating in class Book. When testing your functions, always be careful about the edge cases!

Criteria 2: Implementation of Project Requirements

  • Score Level: 4 (Exceeds Expectations)
  • Comment(s):
  • Very nice job with your commenting of all the functions and classes! Makes everything readable and obvious what each thing does or its purpose
  • Also great job with your extra implementation of unique ISBN and valid email address

Criteria 3: Software Architecture

  • Score Level: 4 (Exceeds Expectations)
  • Comment(s):
  • This is a small thing but there is a better way to do this block of code software design wise:
# Check email validity (@ exists and there is at least on . after it)
if "@" in email and "." in email[email.find("@")+1:]:
    # Create a User instance
    new_user = User(name, email)

Instead of checking the validity of the email in another class before creating an instance of the User class, this type of validation checking can occur in the constructor of the User class itself and throw an error if the constructor arguments are wrong. This saves you from having to do a similar if statement whenever you create a User object and also fits better design wise in the User class.

Criteria 4: Uses Python Language Features

  • Score Level: 4 (Exceeds Expectations)
  • Comment(s):
  • Small thing in most_positive_user, instead of
for item in self.users:
    # Get the average rating for the user instance
    # calling it's get_average_rating method
    avg = self.users[item].get_average_rating()
    if avg >= rating_holder:
            # Update the holders
            rating_holder = avg
            user_holder = self.users[item]

you can do it like so for improved readability:

for item in self.users.values():
      # Get the average rating for the user instance
      # calling it's get_average_rating method
      avg = item.get_average_rating()
      if avg >= rating_holder:
           # Update the holders
           rating_holder = avg
           user_holder = item

Overall Score: 13/16

Overall great job with your project! Most of my comments were nitpicks and suggestions to follow best coding practices and improve readability of your code, but you did an excellent job commenting everything!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.