February 2019 archive

Book review: The Birth of Loud by Ian S. Port

birth_of_loudMore guitars next with The Birth of Loud by Ian S. Port, this is the story of Leo Fender, Les Paul and assorted musicians and other guitar and amplifier makers.

As a recently started electric guitar player, and long time listener of guitar based rock, this is right up my street. It is most likely that any electric guitarists reading this will have a guitar with either the Les Paul or Fender name on it, or like me, have a cheaper variant of something like the Fender Stratocaster.

People started to attach amplifiers to guitars in the 1930s, the problem with a guitar is that it is not very loud when compared to other instruments. The problem with naive amplification of an acoustic guitar is feedback. The body of the guitar is a natural amplifier, it resonates at particular frequencies. Couple it with an electric amplifier and once you get above a certain volume the electric amplifier makes the body of the guitar vibrate, which it then re-amplifies making a horrible squealing noise (when done accidently). I know all this because feedback is an important part of undergraduate physics courses! Solid-bodied guitars avoid this problem by having no natural amplification.

Les Paul was a musician who experimented with instruments, guitars in particular and recording technology. He had a string of hits in the 1950s with his second wife, Mary Ford. He gave his name to the first solid body guitar from the Gibson company. More importantly he demonstrated what the new electric guitar could do. In terms of guitar hardware Les Paul feels somewhat incidental, as a musician he experimented with his guitars and recording equipment but he had very little involvement with Gibson and the guitar that bore his name.

Leo Fender on the other hand was a technician, an expert with design and electronics. He collaborated closely with musicians to bring them the instruments and amplifiers they wanted but he did not play music himself.

Both men had produced solid-body guitars in the 1940s which were pretty close to fence posts with strings and pickups attached. Such devices worked as guitars but ergonomically and aesthetically they were poor. They weren’t alone though, Paul Bigsby made what is arguably the first practical solid-body guitar and lap steel guitars with solid bodies had also been around for a number of years 

Fender’s first solid-body commercial guitar was the Telecaster launched in 1950, renamed pretty much at birth from Broadcaster because Gretsch had a drum kit called the Broadkaster and threatened to sue. This was followed by the Precision Bass (1951) whose design is also apparent in the Stratocaster which came later (1954). These instruments had somewhat prolonged and difficult births. Fender was keen to perfect them, and whilst his sales team led by Don Randall went out and sold them there were frequently long waiting times in the early days and designs were finalised and production ramped up. The early Fender factory sounded rather chaotic, and there were problems with product quality. The Gibson Les Paul was first released in 1952.

It strikes me that the Les Paul / Leo Fender rivalry is actually relatively unimportant. Les Paul was one a a range of musicians whose demands drove the development of electric guitars and amplifiers. If Fender had rivals it was with Gibson, Rickenbacker and other guitar companies. They vied for the imprimatur of the popular artists of the time, Les Paul initially but then musicians like the Beatles, Eric Clapton, and Jimi Hendrix.  

Carol Kaye is also introduced, I first came across her in a BBC4 TV programme Guitar, drum and bass. She appeared as a bass player on an enormous number of hits from the sixties, playing as a highly sought after session musician at a time when you get the impression that songwriters didn’t bother writing a bass part but left it to the session player to come up with something on the spot. The link with Fender is the Precision Bass she used.

I had fun hunting down some of the tracks mentioned in the book, Dickie Dale and the Del-Tones – Misirlou is a particular favourite which I’m trying to learn to play. Fender’s contribution to Dickie Dale were robust high watt amplifiers with spring reverb which made the surfer rock sound. And if you want to hear Les Paul then Lover published in 1948 is an important milestone. It is like nothing else that went before.

The bulk of the story ends at the close of the sixties with an epilogue describing what happened to everybody in the aftermath. Both Fender and Gibson became parts of larger organisations, CBS and Norlin respectively. They both seemed to have suffered from corporate neglect, leading to poor quality products, until they experienced a revival in the late eighties following sales to private investors. Gibson recently filed for bankruptcy whilst Fender seems to have thrived.

