A companion to “Apache Cordova in action” Part 3

The price is right

Having completed Chapter 3 of Raymond Camden’s “Apache Cordova in action” and having a really basic app that makes a GET request to the Github search API; I thought let’s try an extension activity. This is Rethinking Transport, so it had better be about transport. How about we find the rail fares between two stations ?

I am not affiliated with BRFares, but I thought that I’d use their web API because it is currently free and doesn’t require a OAuth subscription process. That simplifies the app a whole load. The JSON API is described at: http://www.brfares.com/api/

Changes to the HTML file

The changes to the HTML file are trivial. For the GitHub search API, we only needed one search parameter. For a BRFareas search, we need two: an origin and a destination.

Here’s the code with the new text highlighted:

image

Basically, I have duplicated the input SearchField and re-named each one to be SearchField1 and SearchField2.

CHANGES TO THE JAVASCRIPT

There’s a bit more to change to the Javascript file app.js. Firstly, we need to declare an extra variable to match the new search box: $search1 & $search2.

image

We create a second variable to hold not only the Origin of the search, but also the Destination.

We update the text when searching to say that we are doing a search for the Origin to the Destination.

Now, we get to the meaty bit. We need to change our API call to:

$.get(“http://api.brfares.com/querysimple”,

{“orig”:search1, “dest”: search2}, function(res,code) {…});

Querysimple picks up all of the fares between an origin and a destination. The format of the response is:

image

We are looking for four data tags:

  • Ticket code at fares.ticket.code e.g. 7DF
  • Ticket name at fares.ticket.name e.g. “Seven Day 1st”
  • Route name at fares.route.name e.g. “Not via London”
  • Adult Fare at fares..adult.fare e.g. £640.00

We now need to modify the function (res, code) {} to parse the data, not from GitHub API, but from the BRFaresAPI instead.

image

Tip for the day

It’s hard these days to find an API that doesn’t require OAuth and a developer key, even if it is not charged. It’s time to learn some new skills and get to grips with OAuth … However, I’m afraid that that is not for this blog series.

A companion to “Apache Cordova in Action” Part 2

I am going to skip over Chapter 2 which is all about installing Cordova and setting up your development environment. Raymond gives some excellent step-by-step instructions, but I had actually set up my environment from a different book that I’d also recommend: “Beginning NFC – Near Field Communication with Arduino, Android and PhoneGap” by Tom Igoe, Don Coleman & Brian Jepson. I’ll leave discussing that book for another post !

This blog post is about Chapter 3, which is a bit more than a “Hello World” application that you get with most Cordova books.

The book discusses that that CLI provides a – – copy-from argument,which is good for using projects as a base project from which you can develop. However, this approach is becoming deprecated and the current approach is to use – – template instead. The default Cordova application is pretty, but it has a piece of code and graphics that you otherwise have to rip out every time that you start a new project. (I’d encourage you to develop your own template project – to start from.) I am going to try the following command:

cordova create jon com.CompanyName.chapter3 Chapter3 – – template searchapp

Next step is I took at peek at what platforms were available to me, by typing:

cordova platforms

It showed that android ~7.0.0, browser ~5.0.1, ios 4.5.4, windows ~5.0.0 and www ^3.12.0 were all available with my install of Cordova (not the latest !).

Let’s add a platform, as that is easy:

cordova platform add android

All you have got to do to install the application on your Android device is to type (and wait a few minutes):

cordova run

Tip for the day

In the source code for Chapter 3, Raymond doesn’t structure his code using the traditional /www for the index.html and /js for Javascript. Instead, he dumps the two files at the top level. You’ll need to replace index.html in the /www directory and either move app.js also to the /www directory (or put it in the /js directory, but then remember to change the link in the code).

A companion to “Apache Cordova in Action” Part 1

This series of blog posts chart my experiences with Apache Cordova, partly to remind me what I did/thought at the time, and mostly as I hope they will be useful to you the reader.

“Apache Cordova in Action” by Raymond Camden is not the first Apache Cordova book that I have read or worked through, but it is the one that I intend to take really seriously and work through (as much as is required) from cover to cover. I have previously dipped in and out of other books. I am not paid by Raymond or Manning Publications, but I do think the book is great !

I am going to skip over Chapter 1 “What is Cordova ?”. If you’re new to it, I’d suggest that you don’t as it is a well written summary of the key things you need to know. Cordova creates a “hybrid” app, which is a mini-browser embedded within a native application wrapper. This app can work on a mobile device even without a network connection because the HTML, CSS and Javascript files are all wrapped up within the app*. (Up to this point, you can think of Cordova as a way to package up your web app and distribute it through the native app stores and even monetise your creation*, although if it doesn’t do enough you might have trouble getting through the validation steps, especially on iOS.) Cordova also provides connections to device features or native features such as Camera, GPS and your contacts. (You may need to use at least one of these native interfaces to pass through the Apple Store approvals process.)

