Dietary myths debunked by the New Scientist

Body Mass Index (BMI)
Body Mass Index (BMI) (Photo credit: Wikipedia)

I always think it’s good to get rid of myths about human diet – so here are six care of last week’s New Scientist.

1. Drink eight glasses of water per day

Turns out we get plenty of water from food and drinks such as tea and coffee (the idea these dehydrate is also debunked).

2. Sugar makes children hyperactive

No scientific evidence for this one at all (to be honest I have always associated this with America – not really a claim you see made in Britain in any case).

3. “Detox diets” get rid of poisons such as PCBs.

Apparently it would take six – ten years of zero exposure to get rid of just half of these sort of chemicals from our muscles. As zero exposure is not possible, neither is that. As for a six week diet, forget it. You can, of course, stop smoking and cut down on drinking. But it is for regulators to cut our exposure to harmful chemicals, a diet is not going to cut it.

4. Antioxidant supplements help you live longer

Scientific studies show that taking antioxidant supplements may actually impair your body’s defences by weakening the natural mechanisms that manufacture these in our cells to tackle free radicals.

5. Being a bit overweight means you will die sooner.

Obesity is one thing – being overweight another. Obesity, certainly a BMI over 35, is correlated with higher risk of premature death. But a BMI of 25 – 29 is a different matter. But being overweight may make you more susceptible to illnesses that affect the quality of life, but there is no evidence to suggest it increases mortality.

6. The “paleo diet” is the way to go

We have no great idea what was eaten in the stone age, or even how healthy those who lived then really were. What is more humans have evolved the genetic ability to digest some of the foods the “paleo diet” suggests we should avoid – indicating a flawed argument (indeed the scientists on whose work the original claims for the paleo diet were based have revised their ideas to account for this – the diet’s advocates are seriously trailing the evidence).


How to install SystemC on amd64 Linux

These instructions work – unlike those you might read elsewhere, which have been edited poorly.

1. Register to get the sources at’s website

2. Once registered login and download the source: go to and download systemc-2.3.0.tgz

3. Move the .tgz archive to the parent directory of where you want to install and unpack it: tar -xvf systemc-2.3.0.tgz

4. Change to the newly created systemc-2.3.0 directory: cd ./systemc-2.3.0

5. Inside that directory create a new objdir: mkdir objdir

6. Switch to that new directory: cd objdir

7. Set up your environment to handle the C++ make files: export CXX=g++

8. Create an installation directory: sudo mkdir /usr/local/systemc-2.3.0

9. Configure your sources for building: ../configure --prefix=/usr/local/systemc-2.3.0

10. Build it! make -j3

11. Install it: sudo make install

12. Now to build a program – eg hello.cpp, your command line needs to look like this:

g++ -I. -I$SYSTEMC_HOME/include -L. -L$SYSTEMC_HOME/lib-linux64 -Wl,-rpath=$SYSTEMC_HOME/lib-linux64 -o hello hello.cpp -lsystemc -lm

In other words – don’t forget that you are using linux64 and not just linux

Wet and stormy autumn ahead?

This weekend sees the summer bank holiday in England, Wales and Northern Ireland (Scotland, like the Republic of Ireland, keeps to what was once the UK-wide date of early August). Although August will still have another few days left, in many ways Monday marks “the end” for summer for many.

So, what of the autumn? I am going to guess it will be wet and stormy (though possibly warmer than some), as the Atlantic seems to be gearing up for a pretty rough hurricane season and eventually many of these, passing out over Newfoundland, end up here as autumn squalls (or, as in 1987’s “great storm”, something worse).

Annoyed with @amazon and their b0rked business model

Last week I was sent a $50 gift voucher: a very pleasant surprise.

English: First 4 digits of a credit card
English: First 4 digits of a credit card (Photo credit: Wikipedia)

I immediately loaded the voucher into my account (I had one of these long before I got an account) and then thought about what books I’d like to order – picked a couple and thought “that’s nice”.

Despite the website very plainly stating apropos gift cards –

We’ll automatically apply your balance towards your next eligible purchase.

– they did nothing of the sort. They simply billed my credit card.

And when, today, I asked them to rectify their mistake they told me the only way I could get the books charged to the gift card balance was to refuse to accept them when they were delivered so that they would be automatically returned to the United States and then I could place a new order.

