After looking at our stoplight gadget again at our weekly meetings, we yet again found some bugs and fixes that we decided to make to our gadget. This time, we found that we mistakenly used parseInt() to parse our strings to numbers instead of parseFloat(). This was a simple fix and didn't take much time to fix. However, we also found that the way we handled retrieving the message from the message spreadsheets needed to be changed. Previously we had our message spreadsheets have the upper threshold, lower threshold, and message fields. Comparing the thresholds in this manner had a few problems that we decided to get rid of my changing the format of the spreadsheets. Our previous format looked like this:
The problem with having the spreadsheet in this manner allows for too much error. If the data source that the user is looking at has the value 20.5, the stoplight returned would be a blank one, since the value is between 20 and 21. So we decided to change the layout of the message spreadsheets to the following:The way the spreadsheet is now setup is pretty obvious after a small amount of explanation. The message would be 'low' if the value received from the data source is less than or equal to 10. The message would be 'medium' if the value received from the data source is less than or equal to 61. The message would be 'high' if the value received from the data source is less than or equal to 90. Finally, the message would be ' very high' if the value received from the data source is greater than 90. Having the spreadsheet formatted in this way removed the error that was previously discussed. This change, along with the parsing problem was fixed and is now implemented in the most current release of our stoplight project, version 1.6.
The stoplight gadget and any information about it can be found here.
Monday, March 1, 2010
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment