Ian Hopkinson

Author's posts

Book review: Eye of the Beholder by Laura J. Snyder

A return to more traditional fare with snyderEye of the Beholder by Laura J. Snyder. This is a collective biography of Johannes Vermeer and Antonie van Leeuwenhoek who were both born in Delft in 1632. Vermeer, a painter, lived for 43 years and Leeuwenhoek most famous as a microscopist lived for 91 years. Alongside the stories of their lives, Snyder also talks about the events in Delft, and the wider Netherlands, and the evolving understanding of optical phenomena that is relevant to both painting and microscopy.

A theme of the book is the idea that Vermeer and Leeuwenhoek knew each other, and possibly knew each other quite well – with their expertise feeding in to each other. This is a link that Snyder has discovered, and is somewhat circumstantial since there is no direct evidence of correspondence between the two men. The main evidence for the assertion is that Leeuwenhoek acted as executor to Vermeer’s estate, some have seen this as no particular evidence since Leeuwenhoek was a public official who might be expected to take on this role. But he only did this for four people, three of whom had known personal links. The other piece of evidence is that they lived within a few hundred yards of each other in a relatively small city and shared common interests in optical phenomena so very likely knew each other, they both knew Constantijn Huygens. In some ways the existence of a personal link is not important, rather the drawing together of technologies of camera obscura and microscopes as new ways to see and understand the world.

I note that as someone who has worked both as a microscopist and in photorealistic computer graphics this book is particularly close to my interests, and strikes a chord with me. One of the challenges of microscopy is understanding what on earth you are seeing, and photorealistic computer graphics brings in to sharp focus the mechanisms by which an image is formed. Even now, three hundred years after Vermeer and Leeuwenhoek, specialists in these fields will have undergone a personal journey of discovery where they sought out the thing they were looking for down the eyepiece of a microscope (possibly spending more time than they’d admit focused on the top surface of the coverslip rather than the sample). In photorealistic computer graphics rendering forgetting to include a light in their model and pointed the virtual camera in the wrong direction, leading to a completely black image are not uncommon beginners mistakes.

In the 17th century the Netherlands was a hotbed of scientific discovery, trade and art – the so-called Golden Age which had started in 1588 and came to an end in 1672 with the Franco-Dutch War. Despite much scientific work, the Netherlands were not to have a scientific society like the the Royal Society until the 18th century. Private art was commonplace in 17th century Netherlands, Snyder associates this with religious sensibilities – as a protestant nation the Dutch did not favour extravagant public, religious art but compensated with art in their own homes. On average each Delft household had two paintings. Also relevant to the story is the fact that the Dutch had only recently started adopting surnames in the 17th century, and it seems in the beginning they were often chosen thoughtfully which is alien to the modern mind for whom surnames are generally a given.

In Delft the biggest event of the book is the "Delft Thunderclap" in 1654, an explosion at a gunpowder store that killed over a hundred people and injured thousands more.

The camera obscura is the focus of the artist side of the story, it had been invented some time around the 13th century, and it was to join other optical aids for artists. A camera obscura is basically a box with a hole in it (originally room sized), where an image of what lies outside the box is projected onto a wall. Hyperrealism though the use of the camera obscura was something of a passing fad, Da Vinci had been scornful of the use of such aids, and there usage was something of a trade secret for artists. By the 17th century the camera obscura had evolved from a simple room with light entering through a hole to a system, possibly even a portable box featuring mirrors and lenses. The camera obscura allowed the artist to capture the geometry of a scene by copying the projected image (indeed camera obscura were also used by surveyors). What’s more by separating the image from the scene it served as a tool to better understand how light interacted with materials. Vermeer’s work shows signs of his use of the camera obscura from the late 1650s.

This is not to diminish the skill of a painter, it struck me that Vermeer’s style had elements in common with the much later Impressionists with subtle uses of colour and line being used to give the impression of a scene rather than painting and exact replica to the canvas.

Vermeer was to die in 1675 at the age of only 43, 1672 "Rampjaar" had left him close to destitute as the art market collapsed, and he had 11 children to provide for. He left behind only 45 paintings from his 20 year career.

