Code Reviews

This piece on code reviews landed in my email via an O’Reilly newsletter this morning.

I’ve posted a brief response to it but I wanted to discuss it a little further here. One of the core issues with some code reviews is that they focus on optics rather than depth. How does this code look?

There are some valid reasons for having cosmetic requirements in place. Variable names should be meaningful, but in this day and age, that doesn’t mean they also have to be limited to an arbitrary number of characters. If someone wants to be a twerp about it, they will find a way of being a twerp about it no matter what rules you put in place.

However, the core reason for code reviews should be in terms of understanding what a particular bit of code is doing and whether it does it in the safest way possible. If you’re hung up on the number of tab spaces, then perhaps, you’re going to miss aspects of this. If you wind up with code that looks wonderful on the outside but is a 20 carat mess on the inside, well…your code review isn’t understanding what code is doing and it’s not identifying whether it is safe or possible.

So what I would tend to recommend, where bureaucratically possible, is that before any code reviewing is done, coding standards are reviewed in terms of whether they are fit for purpose. Often, they are not.

It won’t matter how you review code if the framework for catching issues just isn’t there.

Ad-blocking

One of those simmering arguments in the background has been blowing up spectacularly lately. The advertising industry, and to a lesser extent, the media industry, is up in arms about ad-blocking software. They do not like it and to some extent, you can probably understand this. It does not, exactly, support their industry.

There are two approaches which I think need to be considered. The advertising industry and the media industry, instead of bleating about how stuff has to be paid for, need to consider how they have contributed to this mess. On mobile, in particular, advertising is utterly destroying the user experience. When I wind up with content that I want to read because I can’t access because there is a roll over ad blocking it, for which I cannot find a close button, then the net impact is not that I feel a warm fuzzy feeling about the advertiser and the media site in question. The net impact is that I spend less and less time on the media site in question.

So, instead of screaming about how stuff has to paid for with advertising, maybe the media companies need to recognise how advertising is wrecking their user experience and how, ultimately, that is going to cut their user numbers. The fewer eyes they have, the less their advertising is going to be worth. I have sympathy for their need to pay their bills but at some point, they need some nuance in understanding how the product they are using to pay their bills now will likely result in them being unable to pay their bills at some point in the future.

As for the advertising industry, I have less sympathy. They appear to think they have a god given right to serve me content which I never asked for, don’t really want and which might cost me money to get particularly on mobile data. Often, the ads don’t load properly and block the background media page from loading. They have made their product so completely awful as a user experience that people are working harder than ever before to avoid it. Instead of screaming about how adblockers are killing their business, it would be more in their line to recognise that they have killed their business by making it a user experience which is so awful, their audience are making every effort to avoid it.

The ability to advertise is a privilege, not a right. It would help if advertisers worked towards maximising user engagement on a voluntary basis because by forcing content in the way which is increasingly the normal – full screen blocking ads – on users they are damaging the brands and the underlying media channels. Maybe advertisers don’t care. Maybe they assume that even if every newspaper in the world closes down, they will still find some sort of a channel to push ads on.

Adblocking software should be reminding them that actually, they probably won’t.

 

All for the want of a nail

Last week, it was announced that the Web Summit would be leaving Dublin and this caused a certain amount of handwringing about the impact this would have on Ireland. There were muttered comments about hotels and room rates as well.

I found it very difficult to get excited and upset about this. The bigger news in Dublin last week was the “delaying” of the interconnector, a massive, massive piece of infrastructure which the city is screaming out for and has been screaming out for since I do not know when. Dublin public transport is painful.

The other issue is that I’ve never really seen the Web Summit as anything to get excited about. I have never seen it as a technology conference and most of the people I know who went to it worked in marketing or were students. I’ve always felt a lot of claims have been made for it but when push came to shove, they really only seemed to mention one big deal that was done there. And it was the sort of deal which doesn’t happen without a lot of advance preparation. In short, it was the sort of deal which I suspect would have happened anyway.

