Apr 05 2015

Electoral Predictions

As something of a political anorak and a member of a political party, I thought I should make some political predictions for the 2015 General Election (polling on 7th May).

It’s difficult to call between Labour and the Tories as to who will have the most seats post election. The polls show a pretty much dead heat, and I don’t see either party making great gains or loses over the campaign. Labour have had a built in advantage which means that they get more seats for the same percentage of the vote as the Conservatives. It’s not clear if Labour’s “Scottish Problem” removes this advantage. My hunch is the Tories will do a little better than the polls are suggesting but both will have something around the 270 seat mark with Labour in the lead.

As a Liberal Democrat eternal optimism is something of of a pre-requisite. I joined the party when it had 22 seats and 22% of the national vote. I anticipate we’ll still get more than that after this election. I’m holding out for about 40 which is in excess of what pollsters predict. My reason for this optimism is that Liberal Democrat votes are local votes, and once in place Liberal Democrat MPs are difficult to dislodge, basically because they do a good job for their constituents (see here). 

The most interesting thing will be the SNP. I’m finding it a bit difficult to believe the predictions of an SNP landslide in Scotland, perhaps erroneously. My thinking is that they lost the independence referendum by some margin outside the central belt. It’s possible that the rise of the SNP vote represents a wider disaffection with Labour, not seeing them as representing Scottish interests in Westminster. I’m really struggling to believe they will exceed 50 seats but this is my biggest opportunity to be really wrong. Dropping the SNP seat count will benefit Labour.

UKIP will get nowhere, I actually have a bet with someone that they will have no further MPs beyond the two they currently have by defection. I anticipate they will poll relatively highly (i.e. above 10%), similarly the Greens who I don’t think will get a further seat. I suspect many will be jolly glad that UKIPs votes don’t convert into seats, perhaps fewer will be pleased when the same thing happens to the Greens for the same reason.

The likelihood is that no one party or even pair of parties (aside from Labour and Tory) will have sufficient seats to form a stable coalition. The key interesting thing is whether SNP or Liberal Democrats will have sufficient seats to make a coalition government, or at least a confidence-and-supply government with either Labour or Tory. It’s difficult to see the Liberal Democrats going for another round of coalition with the Tories with any enthusiasm, I see a fair chunk of the party being happy to try it with Labour. I’m not sure Labour will want coalition, they appear to have ruled it out absolutely with the SNP.

A Labour – SNP coalition would very definitely not be what we voted for, no English or Welsh voter could have voted for the SNP. The SNP is standing no candidates outside of Scotland. The party leader, Nicola Sturgeon, is not standing for a Westminster seat. The votes SNP MPs make in Westminster will often not effect their constituents, only those of English and Welsh constituents (see here). The SNP has shown little interest in matters south of the border other than to blame the English for all their woes, and to ensure that English students in Scottish universities pay English levels of fees whilst Scots, and indeed students from the rest of the EU, don’t. Not a happy guide as to how they might treat English interests in future. I can see a Labour-SNP coalition being quite damaging for Labour since I can imagine both Tories and Liberal Democrats will make a great deal of this lack of mandate.

Left thinking people, on the whole, appear happy with the electoral status quo. And so too do the Conservatives, the clue is in the name. But truly the Westminster system is broken, the Scots benefit from a fair degree of independence from Westminster with elections held using proportional systems at both local and national level. The rest of the UK could do with the same. 

Mar 20 2015

…when the sun is eclipsed by the moon

Friday 20th March 2015 saw a solar eclipse visible over the British Isles, subject to the vagaries of the British weather. I have some form in taking pictures of the sun through my telescope. With solar eclipses taking place in the UK only once every 10 or so years (the last one was in 1999), I thought it worth the effort to take some pictures.

The key piece of equipment was the Baader AstroSolar filter mount I made a while back. It’s designed to fit on my telescope but works pretty well for naked-eye viewing and with my Canon 600D camera. I used a Canon 70-300m lens, mainly at the maximum zoom with varying exposure parameters depending on cloud. I used autofocus in the main but manually set exposure time, aperture and ISO. Consumer cameras aren’t designed to give good auto exposure for usual activities such as eclipse observations.

Here’s a closeup of the filter:

solarfilter