The microscope is the focus of Leeuwenhoek’s side of the story, the microscope had been invented in the early part of the 17th century but was not much used until much later in the century with Robert Hooke’s magnificent book Micrographia showing what it could achieve. Leeuwenhoek’s microscopes are quite different from those we use today, they are simple spherical lenses mounted in metal plates smaller than playing cards. Leeuwenhoek’s skill was persistent and careful observation over a period of 40 or so years, reported to the Royal Society in London in over 300 letters. He discovered microbes, red corpuscles in blood, as well as the wriggling tails of sperm amongst much else. He studied the inner workings of things rather than just the surface appearance, as Robert Hooke had done. His preparation of samples equals those prepared today. I recall that Leeuwenhoek was long ignored in the history of microscopy because his work was so much in advance of anything for years after his death and he kept his methods secret, although Snyder makes no mention of this so perhaps I mis-remember.

I really liked this combination of biography, national history and history of ideas. Snyder’s style is warm and clear, I also enjoyed her earlier "The Philosophical Breakfast Club".

Book review: How to Write Songs on Guitar by Rikky Rooksby

how_to_write_songsIn a somewhat uncharacteristic turn my next book is about writing popular songs: How to Write Songs on Guitar by Rikky Rooksby. For me it follows on from Guitar Method – Music Theory by Tom Kolb. I’ve read several books about music theory as I’ve learnt to play guitar and they have left me a bit cold. The presentation of the algorithms to generate scales and chords is my sort of thing but there were always references to how chords made you feel that were never really explained. I was never clear on what I was supposed to be doing with this theoretical knowledge.

After Guitar Method I thought the next thing to do was look at chord sequences, and this book came close to the top of my searches. I also got Chord Progression Encyclopaedia by Tammy Waldrop which does exactly what it says on the cover – list out loads of chord progressions for guitar.

How to Write Songs is quite a different book, in fact it was just what I was looking for! It puts the musical theory I’ve learnt into context. It covers off some of the traditional musical theory of scales and chords but hones it down to what you are likely to actually need to write songs. The four ingredients are rhythm, melody (the tune of the voice), lyrics and harmony (chords). Rooksby seems to prefer "melody first" songwriting but outlines other methods on an equal footing.

How to write songs is divided into 16 sections, these cover the four ingredients listed above and some other things too. The sections on chords are nicely laid out, with which strings are providing which notes included (this is helpful because to the beginner this can be a bit mysterious). Rooksby also talks about how different chord variants "feel". The chord dictionary is spread across a couple of sections with more complex "fancy" chords covered in the second section.

Central to writing songs are "turnarounds", repeated sequences of chords that are used to build the harmony (chords) of a song. The melody (tune of the voice) fits in with this, or doesn’t, for effect.

There are sections on making demo recordings and a couple on more guitar specific techniques, I particularly liked the section on "altered tunings". I have seen these tunings annotated in guitar tabs but not been clear as to why they are used. Rooksby provides a good explanation as to the various types of altered tunings and where they are used. In a number of places Rooksby refers to how chords, particularly those including notes from a second octave are easier to play on piano.

The book finishes with three sections which recommend individual tracks, and albums that Rooksby sees as good examples of the songwriting art and some quotes from famous songwriters as to how they go about composing. The theme of whether songs are invented or discovered comes up a few times here.

Rooksby is opinionated in various places: he doesn’t like drum machines, fancy chords, or spontaneous decorations of melody (called melisma). This gives the book a human touch, and I suspect his opinions are pretty sound.

One of my frustrations with learning guitar is that numerous teachers go on about ear training, they often talk about not doing enough of it when they were learning. I realise now that there is a very good reason for this: ear training is actually really hard if you don’t know about the structures and chord sequences you are likely to hear. This is because for the na├»ve listener there is a large number of possible notes they could be hearing, and it is difficult to identify what it is. However, learning how songs are structured, and some of the theory and the options narrow down dramatically.

