Wednesday, 14 October 2015

Interstellar Radio Propagation


Proxima Centauri: The Closest Star.
Credit & Copyright:  David Malin, UK Schmidt Telescope, DSS, AAO

It's a staple of Science Fiction, and an unquestioned fact of our modern age, that aliens could be listening to our radio and watching our TV broadcasts, as our signals race across the galaxy at the speed of light.  They could be studying our weaknesses, preparing their attack!  But really, is that possible?
 
I have long been fascinated by the possibility of finding life beyond our solar system, or of aliens finding us.  But rather than wishful thinking, scaremongering or falling for alien abduction tales, I'm far more interested in the realistic prospects of such a discovery.  So when Prof. Brian Cox threw down the gauntlet for listeners to BBC Radio 4's The Infinite Monkey Cage to carry out a fundamental but accessible calculation to illustrate the real likelihood of one form of contact, I was fascinated.
 
Episode 5 of Series 12 was broadcast on 3 August 2015, and I heard it several weeks later via the show's podcast feed.  The previous week's episode focussed on extra-terrestrial life and alien contact, but Episode 5 concentrated on speed, including land speed record attempts as well as the fundamental barrier in physics that is the speed of light.
 
If you want to download and listen to the episode yourself, at 38m 38s, presenter Robin Ince asks about radio signals leaking into space and Professor Danielle George, of University of Manchester, describes broadcast transmissions degrading in power with the inverse square law. Then Robin asks Brian Cox to calculate how far away through space their own radio broadcast would be detectable. Prof. Cox ad lib ponders the problem and then defines the listeners' challenge, which I summarise here:
"Suppose a 200kW transmitter broadcasts for 1 second at 198kHz, find the distance at which there remains one photon per square metre."

Now, we can argue the merits of this threshold, whether one photon per second per square metre is easy or unduly difficult for advanced aliens to detect, (and I shall return to this question).  But for now, let's solve the problem.

First, we need to know how many photons of radio energy are transmitted in one second.  Then we need to find the distance at which all these photons are spread out to one per square metre.
 
So let's do it...  First, let's define some parameters and constants:

Transmitted power,       P = 200kW
Frequency,                    f = 198kHz
Planck's constant,         h = 6.6x10-34Js
 
As Prof. Cox helpfully reminded us, the energy of a photon is given by its frequency multiplied by Planck's constant, so
 
Photon energy,             E = hf
 
So each photon at 198kHz carries 198x103 x 6.6x10-34 = 1.3x10-28J of energy.
 
And since a power of 200kW delivers precisely 200kJ of energy per second, in one second the transmitter delivers 200kJ of energy.
 
So we divide the energy transmitted by the energy per photon to find the number of photons transmitted.
 
Number of photons, N = 200x103 / 1.3x10-28 = 1.25x1033 photons.
 
That's an awful lot of photons!  So now we need to spread these photons out over a sphere to the point where there's one square metre of area on the sphere for each photon.
 
The area of a sphere, A = 4πr2 m2, where r is the radius of the sphere.
 
So, a sphere with an area of 1.25x1033 is given by the equation 1.25x1033 = 4πr2.
 
Rearranging this to find r gives, r = √( 1.25x1033 / 4π ) = 1.0x1016 metres.
 
That's an unfeasibly large distance by human standards, but on the astronomical distance scale, it's almost exactly one light year!
 
So once the Radio 4 long wave signal broadcasting The Infinite Monkey Cage gets to a light year from Earth, it will comprise only one photon per square metre, per second.  And by Brian Cox's criterion, it will have degraded to the point of undetectability.
 
Now bear in mind that the nearest extra-solar star, pictured above, is Proxima Centauri which is 4.2 light years away.  And if that was conducive to intelligent life, which it is not, our signal would not make it a quarter of the way there.  So by this criterion, which is not unreasonable at all, we are to all intents and purposes radio silent to any alien life out there, as far as commercial broadcast transmissions are concerned.
 
=====
 
So now, how reasonable is this as a limit?  Can we find an argument which breaks this?
 