The uninitiated may not be impressed by the finish on this piece of equipment but as a scientist of 20 years standing I’m happy to report that I’ve had plenty of stuff in my lab in similar style – it’s good enough to do the job.

Solar eclipses last a surprisingly long time, this one was a little over two hours with first contact of the moon on the suns disk at 8:26am in Chester. This photo was taken at 8:26am, you can just see the moon clipping the edge of the sun top right.

IMG_5217 

By 9:01am things were well under way. The birds had started their evening song around this time and it was starting to feel unusually dark for the time of day.

IMG_5227

The maximum of the eclipse was at 09:30am, by this time clouds had appeared and I used them as an ad hoc solar filter.

IMG_5261

By 09:50am we were well past the maximum:

IMG_5283

The last photo I managed was at 10:18 before the sun disappeared behind the clouds:

IMG_5292

Finally, this is a collage of the majority of pictures I took – some of them are pretty rough:

010 - Eclipse - 20mar151

Mar 05 2015

Book review: Engineering Empires by Ben Marsden and Crosbie Smith

engineering-empiresCommonly I read biographies of dead white men in the field of science and technology. My next book is related but a bit different: Engineering Empires: A Cultural History of Technology in Nineteenth-Century Britain by Ben Marsden and Crosbie Smith. This is a more academic tome but rather than focussing on a particular dead white man they are collected together in a broader story. A large part of the book is about steam engines with chapters on static steam engines, steamships and railways but alongside this are chapters on telegraphy and mapping and measurement.

The book starts with a chapter on mapping and measurement,  there’s a lot of emphasis here on measuring the earth’s magnetic field. In the eighteen and nineteenth centuries there was some hope that maps of magnetic field variation might provide help in determining the longitude. The subject makes a reprise later on in the discussion on steamships. The problem isn’t so much the steam but that steamships were typically iron-hulled which throws compass measurements awry unless careful precautions are taken. This was important as steamships were promoted for their claimed superior safety over sailing vessels, but risked running aground on the reef of dodgy compass behaviour in inshore waters. The social context for this chapter is the rise of learned societies to promote such work, the British Association for the Advancement of Science is central here, and is a theme through the book. In earlier centuries the Royal Society was more important.

The next three chapters cover steam power, first in the factory and the mine then in boats and trains. Although James Watt plays a role in the development of steam power, the discussion here is broader covering Ericsson’s caloric engine amongst many other things. Two themes of steam are the professionalisation of the steam engineer, and efficiency. “Professionalisation” in the sense that when businessmen made investments in these relatively capital intensive devices they needed confidence in what they were buying into. A chap that appeared to have just knocked something up in his shed didn’t cut it. Students of physics will be painfully aware of thermodynamics and the theoretical efficiency of engines. The 19th century was when this field started, and it was of intense economic importance. For a static engine efficiency is important because it reduces running costs. For steamships efficiency is crucial, less coal for the same power means you don’t run out of steam mid-ocean!

Switching the emphasis of the book from people to broader themes casts the “heroes” in a new light. It becomes more obvious that Isambard Kingdom Brunel is a bit of an outlier, pushing technology to the limits and sometimes falling off the edge. The Great Eastern was a commercial disaster only gaining a small redemption when it came to lying transatlantic telegraph cables. Success in this area came with the builders of more modest steamships dedicated to particular tasks such as the transatlantic mail and trips to China.

The book finishes with a chapter on telegraphy, my previous exposure to this was via Lord Kelvin who had been involved in the first transatlantic electric telegraphs. The precursor to electric telegraphy was optical telegraphy which had started to be used in France towards the end of the 18th century. Transmission speeds for optical telegraphy were surprisingly high: Paris to Toulon (on the Mediterranean coast), a distance of more than 800km, in 20 minutes. In Britain the telegraph took off when it was linked with the railways which provided a secure, protected route by which to send the lines. Although the first inklings of electric telegraphy came in in mid-18th century it didn’t get going until 1840 or so but by 1880 it was a globe spanning network crossing the Atlantic and reaching the Far east overland. It’s interesting to see the mention of Julius Reuter and Associated Press back at the beginning of electric telegraphy, they are still important names now.