* Pro tip: I am told if you are adept at these things, you can find the html and Javascript files in the file structure (on Android at least), so your code is not super secure. Bear this in mind if you are a business.

One of the cool things about Cordova, but don’t let it scare you off if you are not a command line aficionado, is the command line tool that is used to create projects and compile them to mobile platforms. It takes the source HTML, CSS and Javascript and converts them into the native binaries required for the platforms supported by Cordova just by typing some commands into the Command Line Prompt. Under the hood, quite a lot of complex thing go on and if you were to try to do them manually, you’d probably forget one or two steps and get into a pickle working out where you had gone wrong.

Recently, it has become rather a two-horse race between Apple and Android, but Cordova still (currently?)  supports other platforms such as Windows 10 and Electron.

Some of the Cordova commands that you can execute are quite simple to understand like:

cordova create

cordova platform add android

cordova plugin add cordova-plugin-geolocation

cordova prepare

cordova compile

cordova build

cordova emulate

cordova run

Tip for the day

Each blog post in the series, I’ll try and leave you with a tip for the day. With Cordova, as it is a CLI tool, you spend a lot of time navigating to the right folder so that Cordova can perform its magic. I have quite a complex folder structure under which my projects are embedded and I was beginning to regret it, until …

Open up Windows Explorer and navigate to the folder that you want. On the navigation bar, right click on the white space and select “copy address as text”.

image

Now for the clever bit …. when you navigate back to the Command Prompt and type CD space to “Change Directory”, you can now right-click and your folder structure will be pasted into the line where the cursor is.

That should save you plenty of typing of folder structures !

If you’ve got any tips for the day (on Apache Cordova) then please feel free to add them as comments below.

Can I vote for smart ticketing ? – Part IV

This is a much awaited, fourth in my series from the May 2015 election, which considers the Green Party manifesto, their transport commitments and in particular what they have to say about smart ticketing.

Green transport policy

As you might imagine, the Green Party has got quite a lot to say on transport policy. They commit five whole pages to transport policy within their manifesto and there are numerous mentions elsewhere in the document as well.

Green smart ticketing ?

As the Greens have so much to say on transport, let’s get the relatively minor question of smart ticketing out of the way … The Greens continue the trend and make specific mentions of smart and integrated ticketing in their manifesto.

Affordable public transport
Instead of prestige projects such HS2 and new runways, we need to prioritise local transport and make sure it is accessible to everybody. The Green Party would:
• Prioritise affordable local public transport, accessible to all, including those with disabilities.
• Support free local transport for pensioners, including the existing local bus pass scheme and the Freedom Pass in London.
• Extend free local public transport to young people and students, costing around £4 billion a year.
• Develop regional smart payment systems with integrated ticketing, like the London Oyster system.
• Extend networks of public transport to include rural areas.

Page 65 of the Green Party General Election Manifesto 2015 

The pledge is also repeated under the heading of  “Towns and Cities for people”:

Towns and cities for people
We need to rescue our towns and cities from traffic and turn them back into places where we want to be. The Green Party will support an Active Travel Bill for England in order to achieve this.
• ….

• Make public transport more convenient by integrating ticketing with smart regional ticketing systems such as the London Oyster card.

Page 66 of the Green Party General Election Manifesto 2015 

I note the careful choice of wording:

  • to mention both smart and integrated ticketing,
  • to use the term “regional smart payment schemes, with integrated ticketing” –
  • The Greens are the first party to draw a distinction between payment and ticketing. (Does it really matter if we have to show a different “token” on one mode of transport than another, as long as it is clearly explained what we need to show to the driver or present at the gateline, for each leg of the journey. However, much more important to getting people out of their cars, is having the confidence that I can purchase a through-ticket all the way to my end destination. As Rory Sutherland described it’s getting people out of the habit of jumping into the car on their driveway, or overcoming the fear factor of “what happens at the other end”, when I arrive an an unknown destination ? I shouldn’t have to go to each individual operator for each leg of my journey and piece it altogether myself. Mental note to self: I must write a longer blog-post on this topic.)
  • Like the other parties, the Greens talk about “regional” ticketing schemes i.e. not mentioning specific modes of transport or operators; and, of course,
  • to reference back to what the public know i.e. the “London Oyster card”.

One fine day in April 2019

The Greens end their manifesto with a vision titled “One fine day in April 2019”, which steps through the day in the life of someone living in a country that voted for the Green party. The scenario starts:

One fine day in April 2019:

You leave work at 5 pm on the dot, and check the bus stop’s electronic display – your bus home is due in 3 minutes. It glides to a stop, electric motor whirring quietly, and you beep on with your smartcard. The buses are not-for-profit now, and cheaper than they were four years ago.