One photon per square metre per second seems like an arbitrary limit, why can't advanced aliens detect those? Well, as advanced as aliens might be, there has to be a signal to receive.  The bandwidth of an audio signal is a few kHz, which means that you'd need at least 5,000 samples per second to reconstruct the transmitted signal.  And that's not a technological limit, which advanced civilizations could surpass, it's a fundamental information limit.  Worse still, one photon carries no amplitude information, so unless the reconstruction is to be distorted beyond use, they would need to detect many photons per sample.  A good signal would use several hundred amplitude levels, but you could get away with perhaps 20 or so.  So now, to reconstruct a useful signal, you'd need 100,000 photons per second.  At just one light year, that would require a receiving antenna with an area of 100,000m2, or a perfect dish with a diameter of 350 metres (1,200 feet).
 
But aliens have limitless capabilities, because... well, aliens! So they could build a 350 metre dish.  Well, perhaps.  But now consider that signal power drops with the square of distance, and dish area increases with the square of diameter.  So double the distance, double the dish diameter.  There are plenty of stars nearby, but to find one which can possibly be inhabited by life which could evolve to sufficient intelligence, we need to look tens of light years away. Say fifty light years.  So now they need a dish fifty times bigger, that's 18km (11 miles) across.  And to search their neighbourhood to a fifty light year radius, they'd need to steer that, and keep it adequately parabolic too.  Consider too that fifty light years is on the extreme edge of optimism for reasonable numbers to plug into the Drake Equation, and the probability of another technologically advanced lifeform existing within 50 light years from us is not zero, but it must be very, very low.
 
So what about higher powered transmitters?  The 200kW BBC Radio 4 long wave transmitter is fairly typical for its waveband.  The Europe 1 transmitter in Germany is about the most powerful long wave transmitter on the planet, pushing out 2000kW at 183kHz.  That'll increase range by about three times, to 3 light years.  In terms of astronomy, that half an order of magnitude  and makes little difference to the feasibility of being heard.  It increases Brian Cox's limit from a light year to three, still well short of Proxima Centauri.
 
How about other wavebands?  Our atmosphere only allows through certain wavebands.  Long wave will get through, short wave will not.  Above that, VHF radio and UHF TV transmissions can get through, but as frequency increases, so does the energy in each photon.  So at higher frequencies, the number of photons for the same power is proportionately less, and so the range to receive sufficient photons to reconstruct the transmitted signal reduces too.  The upshot is, signals at frequencies above long wave will be undetectable closer rather than farther out.
 
You've only considered omni-directional signals, how about directed beams?  Well, yeah.  If you're talking SETI listening to the equivalent of Arecibo, then that's a different question entirely.  What I'm talking about is our routine commercial broadcast transmissions.  Many of those are vaguely directed, particularly the higher frequency transmissions.  And those already suffer from worse propagation issues than long wave.  But it's true that a directed transmission is more powerful than an omni-directional one, (one which transmits equal power in all directions).  And although the power density increases in the transmitted direction, the area of sky covered reduces, reducing the likelihood of any receiver within range detecting the signal.  So directed broadcast transmissions don't help us.
 
=====
 
Finally, let me be clear: I'm not saying that it's impossible for our transmissions to be detected by alien civilisations, if they exist.  But what I am saying is that the above is a reasoned argument supported by calculation that it's very, very improbable that there could be any within receiving range.  It's just not as easy as E.T. sitting on a planet orbiting, say, Tau Ceti with his transistor radio, listening to Hancock's Half Hour or I Love Lucy.  If we're going to make contact with technological civilisations, we'll need a highly funded, planned and directed effort.  Trusting on radio broadcasts leaking into space isn't going to cut it.

Monday, 23 February 2015

The etymology of Donut

When my young daughter said or did something worthy of the name, I would call her a silly sausage, as an innocuous, playful tease.  So when my son became old enough, (he was born in 2000), I used the same phrase.  But he objected to it, not wanting to be called a sausage.  Not wanting to upset him, I tried to think of another fun, food related play-name.  We all like donuts, so I picked that and he seemed to prefer it.  If he spilled his drink, or teased his sister, or made a joke, I'd call him a donut.

He and I even came up with a silly song together:

You're a donut, you're a donut,
you'd be doing quite well if you had a brain cell,
you're a donut, you're a donut...

