Every so often, you have to do little calculations and despite your phone always being handy, you never reach for it to go on the default calculator app. After three or more operations, the phone becomes too difficult to use; you don’t know if you are applying the operations correctly and if you make a mistake you have to start completely over. I’ll end up using my graphing calculator or much more advanced software for a fairly simple calculation. Default calculator apps are too simple to use but with a few small additions they can become a feasible choice for everyday simple use without compromising design.
What it does
The main two features of our calculator app are the ability to see the entire expression you are typing in and to store values into variables to use later. Besides that, we have kept the calculator as simple and non-intimidating as possible for a familiar look and feel.
How I built it
We built this app in React Native using primarily TypeScript. We used React Native because of its cross platform capabilities and its similarity to React. Typescript helps with the type checking, we use a lot of different types of objects throughout the program and ensuring that we have certain attributes available to us was extremely helpful.
Challenges I ran into
We were a little slow to get started since we’ve never used React Native before but after that things went fairly smoothly.
Accomplishments that I'm proud of
This was both our first Hackathon and first time building an app or using React Native. We had a little bit of experience with React going into this which made using React Native not too difficult to use. Overall, we are proud that this is our first time in a few ways and are happy with the result.
What I learned
Before SBhacks7, I knew practically nothing about app development. Thanks to my trusty partner and a decent internet connection, I have learned the same amount over the past few hours than what I learned in a year of AP CS. This project introduced me to TypeScript, React Native, JSX, functional components, and many other things. In terms of broader concepts, I’ve learned how to use frameworks and toolchains such as React and Expo to speed up the development process and turn our ideas into functionality faster. Most importantly, I have learned to harness the raw power of example code in documentation.
What's next for Better Phone Calculator
We set up the evaluation of expressions and functionality of buttons to take in a general operation object and apply it accordingly. This means that adding more functions such as trigonometric functions, exponential functions, etc… would be very easy to implement in the future. Currently our app works in the vertical orientation, and we are looking to add more buttons and operations when in horizontal mode.
- Matthew Ho
- Alex Rudolph