My Big Project: Custom Calculator

2007-07-05 20:09 - Programming

The calculator that comes built in to Windows is convenient, because it's always there, but inconvenient, because it's not very powerful. It does, in the scientific mode, have all four bases that programmers might want to deal with, but using them is a major pain of switching back and forth between mouse and keyboard. It's also the sort of horrible program that all but requires the use of the mouse for advanced usage.

There's a slightly better calculator that I used to use: AnalogX's PCalc. The idea there was that you just type an equation, much like you would in a programming language, and poof, out comes the answer! No mouse-only buttons, and all the bases (and types!) are visible just like that. I don't even remember why, anymore, but I stopped using it. I think one of the reasons was that it was harder to get to than the Windows default calculator (Win+R, calc, enter). I could have gotten around that, but something kept me from it.

I eventually decided that I had to build a better calculator. It was a tall order, because I had a lot of things I wanted it to do. Not only output, but input numbers in binary, octal, decimal and hexadecimal. Type out complex equations and have them processed just as you expect. Like my trusty old TI-85, I wanted to easily refer to past resulting answers, and automatically do so when beginning an otherwise incomplete equation. (I.E. type 2+2 and get 4, type +6 and get 10.) And, I wanted it to be able to integrate with my search engine, MultiSeek. This would make it just as accessible as Windows' calculator; my browser is always open.

It took a lot of work. I had to figure out, more or less, how to write a compiler for the simple "programming" language of arithmetic. But I got there! It could use a little boost in speed, it takes a moment to load, but I think I can do that. It'll just make it harder to change, so I'm waiting until I'm sure I have every last thing I want included. Try it out:

Calculator

Comments:

No comments!

Post a comment:

Username
Password
  If you do not have an account to log in to yet, register your own account. You will not enter any personal info and need not supply an email address.
Subject:
Comment:

You may use Markdown syntax in the comment, but no HTML. Hints:

  • An empty line between text will create a paragraph boundary.
  • Use angle braces around a plain URL to auto-link it: <http://www.example.com/>.
  • Use this format to create a link with different text showing: [An Example](http://www.example.com/).
  • Use backticks (``), not leading spaces to enclose a code block.

If you are attempting to contact me, ask me a question, etc, please send me a message through the contact form rather than posting a comment here. Thank you. (If you post a comment anyway when it should be a message to me, I'll probably just delete your comment. I don't like clutter.)