News for hackers. Stuff that matters.

_kdhr

Re:The Norway Problem on Saturday April 03, 2021 @04:15PM (#26684355)
I mean if the value is imported as a decimal, then a sort by that field will sort as decimal. This might not be obvious if a system imports 23.53, 53.98 etc - a user would think it looks good. It only becomes clear that it was an error to import as a decimal when we consider cases like “00.10”. E.g, package versions: 10.10 is a newer version than 10.1.

Types only help if you pick the right ones.

Re:The Norway Problem on Saturday April 03, 2021 @05:26AM (#26679514)
That’s a shrewd observation. Static types help with this somewhat. E.g. in Inflex, if I import some CSV and the string “00.10” as 0.1, then later when you try to do work on it like

x == “00.10”

You’ll get a type error that x is a decimal and the string literal is a string. So then you know you have to reimport it in the right way. So the type system told you that an assumption was violated.

This won’t always happen, though. E.g. sort by this field will happily do a decimal sort instead of the string 00.10.

The best approach is to ask the user at import time “here is my guess, feel free to correct me”. Excel/Inflex have this opportunity, but YAML doesn’t.

That is, aside from explicit schemas. Mostly, we don’t have a schema.

Re:Spreadsheet is a software development paradigm on Friday April 02, 2021 @06:39PM (#26676689)
I think you shouldn’t try to replace a spreadsheet with yet another spreadsheet that just has one extra feature. Many, many start-ups have done that. They make some money, but it’s not really anything new.

In your case an add-on makes sense.

Re:Japanese writing system basics on Saturday August 20, 2016 @07:50AM (#12326150)
> Another interesting aspect of traditional Chinese characters is that complex words are expressed by combining simpler symbols. For example, the Chinese word for computer is 電腦. The first character represents "electricity", and the second character represents "brain". Which is really what a computer is, an electric brain.

That's nice, but I think most languages do this. It's not particular to Chinese. The word "computer" comes from "com-" (with/together) and "putare" (to reckon). Or "composition"; to position together. "compile"; to pile together, etc.