Whilst the selection of smart ticketing technology might not be the most revolutionary, perhaps the most challenging part of the vision is the timetable that the Greens have set for themselves. They are quite specific that this Vision will be delivered in April 2019, which isn’t that far away. They probably wouldn’t, but the vision isn’t caveated with: “If you travel on the right mode of transport, in the right part of the country” or “If you travel with the right operator”. I read this as a nation-wide vision for the country.

The visionary scenario continues and, in my view, becomes more optimistic in what can be achieved within five years; but perhaps we do have to “think big” if we are going to meet the challenges of really becoming a green society.

Maybe not so unreasonable (see my previous post on Bob Geldof and the Power of Unreasonable People) for the train tickets to cost “less than you would have expected”, but how likely is a local line that gets you practically to the campsite gate ?

Now, to the big points …

image

The BBC summarises their Transport Policy under four main headings: To re-nationalise the rail system, to introduce an immediate cut of 10% on public transport fares and to promote cycling and walking. As described above, in order to fund the policies and in order to avoid ‘air-time’ going on discussion of what they view as “vanity projects”, the Greens propose the scrapping of HS2 rail and extra runways and a re-focussing on local transport and making sure it is accessible for everybody.

There is definitely some meat in these topics. I guess one of the key questions is whether the Green Party could get themselves to the position of being a “king-maker” such that they could have sufficient influence on the policies of a coalition. And if they did, which would they pick out as their headline policies to take a stand on ?

There were two other snippets that I noticed in their manifesto that I thought were worth drawing out, one more surprising than the other:

  • a commitment to open transport data ,and
  • a policy to introduce road-pricing more widely.

Open Data

Oppose the privatisation of data held by the government that should be open to all, such as the Postcode Address File, or by companies providing public services, such as data on the progress of buses that can be used by Smartphone apps to predict waiting times.

Road pricing

Towns and cities for people
We need to rescue our towns and cities from traffic and turn them back into places where we want to be. The Green Party will support an Active Travel Bill for England in order to achieve this:
• …

• Introduce road-pricing schemes such as the London congestion charge and road-user tolls for heavy lorries.

• …

Page 66 of the Green Party General Election Manifesto 2015 

Can I vote for smart ticketing ? – Part III

If you’ve read Parts I and II of this series of posts, I am beginning to wonder whether I should have titled the the series: “Is it possible to not vote for smart ticketing ?”.

So far, we’ve looked at the Liberal Democrat manifesto and been surprised by the detail of their manifesto commitments, including one for each of smart and integrated ticketing. They also refer off to other detailed documents, such as the Transport for the North strategy. In Part II, we reviewed the Labour manifesto and found that they also made commitments to smart ticketing. So today, is the turn of the Conservatives …

What about the Conservatives ?

Like their (current) coalition partners, transport is covered primarily as one of the means by which a Conservative Government will invest in the nation and support the economic recovery.  The Conservatives are more explicit about their investment plans, although this is perhaps not surprising for the party in power.

Better roads, trains and modern communications

One of only two main headlines for the the Conservatives under their (first) theme of “an economic plan to help you and your family” is: “Better roads, trains and modern communications”. The Conservatives’ commitment to the transport industry is clear and unequivocal.

Conservative manifesto summary

imageThe BBC summarises the Conservatives’ main transport pledges using four headlines bullets – three of which refer to their investment plans:  to invest in the roads, to invest in electrification on the railways and also a specific mention of HS2 and HS3. The fourth pledge that perhaps stands out from the others is the Conservative plans to “reform strike laws” (including on the transport network). These may yet turn out to be the most significant for trade union relationships and the operational-side of any transport business. Perhaps, this is where the Conservatives are showing their true colours ?

… and smart ticketing ?

You may not have expected it at the outset of this series, but you may have guessed it by now – the Conservatives also make specific manifesto commitments with respect to smart ticketing. They are also probably the most explicit on the form of “ticketing product” that they expect to see delivered within the timeframe of the Government, as they specifically refer to “part-time season tickets”.

We will also introduce smart ticketing and part-time
season tickets.

Page 15 – Better roads, trains and modern communications of the Conservative Manifesto

Conclusion

So for smart ticketing (at least), there is cross-party consensus across the three (current) main parties. Hence, actually, you probably can’t vote for smart ticketing, as it is pretty certain that any flavour of Government is going to be committed to rolling out smart ticketing anyway.

Can I vote for smart ticketing ? – Part II

Yesterday, I looked at the Liberal Democrat manifesto and was surprised to find a series of detailed commitments with respect to transport, including a commitment to both smart and integrated ticketing.

Today, it is the turn of the Labour party. The first thing to note is that the Labour manifesto is a lot shorter than the Liberal Democrat manifesto – it’s almost half the length. Does this mean that there is less depth on transport ? Less detail maybe, but there are some significant themes and a lot of emphasis on the rail industry. Four of their five main pledges are related to the rail !

imageYou can download the Labour manifesto here. You have to click on “more issues” to bring up transport. Labour have five main transport policies. The BBC’s summary’s only draws out four pledges: freezing rail fares, allowing some public sector operation of the railways, support for HS2 & giving London-style powers to the city and county regions.

