How to build a calculator: Its like smashing a calculator - only in reverse
How to build a calculator: It's like smashing a calculator - only in reverse

I’m going to delay the launch of the Ogilvie DFEC rebuttal calculator for a day or two. 1  I believe it works just fine, but I would like to test it a little more.  This said, I will grant anyone who is interested access to this calculator.

Why the delay?  Well…

The interesting thing about taking apart a set of calculations is that you find all sorts of “hidden steps” to the calculation.  The majority in Ogilvie does a respectible job of going through the steps of this new formula and even gives several examples.

When performing most calculations one will need to round numbers at some point.  However, rounding almost invariably takes place at the very end.  In the case of the Ogilvie calculations, it appears that the WCAB rounds various figures throughout the calculation.

Even though the DFEC rebuttal calculator was giving correct answers, the fourth or fifth decimal places on some intermediary figures occasionally did not coming out right.  It took me a little while to track down all the spots where the WCAB was implicitly rounding their figures (and to what decimal place!).

I am fairly confident the calculator will work without a hitch, but I’m going to test it a little more before I make it available to the public.  If you’re interested in testing this Ogilvie DFEC rebuttal calculator, please drop me a line and let me know.

If you’re not a registered user for this website, its free to sign up and free to use all the workers’ compensation calculators.  Seriously, free as in free!

  1. Photo courtesy of mhuang []

Professor, tell me more of this DFEC rebuttal calculator...
Professor, tell me more of this DFEC rebuttal calculator...

Earlier today I installed an Ogilvie v. City and County of SF DFEC Rebuttal calculator into the free workers’ compensation calculators page on this website. 123 For the moment it is only available to people who have signed up for this website and asked to be a beta tester.  If all goes well, I’ll flip a switch and make it available to the public on Monday morning.

At the moment it requires four pieces of information:

  1. FEC Rank (re: body part in question)
  2. Standard disability (re: body part in question)
  3. Post-injury earnings for Applicant
  4. Post-injury earnings for employees similarly situated to Applicant

Once you add in that information, click “Calculate” and it should crunch through the formula and give you a response.  The WCAB in Ogilvie suggested several possible outcomes to this formula:

  • The “Individualized Loss Ratio” for the injured worker is the same or within the range for the current FEC Rank for the affected body part.  In this circumstance, the 2005 DFEC has not been rebutted.
  • The “Individualized Loss Ratio” for the injured worker is within the range of one of the other seven FEC Ranks.  Here, the DFEC portion of the 2005 Permanent Disability Rating Schedule might be rebutted.
  • The “Individualized Loss Ratio” for the injured worker is outside the range of all eight FEC Ranks.  In this circumstance, you could end up with a new FEC Adjustment Factor much higher or lower than any FEC Adjustment Factor associated with the eight FEC Ranks.  Here, the DFEC portion of the 2005 Permanent Disability Rating Schedule might be rebutted.

Obviously, there are innumerable factors that go into considerations of whether a Judge (or the WCAB) would find the DFEC portion of the 2005 Permanent Disability Rating Schedule to be rebutted.  This calculation and the information relied upon in performing this calculation cannot be taken as a guarranteed method of rebutting the DFEC portion of the 2005 Permanent Disability Rating Schedule.

If you’re not a registered user for this website, its free to sign up and free to use all the workers’ compensation calculators.  That’s right: free as in free.

  1. Photo courtesy of Draggin []
  2. I had this EXACT same calculator as a kid! []
  3. Why, how did you spend your Friday night? []

Calculator
Calculators

Last week a website user notified me of a problem he was experiencing with this website’s rating calculators.  He’s been a regular user for nearly a year now.  When he tried to perform a calculation the calculators would just show waiting indicators without showing the answer.  If he closed the browser window and reopened it, it would sometimes fix the problem.  To complicate matters, his coworker was having a similar problem.

Worst of all, this problem had been plaguing them for two weeks.  If you have a problem with this website, let me know as soon as possible so that I can track down the last change to the site to see if its causing a problem.

