Demonstration Programs
And now the stuff you've all been waiting to see.
My demonstration programs!
These are written entirely in JavaScript so they can be executed directly from
their web page. Also, if you are interested, I have some programs that are
written in C++. Please contact me if you want to look at these.
Instead of just showing you my programs I would also like to comment on them,
so you may better understand what I did and why I did it that way. This is important
for several reasons:
- Any half-competent moron can come up with a program given enough time hacking
on it through trial and error. This is similar in argument to the theory that
given thousands of monkeys smashing their keyboards one would eventually come
up with a quality piece of work.
- Any totally incompetent moron can copy a program instead of developing
one by themselves and afterwards pass it off as their own.
- It takes the skill and talent of a competent computer programmer to design
a program with carefully laid out procedures, algorithms and data structures.
Since I'm neither a half-competent nor a complete moron, I choose to provide
you with the comments to my programs.
Here are the demos!
The commentary link below each demo program will provide a brief overview
of how the corresponding program works and the design decisions that were made
during the development of the program. Contact me if you need a more detailed
description of the program.
Purpose of Demo Programs
These demo programs are exactly what I designed them to be. They are
demonstration programs meant for demonstration purposes only. They
are far from full scale production quality software applications. Hence, their
practical usefulness is limited if at all. However, they do demonstrate the
programming and design concepts that I've discussed before. Also, some of the
ideas used in the development of these programs are generic and can be put to
use in more practical applications. For example, the vending machine has the
same basic concept as an on-line shopping cart application. The user is shown
a web page with a list of merchandise. The user responds by entering some
input onto a form. The program takes the form's data, does some processing
with it, updates the inventory then gives the user the goods. The only difference
between the vending machine demo and a real shopping cart application is that
the shopping cart is conceptually simpler (no different coin denominations to
deal with) and has a server side component which updates the merchandise
database which also resides in the server. I could have made the vending
machine demo a server-side CGI script, unfortunately because of the limitations
of my current ISP, I could not do this. Plus, there is the obvious fact that
the vending machine demo is a perfect simulation of how an actual physical
vending machine works. This leads to the simple step of translating the logic
of the simulation program into a working program which runs in the embedded
system of an actual vending machine. Other examples include the tic-tac-toe
program which provides an extremely simple demonstration of gaming AI. The
mortgage example show some generic techniques used for number crunching such
as the bisection method for root finding.
Credits
Credit must be given to Paul Houle for the Central Randomizer.
This is the random number generator used in the tic-tac-toe demo. The script
can be seen at the top of the demo page.
Sitemap | |