Giter Site home page Giter Site logo

sara's People

Contributors

vasishtashastry avatar

Watchers

 avatar  avatar

sara's Issues

Console input handled by multiple classes

The Alien and ExportAlienDetails classes are both handling console input. This is not so good in two ways -

  • Unnecessary responsibilities for the two classes
  • If you have to change the input method to a file instead of the console, then changes will be required in multiple places

File names

Generally the convention is to use class names as the name of the file too. Eg., a class Person should be in a file called person.py

Class methods vs instance methods

I saw that the convert method in the plugin classes is an instance method. But the methods in InputHandler are class methods. I would like to know what is the rationale behind choosing between making something an instance method and making it a class method.

Too many comments?

I had a feeling that there are far too many comments than acceptable. The code should be readable enough so that comments are not required :)

New formats are not "pluggable"

While I agree that adding new formats is as easy as adding a line of code, with a language like Python, even that is unnecessary :)

Globals should be avoided

I see that FORMATS_AVAILABLE is a global variable. As a good practice using global variables should be avoided. Why can't fetch_plugins return the formats?

Dependencies for the Conversions class

The Conversions class is dependent on the Alien class. Let's say we want to add another attribute to the aliens - Number of hands (I know this is getting funnier ๐Ÿ˜†). This should ideally require changes in one place only (the Alien class). But currently even the Conversions class requires changing.

This is a low priority issue, but I would appreciate it if this is taken care of as well :)

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.