In both steamships and electric telegraphy Britain led the way because it had an Empire to run, and communication is important when you’re running an empire. Electric telegraphy was picked up quickly on the eastern seaboard of the US as well.

I must admit I was a bit put off by the introductory chapter of Engineering Empires which seemed to be a bit heavy and spoke in historological jargon but once underway I really enjoyed the book. I don’t know whether this was simply because I got used to the style or the style changed. As proper historians Marsden and Smith do not refer to scientists in the earlier years of the 19th century as such, they are “gentlemen of science” and later “men of science”. They sound a bit contemptuous of the “gentlemen of science”. The book is a bit austere and worthy looking. Overall I much prefer this manner of presentation of the wider context rather than a focus on a particular individual.

Jan 30 2015

Git–notes

logo@2xI’ve discovered that my blog is actually a good place to put things I need to remember see, for example, my blog post on running Ubuntu in a VM on Windows 8.

In this spirit here are my notes on using git, the distributed version control system (DVCS). These are things I picked up around the office at ScraperWiki, I wrote something there about the scheme we use for Git. This is more a compendium of useful git commands.

I use Git on both Windows and Ubuntu and I have accounts with both GitHub and Bitbucket. I’ve configured ssh on my Windows and Ubuntu machines and use that for authentication. I Windows I interact with Git using Git Bash.

Installation

On installing Git I do the following setup, obviously using my own name and email:

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git config --global core.editor vim

I can list my config settings using:

git config -l

Starting a repo

To start a new repo we do:

git init

Alternatively you can clone an existing repository into a subdirectory of your current directory with the name of the repo:

git clone [url]

This one clones into current directory, making a mess if that’s not what you intended!

git clone [url] .

A variant, if you are using a repo with submodules in it, :

git clone –recursive [url]

If you forgot to do the above on first cloning then you can do:

git submodule update –init

Adding and committing files

If you’ve started a new repository then need to add some files to track:

git add [filename]

You don’t have to commit all the changes you made since the last commit, you can select them using the -p option

git add –p

And commit them to the repository with a commit command like:

git commit –m [message]

Alternatively you can add the commit message in your favoured editor with the difference from previous commit shown below:

git commit –a –v

Undoing things

If you get your commit message wrong you can edit it with:

git commit --amend

If you decide you change your mind about staging a file for commit:

git reset HEAD [filename]

If you change your mind about the modifications you have made to a file since the last commit then you can revert to the last commit using this **destructive** command:

git checkout -- [filename]

You should be careful doing that since it will obliterate any changes you’ve made to a file, even if you saved them from the editor.

Working out where you are

You can list files in the repo with:

git ls-tree --full-tree -r HEAD

The general command for seeing what is going on is:

git status

This tells you if you have made edits which have not been staged, which branch you are on and files which are not being tracked. Whilst you are working you can see the difference from the previous commit using:

git diff

If you’ve already added files to commit then you need to do:

git diff –cached

You can see a list of all your changes using:

git log

This command gives you more information, in a more compact form:

git log --oneline --graph --decorate

is a good way of seeing the status of your branch and the other branches in the repository. I have aliased this log set of options as:

git lg

To do this I added the following to my ~/.gitconfig file:

[alias]
  
        lg = log --oneline --graph --decorate

Once you’ve commited a bunch of changes you might want to push them to a remote server. This pushes to the remote called origin, and HEAD ensures you push to your current branch. HEAD is Git’s shorthand for the latest commit on the current branch:

git push origin HEAD

Branches

The proceeding commands are how you’d work using a single master branch, if you were working alone on something simple, for example. If you are working with other people or on something more complicated then you probably want to work on a branch, you can make a new branch by doing:

git checkout –b [branch name]

You can find out what other branches are available by doing:

git branch –v -a

Once you are on a branch you can commit changes, and push them onto your remote server, just as if you were on the master branch.

Merging and rebasing

The excitement comes when you want to merge your changes onto the master branch or you want to get changes on your own branch made by someone else and pushed to the remote reposition. The quick and dirty way to do this is using

git pull

This does a fetch and rebase all at the same time. The better way is to fetch the changes and then rebase them:

git fetch –prune –all
git rebase origin/master

If you are working with someone else then you may prefer to merge changes onto the master branch by making a pull request on GitHub or BitBucket.

