Don’t Use Arbitrary Limits

Don’t Use Arbitrary Limits

I remember when I was in college I had to take a “Programming Languages” class. One of the things that my professor kept pointing out as a hallmark of bad language design was the use of arbitrary limits. He usually pointed to the arbitrary length of strings and numbers in many languages as a very popular example. Most of us are still using languages that have arbitrary limits on types such as integers, but there are languages like Ruby which don’t even have limits in integers. Ruby transparently expands the numbers as they grow. The limits on numeric types in languages such as C# are there for performance reasons because the Ruby solution, from a performance standpoint, is not an acceptable trade-off in many peoples minds. (In C# 4.0 we are getting a bigint type finally)

The point here is that while some limits may be there for technical reasons, it is generally considered to be very bad form to put artificial limits for the sake of artificial limits. This is why today when I was upgrading my personal laptop to Windows 7 I came across this and had a WTF moment…

Windows Experience Index

Not only does the “Windows Experience Index” start at 1 and not 0, but it ends at 7.9. Seriously? Honestly the choice to start at 1 isn’t terribly bad, I guess they didn’t want to have to tell people that their computer was a zero! But who was sitting around and decided that 7.9 was the optimal point to stop at? So, when you run the tool on your computer and you get a 7.2 you have a screaming computer. My laptop scored a 5 due to my video card, but considering the scale ends at 7.9 that isn’t too bad of a score.

A little while later during more exploration I came across the form for providing feedback:

Rate Your Experience

1 to 7? Again, what is with 7? Maybe they just got 7 stuck in their head because it is Windows 7. And suddenly 7 became the answer for everything! I don’t really  know, I have yet to figure it out. What I want to know is what was wrong with a 1 to 5 scale? Or better yet, a three level “don’t like”, “indifferent”, “like” sort of scale? Overall these oddities don’t detract at all from my Windows 7 experience, but they are just so delightfully random!

As a side note, let me also say that my Windows 7 experience so far has been great. I was one of those idiots that just accepted that Vista was slower because it was “doing more”. And I genuinely did like Vista over XP. I understand that UAC was a nightmare and that early on there was major driver issues, but I never really experienced any of that. I just thought that Vista took up more memory because it was a more complicated operating system that was performing more work behind the scenes. Well, Microsoft is in trouble now because they proved with Windows 7 that you can do more and be faster.

Loved the article? Hated it? Didn’t even read it?

We’d love to hear from you.

Reach Out

Comments (5)

  1. I think the 7.9 upper limit is like that because it’s not fixed. Instead of degrading your computer over time to keep a 1-5 rating scale, as new hardware becomes available, they up the bar, thus changing the range. I guess if you check again in a few months, your computer will still be at (say) 4.9 but now in a 1 to 9.2 scale. It’s weird, I agree.

  2. Sergio is right on the money: the Windows Experience Index is designed to scale higher than current hardware will take you. Keep in mind the reason it was created: to make it easier for a program to describe its hardware requirements. It is convenient that a program (such as a game) can advertise that it requires a 3.7 to run (while a 4.2 is recommended) and that number will remain true even as newer and better hardware comes out. In fact, the Windows Experience Index is a good case study in "Don’t Use Arbitrary Limits". 🙂

    Regarding the 7 star thing, that is definitely weird, but my guess is that it is based off of an older survey system with choices like:
    1 – Very Dissatisfied
    2 – Somewhat Dissatisfied
    3 – Dissatisfied
    4 – In the middle
    5 – Satisfied
    6 – Somewhat Satisfied
    7 – Very Satisfied

    A 7 point scale (8 including abstaining) is a bit too granular for my tastes, but it certainly isn’t uncommon – you just normally don’t see them in star format…

  3. Yeah, I thought about the fact that it was meant to scale, or that it was scaled for my particular machine, but that just still doesn’t make any sense to me. They are still currently limiting it to 7.9 and in the future this will change to some other random value. So 10 years from now my new box will have an 11.2? Then my next one will have a 18.6? I still see these numbers as being arbitrary and hard for consumers to decipher, and it seems to make more sense to have a 10 point scale which is relative to the current version of Windows.
    The only advantage I could see is where you said that they could say the next version of windows requires a 6.5 without having to recenter the numbers. It seems like it would be easier to have an app to tell me that though.

  4. I’d like to chime in on arbitrary limits coming from two different directions.

    1. Bad. We were using an API on mobile phones that passed only ushorts so when our int-based identity column in SQL Server crossed that 65,535 boundary we had to implement a major hack to use "expired" numbers between 1 and 65,535 since clients with this bug were already widespread in production (and the cost to distribute fixes is expensive, up to $0.50 per handset).

    2. Good. When a friend and I were analyzing a business need this past weekend for a feature he was writing, it turns out bounding an incoming parameter to byte (instead of int) eliminated the ability to pass negative numbers as a parameter to his function at compile time.

    Even though there can be good uses, I prefer to steer clear of arbitrary limits whenever possible. Most of the time they just bite me in the ass.

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More Insights

View All