Many sites out there ask you to submit pictures of yourself so other readers can vote on how good-looking you are. Last year I created a Domino Web site using the same general concept, only applied to how bad-behaving your boss is. You can use my site, called MyBossIsWorseThanYours.com, to relate something obnoxious your boss did, and ask other readers to vote on how obnoxious it was. The goal, of course, is to submit the "worst boss" story.
To create a story on the site, press the red link on the upper-left part of the screen. You can judge someone else's story by using the three Vote buttons to rate each story on outrageousness, humor and perceived truthfulness.
Besides getting a kick out of the site, you may also find the underlying code useful for a more serious Web application. The two main design challenges I faced were how to conduct the voting and how to handle the browser windows. (This tip will explain the voting code. A future tip will look at the window issue.)
The voting code had to meet four requirements:
To meet these requirements, the voting design includes:
The periodic agent is well-documented and readable, but there is one wrinkle. Each story must contain not only the current average of the three kinds of votes, but also the number of votes recorded of each type. The reason is th
To continue reading for free, register below or login
To read more you must become a member of SearchDomino.com
');
// -->

at each vote carries less weight as more votes come in. For each new vote, the new average is not based just on the old average plus the new vote. The new average is based on the old average, the new vote, and how many total votes have been cast.
I have posted the source code for this application on my Downloads page. As you look at the code, be sure to look at the views Admin/Controls and Admin/Development Info views. The first allows you to adjust various setup parameters; the second contains other information for programmers. Feel free to use/modify the code, as long as you credit me for the original design. The default ACL for the downloadable version is set to Manager, so it is easy to examine. Before using the database in production, you should change the default ACL so it matches the Anonymous ACL. The database uses R5 design.
Please let me know about any bugs or suggestions for improvement.
Chuck Connell is president of CHC-3 Consulting, which helps organizations with all aspects of Domino and Notes.
Do you have comments on this tip? Let us know.
Please let others know how useful it is via the rating scale at the end of the tip. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.