Jan 20 2015

Book review: Sextant by David Barrie

sextantThe longitude and navigation at sea has been a recurring theme over the last year of my reading. Sextant by David Barrie may be the last in the series. It is subtitled “A Voyage Guided by the Stars and the Men Who Mapped the World’s Oceans”.

Barrie’s book is something of a travelogue, each chapter starts with an extract from his diary on crossing the Atlantic in a small yacht as a (late) teenager in the early seventies. Here he learnt something of celestial navigation. The chapters themselves are a mixture of those on navigational techniques and those on significant voyages. Included in the latter are voyages such of those of Cook and Flinders, Bligh, various French explorers including Bougainville and La Pérouse, Fitzroy’s expeditions in the Beagle and Shackleton’s expedition to the Antarctic. These are primarily voyages from the second half of the 18th century exploring the Pacific coasts.

Celestial navigation relies on being able to measure the location of various bodies such as the sun, moon, Pole star and other stars. Here “location” means the angle between the body and some other point such as the horizon. Such measurements can be used to determine latitude, and in rather more complex manner, longitude. Devices such as the back-staff and cross-staff were in use during the 16th century. During the latter half of the 17th century it became obvious that one method to determine the longitude would be to measure the location of the moon relative to the immobile background of stars, the so-called lunar distance method. To determine the longitude to the precision required by the Longitude Act of 1714 would require those measurements to be made to a high degree of accuracy.

Newton invented a quadrant device somewhat similar to the sextant in the late 17th century but the design was not published until his death in 1742, in the meantime Hadley and Thomas Godfrey made independent inventions. A quadrant is an eighth of a circle segment which allows measurements up to 90 degrees. A sextant subtends a sixth of a circle and allows measurements up to 120 degrees.

The sextant of the title was first made by John Bird in 1757, commissioned by a naval officer who had made the first tests on the lunar distance method for determining the longitude at sea using Tobias Meyer’s lunar distance tables.

Both quadrant and sextant are more sophisticated devices than their cross- and back-staff precursors. They comprise a graduated angular scale and optics to bring the target object and reference object together, and to prevent the user gazing at the sun with an unprotected eye. The design of the sextant changed little since its invention. As a scientist who has worked with optics they look like pieces of modern optical equipment in terms of their materials, finish and mechanisms.

Alongside the sextant the chronometer was the second essential piece of navigational equipment, used to provide the time at a reference location (such as Greenwich) to compare to local time to get the longitude. Chronometers took a while to become a reliable piece of equipment, at the end of Beagles 4 year voyage in 1830 only half of the 22 chronometers were still running well. Shackleton’s mission in 1914 suffered even more, with the final stretch of their voyage to South Georgia using the last working of 24 chronometers. Granted his ship, the Endeavour had been broken up by ice and they had escaped to Elephant Island in a small, open boat! Note the large numbers of chronometers taken on these voyages of exploration.

Barrie is of the more subtle persuasion in the interpretation of the history of the chronometer. John Harrison certainly played a huge part in this story but his chronometers were exquisite, expensive, unique devices*. Larcum Kendall’s K1 chronometer was taken by Cook on his 1769 voyage. Kendall was paid a total of £500 for this chronometer, made as a demonstration that Harrison’s work could be repeated. This cost should be compared to a sum of £2800 which the navy paid for the HMS Endeavour in which the voyage was made!

An amusing aside, when the Ordnance Survey located the Scilly Isles by triangulation in 1797 they discovered its location was 20 miles from that which had previously been assumed. Meaning that prior to their measurement the location of Tahiti was better known through the astronomical observations made by Cook’s mission.

The risks the 18th century explorers ran are pretty mind-boggling. Even if the expedition was not lost – such as that of La Pérouse – losing 25% of the crew was not exceptional. Its reminiscent of the Apollo moon missions, thankfully casualties were remarkably low, but the crews of the earlier missions had a pretty pragmatic view of the serious risks they were running.

This book is different from the others I have read on marine navigation, more relaxed and conversational but with more detail on the nitty-gritty of the process of marine navigation. Perhaps my next reading in this area will be the accounts of some of the French explorers of the late 18th century.

*In the parlance of modern server management Harrison’s chronometers were pets not cattle!

Older posts «