The actual extract from the manifesto is copied below:

  • Rail fares will be frozen next year to help commuters while we implement reforms. A strict cap will be introduced on every route for any future fare rises and a new legal right for passengers will be created to access the cheapest ticket for their journey.
  • We will legislate so that a public sector operator is allowed to take on rail lines and challenge the private train-operating companies on a level playing field.
  • We will review the franchising process to make sure the Tories’ franchising fiasco is never repeated.
  • We will create a new National Rail body to oversee and plan for the railways and give rail users a greater say in how trains operate.
  • City and county regions will have more control over the way buses are operated in their area. They will be able to decide routes, bear down on fares, drive improvements in services, and bring together trains, buses and trams into a single network with smart ticketing.

Even though this is only a few extra words, Labour’s presentation of their own policies throws up some quite important differences from the BBC summary. At the top-level, HS2 isn’t actually mentioned; but creation of a new National Rail body and reviewing the franchising process (yet again) is. The emphasis seems to be on the strict cap on rail fares and a legal right for the passengers to access the cheapest ticket fare. I’d like to see what this actually means and how different it is to plans already being implemented within the industry.

Also, the rhetoric used to introduce the “public sector operator” suggests that the changes could be rather significant: “Labour will reform our transport system in order to provide more public control and put the public interest first.”

What about smart ticketing ?

Again, I was surprised to see specific mention of smart and integrated ticketing. There appears to be some cross-party consensus between the Labour party and the Liberal Democrats, as Labour are also pushing for integrated transport in city and county regions through the integration into a single network and, again, they select smart ticketing as one of the ways that they want to achieve this.

Perhaps, I’ll struggle not to be able to vote for smart ticketing ??? Find out what the Conservatives have to say tomorrow …

Can I vote for smart ticketing ?

Seeing that the nation is gripped in election fever, I thought it was worth looking into what do the different political parties stand for. Transport policies probably aren’t going to be the single decisive factor that determines the result of the election and hence I’ve not seen that much coverage on what the plans of the different parties are and perhaps, more importantly, how different they are. I thought I’d try and re-dress the balance with these blog posts.

If you don’t believe me that transport is not top on the political agenda at the moment, just take a look at the word cloud taken from one of the coalition party manifestos. (Hint ! – It’s not there.) As the word cloud illustrates: schools, NHS / health, crime, green / environment, tax / cut / services make it onto the mainstream agenda, but not transport. (Also, I liked how the implication that the political class “must improve” crept into the bottom left of the diagram !) However, note the positioning of transport as an “enabler” for the economy by both coalition parties and as a contributory source of cost of living crisis for the working man by Labour.  Hence, the parties must have something to say and I thought I’d find out what it was …

image

Word cloud of the Liberal Democrat manifesto, produced using Jason Davies’ implementation with d3.js.

imageLiberal Democrats

I started my analysis with the Liberal Democrats, simply because they provided their manifesto in “easy read”, “clear print” and “plain text” formats and the  accessible plain text format is simplest to parse and analyse. We probably all know that the Liberals plans to borrow less than Labour, but cut less than the Tories and hence would be the balance or “conscience” within any coalition – or that’s where they like to position themselves.

But, what about transport ? Where do they stand ?

Smart and integrated ticketing

I was surprised to find that smart ticketing and integrated ticketing both make it into the Liberal Democrat manifesto as specific pledges !  I had never thought of these as “election issues”. A couple of extracts from the Liberal Democrat manifesto follow that cover transport issues. (I actually counted more than 40 commitments to transport in their manifesto.)

6.6. Improving local public transport

High-quality public transport is essential to building sustainable communities and local economies, and two thirds of public transport journeys are made by bus. With more people commuting to work by bus than any other mode of public transport, buses are of significant importance to the economy. Bus services are also particularly important to many rural and isolated communities, where one in five of the population lives.

* Carry out a review of bus funding and bus policies and introduce a five-year investment plan to give the industry and Local Authorities certainty and help plan investment. We will support local areas that want to bring forward plans for regulating the bus network in their area.

* Give new powers to Local Authorities and communities to improve transport in their areas, including the ability to introduce network-wide ticketing like in London.

* Support the expansion of smart ticketing systems.

* Continue funding for local economic and sustainable transport infrastructure through the Local Growth Fund.

* Help bus companies trade in older, more polluting buses and coaches for newer, low emissions ones, helping develop the market for low-carbon buses.

More broadly, transport features in the Liberal Democrat manifesto as one of the exceptions to their “second fiscal rule”:

Our second fiscal rule is that over the economic cycle we will balance the overall budget, no longer borrowing to pay for everyday expenditure. We will make one significant exception to enable us to invest in the things that will help our economy grow.

Like some other parties, this exception supports the transport industry, because it is seen as an enabler of economic recovery and growth.