Everything in the book is supported by references to popular songs, and typically multiple songs are referenced for each point, so you’re likely to have heard at least one of them – and these days its very easy to find music online. I’ve listened to a lot of Radiohead and Arctic Monkeys which turn up a few times, I suspect the same will apply to many people (just with different artists).

The next steps for me are to look at the "song chords" table which lists the chords in each key, and also look at the chord sequences with their examples. Rooksby has written a number of other books, I think I might add his book on riffs to my reading list. Finally, I’m making Spotify lists of the recommended tracks and albums.

The production values for How to Write Songs are high, it is clearly and neatly laid out and well-printed. The prose is enjoyable and manages to avoid sounding dry which is a risk when writing about music theory. I’d recommend it to anyone interested in how popular music "works" on guitar.

I must admit I’d assumed that Rooksby was an American, possibly someone who had written a few songs I knew, but it turns out he is English, lives in Oxford and has a PhD in English literature (website)!

Book review: Hidden Histories by Mary-Ann Ochota

For my next book I read hidden-historiesHidden Histories: A spotter’s guide to the British Landscape by Mary-Ann Ochota. As a countryside walker and cyclists of many years, I’ve always been interested in what I saw and how it came to be, Hidden Histories is just the book for me.

The book is divided into broad sections: lumps and bumps, stones, lines and "in the village" and within each of these sections there are 10 or so topics covered over a few pages each. There are many illustrations, and photographs on pretty much every page. Domestic buildings and churches are covered but castles and stately homes are not which is not unreasonable.

If there is a gap it is in the coverage of industrial landscapes which is limited, this reflects my interests and where I have lived, and holidayed, as much as anything.

"Lumps and bumps" covers long barrows (collective burials dating back to the Neolithic), round barrows (single burials, found in nearly every parish dating back to the Bronze Age), hillforts (defensive earthworks from the Iron Age), miscellaneous earthworks and the ridge-and-furrow plough system. I was interested to learn that windmill bases can be mistaken for round barrows. One learning of this section is that there are only known burials for about 10% of the estimated population of prehistoric Britain. I grew up in Dorset which makes frequent appearances in this part of the book. Maiden Castle was a regular walking spot – it is the biggest Iron Age hillfort in Europe.

The ridge-and-furrow plough systems makes a re-appearance in the section on lines. Essentially visible ridge-and-furrow systems are usually at least seven centuries old and are the result of the medieval method of farming with ox-drawn ploughs which leave a shallow S-shaped furrow. This gentle S-shape is also seen in ancient field boundaries. The way land was owned and shared is also relevant, in medieval times land was common with patches exploited by individuals but individual plots did not have hedge boundaries. This ended with the Enclosures Acts in the 18th and 19th century that made land ownership more individual although in principle it shared land equitably in practice it favoured the rich who had the resources to exploit land in line with the new Acts. Enclosure Acts were particularly important in the Midlands and had widespread impacts on both people and the landscape.

"Stones" covers standing stones, stones in circles,stones in lines, stones with symbols on them, stone crosses, stone tools and wayside markers (stone ones!). Standing stones are difficult to date, and Stonehenge is pretty unique in that its constituent parts are not local, usually stone circles are built from local stone.

"Lines" talks about Roman roads, and other ancient pathways before moving on to the shapes of fields and various chalk figures. I grew up just down the road from the impressive Cerne Abbas giant which is 2000 years old, there is also a white horse on the hillside into Weymouth but that is of George III and dates back to 1808. I hadn’t appreciated that chalk figures require very regular maintenance which is impressive considering the Uffington white horse dates back to 1400BC.

Holloways have a number of mentions – these are ancient routes that have been worn below the prevailing ground level by use. It is chastening that after the Romans left their road building skills were not surpassed until the turnpike roads were introduced a thousand years later.

"In the village" covers various buildings found in villages, mainly houses and churches but briefly mentioning pubs and barns. The age of homes is of direct professional interest for me, although the focus of Hidden Histories is older buildings. I was bemused to learn that the term "Gothic" was originally applied as an insult coined in the 1600s to describe what they saw as overly ornate buildings from the 1200-1500s.

