In-Depth Post #5

Since my last blog post, I haven’t had another meeting with my mentor due to a delay, but I made good progress on my calculator.

Calculator update

I am proud to say that I have finished the new version of the calculator. This will probably also be the last version and unless there is anything else I need to do with it, the calculator is pretty much done. Once again, I encourage you to try it out!

Calculator download

The first thing you’ll probably notice is that there’s a whole bunch of new buttons! There are now 30+ buttons and the calculator has most of the functionality of a basic calculator, and even a bit more.

Secondly, you may notice a very slight speed increase, especially if you are inputting a very long expression. For anything small, you won’t be able to notice a huge difference, as the improvement was with the scaling (explanation in previous blog post).

The calculator uses some nifty tricks that my mentor taught me, such as short-circuiting an if statement or how recursion prioritizes the variables at the top of the stack (the variables that are in the current layer of recursion).

How to have a beautiful mind

Since I wasn’t able to have another meeting with my mentor since the last post, here’s a snippet from my most recent meeting.

 

C: “Is there a more efficient way to do all the buttons? This is so long”

S: “That’s what I was thinking. You have to instantiate all the buttons on their own and add actions to them. And you’ve already generalized one of the common actions into a function, so that’s good.

C: “I think there’s more common actions, though. Like, other than instantiating it.

S: “The only thing I can think about is generalizing more common actions into functions. That’s it.

 

Thanks for reading! Make sure to check out my calculator!

Posted in Uncategorized.

2 thoughts on “In-Depth Post #5

  1. the fact that you didn’t need a screenshot to get the highlighting and just used HTML programming to get the words to become highlighted within the blog post is very cool. Your calculator is also so impressive too, great job!

Leave a Reply

Your email address will not be published.