The Liberal Democrats make the following commitments wrt transport:

We have established our second fiscal rule precisely so we can invest in productive infrastructure to help the economy grow.

We will:

* Set out 10-year rolling capital investment plans.

* Develop a comprehensive plan to electrify the overwhelming majority of the UK rail network, reopen smaller stations, restore twin-track lines to major routes and proceed with HS2, as the first stage of a high-speed rail network to Scotland.

* Invest in major transport improvements and infrastructure. We will:

o Deliver the Transport for the North strategy to promote growth, innovation and prosperity across northern England.

o Develop more modern, resilient links to and within the South West peninsula to help develop and diversify the regional economy

o Complete East-West rail, connecting up Oxford and Cambridge and catalysing major new housing development.

o Ensure London’s transport infrastructure is improved to withstand the pressure of population and economic growth.

* Work to encourage further private sector investment in rail freight terminals and rail-connected distribution parks. We will set a clear objective to shift more freight from road to rail and change planning law to ensure new developments provide good freight access to retail, manufacturing and warehouse facilities.

* Ensure our airport infrastructure meets the needs of a modern and open economy, without allowing emissions from aviation to undermine our goal of a zero-carbon Britain by 2050. We will carefully consider the conclusions of the Davies Review into runway capacity and develop a strategic airports policy for the whole of the UK in the light of those recommendations and advice from the Committee on Climate Change. We remain opposed to any expansion of Heathrow, Stansted or Gatwick and any new airport in the Thames Estuary, because of local issues of air and noise pollution. We will ensure no net increase in runways across the UK.

* Ensure new rail franchises include a stronger focus on customers, including requirements to integrate more effectively with other modes of transport and a programme of investment in new stations, lines and station facilities. We will continue the Access for All programme, improving disabled access to public transport.

Modern light rail systems, like Croydon Tramlink and Manchester Metrolink, have brought significant benefits to passengers. We will encourage Local Authorities to consider trams alongside other options, and support a new generation of light rail and ultra-light rail schemes in towns and cities where local people want them.

imageYou may note that a lovely yellow Manchester tram makes it as one of the images into the manifesto. Is this any more than the fact that it is painted in “Liberal Democrat colours” and matched the brand guidelines for imagery within the manifesto ?

Transport for the North

imageSpecifically, the Liberal Democrats make further pledges, one of which specifically refers to the recent (March 2015) Transport for the North strategy – a strategy to build a northern powerhouse which capitalises on the strengths of northern cities and encourages economic growth and investment. This document outlines a plan for rail to support that economy by delivering “a world-class rail network with smart tickets and simpler fares will make journeys faster, easier and less crowded.”

  • Our vision is to develop a ticketing solution across the North that makes travel by rail, bus, Metro and tram as simple, attractive and convenient as possible for local trips and for longer journeys.
  • An integrated Northern travel area, based around clear geographical zones and a fair and simple fare structure that people can understand, will inform sensible travel choices and make public transport an
    attractive option.
  • The introduction of a single smart ticketing solution that works on all modes of public transport right across the region.

What about the others ?

On reflection, a vote for the Liberal Democrats might not be a vote for smart ticketing, however. Firstly, the Liberal Democrats are only likely to make it into power as a coalition and I doubt that this is the policy issue that they would take a stand on with their coalition partners. Also, maybe all of the parties also make manifesto pledges for smart ticketing ??? In the next blog post, I’ll take a look at what the Labour manifesto has to say. Stay tuned …

Where can I find out more ?

imageThe BBC’s election 2015 website provides a summary of the different party policies, against key topics. For transport, the LibDem policy is boiled down into just four transport pledges. I’ve mentioned two in passing: to support light rail schemes in urban areas and to electrify all of (actually “the overwhelming majority” of) suburban and major rail routes, although I’d missed the commitment to “re-open smaller stations and restore twin-track lines to major routes” that the LibDems make.

What I’ve not discussed is the commitment that they’ve slipped in to give Young Persons two-thirds off bus travel:

* Work to introduce a new Young Person’s Discount Card, for young people aged 16–21, giving a 2/3rds discount on bus travel, as resources allow. This will assist all bus users by helping maintain the viability of existing bus routes and making it easier to open new ones.

* Enable government departments, local Councils and private businesses to add discount offers to the Young Person’s Discount Card.

I’ve deliberately not covered the contentious issues on air travel and third runways at Heathrow or Gatwick, in advance of the Davies commission.

However, as I mentioned above (and have illustrated with the example on smart ticketing), there is a lot of detail in the Liberal Democrat’s 158-pages of Manifesto and a reasonable proportion of this relates to transport, whether on the railways, bus, road or by air. I am working on a little tool to allow you to make your own analysis of the issues that matter to you.

Are you a fox or a hedgehog ?

