News for hackers. Stuff that matters.
Re:Why the Gov.uk Design System team changed the input type ... by pwdisswordfish2 on Thursday February 27, 2020 @02:43PM (#22436988)
So a temperature is a number only as long as it's expressed in kelvins?
Re:Why the Gov.uk Design System team changed the input type ... by rocqua on Friday February 28, 2020 @03:57AM (#22441483)
Perhaps you should take differences instead? Same with pointers. Their addition isn't meaningful, but their differences are.

In general, addition is only meaningful in linear systems, but differences can be meaningful in affine systems.

Re:Why the Gov.uk Design System team changed the input type ... by elcomet on Thursday February 27, 2020 @03:00PM (#22437173)
you can add farenheihts or celcius.
Re:Why the Gov.uk Design System team changed the input type ... by lmkg on Thursday February 27, 2020 @03:33PM (#22437476)
You can meaningfully add or subtract degrees to a temperature reading, but you can't meaningfully add two readings together (unless you're averaging them!). There's a subtlety here: A temperature difference is actually a different data type than a temperature. Dates and times have similar issues: You can add 2 hours to 3 hours, and you can add 2 hours to 3 o'clock, but you can't add 2 o'clock to 3 o'clock.

A better litmus test is whether you can subtract values. The difference between two times, or two dates, or two temperature readings is something that is meaningful and commonly used in everyday life. The difference between two ZIP codes is nonsensical.

Re:Why the Gov.uk Design System team changed the input type ... by kaoD on Friday February 28, 2020 @03:32AM (#22441377)
> unless you're averaging them!

Nitpicking, but that seems like a great case for them being numbers. You will never average credit cards or zip codes. Averaging times is meaningful too (e.g. the mean arrival time).

I think op meant "adding" as generally doing math on them. Each quantity will have its own natural operations.

I see what you mean though, subtraction seems like a good heuristic by virtue of difference being mostly (always?) meaningful.

Re:Why the Gov.uk Design System team changed the input type ... by Izkata on Friday February 28, 2020 @12:33AM (#22440747)
> The difference between two ZIP codes is nonsensical.

Not completely, there's a rough east-to-west pattern: https://d33wubrfki0l68.cloudfront.net/979d9b9012d8bbb1e4f14b...

So the difference is extremely crude geographic distance.

/evil

Re:Why the Gov.uk Design System team changed the input type ... by zentiggr on Thursday February 27, 2020 @03:50PM (#22437676)
Too bad the post office wasn't aware of space-filling curves when they started assigning regions :)
Re:Why the Gov.uk Design System team changed the input type ... by titanomachy on Thursday February 27, 2020 @03:37PM (#22437508)
Yeah, it's 5°C warmer than it was yesterday.
Re:Why the Gov.uk Design System team changed the input type ... by egdod on Thursday February 27, 2020 @09:52PM (#22440116)
That’s the difference, not the sum.