GithubHelp home page GithubHelp logo

angryelectron's Introduction

#Project Angry Electron

##Overview Angry Electron is the project name for a stoichiometry calculator. The User of this stoichiometry calculator will be able to enter in the molecules of a chemical equation and the calculator will balance the equation for the user, telling them how many of each molecule should be used for the equation to be balanced.

##Breakdown

  • [Parsing](/Documentation/Chemical Equation Backus-Naur Form.md) - - Interpreting user's typed inputs to domain objects.
    • Equation is made up of two Sides.
      • One side is Reactants.
      • One side is Products
    • A Side of a reaction is made up of molecules. The parser should be flexible enough though that in a later implementation there may be other things included that arent molecules (for example electrons).
      • A Molecule may be preceded by a coefficient.
      • A coeffiecient must precede a molecule.
    • A Molecule is made up of Complexes and Elements.
    • A Complex is made up of either more complexes or Elements.
    • A complex or an Element may have a subscript.
    • The subscript designates the number of atoms or the number of complexes of any given element or complex, respectively.
    • The lack of a subscript or coefficient implys that it would be the number one if it were present.
  • Domain Calculations - Manipulating sets of domain objects to arrive at solution to equation.
    • total for a number of atoms of a particular element on one side must equal the total for the number of atoms for that particular element on the other side.
    • coefficients are the only thing that may be changed in order to for the total number of atoms on one side to balance.
  • Presentation - Showing the results of the domain calculation in an attractive manner. May include real-time error checking, or showing the results immediately (without requiring calculate to be pressed).

##Parsing

  • Side Start
    • Molecule Start
      • Coefficient - is a number either at the front of the molecule or not specified. If its not specified its assumed to be one. The number of atoms of each element is multiplied by the coefficient.
      • Complex Start - May be either parentheses or square brackets.
        • Complex
        • Element
        • Complex End - Designated by the closing parenthesis or square brackets, depending on which it was began with. The complex end may also have a subscript immediately afterwards. If the next character is anything other than a number than the number of atoms for each element within it is multipliplied by one, otherwise it is multiplied by the number immediately after it.
      • Element Start
        • Element second Letter (lowercase)
        • Element subscript (number)
        • Element End
      • Molecule End
    • Space, plus or electron* (*in a later version)

angryelectron's People

Contributors

pharylon avatar pabreetzio avatar willtheprogrammer avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

pharylon

angryelectron's Issues

Instantiating Elements

I have a question about how I'm supposed to instantiate Elements. When the Parser finds the text string "Na," where does it look up information on Sodium's name, atomic weight, etc so it can feed that into the Element's constructor? Is that what the TableOfElements class is for? If so, how do I properly use it?

Front-end validation

Front end Validation

For Two Field (Products and Reactants) entry method.

  1. Break down the string a user enters into different molecules based on plus signs
  2. Check each molecule to ensure it has valid syntax
    • no series of letters should be anything other than an element.
    • Parenthesis should match and numbers should be in the right places
  3. If the user clicks to balance the equation an error message should be thrown without hitting the server.

Choose, purchase, set up Second Level Domain

  1. Already utilizing MSDN free azure account for free website hosting of angryelectron.azurewebsites.net.
  2. AngryElectron.com is already taken, need to decide on an alternative such as angryelectron.net, .us, or whatever.
  3. point the second-level-domain at the azure site.

Clean up app navigation.

  1. Move stoichiometry calculator to main page
  2. Clean up naviagtion to pages that are incomplete
  3. Simplify app.

Poor Encapsulation of Element Class

Is it just me, or is the Element class really poorly encapsulated? We have a bunch of public properties that can be set all willy-nilly with absolutely no error or sanity checking. In fact, as of right now there's no reason to change them after the Element is instantiated, so why not make them {get; private set;} and set them in the constructor? Since we're doing Flyweight design, I can't even think of any reason we would want to change any of them later. If we need an isotope, it'd need to be instantiated separately.

Poor Encapsulation of Element Class

Is it just me, or is the Element class really poorly encapsulated? We have a bunch of public properties that can be set all willy-nilly with absolutely no error or sanity checking. In fact, as of right now there's no reason to change them after the Element is instantiated, so why not make them {get; private set;} and set them in the constructor? Since we're doing Flyweight design, I can't even think of any reason we would want to change any of them later. If we need an isotope, it'd need to be instantiated separately.

I don't mind changing it myself, but as I didn't author it, I didn't want to do something that'd mess something up somewhere in the Front End.

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.