I’ve been meaning for ages to blog on some of my favourite books that have “shaped my way of thinking”. When David Pottinger blogged on “Are you a fox or a hedgehog?”, I was spurred into action. In the famous essay “The Hedgehog and the Fox”, Isaiah Berlin divided the world into hedgehogs and foxes based upon an ancient Greek parable:

The fox knows many things, but the hedgehog knows one big thing.

The fox is a cunning creature, able to devise a myriad of complex strategies for sneak attacks on the hedgehog; each one more devious and cunning that the last. Fast, sleek, beautiful, fleet of foot, and crafty – the fox looks the sure winner; or so you would think. The hedgehog on the other hand is a simpler creature, who appears to dawdle along through life, taking his time searching out food, taking time time eating food and generally living life at a  leisurely pace.

So when, the fox attacks you might think there could only be one winner. However, the hedgehog’s response is always the same. You can almost imagine him thinking, in some kind of Tom and Jerry-esk cartoon sketch, “Here we go again …”. The hedgehog rolls up into a ball and becomes a sphere of sharp spikes, repelling attack from all directions. The hedgehog has one strategy but it is a beautifully simple strategy and it works within his environment.

That strategy wasn’t dreamed up on the spot, it has evolved our the years; but it is a wonderfully robust strategy; however simple it might be to explain. Having this kind of strategy and simplicity of thought requires great market understanding.

David’s blog post is primarily about scientists, but he throws out the question: “In a much milder form, maybe the same fox/hedgehog division is true in business?”. Well I believe, that it is absolutely true and I’d even question whether it is in a “much milder form”.

If you’re not convinced, I’d heartily recommend reading “Good to Great” by Jim Collins (who was also the author or “Built to Last”). Jim says:

“To be clear, hedgehogs aren’t stupid. Quite the contrary. They understand that the essence of profound insight is simplicity.”

Jim goes onto to apply the concept to Walgreens, who generated stock returns from the end of 1975 to 2000 that exceeded the market by over fifteen times. Their concept was simple: to be the best, most convenient drugstores, with high profit per customer per visit. In classic hedgehog style, Walgreens took this simple concept and applied it with fanatic consistency. It embarked on a systematic programme to replace all inconvenient locations with convenient locations, even if it meant moving a store just half a block away. At their peak, Walgreens were more densely packed in some city centres than Starbucks coffee shops. The philosophy was that in busy urban areas, no-one should have to walk more than a few blocks to reach a Walgreens. The ideal lot was a corner lot, where customers could easily enter and exit from multiple directions and Walgreen would even close stores in “good” locations half a block away in order to open stores in “great” locations, even if it cost millions to exit the lease. [Source: Chapter 5 of “Good to Great”.]

Have you got an understanding of your market-place that has let you develop your “Hedgehog Concept” ? Do you execute on that strategy with unerring drive and determination, and not get seduced by good opportunities that might distract you from your primary goal ?

I’d be intrigued to hear your thoughts on what you think might be a “hedgehog strategy” in the rail or transport industry.

Enter the Paralympics …

Is there room for a “living legacy” (in transport after the Olympics) ?

We knew that the final Sunday of the Olympics was a quiet morning for sport, when politics returned to Sunday morning TV and the Prime Minister was interviewed by Mishal Hussein. The key question was all about legacy. What will the legacy of the London 2012 Olympics be ? We all felt the euphoria and pride in our country. There was a sense of togetherness and a common experience to unite us all. There were certainly some heroes.

GATOG_horse_on_escalatorIt’s been a long time since I worked on the transport planning for the London Olympics on their Travel Demand Management project. Yes, THAT project that was made famous by Boris’ annoying messages at tube stations that encouraged us all to think about our Games travel plan.

GATOG_weighlifters_on_tubeThose announcements might be the most newsworthy, but I think it was the series of posters that went around the London tube stations  and were put into Metro that to me summed up the whole campaign and used sporting characters to encourage us to think about how we travel at Games time and what we could do to play our small part in helping to put on the greatest show on Earth.

So, as the nation’s attention turns to legacy, what legacy might there be from the Travel Demand Management project ? One of the terms that I was really keen on when helping design the project was the creation of a “living legacy” i.e. not only a legacy in hard transport infrastructure (such as those extra carriages on the DLR) but also a legacy in when and how we think about using that transport system.

These numbers are probably a little old now, but when we were planning the project:

– nationally only 1% of people had heard of Transport Direct (a national multi-modal journey planner),

– When there are problems on the line, 87% of people still arrive at National Rail stations not knowing about disruptions on the rail network (and start to form the queue waiting for the disrupted rail network.) [See Passenger Focus study.]

– The numbers were a little better in London, where 1 in 5 commonly used TfL’s travel tools, rising to 2 in 5 when they’d heard that there was known disruption. (This provides some comfort for the vision that I’ll outline below, where people check before they travel and exacerbate any disruptions on the line.)

