Sunday 28 September 2014

Hiccups - and their cure

This post is a re-publication of an article I posted on my website many years ago.  I have used the cure below successfully many times on many people. I am yet to find a case of hiccups this will not cure.

Health Warning - I am no medical expert, please consult one if you need assistance. If you have good cause to enlighten me, please comment below.  I will gladly consider warranted corrections.

There is quite a mystery about hiccups. Medical knowledge seems to be rather limited about their causes, and cures. So it is not surprising that many home remedies remain popular, even if they blatantly don't work.

Have you ever been shocked out of your hiccups? If so, please comment below.

Conventional wisdom on hiccups
According to the NHS, hiccups "don't seem to have a useful purpose". This can be translated as "we haven't a clue what they're for".

According to the Phylogenetic hypothesis, hiccups are an evolutionary remnant of earlier amphibian respiration. That's only 250 million years out of date then.

Short term verses persistent hiccups
As far as I know we all get short term hiccups. These are sometimes humorous, sometimes irritating. This page deals with short term hiccups.

However there is a rare but more sinister version which is not humorous at all. Persistent hiccups are those which continue for longer than 48 hours and these usually result from an underlying medical cause. They can be positively debilitating and can prevent the sufferer from working, sleeping, eating and performing many ordinary functions of life. If you have hiccups which last for longer than 48 hours, please seek medical advice without further delay.

My Hypothesis
Mammals appear to be unique among vertebrates in that we can breath while we feed.  This is essential for infants suckling, and has the nutritional advantage that we can take time to chew our food. Reptiles and birds can do neither of these, and must swallow chunks of food whole, which means that their food takes longer to digest.  However, breathing while we feed does not come without added complexity.

Hiccups seem to be associated with the phasing of swallowing and breathing in mammals. Swallowing is a complex process which involves four different neurological mechanisms which must be correctly coordinated to enable a bolus to pass from the mouth to the oesophagus without entering the trachea. If we fail to close the trachea we risk aspirating part of the bolus into the trachea which we know as "going down the wrong way" and produces a powerful cough reflex to clear the airway. In extreme cases, a piece of food can block the trachea which causes choking.

Normally we unconsciously time our swallow to occur at the moment when we have fully inhaled, and momentarily hold our breath while the epiglottis closes our airway and the bolus passes cleanly into the oesophagus. This allows us to remain fully oxygenated during swallowing, and prevents us from aspirating which may happen if we inhaled as we swallowed. It also ensures we have a lungful of air in case we get it wrong and need a good strong cough.

My hypothesis is that failing to synchronise swallowing with inhaled breath-holding risks causing spasms, which present as hiccups, and that re-synchronising swallowing with inhaled breath-holding can cure hiccups.

Supporting Evidence
Many causes of hiccups are given in the usual references. A great many of them are associated with mis-phasing our swallowing and breathing. Let's examine some of the commonly cited causes of hiccups. All of these involve a disruption in the ordered synchronisation to our swallowing and breathing. It is important to remember that we swallow not only when we eat or drink, but regularly swallow saliva unconsciously.

Commonly Cited Cause My Explanation
Eating or drinking quickly If we eat too quickly we swallow too soon rather than at peak inhalation.
Alcohol Alcohol produces a general loss of coordination which is required to synchronise swallowing with breathing.
Sudden excitement or shock Excitement or shock can cause an involuntary inhalation which can interrupt our synchronisation.
A sudden change in temperature This can cause a shock induced inhalation.
Spicy food Surprising food taste or temperature can also cause a shock induced inhalation.
Carbonated (fizzy) drinks Fizzy drinks commonly cause regurgitated air (burping) which interrupts both swallowing and breathing functions.
Swallowing air Swallowing air also causes regurgitation (burping).
Smoking Smokers often exhale while drawing smoke into their mouth. Tobacco smoke promotes salivation and if the smoker swallows immediately prior to inhaling the smoke then the swallow will occur during full exhalation. This is exactly opposite to our normal synchronisation.
The other major piece of supporting evidence is the success of the cure as described below which aims to resynchronise swallowing and breathing functions.

