The logic of a diet I had some busy days lately, with many things going on. The long vacation period is over, and I'm back home. Here I can be more relaxed, although we are far from family, and we can't get much help with our child. It is time for me to regain control over my life and routines. Living with our respective families was nice, but came with a price: both me an my wife gained a lot of weight, due to all those over overabundant meals. We both feel quite sick, each in its own way. My stomach acid reached new levels of pain, although I was expecting a far worse response from the scale. We dusted off our tailored diet, and started the difficult path of getting back in shape. Our will is strong, we are both resilient to temptations, but it is quite hard nevertheless. While the diet is proven to be effective, I had to deal with the absurd way in which it was redacted. I'll try to explain. As you might know or guess, being on a diet is all about the amount of calories you get into your body. Since we don't like eating the same thing over and over, there are many alternative meals to pick from, but essentially it boils down to equivalence classes. For instance, X grams of meat is equivalent to Y grams of fish, to W grams of poultry... And so on. There is a certain number of these equivalence classes (e.g. one for proteins, one for carbs, one for fruit). Then you get many possible combinations just by replacing an item with anything in its class of equivalence. In short, a meal can be described as One item of equivalence class 1 One item of equivalence class 2 ... One item of equivalence class N Which means it is basically an expression: (A xor B xor C) + (D xor E) + (F xor G xor H) While this is so obvious, something tells me it is not obvious at all for the average human. The nutritionist in fact expressed this by expanding the expression over a dozen papers. Like this: A + D + F xor A + D + G xor A + D + H xor A + E + F ... Not a complete exponential expansion, but a good deal in that direction, with an infinite sequence of copy-paste. Wait, it is not over! The nutritionist devised a couple of variants, so that we could have a "pizza day" and a "sushi day", since we are greedy for these things. And as you might guess, the number of pages triplicated, since the whole diet was repeated for both variations. Wait, it is not over! After venting my well justified anger, I started to work on a factorization (I eventually managed to shrink it to a single page). I decided nevertheless to print a copy of it for future reference: since I'm quite distracted, I kept the possibility to compare my abridged version with the original. In the process, I spotted some inconsistencies too. After a couple of days, I received a new email from the nutritionist, with the rectification. Yes, another book. Did I mention the diet was on a PDF file, originally written in stupid microsoft word? Despite the crazy format, I managed to extrapolate the text from it, and use diff(1) to obtain a patch, that I applied by writing on the printed version. It all boiled down to a single weight correction, although I found some pointless corrections too (e.g. from boiled egg to poached egg. How would it change, calories-wise?) Fortunately, the abridged version was still stapled to the fucking folio!