These figures confirm what we all know, that transport is an habitual behaviour. We generally just do it. We don’t really want to waste time thinking about it, or planning our travel. Why would we want to plan a commuting journey that many of us do every day of our lives ? Why would we want to waste important “brain space”, that could be thinking about more noble, more salacious or more addictive stuff [delete as applicable, depending on how you think your brain works.]

How could we make an intelligent dynamic transport system, where the human elements which the transport planners call the “demand” for the transport system can be influenced to match the available “capacity” on the network and perhaps could those elements be switched dynamically in real-time, to account for unexpected peaks in demand or break-downs in performance ?

For an event like the Olympics, we can put support staff & services on high alert (perhaps even give them “blue light” status), we can temporarily increase our readiness to be able to respond to the inevitable incidents. We can employ thousands of friendly volunteers on a temporary basis, to help show the way, to provide directions, to keep crowded platforms safe or to even to help with loading disabled travellers. But, we can’t make that “business as usual”. At some point, we need to relax back to a steady operational state. Hence, don’t forget how many additional measures were put in place for the Games; which we won’t be able to keep up for Londoners. Hence, the effective available capacity of the transport system and the good-will of its users is naturally reduced in the ‘steady-state’ situation.

In a sense, the Olympics is actually the easy part. But, the Paralympics concern me … …

The TDM project coined 4 R’s: Reduce, Retime, Re-mode, Re-route, in order to build up the available network capacity when and where it was needed for the Games. The Civil Service then took these on-board in Operation Step Change in the run-up to the Games, encouraging people to think about the options available to them when they travel. People do/did work from home more and this generally builds up a buffer in the transport system. In these circumstances, the biggest R within the equation is the R for Reduce. Hence, a lot of the success of the system comes down to the work done in advance, on reducing the “background demand”. Many people took the decision to get out of town and leave London to its Olympics and they’d have their summer holiday. They might even have rented out their driveway as well.

But, when TeamGB does so well at the Games, the weather is pretty good; then actually what happens (although employers wouldn’t like to admit it, in advance) is that we naturally get a conversion of the “base load” on the transport system to what is really Games-traffic. People do watch the Olympics at work. Commuters do become “spectating spectators”. They do go and line the streets at lunch-time or after work. And, their own travel patterns are naturally altered.

In week 1 of the Paralympics, following the Bank Holiday weekend, we might also expect a natural reduction in background demand. But, in week 2, we are certainly back to the daily grind; having extracted every ounce of flexibility of our bosses. Hence, for the Paralympics and actually for the “living legacy” that I crave, we need to rely much more on the other R’s in the equation: the Re-mode, the Re-time and the Re-route and the step before each of those which is “stop and think about it”. For that living legacy, it doesn’t make sense to encourage a long-term Reduction in demand, when we are trying to bolster the economy of London. (This isn’t to say that virtual tele-working aren’t vitally important; but as the long-term trend for these increases, we hope that the economic drive will increase the need for transport even more.)

Hence, over the Paralympics, we actually get to test what we really need to test for the long-term “living legacy” in transport behaviour. Hence, the spot-light really is on.

So what do I mean by that “living legacy”. I’d like to use the Paralympics as an opportunity to kick-start a new or additional habitual travel behaviour, where commuters as part of their routine, check for disruption before they set out and on route, each and every time; and are prepared to influence their travel patterns in light of the travel information that they receive, because they trust it. Then, at that point, we can think about Re-timing, Re-routing, Re-moding i.e. commuters can think about their alternatives whilst they’ve still got time to influence their travel pattern. Perhaps, this involves calling the family and saying “sorry, transport is messed up. I’m going to take the opportunity to finish this project off; so that I can take a long week-end later this week”. Perhaps, it involves walking in the opposite direction out of the office in order to travel via a different route or even on a different mode of transport.

London is doing well with their 40% of people who know where to turn once they’ve heard that there is disruption with the transport system. However, what we want to increase now is the percentage of people, who convert it into a habit to look at travel tools, before or as they set out and turn planning into an habitual behaviour. Then, we’ve “closed the loop” and it is the first step towards that intelligent dynamic transport system that I talked about.

So, now really is the time to check out your Games plan for the Paralympics (and encourage your friends to). The Olympics were a one-off special and they are unlikely to return to London in my life-time. However, the Paralympics are more like “life as normal in London”. However, they are still a huge sporting event. They are the SECOND LARGEST EVENT in the world and they follow on immediately after the euphoria of the world’s largest event hosted in the same city. So, there is NO ROOM for complacency, no room at all and we shrug the Paralympics off at our peril. They are in September and life will go on in September. September isn’t a natural extension to our summer holidays.

Operation “Step Change” was an opportunity to prepare for something as large as the Olympics. The Paralympics are an opportunity to prepare for our lives.