None of the above qualifies as scientific evidence. The first is is hypothetical narrative; the second is anecdote. I would be most interested in supporting any proposed scientific evaluation of my cure.

Billy's Hiccup Cure
Billy's cure simply involves relaxing and resynchronising breathing and swallowing. It's a simple step-by-step process which I've found to work with many people, particularly children.
  1. Sit somewhere quiet and calm.
  2. Breath in SLOWLY until your chest is full.
  3. Breath out SLOWLY until your chest is empty.
  4. Breath in SLOWLY until your chest is full and hold your breath.
  5. Swallow three times.
  6. Breath out SLOWLY until your chest is empty.
  7. Gently breath again normally.
  8. If you still hiccup, repeat the process once more.

Does this work for you? If so then pass it on. If it doesn't, then do please let me know by commenting, telling me what happened and what worked in the end.

Thursday 28 August 2014

The face of a Murderer

Actor Brendan O'Carrol is most famous for playing his alter ego, Mrs Brown.  But his most recent screen time has been on an episode of the BBC's family history programme, Who Do You Think You Are?

Brendan, who hails from Dublin, always knew that his grandfather had been murdered in 1920, and that his family always believed that he had been killed by the British military.  I'm not going to spoil the show and give details, and those details are not necessary to the point of my post.  So I'll leave it to Brendan and the BBC to tell his story in full. It's well worth seeing if you can catch it.

I have no connections to Ireland, no known Irish blood, no allegiance to Catholicism or Protestantism. But I grew up in England in the 1970s, knowing that Irish nationalists were planting bombs in my country to kill me and my fellows.  The risk to me, living in rural England, was remote, but it forged an allegiance to the British side of the conflict, if for no other reason than pure self-interest.

In my adult years, as a student of human nature, I am cautious of simplistic fallacies such as "our side is always honourable", and was fully accepting when the truth about the 1972 Bloody Sunday massacre finally came out, and David Cameron apologised on behalf of the nation.  But still, no prosecutions have been successfully brought.  And no closure process has been entered into, like the Truth and Reconciliation process which followed the end of Apartheid in South Africa.

Brendan achieved far more than he hoped for in tracing his grandfather's murderers: not only did he establish a motive and method, but he even identified the man who pulled the trigger - his cold face stares from the photo above. The motive was not noble, indeed it was not worth a man's life. And it is revealed that the killer lived a full life following his many crimes, and died having never faced justice.  This is not the closure I would want in Brendan's position. He has no formal justice; no apology from a representative of our nation, which sent a cold, ruthless murderer to kill of our behalf. As much as I'd like just to put my arm around Brendan and express my sorrow and regret for the loss of a grandfather in his life who was taken on behalf of my forebears, I can't do that. But in bringing this story to light, in telling us all what happened in those dark days of 1920 in Dublin, when so much violence and hatred was rife, he brings dignity and a different kind of justice to his family - the justice of truth being told, that we may know what has been done on our behalf, and hold to account our leaders for their actions now and in future.

Tuesday 22 July 2014

On the Nature of Mathematics

Hands up, I'm way outside my sphere of expertise here: I'm no mathematician, physicist or epistemologist. I know enough to be dangerous, but not enough to make any ground-breaking contributions. So why read any further? Well, I have something to say on this which has been worming around in my mind for years, sometimes peeping into my consciousness for a fleeting moment, before vanishing back to obscurity. But it's now well enough formed to describe as a starting point, if not with any degree of eloquence. And even if I haven't made any breakthrough, let me perhaps lay a cobble along a road which may be interesting to walk. Please be patient...

I have long thought about the nature of mathematics in relation to physics. The two disciplines are closely linked, particularly at the limits of today's advanced cosmology and particle physics. Many physicists and mathematicians have marvelled at the predictive power of mathematics, at the way that theories can be synthesized mathematically into structures which suggest discoveries to be made experimentally, if only to realise some perceived 'beauty' by completing an elegant mathematical structure. When lo and behold the discovery is made, theorists marvel at mathematics and its pre-eminence among the intellectual disciplines.