My troubleshooting went like this:

  1. Get a detailed description of the symptoms.
  2. Try to replicate the problem.
  3. Reiterate the problem to make sure I’ve got it right.
  4. While working to diagnose and fix the problem, offer a temporary fix (putting up a temporary site for their use).
  5. Look into recent changes in the website (going back two weeks).
  6. Since I couldn’t replicate the problem, ask additional questions.
    • Does the problem occur at a particular time of the day?1
    • What web browser and version do they use?2
    • What operating system?  When was the last update?3
      • Explain how to figure out their version of Windows and how to install update.
    • Do they have any third-party “toolbars” installed?  Yahoo, Google, MSN, etc toolbars.4
      • Ask them to temporarily disable or uninstall the toolbar.  Give them links to where they can re-download the toolbar software.
    • Do they single-click or double-click on buttons?5
    • Are other co-workers having the same problem?6
    • Do they have this same problem on different computers?7
    • Is the browser showing javascript errors?8
    • Ask them to try out a new browser. I recommended the PortableApps.com version of FireFox.
      • If the problem disappears, its obviously in their computer or network.  If the problem persists, it could still possibly be their network or the website.
  7. Above all else: KEEP THE CLIENT INFORMED.9

As of right now, one of this client’s co-workers has contacted me to say that he’s no longer having trouble with the website.

So, problem solved?  If not, let me know, alrighty?

  1. This would indicate a data bottleneck at the server.  Time to upgrade! []
  2. And, tell them how to find this information. []
  3. Have I mentioned how much I loathe Microsoft VistaSeriously, I think people should delete Microsoft Vista because its crap. []
  4. These browser helper objects are notorious for interfering with normal browser operations.  Worse, you can’t rule them out based upon when they were installed because they’re constantly downloading and installing updates to themselves. []
  5. Double clicks send two requests to the server – and might be confusing the browser. []
  6. Two computers on a single network could be a coincidence, a sign of a problem with the website, or a sign of a problem with the client’s network. []
  7. If not, its a problem with that computer.  If so, could still be a problem with either the website or their computers/network. []
  8. Tell them how to tell if there’s an error and how to give you the error code information. []
  9. They may not care for the constant updates, but they will know you’re on the case. []

EAMS Logo
EAMS Logo

As you know, last Monday I brought you two new EAMS calculators / search engines which were basically an improved search engine for the EAMS ADJ number lookups and EAMS office lookups.

The IT guy for my law firm wrote an e-mail to me on Friday suggesting:

Hey, how about a body part search function on your website? That might be useful sometime.

First off, thank you for the suggestion TK!  Secondly, I was actually in the process of building such a calculator on Sunday September 21, 2008 when my laptop stopped working.  My laptop was fixed on Friday (more tomorrow) and I was able to finish the EAMS body part to body part code search function.

Calculator
Calculator

I was so happy to get my laptop back I built a whole new EAMS search engine and a better way to access forms.  After having a hell of a time trying to locate the proper document type and document title on Friday I decided to make this my next project.

With the new EAMS forms on the DWC forms page, you now have a bewilderingly large number of forms to search through in order to find the one you need. Not only do you have to look through the 136 different forms offered by the page, but the EAMS forms are not easily distinguishable from the non-EAMS forms.

  • What I’ve done is create an EAMS and DWC forms search engine which scans through the DWC’s lists of forms by the form type, form name, and form number, and generates a list of just the forms which fit your search.  On my forms search engine, the EAMS forms will be highlighted so you know its an EAMS form at a glance.

And THAT is how I squandered my weekend.

EAMS Logo
EAMS Logo

As you may already know, the WCAB’s EAMS sub-webpage allows you to search for the new ADJ numbers or the official address for a claims administrator or representative.

Calculator
Calculator

Using the same data, I’ve written my own search engines that, to be blunt, work better.  You can find these two new search engines on the calculators page.  They are named “WCAB ←→ ADJ” and “EAMS Registered Offices”.

Later this week I’ll post about “why” and “how” I’ve developed these two new “calculators.” For now, I’ll just talk about why you’re going to want to join this site (for free!) and bookmark the calculators page.

  1. User Friendly. Search engines shouldn’t need pages of documentation.  One search box is all you really need.
  2. Easier. My search engines aren’t picky.  Enter “OAK0123456, OAK 0123456, OAK123456, OAK 000123456” and you’ll get “ADJ522195, ADJ522195, ADJ522195, ADJ522195.”  The EAMS page requires you enter the WCAB or ADJ number with no spaces and exactly 10 characters.
  3. More powerful. Search the Claims Administrators’ Offices and Representatives’ Offices database or unlimited ADJ and WCAB numbers simultaneously.
  4. Faster searches. You can search for 50 WCAB and ADJ numbers on my site in the time it takes you to search for one at the EAMS page.
  5. Better results. Although I use the same information as the WCAB search engines, I’ve designed my calculators to apply your search query to more of the information.  The result is better search hits.
  6. One page to rule them all. Both new search engines are built into the same page as the rest of my calculators.  No need to poke around the WCAB-EAMS website.  Bookmark one page and have all of the latest EAMS information right at your fingertips.