I learnt a wide range of useful facts from this book, such as "metalled" roads being derived from the Latin for "quarry" which has always puzzled me! I also learnt that "turbary" refers to peat workings, so I have learnt a new word to slip into conversation.

I’m interested in maps and computers so it struck me there are some interesting things to do in geospatial analysis relating to this book. For example, medieval ridge-and-furrow ploughing shows up quite nicely in LIDAR, as do other earthworks. Similarly field boundaries and place names, and other mapping features, are all in Ordnance Survey mapping products and these days are readily accessible by automated means.

Cheshire, where I live now, has few entries although on this morning’s cycle I was spotting what I now know to be Enclosure Act hedging with oak "standards" spread along it. Hidden Histories satisfies a curiosity I’ve always had about the countryside I’ve been traveling through.

Book review: Guitar Method – Music Theory by Tom Kolb

music_theoryThis is less of a book review and more some notes on music theory as it applies to the guitar. It is based on Music Theory: Everything you ever wanted to know but were afraid to ask by Tom Kolb from the Hal Leonard Guitar Method series.

I’ve been playing guitar for a couple of years, and I found myself increasing asking why I am doing things and how are songs constructed. What notes belong with which chords?

The book starts with a tour of the fretboard, the version below is from the Youcisian website, I use Youcisian app for learning guitar – it’s great.

Kolb recommends learning the fretboard by picking a note and playing it up and down the fretboard at all locations. I have a new toy to help with this – a Polytune 3 tuner pedal!Guitar Fretboard Notes Diagram

I particularly liked the figure showing how notes on the traditional stave matched up to locations in guitar tab notation.


P5 Figure 2 – how notes are repeated in traditional music notation and tabs

The observation that that the 5th fret on one string is the same note as the open note on the next string, except G to B when it is the fourth fret. This allows you to tune a guitar to itself, It seems like a useful cross-check. There was also a section on tuning using harmonics. I sort of got this working on my acoustic, I found I needed to watch a video: Justin Guitar – How to Tune Your Guitar using Harmonics to understand what I was trying to achieve.

The second chapter is on traditional musical notation, I feel I should know this but it isn’t a priority.

Chapter 3 is about scales and key signatures, there is an algorithm for generating the notes in a major scale. Figure 3 on p17 shows the C major scale in 5 locations on the fretboard.


Page 17 – figure 3 the C Major Scale at different locations on the fretboard

There is similar expression to generate minor scales.


Page 22 Figure 15 shows how the scale formula for major and minor scales compare.

Figure 13 (p21) shows how the C major and A minor scale compare


P21 figure 13 the C major and A minor scales compared


P21 figure 14 the A minor scale at different locations on the fretboard

Chapter 4 talks about intervals (steps between notes) and their names. The names of the intervals are listed.


P25 table of interval names

Each fret on the guitar corresponds to 1/2 a step. The different intervals form different patterns on the fretboard, these patterns are moveable but they change around the G-string because the interval to the G-string is four steps rather than 5.


P26 figure 5 interval shapes on the top strings


P26 figure 6 interval shapes on the bottom strings


P28 A list of popular songs illustrating the intervals

Chapter 5 introduces us to triads which form the basis of chords. The pattern for major triads is 1-3-5 and that for minor triads is 1-flat 3-5. Augmented triads are 1-3-sharp 5 and diminished triads are 1- flat 3 – flat 5

Chapter 6 – harmonizing the major scale chords are related to scales via the process of harmonisation. The chords of a scale are given Roman numerals with the case indicating whether they are major or minor chords, and a o superscript indicating the diminished vii chord. The chords for the major scales are shown in the figure below


P36 Figure 3 Harmonized major scales

Jazz, blues and other music styles use 7th chords which add a seventh to the 1-3-5 pattern. This produces a harmonized chord table which looks like the above but with a 7 added to each chord! Actually the I and IV chords get a maj7 and the V chords just a 7.

Chapter 7 following on from the harmonized major scale get to construct a whole load more chords with different names by modifying the basic 1-3-5 formula.