Some go further still: Roger Penrose holds mathematics to be the reality of nature, and if that wasn't enough, that mathematical concepts have a metaphysical existence in the universe independent of mathematicians, as if Pythagoras's Theorem was floating in the ether for the Greeks to discover and document.

I have long held mathematics to be a human construct which represents the world around us, and not some disembodied mystical entity. I have found every other metaphysical construct to evaporate under the harsh light of critical examination, and I have no patience to entertain disembodied equations emerging from the Big Bang! But I see a problem: my view of mathematics as a construct just doesn't fit with the predictive power mathematics has proved to wield. The discovery of the Higgs boson was a triumph of the predictive power of mathematics, and one which has not sufficiently been heralded in my view. So there must be something more to mathematics than just a toolbag of strategies for solving practical problems.

There is something transcendent about mathematics. If you know what a materialistic skeptic I am, you'll appreciate the enormity of that statement. Solving equations, as I do from time to time as an engineer, feels like refining truth - cancelling terms feels like spooning off the dross from the ever more pure and precious metal sought. The formal proofs of theorems are eternal - once proven they are never broken, and reveal their truth for eternity. There is some kind of magic in mathematics, but I just can't follow Penrose down his metaphysical road. That way lies madness!

I also have bags of humbug for the ancient Greek philosophers. Hemlock wasn't Socrates's only herbal vice: just what was he on when he came up with the Allegory of the Cave? So I'm more than slightly embarrassed that my resolution to the problem of mathematics has certain similarities to his shadows on a cave wall.

While listening to back issue podcasts of The Infinite Monkey Cage a few days ago, with Brian Cox perhaps stating as final that mathematics is truth, while Robin Ince teases him on multiple levels simultaneously, which you only realise are much more clever than at first appears some time later, a thought popped into my consciousness, and decided to hang around.

The thought was: "there is a structure of underlying truth to the universe which we hairless apes are not adapted to comprehend, but parts of which are projected onto our limited consciousness, and the shadows formed are what we call mathematics".

Sitting there, like a mischevous imp at the corner of my mind, that thought cast off other thoughts. I thought of the schematic map of the London Underground. When laid out geographically, the tube network is fiendishly complex. But the schematic representation just shows what we need to know to plan a route from A to B, and where to change lines. It's a functional representation of London, but it's not actually London. So if the underlying truth is like London, but we only have parts of a schematic tube map, there are limited things we can know about London, (er, I mean truth). We know schematically that the Jubilee line crosses the Circle line twice, and if we know that in real London it crosses at one point, (we have solid experimental evidence for one physical law), then we can infer from the rules of topology that it must cross somewhere else (and make a prediction to test experimentally), even if we've never been to Baker St.

There are truths which are so obvious to us that they seem pointless to express: like the number 2 is half of 4, and sits neatly between 1 and 3.  Perhaps if we were not adapted to life as apes, but as supreme logicians, Pythagoras's Theorem would be similarly trivial, and unworthy of a name. So perhaps there is no need for a disembodied metaphysical law of right triangles in the universe, right triangles just are the way they are. And it's not obvious to us because we don't have the right kind of minds to appreciate it, and have to construct formal proofs instead. These proofs seem so magical and powerful to us, that some of us think they have a special existence, but that's just an illusion born of our limited perception. And perhaps the behaviour of waves and particles, and spacetime, and the unity of forces, are all logically deducible, if only we could perceive the logic so clearly.

So we build pieces of a reality map through our reasoning and by our observations, and call these pieces laws and theorems. But these laws and theorems are our constructs, our inventions to account for the way the universe is, to steer our ape minds to conform for a moment to the truth of reality, while the universe just goes on being what it is without any need for such trivia.

On this view then, mathematics really is the projection of reality onto human consciousness. And as the contours of our consciousness change, so do the mathematical strategies we use. When I learned basic number theory as a child, I used abacuses to count-on and perform basic addition. My children were taught the number line, which is a different concept. So their mathematics will be different to mine, not because truth is different for us, but because their consciousness of number is different from mine.

