I do contract work for a living, which could include writing a program such as this. However, I don’t do people’s homework for them. That just robs them of an education.
You have my full permission to implement this project any way you please.
It would also be sufficient to run some batch process once a week to update my HTML and reupload it. I don’t need up to the second accurate exchange rates.
The programming is fairly simple. It could be done with CGI, JavaScript or even a Java Applet. The most difficult part is political, getting access to a file of current exchange rates. You could extract it by simulating one of the free converters, or you might make special arrangements with a company such as Oanda to let you periodically download it to your own server using their FXCommerce service.
It might be implemented much the way a hit counter is, using digit *.gifs or a numeric gif to display the value. You might use a cookie to track preferred currency. You might have a way to display/change that preferred currency either as a flag icon or as a country code and/or country name.
Oanda has implemented a scheme very similar to what I have asked for called FXCommerce that requires JavaScript and cookies. A typical convertible price has to be encoded in your HTML with JavaScript like this:
This means the price is . Unlike mine, Onada is not smart enough to use your local currency as the default display. With Oanda there is no default currency and no display of the current currency country, either in words or icon. In their scheme, typically you use two columns to display, one in US$ and one in local currency that starts out saying "Convert This!" until the user selects a local currency, which wrecks the layout by being too long a string. In my scheme, you would need only one column.
Here is how you invoke my currency converter I wrote as a Java Applet:
I don’t actually write all the bubblegum, I generate it with an html macro like this:<!-- macro CurrCon c$A CAD 2500.00 -->
Here is what it looks like on screen:
The interesting thing about is the way all currencies on a page will flip if you change even one. See the gay glossary to see it in action.
Another way to handle this is to prepare your pages with a servlet using JSP, or displaying columns of currencies, recalculated daily. You can get a list of the day’s conversion factors by screensrapinig in from their FxDaily page.
You might try a similar but slightly simpler project first, a metric/English measure converter, so you can prepare your web pages in either metric or English units and have the viewer decide in which system they prefer to view the page. The conversions are more complex, but the conversion factors don’t change daily the way currency conversion factors do.
The main cleverness in the program is selecting a suitable unit for a particular dimension, e.g. is inches, feet or yards most appropriate for 59 cm?
The user could even invent her own personal set of measures, e.g. hands where hand is defined as the width of her hand, or strides where a stride is the length of her stride, or fingers for the volume displaced by her index finger up to the knuckle. This lets everyone satisfy Henry VIII-sized egos.
You could even invent a set of personal cooking units of measure, like the pinch and sifterful. You could compose recipes in your personal units and others could read them translated to whatever units they wanted. It would be trivial to add recipe doubling or halving to serve any number of people.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.18] | The information on this page is for non-military use only. | ||
| You are visitor number 12,067. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/Mindprod website mirror) | ||
| http://mindprod.com/project/currencyconverter.html | J:\mindprod\project\currencyconverter.html | ||