P41 Chord names

Power chords are unusual in that they are comprised of only two notes 1-5, the rest are three or more. This does not say anything about the voicings of a chord, the exact notes on the fretboard which are played. Slash chords are sometimes just simplified names for chords which have a complex formal names. There are polychords, indicated by one chord name over another, like a fraction which suggest two chords played together they are not very relevant to guitarists.

Chapter 8 – we can repeat the exercise of harmonising the major scale for the minor scale. This changes the pattern of major and minor chords. Relative scales such as C major and A minor use the same chords but they take different roles in the chord number sense.P50-relative-scales-harmonized

P50 Figure 3 shows how the Roman numerals and chords of the A minor and C major scale relate.


P50 Figure 4 shows the harmonised minor scale

Chapter 9 if we know the scale a set of chords belongs to in a song them we can play notes from that scale as a solo over it. Progressions often start and end on the I chord so we can use that as a clue, and the V chord is distinctive too this seems to be because it is the "dominant" chord. Popular music often sticks with one key centre but other forms of music such as jazz can switch from key centre to key centre but they usually return to the original key centre.

Chapter 10 – the blues doesn’t follow the same scheme as discussed to this point. There are a number of different standard blues progressions based around the I, IV and V chords. The blues makes a lot of use of the minor pentatonic scale


P63 Figure 8 Formula for the pentatonic scale along with the major scale for comparison


P63 figure 9 A minor pentatonic scale at different positions on the fretboard

The blues scale has a different formula again, handily the formula and the scale at the 5th and 11th frets are shown in the same figure for the A blues scale. We should play notes from this scale of the A7(I), D7(IV) and E7(V) chords.


P64 Figure The blues scale formula with positions on the fretboard.

There is also a major pentatonic scale.


P64 Figure 12A The formula for the C major scale and the C major pentatonic scale, compared


P65 Figure 12B The C major pentatonic scale at different places on the fretboard.

To make matters more confusing it is not uncommon to mix the major and minor pentatonic scales with the same root together (parallel scales)!

Chapter 11 covers the modes of a scale. Modes of a scale use the same sequence of notes but with a different starting note because they use the same notes they differ from the scale starting at that note. The modes have names Ionian, Dorian, Phyrgian, Lydian, Mixolydian, Aeolian and Locrian.


P68 Figure 3 the modes of the C major scale and their notes on the fretboard

The chapter covers each mode, showing formula (notes), construction, category (major, minor etc), differentiating scale degree. chord types, harmony (Roman chord numerals), and common progressions as well has patterns on the fretboard.

Chapter 12 other scales and modes, this starts with an encyclopaedia of further scales, such as the whole tone scale and chromatic scale, showing information similar to that shown for the standard modes. This chapter includes information on arpeggios and how chords relate to scales.

Chapter 13 chord substitution and reharmonization. These appear to be ways of modifying chords, either by changing or adding a note or by substituting chords in a progression. What chords can be substituted for which depends on the family the chord lies in (Tonic, subdominant, dominant). This is one of those places where the function of chords are hinted at, tonic being something that "resolves" the key, IV chords move away from the tonic and V chords move towards it.


P88 Figure 2 Chord families illustrated for the C major scale.

I find it useful to think in terms of computer code, what information do I need to generate the fretboard, scales and  chords.

  • Fundamentally we need the notes A-A#-B-C-C#-D-D#-E-F-F#-G-G#
  • From the notes we can generate the fretboard given there is a half step per fret and the notes on the open strings (E-A-D-G-B-E) – it would be interesting to know which octave a note sits in;
  • Using the scale formula I can generate the major, minor, major pentatonic, minor pentatonic and blues scales from the notes;
  • Given the harmonisation of a scale I can get the chords in the scale;
  • Given the chord compositions (i.e. 1-3-5) I can generate the notes in a chord and the names of the chords;
  • There’s probably an interesting exercise in generating chord voicings and scoring them for playability and sound;
  • Finally, we can calculate the modes of a scale;

Missing from Music Theory is much description of the "function" chords, these are hinted at in terms of returning to the root chord and resolving tension. Chord progressions and song structure are also not covered.