So where does that leave us? Well, I still don’t care about the fact that the Web Summit is relocating to Lisbon. My personal experience of rush hour traffic getting from Lisbon to the airport in Lisbon would not necessarily lead me to believe things are massively better there. But there are linked issues. We don’t really have the infrastructure for a large indoor conference like that (although let’s face it, we do a decent enough job on music festivals and ploughing championships). The question is, would it be worth our while building somewhere to handle conferences and fairs with an attendance of tens of thousand? I have some doubts. If we learned anything much in the last 10 years – and I doubt it was much – it was that Build It And They Will Come is not a recipe for success. I cannot see the point in doing something like that unless we could identify a minimum number of annual events to make it worth our while to build it. I’m not in event management so maybe someone could come up with it. However, I do have certain interests and can say that frankly I have had cause to look at some of the events which go to the Hannover Messehalle and Frankfurte Messe. We’ve a long way to go.

That being said, the big issue I have with the Web Summit is that it’s not a technology conference much and it certainly isn’t tech sector in my view. It’s event management and that’s it. I don’t think it’s a loss to our tech sector and for all that’s said about it, evidence that it has a major impact on our tech sector seems to be scant. Given the ability to shout about it, I find this curious.

If we are to be concerned about the Web Summit at all, it is purely in the context of whether we want to be able to attract large conferences/fairs/shows to Dublin and whether, given our relative isolation, we would be able to. We can be expensive enough to reach if you’re not on a point to point connection. So no decision on whether the loss of Web Summit is good or bad should be made in the context of ochon o my chroi, we’ve lost the Web Summit, but in the hard cold calculations of whether we can, at least 4 times a year, get large numbers of people to come to Dublin for a conference of any description. When I look at the conferences I’m more familiar with such as CeBit in Hanover and the London Stationery Show (I have diverse interests), I recognise that we are nowhere close to even being able to start with these things. And for all the big shows which take place like the various car shows, yes these places have airports. Most of them also have rail connectivity to other urban areas. Put simply, I doubt you could argue in favour of a large conference venue in Dublin absent a high speed train connection to more places than Cork and Belfast. We are not Frankfurt, we are not Hanover. We are not London. Our hinterland is too small for things like this in my view. For all that Portugal has a bigger population, I’m not convinced that they are any better either.

I’m of the opinion that if Web Summit genuinely had a vision of a future where they were huge and could bring that level of audience to Ireland consistently, they would be able to build their own premises as a conference centre. If the demand for large conferences in Ireland was there, it would make them a profit. If it isn’t, it wouldn’t. They’ve very obviously voted with their feet.

GIT and open source, the victory or not

During the week, Wired published a piece under the title Github’s Top Coding Languages Show Open Source Has Won.

This is basically – and I am being diplomatic here – not what Github’s Top Coding Languages shows.

Fundamentally, for Github to show this, every piece of operational code would have to be on Github. It isn’t. I’d be willing to bet less than half of it is, and probably less than a quarter, but that’s a finger in the air guess. Most companies don’t have their code on Github.

What Github’s top ten coding language shows is that these are the ten most popular languages posted by people who use Github. Nothing more and nothing less.

I suspect Github know this. I really wonder why Wired does not.

 

National bus stops

Having done Dublin Bus, it occurred to me to see if the Bus Eireann network was available. It is.

BusEireann

This is actually a bit more interesting than the Dublin Bus one for various reasons, specifically the gaps. I’m fascinated by the big hole in the middle and I will probably look at doing some additional work in terms of other spatial data.

I’ve just been asked where I get the data and it’s remiss of me not to credit the data source. The data for both Bus Eireann and Dublin Bus, plus a number of other operators is available on Transport for Ireland’s website. The link is here.

I haven’t cleaned up this graph all that much and I have additional plans for this and the other transport data that I have been looking at.

The beauty in Dublin Bus Stops

I have an ongoing project in the area of public transport in Dublin, which has a) stagnated for a while and b) grown a bit since I have had to interact more with public transport in Dublin.

DublinBusStops

This is one of the items on the project list. This image is a scatter plot of Dublin Bus latitude/longitude values for Dublin bus stops. The file this is based on, which I pulled into Excel to do this (yes, I have other plans involving R at some point which may see this revisited) has more than 4700 datapoints. Looking at it like this, I’m going to see if I can find a similar dataset for street lights. I think it’s a rather beautiful looking spiders’ web.

 

Flight routes operated by Aer Lingus out of Ireland

Following yesterday’s project with the Ryanair route data, I did the same for Aer Lingus this morning. I included one extra chart, mainly because of the northwest Atlantic destinations which are served by Dublin and Shannon and I wanted a view on how many airports service two routes.

