In Sucks-Rules-O-Meter Value Comparison, a couple days ago, I mentioned a program I wrote that translated values collected for Sucks-Rules-O-Meters into sucks/rules quotients that are more easily compared.

Today, I refactored the program a touch and added in a linear function along with the decelerating curve function that meter.rb previously used. Now, the linear function that ranks list items from 0.00 to 10.00 is the default, and the decelerating curve from -inf (negative infinity) to 10.00 is used when you use the -t d option.

I created a test file called test.meter . It contains:

high,50,100 highest,0,100 low,100,50 lowest,100,0 middlest,50,50

The output of meter.rb test.meter using the new algorithm looks like this:

highest : 10.00 high : 7.50 middlest : 5.00 low : 2.50 lowest : 0.00

The output of meter.rb -t d test.meter looks like this:

highest : 10.00 high : 9.50 middlest : 9.00 low : 8.00 lowest : -inf

The output of meter --help looks like this:

Usage: meter [options] -t, --type=OUT_TYPE Specify the type of output you want. At this time, the only option that has been implemented is 'd', which indicates a decelerating curve function whose maximum output value is 10.00. If the '-t' option is not specified, the default of a linear function whose output value ranges between 0.00 and 10.00 is used.

The source code of the current version of the program is stored at meter.rb.txt. For more information on some of what’s in the program — in particular, what can be done with the path variable — see Sucks-Rules-O-Meter Value Comparison.

Prompted by Sterling in comments, I realized I needed to add the output of meter.rb using the new algorithm, with the Operating System Sucks-Rules-O-Meter data as input. I’m using the data from two days ago, though, because I’m too lazy to check whether the numbers have changed at all since then. So, here’s the output:

VMS : 9.96 FreeBSD : 9.72 MacOS X : 9.42 NetBSD : 8.74 OS/2 : 8.48 MVS : 7.94 Unix : 7.82 AmigaOS : 7.16 Linux : 6.50 Solaris : 5.07 OS/400 : 5.00 NetWare : 3.73 BeOS : 3.58 MacOS Classic : 1.51 OpenBSD : 1.00 Windows : 0.82

Did I forget to mention anything else?