What can this idea tell us we didn't know before? Well it does suggest that there may be limitations to what we can discover. In terms of the analogy, there may be areas of our consciousness which our cerebral topography keeps in mathematical shadow, corresponding to universal truths we can never comprehend. But who knows, if we can find where these conceptual gaps lie, perhaps mankind's perseverance at solving problems will find routes around these gaps, allowing us to solve theoretical and practical problems regardless. Quantum theory could be one of those gaps - we just do not have minds equipped to understand the world on such small scales, but we have mathematical strategies which allow us to skirt the edge of our blind spot and solve quantum mechanical problems anyway.  We've done rather well for ourselves, don't you think?

Thursday 10 July 2014

Fiat justitia ruat caelum

Dame Elizabeth Butler-Sloss is under fire for having taken the chair to inquire into allegations of historic establishment cover up of child abuse, when her brother stands accused of being party to such cover up. There is indeed a prima facie conflict of interest here, and I've been thinking this one over all day, (off and on, among other things). Now I think I have reached a personal conclusion.

What needs inquiring into, (among other important things, but this one’s pretty central), is this: we had people in positions of authority and responsibility who are alleged to have been conflicted when they became aware of allegations of wrongdoing, but failed to pursue those allegations because that may have disadvantaged them in some way. Perhaps politically, perhaps in their career aspirations, perhaps because it threatened to bring into disrepute a social group to which they belonged. We've accepted these people into positions of authority and responsibility with the unspoken bargain that they should in return exercise such powers responsibly, for the benefit of wider society and not for personal protection or advancement.  And we've been let down: by cash for questions; by the MPs expenses scandal; by the failure to hold Jimmy Savile to account; by disgraceful cover ups over Hillsborough; by the phone hacking scandal.

It seems to me that there will be no one in the establishment with the authority to inquire into this matter, who is not tainted in some way by association.  And despite the appearance of conflicted interests, that is not what we need. What is needed is someone who has the integrity to rigorously inquire into these allegations despite it being potentially damaging to the good name of a close family member, and not someone whose potential embarrassment remains concealed.

All commentators who seem well enough informed to judge her describe Dame EBS as possessing impeccable integrity and unparalleled qualifications to chair this inquiry.  And continuing to chair the inquiry would give her the opportunity to set an example to those pillars of the establishment and inquire into this matter as rigorously as they all perhaps should have done all those years ago, and damn the consequences.

I think she should proceed, and show them what integrity looks like, because it's a lesson many in the establishment need to learn.

Profile: Dame Elizabeth Butler-Sloss
Fiat justitia ruat caelum

Tuesday 1 July 2014

LogMeIn - Can that let anyone in?

Until recently, I used a service called LogMeIn, which allows me to access other computers I've set up with specific accounts.  I used it primarily to enable me to provide technical support to family members.  It's an incredibly useful service, and until recently a limited service was available completely free of charge. Recently the free option was withdrawn so I stopped using it.

I used it twice for business purposes, one time setting up a specific email address so that a client could access a remote computer I had set up to configure a specific piece of equipment installed on another continent.

Then I began to receive spam email which had been sent to the login email address I used for business that one time.  I knew that the email address had not been published.  I knew that only I had access to the server receiving emails to the address used.  I knew that I had not used it for any other purpose, and that there was no benefit to it being used by anyone else, since only I could receive emails sent to it.  The email address used for spam HAD to have been released by LogMeIn.  So I emailed LogMeIn and explained, but I just received a generic denial, and left it at that.

Today I received an invoice for $826, purporting to be from LogMeIn, sent not to the exclusive login account previously sent spam, but to my business email address.  The attached invoice contained no data, so I was fairly sure it was a phishing attempt to defraud me.  Sure enough, one look at the LogMeIn Facebook page reveals other victims complaining of the same scam.  I forwarded the information to LogMeIn, along with my rationale for believing that it was attempted fraud.

Now I think about it, my alarm bells are ringing loudly.  LogMeIn has allowed my private data to fall into the hands of criminals, witness the exclusive login email address now used for spam.  That's irritating.  Now their customers are being targeted with attempted fraud.  That's alarming.  But how bad could this be?

