Coder Social home page Coder Social logo

calc's People

Contributors

peteretep avatar

Watchers

 avatar  avatar

calc's Issues

Make the controller DRY'er

The calculations_controller has too many lines and has too much repetition.
It counld be made more concise and DRY'er

Decimal calculations allowed

Decimal inputs are being allowed by the front end.
The server is doing integer calculations for operations except for division.
This is not good.

Should be fixed in two places -

  • Client should check that inputs are int values and only enable submit boxes if they are.
  • Server should check that inputs are ints and return an error if not.

Investigate MongoDB

The calculator currently uses the default sqlite development DB.
MongoDB is preferred.

Currently possible to submit blank form

It's currently possible to submit a blank form.
Enter two values and submit the form.
The form is submitted and is reset, and disabled until the server responds.
The form is then reenabled.
The submit button should not be re enabled until two valid values are input

Server Side error trapping

Calculator must operate only on non-negative integer numbers lower than 100.
The form is disabled by javascript if invalid values are input, but server side error trapping is also required to be safe.

Introduce other operations

At the moment, the form only does addition. Not good obviously.
Sum, difference, multiplication and division are all required.

Clean up interface

The interface looks a bit gammy still.
Inputs should be made smaller.
Extra buttons for other operations are needed.

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.