So here are the charts.

AerLingus_EX_IRL

Complete network

AerLingus_EX_IRL_2

Airports serving at least 2 routes

AerLingus_EX_IRL_3

Airports serving at least 3 routes.

So there are a couple of points to note about this. Both the Ryanair and Aer Lingus data were imported into Illustrator to build a web friendly file format (I exported the graphs as PDFs. I am primarily an expert in Photoshop rather than Illustrator so there are a few things I missed yesterday, which I could fix on today’s files particularly with respect to label positioning. I did this specifically for the second and third charts.

The underlying data have some similarities. For Aer Lingus, Dublin has something in the region of 80 destinations which is not that dissimilar to Ryanair’s offering. Aer Lingus flies out of a couple of extra airports, namely Belfast and Donegal but the routes concerne are limited – Belfast targets London at the moment, and Donegal targets Dublin. The other point to note about this data is that it includes destinations operated by either Aer Lingus, or Aer Lingus Regional (operated by Stobart) but not connecting destinations beyond their hubs in North America, for example. Direct flights only.

Just a brief comment on those airports with three or more routes outbound: they include the following:

  1. Cork
  2. Dublin
  3. Shannon
  4. London Gatwick
  5. London Heathrow
  6. Manchester
  7. Birmingham
  8. Bristol
  9. Edinburgh
  10. Lanzarote
  11. Malaga
  12. Faro

This is significantly UK focused compared to Ryanair which was highly holiday destination focused. I’m not saying you couldn’t go on your holidays in Manchester or Birmingham…but I suspect most people don’t.

I am not really finished with this project – I have a couple of other thoughts about it and I’d also like to look at combined connectivity out of Ireland across all airlines. That data is going to take a while to gather up and certain things I want to do I am not sure are possible using Gephi. I will also look at graphic decisions like the fonts and colours as well.

Flight routes from Ireland operated by Ryanair

Flights operated by Ryanair from Ireland

The image above is a network chart of flights out of Ireland as operated by Ryanair from the following airports:

  • Cork;
  • Dublin;
  • Kerry;
  • Knock Ireland West; and
  • Shannon.

The data is not organised geographically, but in terms of connections between nodes. The nodes on the charge are various airports, and the links, or edges are operated routes. This chart shows all the connections between the five Irish airports above and any airport that Ryanair flies to from those airports.

However, Gephi allows you to fine tune what you want to see, and so there is this:

Ryanair_EX_IRL_3

This basically includes only those nodes which have three connections to other nodes. So only those airports which are destinations for at least 3 other nodes in this network. If you like, it basically includes destinations which are served by Ryanair from at least three airports in Ireland. Without looking in too much detail, you could probably guess a few: London Stansted is an obvious candidate. Dublin still has the most connections; this is not surprising as it had 80 or so to begin with.  But the target airports are interesting:

  • Alicante;
  • Faro;
  • London Stansted;
  • Malaga;
  • Tenerife South;
  • London Gatwick;
  • Palma;
  • Lanzarote;
  • Milan Bergamo;
  • Girona Barcelona; and
  • Liverpool.

Most of those airports, with the exceptions of London Gatwick and Stansted, and Liverpool, are holiday destinations. The outlier – as in the one I did not really expect to see – was Milan Bergamo.

The graph would probably be bigger if I stripped it down to airports with two connnections, mainly because Dublin has destinations in common with most of the other airports. Fuerteventura is one of the few destinations which is served by Cork and Shannon but not by Dublin, for example.

Gephi is a really nice tool to use for stuff like this and I have other plans for it. This is actually the first project I have done using it and I have an interest in figuring out how much more I can customise to use more data. For example, there is no weighting on any of the edges in either of the graphs above, and that parameter could probably be used to demonstrate frequency or seasonality. I have other plans as well. I also have plans to do something like this with bus routes in Dublin and general public transport, for example.

Couple of notes about the data:

  1. Route data was collected on 12 May 2015. As such, it will go out of date as Ryanair update their routes out of Ireland.
  2. It does not take account of any seasonal differences: all of these flights may not operate year round. Personally am considering a flight to Grenoble myself as I did not know one existed until today.
  3. This is a proof of concept for other work I want to do later with transport routing.
  4. I will probably look at other airlines later if I can access the data easily.

this is about data and technology and where I interact with both