March Challenge - Calculator

thank you so much! :star_struck:

1 Like

Although it seems to be up to some mild interpretation on the order of operations with calculating percentage, (depending on which calculator I compared against…some required additional parentheses to get a matching result), I’d say that I feel pretty confident that I’m getting the correct results. This particular example below is probably very very unlikely to happen in real life. :wink: One more day for me to double check for any major bugs

PS. I’ve been working on a branched version so I could rework some of the logic, add Percent (%) and Square Root (√), and add memory storage to store up to 4 numbers. I had reworked some of the logic to hopefully make it a little bit easier to understand and make some of the hard to resolve bugs go away. The branched version is the one that I’ll allow to be copied.

PPS. There are some minor bugs that I believe are out of my hands at the moment, and I’ve submitted them to Glide support. There’s an Instructions tab in the side menu that will point out all of the bugs that I’m aware of.

6 Likes

@Jeff_Hager Well, this is as far as I have come in March. It has definitely been a challenge - and taken many hours. But it has been a great training.

I’m looking forward to look inside your app in order to understand how you managed different dev-challenges.

And of course you just put in some extra, extra stuff to raise the bar that extra bit. But I’m glad you did! I’m very impressed. You get :1st_place_medal: (there was never doubt about that :slight_smile: )

EDIT: personalization should now be working

7 Likes

That looks awesome! I like the personalization options!

I would agree that it’s definitely been a challenge and I definitely learned a lot. I learned some new techniques, what I’d like to see improved by Glide (IF/Then logic), and definitely relearned some math that I haven’t touched since high school and college.

It will be interesting to see how we approached the same problems.

I think my next goal will be to add some specialty calculators. Like financial and volume/area type calculators. Maybe even some date calculations.

4 Likes

It’s here! I’m letting is loose for everybody make a copy and play with. I’ve updated the original post in this thread with the new link and an updated screenshot.

Here is the updated link:

Original post:

9 Likes

Congratulations, you have successfully completed your challenge.
Great job

2 Likes

Yesssss :+1::+1::+1::+1::+1::+1::+1::rocket::rocket::rocket::rocket::rocket::rocket::rocket::rocket::rocket::rocket::rocket:

1 Like

This is got to be the app of the year !

2 Likes

I’m probably the only one in the Glide forum that will get the reference :joy:
But maybe there is another Aussie out there somewhere who will understand it…

1 Like

Amazing!

I was waiting to see a “basic” calc but no way, you crossed the line 2 Km away, really cool.

I think your calculator is better than one I use on my iPhone :rofl:

The most complex part I see is to work with parenthesis “()” and your calculator tries to guess where to put them and it’s brilliant but sometimes it fails.

This kind of operation causes a problem:

3-1/2+3/5 —> 3-(1/2)+ (3/5)

but nothing to criticize, someday with more time you fill find the solution.

Great job @Jeff_Hager

Feliz día

3 Likes

@Darren_Murphy had to google it, but now I understand. Thank you!

1 Like

I’ve been Googling “sticking tolerance” since yesterday but keep ending up with the engineering “equivalent” stack-up tolerance :rofl::rofl::rofl::rofl:

This latest @Darren_Murphy one is also beyond my wit. I’m consulting a jokes psychiatrist on this :frowning::frowning::frowning:

1 Like

Let me help you out… :wink:

2 Likes

So far @gvalero @Jeff_Hager calendar, calculator and rocket webhook action made huge impression on me. @gvalero your webhook is the real deal. Awesome. Magnificent. Brilliant guys! Thx :pray: !

2 Likes

I get it now. Thank you :blush: !

@gvalero hehe, yeah, it was supposed to be “basic”, but I just kept going.

Completely agree on what you say about the parenthesis. I was stuck with forcing the order of operations. Basically I have a value to the left of the operation (+, -, x, /) and a value to the right, then based on that math operation, I determine which calculation to do. Up until a few days ago, I was just taking the the calculated result and moving it to the left part of the calculation whenever you pressed one of the operation buttons. I still do that but I also save the friendly formatted version of it. Underneath, it’s still using the number from the previous calculation. (confused yet? :wink: ) I added the extra parenthesis to indicate that everything inside the parenthesis was already calculated first and using the underlying result. If you look at @Krivo’s version, you can better see what I mean. I’m guessing he is doing something very similar, but moving the result to the left side and displaying it.

It comes down to a Glide limitation. I couldn’t find a way to build a complete math formula and use a single math column to calculate it.
So to use your example, this is what is happening behind the scenes, so it will calculate in this order:
3-1 = 2
Pressing / gives you:
(2)/2 = 1
Pressing + gives you:
(1)+3 = 4
Pressing / gives you:
(4)/5 = 0.8

Technically not correct in the math world if you consider the formula as a whole, but if you calculate it piece by piece in the right order, then it would give you the correct result of 3.1. It’s kind of the same limitation with very basic calculators. They don’t handle complex formulas

Like I said, I wanted to show the entire formula instead of the previous result, but the only way for it to make sense mathematically was to force the parenthesis. Maybe something to think about in the future, unless glide begins to allow us to build formulas with template columns and then plug them into a math column. That would simplify a lot of this.

Thanks for the feedback though.

3 Likes

@Wiz.Wazeer “sticking tolerance” maybe isn’t a technical term, but I was referring to something like this. :slight_smile:

Preventing inadvertent movement of features when selecting—Help | ArcGIS for Desktop.

1 Like

Hi @Jeff_Hager

Thanks for sharing the calculator app. Very interesting to look inside to try to understand how you completed the task of creating a calculator app.

Would you be interested in doing a session where people can join in and you run through the app and tell how you approached the different challenges - and how you solved them.

Nathanael Boy and I have had other sessions where people joined in - and it was very rewarding for people attending.

I know people will be asking for recording of such a session - but that it only if you would feel ok with that.

I’m located in Denmark and you in USA, but I hope it would be possible to find a time slot where it would be possible. Could potentially be a weekend. I would think that 1 hr would be appropriate.

Anyway, I don’t know whether you would be into it at all - but if you are please let me know in dm. I will do the meeting setup and try to keep track of questions, time etc in the meeting.

Very best regards
Kristian

3 Likes

I get it now. I was thinking along the lines of flogging tolerance as in with a stick :joy: duh :roll_eyes:

this is great.