Well, the title really says it all.

This website was re-launched on July 6, 2008.  While all of the permanent disability and workers’ compensation benefits calculators are still free, a quick and simple registration process is now required to use them.

In the 33 business days from July 7, 2008 through August 20, 2008, one hundred people have registered for free access to this website.  I like to think that’s pretty good.

My totally unscientific research has revealed this website’s users to be:

  • Well above average in intelligence;
  • Have extremely discriminating taste;
  • And, not at all susceptible to flattery

I recently gave a brief overview of my permanent disability and workers’ compensation benefit calculators. In that post I wrote a little bit about how my online benefits calculators work. My last post in this series was about how and why these permanent disability and workers’ compensation benefits calculators use javascript.

I had tried Microsoft’s ASP (active server pages) in experimenting with a prior version of my permanent impairment calculators, and while functional, the coding was a complete mess since I didn’t fully understand what I was doing. To make matters worse, the only manuals on ASP I could find gave examples using VBScript – which is MS’s version of javascript. ((Can’t we all just get along?))

Just over a year ago a friend of mine encouraged me to try PHP. (Thanks Johnny!) Its syntax, the way in which you write code, is very similar to javascript and was fairly easy to learn.

Unlike javascript, PHP is run only on the web server. There are a lot of benefits to moving all of the calculations from being performed by a user’s computer to my web server:

  • Uniformity. All calculations will always be performed by the web server in the same exact way – irrespective of the user’s computer.
  • Speed. Since all calculations are performed on the web server, the user’s computer doesn’t need to do any number crunching.
  • Protection. All of the formulas, tables, and magical incantations used to generate the calculations are kept only on the web server.

But, PHP isn’t without its downsides:

  • PHP is being used to perform a calculation, even when javascript would be faster. Javascript takes longer to crunch the answer, but you have to “wait” for PHP to send a request to the server and wait for the answer. ((I say “faster,” but we’re talking about the difference between 10 milliseconds for javascript to calculate the answer and waiting 400 milliseconds for the server to return the answer.))
  • A pure PHP calculator would require the user to send the web server the entire page and wait for a whole new page to load. Every calculation would take a full second or more using a pure PHP calculator. ((A second might not seem like a long time – but it is when you’re using a computer. I’d bet that if these calculators took 1 second for everything (such as finding an occupational code or work restriction) no one would use them.))
  • When PHP is used to perform handle all calculations, there is more of a strain on the web server itself.

Using AJAX (more on this later) to create workers’ compensation benefits calculators has allowed me to take advantage of all of the strengths of javascript and PHP and minimize the negatives of these technologies.

Next up, AJAX!

Mario Puzo, the famed author of The Godfather, The Sicilian, and The Last Don, also wrote a slightly lesser known book by the name of “Fools Die.” ((Did you know Puzo also wrote the screenplays for Superman and Superman II?)) Fools Die was a very cynical look at the gambling, literary, and film industries. Some of the best parts were the casino owners talking about gambling:

Percentages never lie. We built all these hotels on percentages. We stay rich on the percentage. You can lose faith in everything, religion and God, women and love, good and evil, war and peace. You name it. But the percentage will always stand fast.

Throughout the book characters say, “no percentage,” or “bad percentage,” or “I have the percentage.” This phrase refers to a (slight) mathematical advantage or disadvantage which, with the inevitability of a glacier, will guarantee a net win or loss over time.

I’ve given a little more thought to the idea of offering website calculators that can be used from a cell phone. Right now, there are precious few cell phones and cell phone web browsers that are capable of using the basic internet protocols necessary to use these workers’ compensation benefits calculators.

At this point I could redevelop the calculators to work with more phones. No one is clamoring for cell phone based permanent disability and permanent impairment calculators. Though I have a feeling that day is not far off, right now there is no percentage in that game.

However, do not despair – I’m thinking of offering something of a consolation prize. More on this later.

I recently gave a brief overview of my permanent disability and workers’ compensation benefit calculators. In that post I wrote a little bit about how my website calculators work.

In late 2004 I spent some of my free time working on a calculator for the 1997 Permanent Disability Rating Schedule 100% pure javascript (the only programming language I knew at the time). I had several reasons for never publicly releasing this calculator:

  • Uniformity. Not all computers and browsers perform all javascript functions the same way.
  • Speed. A pure javascript calculator would require the user to download all of the code – not just the parts they needed.
  • Protection. Anyone with a modicum of technical knowledge could simply downloaded the calculators, and then post it as their own.
  • Obsolete. With SB 899 and the 2005 Permanent Disability Rating Schedule, my calculator became nearly obsolete. I scrapped it rather than building a second calculator.

The current workers’ compensation benefits calculators use very very little javascript. Doing so has meant that I don’t have to worry about different computers/browsers, users only need to download the code they need to run a single calculation, and my calculators don’t work without my server.

Next up, PHP!

Here’s a (simplified) overview of how my permanent disability/impairment and workers’ compensation benefits calculators work. As I’ve mentioned elsewhere, I wrote these website calculators using javascript, PHP, MySQL, and AJAX.

In a recent post, I created a really simple test for cell phones using the above languages. Here’s what was happening:

  • The user clicks the button “Cell Test.”
  • The javascript embedded in the button detects the “click.”
  • The javascript embedded in the button then tells an AJAX program that the button was clicked.
  • AJAX sends a little bit of information to the web server – saying that the user clicked that button.
  • The PHP program on the server is notified that the button was clicked.
  • The PHP program checks a MySQL table to see what it should happen when that button is clicked.
  • The MySQL table returns the answer, what should happen when a button is clicked, to the PHP program.
  • The PHP program takes the answer from the MySQL table and sends it back to the AJAX program.
  • The AJAX program takes that information and, using a little bit of javascript, displays the answer in your web browser.

Easy!