Now, the chances of me being actually able to “refuse” a delivery by the Royal Mail (who, according to Amazon, do the fulfilment of the order once it gets to the UK) are in all practical terms, zero. Has anyone reading this in the UK ever refused a package from the Royal Mail? How often would they even get the chance? Quite often packages are left at the doorstep or with neighbours without any further thought.

But aside from that deeply practical consideration, what sort of a business are Amazon running that they are willing to shoulder all these costs (as they implied I would get both a full refund on the shipping costs of the refused order and a free upgrade to the fastest possible delivery method on the new order)? They certainly do not take carbon reduction seriously if this is how they propose to solve what ought to be a relatively minor problem – how can it be impossible to refund the credit card charge and bill the gift card? After all their proposed “solution” amounts to the same thing, just with the addition of significant inconvenience and delay for me, significant inconvenience and costs for them, and utterly unnecessary damage to the environment?

Surely it cannot be because their IT systems are not up scratch, can it? My guess is it is because they simply do not devolve enough power and responsibility to their customer service staff, who are left to propose this utterly bonkers way of working because it works for them and allows them to mark the problem as “solved” even though it must cost the company buckets. I do not blame the staff but the managers who allow this to arise.

PS: In fairness I should add that Amazon have given me a $15 dollar “promotional” certificate to compensate me for the inconvenience – that would be another cost to them – on top of all the additional shipping – if I accepted their “solution”.

PPS: The books I ordered were Elliptic Tales: Curves, Counting, and Number Theory and The Idea Factory: Bell Labs and the Great Age of American Innovation.

Weight loss: all gone wrong?

weight 22 augustSo, I go on holiday, hire a bike and cycle a lot for the fortnight I am away: regularly burning (according to online assessments) over one thousand calories a day.

And then I come back and find (see the graph) that my weight has risen by five pounds. Too much drinking, fatty foods and so on? I don’t think so, though plainly something is up.

(In the graph the green line is the 90 day moving average, the blue the 30 day and the red the 14 day – I smoothed the weight gain over the two weeks I was away across that period – as I didn’t have access to scales then).

Weight gain and loss continues to be a mystery to me – I am “training” as hard as ever but weight has gone up even though I don’t think I have changed my diet.

I am going to go for heavier weights (necessarily with lower repetitions) now to see if that makes any difference (this is generally combined with a fair amount of cardio too).

My aim is to get to 168 pounds by the end of the year – still overweight incidentally – but that looks quite remote now.

Two things I can be certain about though, given the difficulties I have had with running since coming back from holiday are: cycling is a poor way to train to run – very different muscles used (and not just in the legs – I never realised ho important my arms were in running for instance) and I really ought to invest in a runner’s watch.

How secure is your encryption?

Papal Encryption
Papal Encryption (Photo credit: Samuraijohnny)

The answer is, “probably quite secure, but not as secure as you might think.”

This is not a story about the NSA but about the fundamental maths of encryption – and about the ability to “guess” what an encrypted message might mean through a sophisticated version of “frequency analysis” – in other words guessing what the unencoded symbols would be on the basis of how likely they are to occur.

Up to now the assumption has been that for long enough messages encryption would essentially erase the underlying pattern of a message – in other words the encoded message would have the maximum possible degree of randomness or “entropy“.

A parallel can be made with compression – in a perfect compression algorithm entropy would be maximised: there would be no underlying pattern of 1s and 0s in the binary – as if there was a pattern then this too could be compressed (replaced by a shorter symbol) and so on. In fact most compression algorithms are pretty good – which is why you cannot repeatedly zip files and hope they will keep getting smaller.

But if you are using encryption you might not regard “pretty good” and really good enough – you would want a more or less nailed-on guarantee that your encryption would have maximum entropy, as a pattern in the coded message might point to the patterns in the underlying message.

To get that guarantee we need to show that coding the same word in “clear text” would result in a truly random selection of “code words”. Now, no mathematical process can ever truly guarantee this but it was assumed, based on what seemed to be sound reasoning, that for a sufficiently long message of “clear text” the entropy of the coded message would rapidly approach the maximum.

But report Mark Christiansen and Ken Duffy from the National University of Ireland (Maynooth) and Flavio du Pin Calmon and Muriel Medard from MIT – that assumption is flawed. In fact, in the real world, the approach to maximum entropy is a good deal slower than previously believed: in fact “conditioned” (i.e. real world) sources never get there