It seems like the next steps are looking at some of the songs in my songbooks, or tabs on Songsterr and working out which chords are being used and hence which scales, and what the chord progressions are. I should also be able to work out which scales riffs come from. It would be good to learn about song structure too.

Book review: Exercises in Programming Style by Cristina Videira Lopes

exercises_in_programming_styleRecently our CIO has allowed us to claim one technical book per quarter on expenses as part of our continuing professional development. Needless to say since I was buying these books already I leapt at the opportunity! The first fruit of this policy is Exercises in Programming Style by Cristina Videira Lopes.

The book is modelled on Raymond Queneau’s book Exercises in Style which writes the same story in 99 different ways.

Exercises in Programming Style takes a simple exercise: counting the frequency of words in a file and reporting the top 25 words, and writes a program to do this in forty different styles spread across 10 sections.

The sections are historical, basic styles, function composition, objects and object interaction, reflection and metaprogramming, adversity, data-centric, concurrency, interactivity, and neural networks. The section on neural networks breaks the pattern with example programmes only handling small elements of the word frequency problem. The sections vary in size, the objects and object interaction is the largest.

Lopes talks about styles in terms of constraints, for example in the "Good old times" historical style there are no named variables and limited memory, in the "Letterbox" style objects pass messages to one another to prompt actions.

The shortest implementation of the example is in the "Code Golf" chapter with just six lines, other examples run to a couple of pages – a hundred lines or so. Lopes is somewhat opinionated as to style but quite balanced providing reasoning where unusual styles may be appropriate. This was most striking for me in the section on "Adversity" which discussed error-handling. Lopes suggests that a "Passive Aggressive" style with error handling all occurring at the top level in a try-except block is better than my error handling to date which has been more in the "Constructivist" (trapping errors but proceeding with defaults) or "Tantrum"(catching errors and refusing to proceed) style.

Sometimes the fit to the style format feels slightly forced, in particular in the chapters relating to neural networks but in the Data-Centric chapter I learnt how to implement spreadsheet-like functionality in Python which is interesting.

I’ve been programming for about 40 years but as a physical scientist analysing data or trying out numerical models rather than a professional developer. Exercises  brings together many bits and pieces of things I’ve learnt, often in the context of different languages. For a while I’ve had the feeling that I didn’t need to learn new languages, I needed to learn how to apply new techniques in my favoured language (Python) and this book does exactly that.

Once again I was bemused to see Python’s "gentleman’s agreement" methodology over certain matters. By convention methods of a class whose name start with an underscore are considered private but this isn’t enforced so if you really want to use a "private" method just go ahead. Similarly many object-oriented languages support a "this" keyword for the members of a class to refer to themselves. Python uses "self" but only by convention, you can specify "self" is "me" or whatever other name you please. The style format provides a nice way of demonstrating a feature of Python in a non-trivial but minimal functioning manner.

It is somewhat chastening to discover that many of the styles in this book had their abstract origins in the 1960s, shortly before I was born, entered experimental languages such as Smalltalk in the seventies where I would have read about them in computer magazines and became mainstream in the eighties and nineties in languages like C++, Java and Python, not long after the start of my programming career. Essentially, most of the action in this book has taken place during my lifetime! In physics we are used to the figures in our eponymous laws (Newton, Maxwell etc) being very long dead. In computing the same does not apply.

What I take away from Exercises is that to a fair degree modern programming languages can be used to implement a wide range of the ideas generated in computer science over the last 50 or so years so in improving your skill as a programmer learning new languages is not the highest priority. There is a benefit to learning new techniques in a language in which your are familiar. Clearly some languages are designed heavily to support a certain style, for example Haskell and functional programming but I found it easier to understand monads explained in the context of Python than in Haskell where everything was alien.

Exercises is surprisingly readable, the programs are well-documented and Lopes’ text is short but clear with references to further reading. It stands alongside Seven databases in Seven Weeks by Eric Redmond and Jim R. Wilson as a book that I will rave about and recommend to everyone!