Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Education » math-teach

Topic: On "Programming the Calculator" (a curriculum segment)
Replies: 2   Last Post: Aug 29, 2005 2:41 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Kirby Urner

Posts: 4,709
Registered: 12/6/04
On "Programming the Calculator" (a curriculum segment)
Posted: Aug 28, 2005 2:39 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

By "programming the calculator" I don't mean taking up a calculator and programming it by entering into its memory using its keypad. I mean starting with a computer and emulating a calculator by programming a GUI window object, with the calculator its content.

This "shop class" approach to building a calculator will drive a review of what all the keys do on a real (non-emulated) calculator. I just explained SIN and COS to my daughter, after she tutored me in 'Majesty' (a computer game she likes, and I respect for its quality craftsmanship -- and won at this morning). I did this to demystify a new keyboard; the school requires middle schoolers carry these devices. I think if you carry it, you should know what the keys do, even if you don't need them yet. I bought her a Sharp EL-501W at the local grocery (returned the rebate slip, with all requisite documentation).

Later, once you've been over the key functions, you get to see how a programmer wires up screen buttons so that mouse clicks fire off to subscribers, who respond to button press events. A number is keyed in and registered. An operation key is queued. Another numeric argument is keyed, and the equals key pressed. This triggers a cascade of evaluations leading to a result, which must be communicated to the emulated LED (just pixels on a computer screen).

Exactly how deeply a teacher chooses to go in this direction is a variable. Some trade school community college course for GUI programmers might go into it for a whole semester. In another context, a mere allusion to this project might suffice. An advantage of this proposal is it has already been done. Numerous published works already implement the GUI calculator, using this or that computer language. In other words, we're talking about a genre, the literature is already big, the teacher doesn't have to invent a syllabus from nothing.

A contribution to this genre came at OSCON 2005, in Jim's IronPython demo, where a calculator was displayed using the Avalon library. Miguel asked to see the buttons all tilted at 45 degrees, a ridiculous expectation for a real calculator, but a request completely consistent with the Avalon API, and therefore IronPython's. Jim obliged with some list comprehension (one line of Python). The experiment was a success. The appeal of .NET and Mono technology had just been bumped up a notch.

Kirby



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.