So, here is my plea … … Please plan for the Paralympics. Please prepare your travel plan. Please use it as an opportunity to explore alternative routes to your place of work / your school / your trip from a night out. But don’t just plan for the Paras, plan for your life after the Paras too. Please use the Games as an opportunity embed some traveller information into your daily life. Set up some travel alerts from email or SMS, set up a widget on your desktop, set up a Live Tile on your mobile phone, … not just for the Paralympics, set up these measures for your life.

Do get it touch, if you need any recommendations on good travel tools to embed into your travel patterns.

House of Lords attacks nudging ???

Baroness Neuberger, chair of the House of Lords Science and Technology Sub-Committee,  was on the Radio 4 today programme. yesterday.  Her thesis seemed to be that nudging techniques alone are not sufficient to tackle some of the huge challenges that our country faces, such as climate change or obesity. 

Well that was the headline anyway … Firstly, the report didn’t actually attack nudging, only that it shouldn’t be applied in isolation and secondly the media reports seem to miss the fact that the select committee’s report was based on two case studies. One of those case studies was all about encouraging a significant reduction in car use, if we are to have any chance of meeting agreed carbon reduction targets. However, I’ve not seen any significant press coverage on this point.

The Baroness’ select committee report, apparently, at least attacks civil servants for their interpretation of the steer that they are getting from their political masters, or possibly the policies themselves.  On one hand, the Government are stating a preference for the consideration of behaviour science techniques (which the scrutiny committee applauded);  but at the same time, they are also taking away the financial freedoms for Government Departments to be able to do anything else anyway. The select committee argues that the nudge alone is not enough.

On the Today programme, the Times columnist, Philip Collins, argued that there is an ideology behind nudging: “There’s a feeling that it’s better if things are done in a voluntary way, rather than through regulation and the state.”  But, both agreed that nudging was only part of the solution. Philip trotted out defaults the classic examples of auto-enrolment on pensions, organ donation and “save more tomorrow schemes”. 

The truth behind the headlines, as ever, is more balanced. For instance, one of the key recommendations from the select committee report  is that the Government should appoint an independent Chief Social Scientist to provide them with robust and independent scientific advice and to advise and shape the development of such policies. If the Sub-Committee really felt that these policies had no part to play then what would be the point of such an advisor. The BBC was just trying to make a headline, along with previous ones such as “Nudge or Fudge ?”.

That isn’t to say that nudges are the ultimate panacea. Of course, many times we will need to consider the environment (such as regulation) within which  nudges will sit. If you’ve read Thaler’s book, you’ll know that the first “[i]N” in Nudge stands for incentives – he never saw “pure social science” standing alone. However, what is important with the behaviour science approach is to design the overall package of measures together so that they can be mutually re-enforcing. We all know what if we hear nine pieces of advice that we don’t like, but just one that we do like; then we’re much more likely to take comfort in the tenth piece of information as it sits nicely with our current world view and gives us an excuse not to have to change.

Baroness Neuberger also challenged whether there was any catalogued evidence that nudging works, at a societal level.  She felt the case had only been proven at an individual level.  She argued that you may get a marginal difference in individual behaviour; but the Government are not doing the evaluations correctly when applied to a population.  With organ donation, she argued that actually the thing that would make the difference was training of the staff.  (It is that classic problem that in the real world, you can never set up an “experiment” such that you can only change one thing at a time – not at a realistic level, for a topic that matters quite so much – and hence you can never be quite sure which of the interventions that you made that be be credited with causing the difference.)

Of course, there is a massive “Catch 22” situation in this argument. Unless we undertake the interventions then we’ve got no chance of being able to gather the appropriate evidence. Also, it is a brave project manager, who cancels something essential for his own project in favour funding the evidential framework in order to assess whether the intervention worked in practice and support future projects. (The solution, by the way, is for the programme manager to set the context and mandate the use of the appropriate evidential frameworks and to give the project manager freedom to set financial priorities within his project.  It also takes the right culture for the project manager and the programme manager to be prepared to willingly cut entire projects – even their own – because there aren’t sufficient funds to do “everything necessary” and it is better to do everything necessary on a smaller number of projects than it is to do a large number of parts of projects.  Unfortunately, such cuts don’t necessarily make the best PR when communicating this approach.)

Completely missing from the headlines was the fact that one of the two case studies that the Select Committee looked at was: reducing the reliance of the British public on the car.

One of their specific recommendations from the Select Committee was that the Government should:

    (a)  establish and publish targets for a reduction in carbon emissions as a result of a reduction in car use;

    (b) publish an estimate of the percentage reduction in emissions which will be achieved through  reducing car use and  the timescale for its achievement; and

    (c) set out details of the steps they will take if this percentage reduction is not achieved by this time.

You can listen again to Tuesday’s Radio 4 Today Programme (at 07:50) at: bbc.

You can see a slightly longer video report by the Baroness on the www.parliament.uk site.

You can also download the reports there at:

  • Report: Behavour Change
  • Report: Behaviour Change (PDF)
  • Inquiry: Behaviour Change
  • Science and Technology Sub-Committee I