Hacker News new | ask | show | jobs
by msla 901 days ago
Doing this with text files used to be a big part of my job. I had to write Java (well, mainly Java... ) (cf. the ingredients of scumble on Discworld) programs to parse the files school districts had that described bus stops, from depot to school in the AM and from school to depot in the PM among other arrangements, and, often, the best you could say about some files is that someone had likely worked fairly hard to make them look like they were software-generated. They had just enough structure that parsing them with a program was the correct option, but they had enough irregularities that the program was never going to be pretty, because there's no pretty way to parse an ugly file.

It's a wonderful example of inductive reasoning, or generating general rules from a collection of specific examples.