There is a paper discussing this – here – with some heavy duty maths. Another article – which probably does a better job than me in explaining it, (but also seems to play down the Irish connection!) is here.

The bottom line seems to be that sophisticated “brute force” attacks (also known as guessing!) might just work after all – because once you guess one word well, the rest of the code might fall into place. If the decoder has some clues about what the message might contain (think of the cryptanalysts at Bletchley Park knowing that many German messages contained weather reports) then it is possible that guesses might – just might – work.

Does this mean that your encryption is broken? Probably not. But it does mean that someone might be able to break your messages well inside the known age of the universe after all.

“Crowd sourcing” to play a key role in fundamental physics experiment

Cern accelerators
Cern accelerators (Photo credit: Cédric.)

Ordinary people are to be asked to make a contribution to an experiment which aims to determine key facts about the nature of the physical universe – reports the New Scientist.

Particle physicists at CERN – the join European experiment famous for the Large Hadron Collider – are conducting an experiment – AEgIS – into whether anti-matter interacts with the gravitational field in the same way as matter.

Most of our universe seems to be made of matter – a mystery in itself because there is no simple explanation why ‘matter’ should outnumber ‘anti-matter’ – and the two forms annihilate one another in a burst of energy when they meet – so it can be difficult to conduct experiments with anti-matter.

Anti-matter particles pair up with matter – so for the electron, the negatively charged particle in our everyday atoms, there is an anti-matter positron, which is a positively charged particle which looks like an electron except it appears to ‘go backwards’ in quantum physics experiments (i.e. if we show an electron carrying negative charge in one direction, we can show a positron going in the opposite direction – and backwards in time! – with out violating physics’ fundamental laws). Richard Feynman’s brilliant QED – The Strange Theory of Light and Matter is strongly recommended if you want to know more about that.

Conventionally it is assumed gravity interacts with matter and ant-matter in the same way, but in reality our deep physical understanding of gravity is poor. For while Einstein’s general relativity theory – which describes gravity’s impact and has stood up to every test thrown at it – is widely seen as one of the great triumphs of 20th century physics, it is also fundamentally incompatible with how other “field” theories (like that for electricity) work and as a force is much. much weaker than the other fundamental forces – all of which suggest there is a deeper explanation waiting to be found for gravity’s behaviour.

Showing that anti-matter interacted with the gravitational field in a different way from matter could open up huge new theoretical possibilities. Similarly, showing anti-matter and matter were gravitationally equivalent would help narrow down the holes in our theoretical understanding of gravity.

How can the public help? Well, on 16 August (just after the New Scientist article was printed) CERN asked for the public’s help in tracing the tracks made by particles in experiments: these tracks are then analysed to judge how gravity impacted on the particles (some of which will be anti-matter).

The public can help CERN analyse many more tracks and – crucially – help calibrate CERN’s computer analysis software.

It is expected that there will be further requests for help – so it might be worth keeping your eyes on the AEgIS site if you are interested in helping. (The tutorials are still up. but all the current tasks have been completed).


A neat contradiction

English: A contradiction in terms! Whatever go...
(Photo credit: Wikipedia)

the smallest natural number that cannot be described by an English sentence of up to one thousand letters

Such a number cannot exist – if we take the sentence above as a legitimate description of the number – as the sentence above both describes the number that cannot be described in less than one thousand letters and yet takes quite a lot less than one thousand letters to do it.

Stolen from P, NP, and NP-Completeness: The Basics of Computational Complexity – which is a less than easy read (for me at least).

My one problem with Feynman’s QED

Stimulated emission of photon from an atom
Stimulated emission of photon from an atom (Photo credit: Wikipedia)

Well, as predicted, I finished off Richard Feynman‘s QED – The Strange Theory of Light and Matter in short order this morning – and it is a truly marvellous book. I just wish I had read it as an undergraduate.

My one problem with it was its explanation of “stimulated emission“. Now, as an undergraduate, I remember I understood this quite well – it came up in a discussion of MASERs (intense microwave sources in deep space) as opposed to the more familiar LASERs ifI remember correctly. But that’s a long time ago.

Perhaps I should look it all up again.