Comments, questions, criticsms always appreciated.

Google
Google

Google has a saying, “launch early and iterate.”  Launch your idea, get feedback, make it better, keep doing it! As a friend of mine has delicately suggested, I’m no Google.  This doesn’t mean I can’t learn from Google, right?

Two of the calculators I’ve been developing are a commutation calculator (for pre-1/1/2003 injuries) and a retroactive benefits calculator.  I’ll discuss the commutation calculators more closer to their launch.

However, today is the day I’m publicly launching my Retroactive Benefits calculator!  Its fairly straight-forward.  You tell it the weekly rate, start date, end date, payment date, and an interest rate.  It tells you how many days, how much is due, how many days the benefit was delayed, and how much is due with interest.

Take a look, play around with it, let me know what you think.  Drop me a line or post a comment.

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. Since then I’ve posted about my use of javascript and PHP in creating these permanent disability and permanent impairment calculators.

As I’ve mentioned in those prior posts, both javascript and PHP have inherent downsides. My very first attempt at online benefits calculators using javascript and ASP actually suffered from all of the downsides of javascript and PHP. Those first calculators used tons of user’s computers’ resources, bandwidth, and server power. However, learning more about AJAX enabled me to build a set of calculators which benefited from the strengths of javascript and PHP while minimizing, if not eliminating, their weaknesses.

The acronym “AJAX” refers to “asynchronous javascript and XML” – a collection of other technologies which allow a webpage to communicate with a web server without requiring an entire page download.

Example 1: A calculator without AJAX calculating “6 x 7” would send information to be calculated to the web server. The web server would then respond by giving you an entirely new page with the answer, “42”. However, in order to download that answer you would need to download a whole new page – and all the images, text, and code associated with it. Even a normal web page could be between 30,000 and 300,000 bytes in size.1

Example 2: A calculator with AJAX calculating “6 x 7” would send information to be calculated to the web server. The web server would then respond by sending back just the answer, “42”. This would be 2 bytes.

If my calculators needed to download of 300 kilobytes for every single operation, a simple calculation could take about 30 seconds on dialup and a full 1 second on broadband. Although 1 second doesn’t seem like a long time – it is in the internet age. Most of the calculations on this site take approximately .500 seconds using a broadband connection. I would guess that about 90% of that time is due to network latency/network lag – which wouldn’t be much different for a dialup connection.

For the first few months after the launch of this website, it did not use a MySQL database. I actually went to some pretty ridiculous extremes to not have to learn a new programming language. I eventually gave in, learned how to use MySQL and am a better programmer for it.

Next up, MySQL!

  1. A download of “www.google.com” was approximately 30,000 bytes and a download of “www.yahoo.com” was approximately 300,000 bytes. []

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.1

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.2
  • 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.3
  • 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!

  1. Can’t we all just get along? []
  2. 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. []
  3. 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. []

Lately I’ve been working on cleaning up all of the calculators and making them easier to use. You can see the latest version here. Hopefully in the very near future these “updated” calculators will replace the ones currently available on this site. I’m retooling these calculators because the current calculators were built specifically for the old site. This also gives me a good excuse to implement some of the improvements I’ve been kicking around.

  • Improved graphical user interface. I find this new layout more intuitive. Let me know what you think about it.
  • More calculators. I have a working retroactive benefits calculator that can be plugged right into the new calculators. Got an idea for a new calculator? Drop me a line and let me know!
  • Help information. The current calculators don’t offer a lot of help information – except when you try to do something wrong. I’ve designed these new ones to give a lot more feedback.
  • Quicker load times. The current calculator page takes about a full second to load up. That’s too long!

My arbitrary self-imposed target date to get the new calculators working is July 23, 2008 – the one year birthday of this website. I’ll have to find some screenshots of the original site for you to snicker at. It was pretty ugly.