I'd never heard the term used in that context before, but it was picked up by other family members.  We travelled the UK, from the south coast of England to Scotland, through cities and theme parks, and never thought once of the influence we may be having on our language as we may have been overheard.

A few years ago I heard Al Murray use the expression on TV, and wondered where he heard it.  Then last week, I heard it on Eastenders too.  I mentioned it to my son, who looked up the origin.  He found a couple of sources, not before the early 2000s, one in Scotland and one in southern England.

So I'm wondering, did I coin the term donut, as a playful name for a silly person?

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.


Hiccups
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, join.me, 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

Introduction

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))

Or

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

Where

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
  return(x);
}
 And if you want to play around with different thermistor parameters, I’ve prepared an Excel file with all the calculations included.

Friday, 13 September 2013

Why I oppose gambling - A humanist perspective

I don't like gambling.  Many people don't like gambling, some for religious reasons.  But I'm a humanist, so I have no religious reasons.  So why do I oppose it?

We all live under the illusion that what we see is real, and what we think is true.  These illusions are so compelling that many people refuse to believe that our awareness is an illusion, but neuroscience and the study of the paranormal prove that the images in our minds are not accurate pictures of the real world.

Some of the differences between human perception and reality are classified under the title 'cognitive biases'.  These include the perception that 'I' am more important to the world around me than is justified.  Another key human bias is that we have a tendency to overestimate the chance of good things happening to us, and underestimate the chance of bad things happening, even in the face of compelling evidence to the contrary.

Because we are alive, we are descended from ancestors who won through tough times and out-competed their peers in the struggle for survival and reproduction.  And we inherited the traits which helped make that difference, for example the tendency to persevere in the face of adversity, and not the abilities accurately to assess probabilities of success versus failure.  Indeed, we are spectacularly maladapted for mathematics, which is why so many of us find it hard.  We have to defeat our in-built biases and become disciplined in following rules of logic which are as unnatural as they are successful.

Just how bad we are at intuitive math, particularly when it comes to assessing risk and probability, is shown by the following BBC video.  When I first saw this kind of demonstration I was utterly convinced that the probability of winning remained 50:50, (you'll see what I mean when you watch it).  Even Professor of Mathematics Marcus du Sautoy was convinced.  He worked it out mathematically, I modelled the game in Excel, (independently of course, I don't move in such noble circles), and the correct answer really is 1 in 3 if you keep to your original guess.

BBC News Magazine - Monty Hall problem: The probability puzzle that makes your head melt

So what has this to do with gambling?  Well we're programmed to assess risk and probability incorrectly.  We inherently overestimate our chance of winning compared to losing.  If Alan had been tempted to bet on the game, Marcus could've cleaned him out.  Alan is inherently no worse at this than you, me or anyone else.  And when we use intuition and common sense about gambling, we make decisiona as rational as a child playing on a railway track.

The only gambling I entertain is the English Grand National, (an annual horse race over jumps, on which many people make a token bet).  But I take the role of family bookmaker and stakes each person can afford to lose.  I've come away on top every year except one.  Even when my wife got third place this year, I paid out less in winnings than I made in stakes on her other bets.  And that's how gambling works - it's always rigged against the punter, it's just that we're all programmed to ignore that fact.

This makes gambling as much a vice as addiction to narcotics.  And the bookmaker is the pusher.  Both vices involve bypassing reasoned choice.  Both involve someone making money by exploiting other people whose decision making is compromised.  Both ruin lives.  And in my opinion, both should be outlawed.

Sunday, 14 July 2013

Winchester Science Festival 2013

While planning my visit to the Winchester Science Festival next weekend, I was looking for a programme laid out as a timetable, so my family and I could mark sessions of interest then plan what we were going to see when.  I couldn't find one, so I decided to compile one.  My OCD compelled me to make a reasonable job of it, so I now have a printable PDF which can be printed on one double-sided page per day, (one side per morning or afternoon).

If you're thinking of going, feel free to download it here: WinSciFest2013.pdf

Otherwise, for a quick summary, see the table below (without photos and session descriptions).

SATURDAY MORNING
Performance Hall
SATURDAY MORNING
Learning Room
Sat 10:00
DR HELEN CZERSKI
A WORLD OF SCIENCE TOYS