I used LogMeIn to gain authorised access to computers, with the knowledge and trust of the owners of those computers.  But the means to do that, in the form of login credentials to the computers involved, is entrusted to LogMeIn.  And I now know that information entrusted to LogMeIn has fallen into the hands of criminals.  So how safe are the computers I have used with LogMeIn?  If someone with malicious or fraudulent intent can gain unauthorised access to those computers, they may have access to all sorts of information which could be harmful, such as login details to banking services, financial accounts, employee personnel records, medical details, intellectual property, state secrets,... the list is endless.

I have removed LogMeIn from all my computers, and family computers.  But this remains a concern.  If LogMeIn cannot secure client data, and they hold the keys to millions of computers worldwide, is it wise to entrust LogMeIn with those keys?  Think about it... it gets frightening if you do!

LogMeIn also provides services marketed as RemotelyAnywhere,, Xively, Cubby and BoldChat.

Thursday 8 May 2014

Halal or Not Halal? That is the Question.

Today's news is full of stories that Halal meat is being sold in the UK without being labelled as such. Now let's get this clear: according to the BBC, 90% of UK Halal meat is from animals which have been pre-stunned, so they conform to legal requirements without the religious exemption. So what's the issue?
During the Foot & Mouth crisis, having seen videos of a man running around a field with a bolt gun after a sheep, I decided to look into legal slaughter practices, (he should have been imprisoned in my opinion), and in doing so I also looked into Halal practices.
The biggest issue for me, way bigger than whether someone speaks magic spells over my food, is that correctly carried out, to the spirit and letter of the law, legal slaughter in the UK is as humane as it's reasonably practical to be. And in my view it's far preferable to death from predation or disease in the wild.
The problem I have is that human nature does not pre-dispose us to treat other humans, let alone other animals, with the dignity, respect and humanity required when there is so much potential for suffering. So we need far greater safeguards against the darker side of our nature in the slaughtering process. I have some in mind, which include routine oversight by independent observers, but the cost would be unacceptable to many people who just want a cheap meal to feed their families.
There are three main requirements for the practice of Halal slaughter: ritual cleanliness; hygienic cleanliness; and minimising the suffering of the animal being slaughtered. Whatever you think of Islam today, these requirements clearly underlie Halal practices and they are entirely consistent with the best ethical practice in humane animal slaughter.
Considering the time when these requirements were established, there was not the knowledge of disease causes we have today, and the distinction between ritual and hygienic cleanliness was entirely blurred. Speaking magic spells over the animal was just as important as ensuring that the animal did not have a communicable disease. The strict requirements of the blade, and the manner in which it is used, are clearly intended to minimise pain and bring about unconsciousness as quickly as possible, both requirements for humane slaughter.
The prohibition on pre-stunning prevents botched attempts which could cause unimaginably greater suffering than a clean Halal kill. And given the state of knowledge over a thousand years ago, when these requirements were founded, I cannot in all conscience condemn it. And having read the scientific literature examining both sides, I find it hard even to insist on pre-stunning, but on balance I do support it.
So, the Halal requirements for cleanliness and the humane treatment of animals are precisely the same as those which underlie our legal requirements today. If Halal practices could be refined in the light of new scientific evidence, then I have no doubt that they would allow carefully prescribed pre-stunning, and place less emphasis on magic spells. Halal practices were introduced for precisely the same reasons we want humane slaughter today, and dogmatically holding to the letter of scripture, while denying improvements in the light of new knowledge, which support its spirit and clear purpose, can be neither just nor holy.
According to the BBC, 90% of UK Halal meat is from animals which have been pre-stunned, so they conform to legal requirements. There is no legal prohibition on magic spells, since we all know they do nothing so cannot possibly do us harm. Therefore, I would be perfectly content to buy and eat Halal meat from animals treated according to secular law, including careful pre-stunning, with or without the magic spells and added Halal requirements, and whether labelled as such or not.
The final issue troubles me as a secular Humanist: compare two circumstances.
1) The legal, ritual slaughter of animals by a devoutly religious person, who believes he is being watched over by an invisible master who requires the animal to be treated with respect.
2) The slaughter by the hand of the kind of person I can imagine applying for and doing the job of slaughterman in a secular abattoir, without independent oversight.
In the light of this comparison, and knowledge of the requirements for Halal slaughter and secular slaughter, I do have a hard time condemning Halal practice.
This is an emotive subject, but I do have one request. Before condemning my heresy, please do read up on the details and argue from a position of knowledge of the subject. Then please feel free to weigh in.