The book is comprised of many short chapters with long titles. It’s a very easy read, and a nice story. There’s a lot of the descriptive prose of imagined meetings and scenes that I associate with this style of journalistic story telling. It is well referenced, and the final sections of the book provide ample pointers to those who wish to learn more about the history of the electric guitar.

Book review: Eloquent Javascript by Marijn Haverbeke

eloquent_javascriptThis is a review of a more technical book, Eloquent JavaScript by Marijn Haverbeke. The book has the appearance of being about learning programming from scratch but I suspect anyone using it as such would struggle. However, if you have some background in programming it is something of a delight.

The book is divided into three parts, on JavaScript itself, the web browser, and node.js – where JavaScript can run without a browser. Along with a description of the core features of the language there are some significant examples, elaborated over full chapters.

These are quite engaging although a bit off the wall. One concerns were-squirrels, another crows, making a pixel art editor and a platform game seem rather tame in comparison. These examples show you how you should use language features, rather than just giving you a pile of bricks from which to construct your building.

JavaScript has evolved since it was first introduced in 1995 with a major update in 2015 including modules, promises, and generators amongst other things – Haverbeke covers these (highlighting what is new). This is useful to know since I started programming in JavaScript a while back where I observed, for example, that arrays were looped over by index, but now I find I no longer need to do this.

Coming to JavaScript from another language I find the event driven, asynchronous features of the language most difficult to understand, and the older JavaScript way of using callbacks to handle these features produces code which is difficult to read – certainly to my eyes. Promises offer a clearer way of implementing asynchronous code. 

Importing modules still feels like an area undergoing much needed development. Originally JavaScript had no built-in functionality to handle modules, but this gap was filled with third party libraries. Now module management has been built into the language but a lot of legacy code uses incompatible third party libraries, and node.js doesn’t fully support the new module features (as far as I can tell).  Haverbeke mentions how some of these difficulties are handled with the toolchain associated with JavaScript.

JavaScript seems to have some pretty wacky features: month numbers start at zero, exactly like absolutely no system of date description I have ever seen. The case-switch syntax seems really odd, although I understand it is inherited from C/Java like languages. JavaScript’s try/catch functionality is indiscriminate by default which is considered bad style in Python although there are workarounds for this. 

Although I’ve been working with browsers and JavaScript for the last 6 years or so, I still learnt new things about how browsers work. Such as the different applications of the onclick attribute and addEventListener, the former only allows for one listener per element.

One of the examples uses “long polling” to demonstrate how to update a web page at regular intervals, or when the content changes due to actions elsewhere.

The material on node.js was new to me. I’m aware I should probably be writing tests for my JavaScript code, and node.js is the easier way of doing this. node.js is based on the Chrome V8 JavaScript engine with extensions for handling Input/Output amongst other things, features which belong on the server side rather than the browser, client side.

I quite like that, in common with Python, JavaScript uses convention to make class methods private. Basically programmers agree not to use a method if it’s name starts with an underscore! 

Python (my favoured language) and JavaScript both have the air of being little things designed to smooth your path rather than serious languages for serious projects like C, C++, Java, Fortran, and C#. However, Python is arguably the most important language in data science applications and many of the big internet companies have significant investment in Python code. Whilst JavaScript is arguably the most important language in the world at the moment, almost everything that happens in a web browser has JavaScript behind it.

The book finishes with a chapter on performance, I found this really interesting. JavaScript engines have a multi-stage approach to compiling JavaScript into executable code. It starts with a quick and dirty compile, but then returns to do optimisations if code is run frequently. Somewhat disconcertingly different JavaScript engines handle the programmers attempts at optimisation differently i.e. you can optimise your code for Google Chrome only to discover it runs more slowly in Microsoft Edge.

There’s no description of the JavaScript dev environment or tool chain in Eloquent JavaScript. Although I missed this it is probably best not to include in a book such as this – tools change rapidly and what works for one developer doesn’t work for another both in aesthetic and practical terms.

I think this is one of the most enjoyable programming books I’ve read. It covers the core features of the language concisely but then goes on to illustrate how to use those features. It also discusses the key environments in which JavaScript runs.