Sat 10:00
DR JEN GUPTA
STARGAZING TBC

Sat 11:00
DR ADAM RUTHERFORD
CREATION: THE ORIGIN AND
THE FUTURE OF LIFE

Sat 11:00
DR SIMON WATT
SPERM WARFARE

Sat 12:00
PROF DEBRA SKENE
HOW YOUR BODY TELLS THE TIME

Sat 12:00
PROF BOB NICHOL
SETI: THE SEARCH FOR
EXTRATERRESTRIAL LIFE

SATURDAY AFTERNOON
Performance Hall
SATURDAY AFTERNOON
Learning Room
Sat 14:00
PROF MARK MIODOWNIK
STUFF MATTERS

Sat 14:00
ALAN LAWRIE
SECRETS OF THE SATURN V

Sat 15:00
ROBERT LLEWELLYN
ELECTRIC CARS ARE RUBBISH,
AREN'T THEY?

Sat 15:00
BEN LITTLEFIELD
STRONGER, GREENER, FASTER

Sat 16:00
PROFESSOR BRUCE HOOD
THE SELF ILLUSION

Sat 16:00
DR ED WAUGH
DRILLING IN ANTARCTICA:
THE LAKE ELLSWORTH PROJECT

Sat 17:00
MAGGIE PHILBIN
TEENTECH

SUNDAY MORNING
Performance Hall
SUNDAY MORNING
Learning Room
Sun 10:00
DR TOM CRICK
COMPUTING: THE SCIENCE OF
NEARLY EVERYTHING

Sun 11:00
DR DEAN BURNETT
BRAINS, I AM IN YOU!

Sun 12:00
DR LISA MCNEILL
NO MARGIN FOR ERROR

SUNDAY AFTERNOON
Performance Hall
SUNDAY AFTERNOON
Learning Room
Sun 14:00
PROF COLM MULCAHY
MATHEMAGIC WITH
A DECK OF CARDS

Sun 14:00
MEGAN WHEWELL
HOW DO WE KNOW
WE LANDED ON THE MOON

Sun 15:00
PROF DOROTHY BISHOP
THE REF, IMPACT FACTORS,
AND OTHER DAMAGING TRENDS: THOUGHTS FROM
A GRUMPY OLD SCIENTIST

Sun 15:00
DR MATTHEW WRIGHT
HOW SCIENCE SHAPED MUSIC

Sun 16:00
DR SIMON WATT
WHY WE DIE...,

Sun 17:00
PROF JON BUTTERWORTH
ATLAS SHRUGGED;
OUR NEW BOSON

MONDAY MORNING
Performance Hall
MONDAY MORNING
Learning Room
Mon 10:00
DR KAREN MASTERS
A RAINBOW VIEW OF
THE ANDROMEDA GALAXY

Mon 10:00
NICOLE SLAVIN
FUN WITH BRAINS AND BEYOND
(FOR AGES 7+)

Mon 11:00
DR HEATHER WILLIAMS
PHYSICS GETS TO
THE HEART OF THE MATTER

Mon 11:00
DAVID GREEN
ECOISLAND; THE HARDWARE AND SOFTWARE FIX FOR PLANET EARTH

Mon 12:00
PROF DAME WENDY HALL
NO WOMAN, NO RASPBERRY PI

MONDAY AFTERNOON
Performance Hall
MONDAY AFTERNOON
Learning Room
Mon 14:00
PROF SOPHIE SCOTT
LAUGHTERLAB

Mon 14:00
PROF JAMES SMITH
FROM CHERNOBYL TO FUKUSHIMA: PREDICTING THE CONSEQUENCES OF NUCLEAR ACCIDENTS 

Mon 15:00
DR FRAN SCOTT
SCIENCE MISADVENTURES

Mon 15:00
DR SIMON WATT
DR DEATH AND THE MEDI-EVIL MEDICINE SHOW

Mon 16:00
GRRLSCIENTIST
ENDANGERED SPECIES

Mon 17:00
DR KAREN JAMES
DARWIN, THE BEAGLE PROJECT AND GALAPAGOS NOW