Saturday 3 May 2014

Billysugger Simples: How to measure temperature with a Thermistor


Often we have a requirement to measure the temperature of the board, the environment or some process.  Here’s a quick and easy guide to simple temperature measurement using a simple, cheap thermistor.

There are numerous silicon devices on the market which seem to simplify temperature measurement, but it’s difficult to beat a good quality NTC thermistor.  I’ve used them to measure the temperature of things as diverse as engine manifolds to LEDs, and in medical applications have measured patient internal temperatures to accuracies far better than 0.1°C.

Selecting the Thermistor

There are two types of thermistor, defined by whether their resistance increases or decreases as temperature rises.  Temperature is best measured using NTC (negative temperature coefficient) thermistors, whose resistance decreases as temperature rises.

There are two parameters of importance in defining the characteristic: A reference resistance and the Beta value.  The reference resistance is usually specified as the resistance at a temperature of 25°C.  The most common types have a 10k resistance at 25°C.  The Beta value specifies how the resistance varies as temperature deviates from the reference temperature.  The most common types have values in the region of 4000 and have units of Kelvin.

For this example, we will use a Vishay NTCLE100E3103JB0, (Farnell/Newark part 1187031, Digikey part BC2301-ND).  This is a cheap and simple leaded part with a 2.54mm (0.1”) lead spacing, has a 10k resistance at 25°C and a Beta value B=3977K.

There are many, many types of NTC thermistor, some with different case styles including surface mount parts, different reference resistances for nominal temperature ranges other than room temperature, and different tolerances for accuracy.  This one is good for general purpose air temperature measurement.

The Measurement Circuit

The thermistor is connected to the ADC 0V and in series with a reference resistor, forming a potential divider from the ADC reference.  A filter capacitor across the thermistor will reduce any thermal noise, or other pickup.

Now, we can easily calculate the ADC value at 25°C.  And we’ll see that as the temperature increases, the thermistor resistance decreases and the voltage measured at the ADC falls.

Calculating Temperature

We could approximate the thermistor response as a linear function, but beyond a very small range around 25°C, the errors would quickly become unacceptable.  A better approximation is made by using the Beta-curve function:

R = exp[(Beta/Tk) + LN(A)]

Where Tk is the thermistor temperature in Kelvin, not degrees centigrade, and LN(A) is a constant value for the thermistor. (Kelvin is an absolute temperature scale, where Tk = Tc + 273.15).

Solving the above equation for temperature gives

Tk = Beta/(LN(R)-LN(A))


Tc = Beta/(LN(R)-LN(A)) – 273.15


LN(A) = LN(R25)-(Beta/298.15)

But now we need to know the thermistor resistance R.  The ADC value depends of the resistance R as follows:

ADC = ADC_TOP * R / (R + Rref)

Where ADC_TOP is the highest value given by the ADC, (e.g. 4095 for a 12-bit ADC), and Rref is the reference resistor value.

Solving for R gives

R = Rref * ADC / ((ADC_ TOP * Kadc) – ADC)

Implementing in C-code

The following is representative of code which calculates temperature measured using the above method.  The detailed code will need to be adapted depending on your processor, your board and your thermistor.
// Include math library for calculations
#include <math.h> 

// Define ADC parameters
#define ADC_TOP 1023 

// Define thermistor parameters
#define R_NTC 10000
#define BETA 3977
#define LNA (-4.12858298874828)

// Define Reference Resistor
#define R_REF 15000 

float read_temperature(void)
  float x = 0; 

  // Calculate thermistor resistance from ADC
  x = (R_REF * adc[0]) / (ADC_TOP – adc[0]; 

  // Calculate Kelvin temperature from resistance
  x = BETA / (log(x) - LNA); 

  // Convert temperature to Celsius
  x = x – 273.15; 

  // Return result
 And if you want to play around with different thermistor parameters, I’ve prepared an Excel file with all the calculations included.