Monday, July 10, 2017

What do these road signs mean?

Over recent years I have started to notice road signs like these around Dublin. I have been fascinated to find out what the signs are pointing to, but it is hard to guess their meaning since the signs only contain an abstract shape in either black on a yellow background or visa-versa.
Sometimes the signs will appear on their own (like the first example), or else they will be a small addition to an existing sign with many directions as you can see in the example below.


Occasionally I have tried to follow the signs to see where they lead to, but always I have given up after several left/right turns that don't seem to be leading to any particular direction.

Can anyone take me out of my misery and tell me what the signs mean?

Are they a Dublin phenomenon or do they appear in other parts of Ireland? Can the y be found in other countries?


Thursday, June 29, 2017

Adapting to a new MAC

Recently I got an email at work saying that my laptop was due for replacement. The email asked me to choose whether to get a Lenovo laptop or an Apple MAC,. I am not really a fan of Apple products due to their habit of ignoring standard interface conventions. Nevertheless I was persuaded by some co-workers that clicking the apple button was the right choice. The new laptop was delivered very promptly after I clicked on the button and suddenly I had a shiny new MacBook Pro sitting on my desk and I had no choice but to become friends with it.
  • On the positive side
    • The hardware is impressive  The laptop is slim and light and the screen is crystal clear with a very high resolution. It can even be read outdoors on a sunny day.
    • It comes with a solid state disk drive which means that it is lightning fast.
    • The CIO office in IBM has set up a process http://setupmymac.ibm.com which  makes it trivially easy to setup all of the essential applications most people need in IBM in one go. This meant I was productive very quickly.
  • On the negative side:
    • As many of you know, MAC uses the command key for most  situations where most normal computers expect  you to press the control key. This is quite annoying at first, but I am surprised how quickly I managed to learn the new key sequences. This inventing of their own UI conventions is not ideal, especially for people like me who have to regularly use a variety of different operating systems. However, I think I will learn to live with it.
    • What is really annoying is that Apple is into minimal design and hence they decided to remove any keyboard keys that they think are rarely used. One of these is the break key. Many users rarely if ever use this key, but in Lotus Notes there is a convention that you can use ctrl-break to abort any operation which is taking too long. Unfortunately this is a key combination that I find myself wanting to use frequently. A Google search threw up a few suggestions for MAC compatible alternatives, but none of them seem to work.
    • Another missing key is the escape key, but this is compensated by the Touch Bar.  This is a cool strip which contains virtual keys that change depending upon what app is running. For example, whenever an application is running that can accept the escape key, a small esc appears in the touch bar. Likewise whenever Spotify is playing the touch bar has virtual keys for play, skip etc.  (even if it is running in the background).  This is a nifty idea, but most applications don't take advantage of it yet (probably because it is only available on newer MACs). You can also customise the touch bar so it works the way you like.
    • I am a big fan of Bluetooth and I (wrongly) assumed that a modern laptop like a MacBook Pro would have excellent Bluetooth support. To be honest I find the poor Bluetooth performance to be the most frustrating thing about the new laptop. Initially, I connected a Bluetooth mouse and it worked except that I need to turn the mouse on and off every few hours to make my laptop realise that it was still there. Then I connected a Bluetooth keyboard and things got even worse, the laptop looses connection to either the mouse or the keyboard about once per hour (it can be even more often). Finally I added a Bluetooth headset and this seemed to overload the laptop's Bluetooth sub-system completely. The different devices seem to conflict with each other. For example, if I turn off the Bluetooth keyboard (which I often have to do),  the sound on my headset is likely to go up or down. Overall it makes me want to go back to wired devices (if the laptop had proper sockets to plug them into).
Overall I have to say I am still undecided about my decision to go down the Apple route. I am not (yet) looking to take my old Lenovo Linux laptop out of retirement, but I am a still a long way from being converted into an Apple fanboy.

Saturday, June 3, 2017

My neighbour becomes youngest ever Irish leader

There was great excitement yesterday when Leo Varadkar was announced as the new leader of the Fine Gael party. This means that he will almost certainly  be elected Taoiseach at the next meeting of the Dáil.

Much of the press coverage focused on his attributes which would in the past have been a barrier to high office in Ireland.

  • He is on;y 38 which will make him the youngest ever Taoiseach
  • He is openly gay
  • His father is an immigrant from India
Around where I live there is additional excitement since he is a local boy having grown up quite close to where I live and even still lives in the area.

Leo has many positive attributes:
  • He is clever and well educated (he is a medical doctor)
  • I don't think he will be an embarrassment to us in public (unlike other leaders I won't mention)
  • In all previous ministries, he seems ti have been a very competent administrator
  • He is a good communicator and is loved by the media due to his habit of giving a straight answer when asked a question (this sets him apart from most other politicians).
However, I can't be totally enthusiastic about his election. Fine Gael is definitely on the right in Irish politics, but Leo's politics are on the right wing of the party. Many people think that his recent campaign against social welfare cheats didn't set a very good tone. I also didn't like the slogan of his leadership campaign which was that he would represent "the people who get up early in the morning" - this doesn't show much sympathy with people unlucky enough to be unemployed.

I am not too worried however, because Fine Gael need support from other parties and independents and hence his right wing tendencies will be help in check.

Wednesday, May 31, 2017

Windows and Linux command recall compared

I prefer to use Linux, but sometimes I need to use Windows. What is frustrating is that sometimes the operating systems have essentially the same feature, but there are differences in implementation that can trip you up if you forget about them.

Often when you are working at the command line you will need to issue the same command  you used before.(or a similar command). With either Windows or Linux you can easily recall the last command by typing up arrow once or recall the command before that by typing up arrow twice. So far so good, but if you read at the finer details of command recall on Linux or Mac you can see there are quite a few differences to the way the feature is implemented on Windows.

Mostly the differences are different key combinations used which can be difficult to remember when you switch between both systems. However, there are a few things that are significant:
  1. The way recalling commands affects your place in history:

    Linux takes a simple view of command history, while Windows adjusts your perception of history depending upon whether you typed a command directly or recalled it from history. This is a tricky concept, so lets look at example. Suppose you had typed the following commands:

     > command a
     > command b
     > command c

    If you type up-arrow twice and then return, both Windows and Linux would execute 'command b' because this is the second last command, However, the two systems have a subtly different view of your command history after this. Linux takes the view that you typed command a/b/c/b and so if you type up-arrow twice you should get 'command c'. Windows agrees that 'command b' was the last command executed, but if you type up-arrow twice it gives you 'command a' because that was the command executed before 'command b'. If you want to recall 'command c' on Windows, you should type down-arrow.

    The Windows approach is probably superior because it makes it easier to recall a series of commands you executed some time ago, but it can be confusing and it is easy to trip up (especially when you switch between both systems).
  2. The way you search for previous commands:

    If you executed a command involving 'blog.txt' some time ago it might be tedious to have to keep typing up arrow to find it. Luckily both Windows and Linux provide a quick way to find the command in question.

    In Windows you would type the string 'blog.txt' and then hit the F8 key to see the last command containing that text. In Linux you first type CTRL-r and then start typing the text you want to match. As you are typing Linux will show you the command it would match for the text you have typed. The Linux way is clearly better because you can see how much text you need to type to match the command you want or you might decide to match on a different part of the command if you see lots of commands in your history containing the word 'blog.txt'.
  3. History persisting between sessions:

    In Linux your command history is stored in a file, which means that when you start a new session it automatically know your command history from a previous session. In contrast, Windows stores the command history in volatile memory so each new session starts with a clear slate, In general the Linux approach is much more useful, but there can be problems when you have two command windows open at the same time - the command history is effectively a combination of the commands typed in both windows which can be confusing.

Wednesday, March 15, 2017

Personalised weather warnings

One of the benefits of having a personal weather station in your back garden is that you should know about local bad weather events quite quickly after they happen. However, the reality is that I don't constantly check the weather data published by my station, so I decided to implement a personal alert system driven off the data.

The obvious protocol for such an alert system is MQTT. However, the MQTT interface module  of the pywws software that I am using to manage my weather station doesn't seem to want to upload any data. After spending time debugging Python (confirming my dislike of the language), I gave up and decided to pursue an alternative strategy based upon the Twitter updates from the station. I implemented a NodeRed  flow on the IBM BlueMix service which monitored the twitter feed and took various actions depending upon what it saw.

The warning rules I decided to implement were:
  • The station is supposed to tweet a weather status every 10 minutes. If 15 minutes or more have passed since the last tweet something has malfunctioned, so the weather station twitter account (@llweather) sends a direct message to my personal account (@bodonovan).
  • When it starts to rain (an all too frequent event in Ireland), the weather station sends me an @reply message to advise me to bring in any washing hanging on the line.
  • The dashboard in my car warns of possible icy roads when the temperature drops below 3 degrees centigrade. Therefore I decided to get my weather station to also send me an @reply message when this happens (luckily this alert gets triggered less frequently in Ireland, but if I moved to Alaska I would need to tweak the threshold).
  • I don't want to be annoyed by repeated tweets about the same weather event, so I put in some code that alerts of the same type won't be repeated more often than once every 6 hours. 
  • The application is configured not to send any warnings between midnight and 7am. I am interested in weather, but not interested enough to lose sleep over it.
It is quite unusual for the temperature in Ireland to drop below 3 degrees at this time of year. Rather than wait for several months to find out if the temperature warning was working I temporarily set the limit to 10 degrees and this is an example of what I got:
Unfortunately, I didn't have to wait too long to get a real rain warning e.g.:

At some stage in the future I will put some more effort into fixing the MQTT problems (partly as a way to learn Python better). But, for now the system seems to be working fine.

Monday, February 13, 2017

My Personal Weather Station comes back on line

Back in March 2011I set up a personal weather station reporting to Weather Underground. Thus continued to report until September 2014 when the hardware I was using died. I recently acquired  replacement hardware and I now have my site on Weather Underground up and working with data being updated every 10 minutes. I am now using a Raspberry Pi rather than a Tonido plug which I was using last time. But, this useful guide on how to get working on a Raspberry Pi helped make it very easy.

I am still using the pywws library, but I am glad to report that it has become even better since the last time.  Using the new functionality, the site is also twittering regularly and also send updates to the UK Met Office and OpenWeatherMap. The software also supports a number of more obscure web sites so it is really easy to widely share the data being collected.

When I first set up the weather station, there were around 4 or 5 stations reporting from Dublin. However, when I checked recently I see that the number of stations reporting from Dublin has grown to over 50 (possibly helped by the fact that Maplin are selling the hardware in kit form quite cheaply).

Previously I could claim to be the only wunderground weather station in Castleknock, but now there are 4 quite close to me. One is about 750 meters south west of me. Another is 1km east of me, while a fourth station is about 1km further east. When I have sufficient data collected I might do a little analysis about how close are the data point reported by the 4 stations in almost the same place.

Last time I mounted the sensors on the boundary wall. Unfortunately this meant that the wind sensors were blocked by overgrown vegetation in neighbouring gardens. This time I decided the put the hardware on the side of shed where I hope it is less likely to become entagngled.

Tuesday, January 10, 2017

How accurate are wind forecasts for Dublin?

In my last post I analysed temperature forecasts for Dublin and today I will turn my attention to wind.

At first glance, the wind readings seemed less consistent with each other than the temperature readings. In particular, the readings from OpenWeatherMap and WeatherUnderground (WU) were consistently lower than the others. However, when I investigated, I found:
  1. I had been interpreting the readings from OpenWeatherMap as kilometres per hour while in fact they were in meters per second. Once I corrected this error, their readings lined up well with other services.
  2. There was no similar simple explanation for the wind speed readings from WU not matching the other services. It was just a problem with their actual data from Dublin - the forecast data for Dublin and the actual readings from other cities lined up with other services. Since weather underground is built upon data from amateur weather stations, I suspect that the weather station they were using for wind speed readings from Dublin was badly positioned e.g. see  the picture of a weather station of mine which used to report to WU before it broke - initially the readings were reasonable, but then the neighbour's hedge grew taller and began to block wind from reaching the station. As a result, I chose to exclude the WU from the calculation of averages and to compare the WU forecasts with the actual reading from other stations rather than their own readings.
The raw data about wind forecasts is available here and a summary table is given below.

ProviderDecimal PlacesAve ErrFcst1 ErrFcst3 ErrFcst7 Err
weatheronline04.306.137.37
openweathermap24.3010.2211.10
weatherunderground115.834.194.026.04
darksky24.893.314.647.07
BlueMix04.284.675.378.07
yr.no25.973.624.317.97
Average excl WU4.755.596.567.70
Average incl WU6.595.366.137.29

A few observations about this table:

  • In general, the accuracy of the wind forecasts is worse than the accuracy of the temperature forecasts. Although you can't compare Celsius readings with km/h readings, if I transformed the data into % error the same conclusion would be reached. This is probably a reflection of the fact that the wind speed in Dublin varies more from day to day than the temperature.
  • On balance DarkSky is probably the overall winner for accuracy, but BlueMix and yr.no are both very close.
  • Surprisingly the wind forecasts from weather underground are almost as accurate as the best services, but their historical reports are so inaccurate that they could not be considered good.
  • In contrast, the wind forecasts from open weather map are noticeably worse than the other services (and weather online is not much better).

While I was writing this post, I found out about an organisation called Forecast Watch who did a much more detailed analysis of weather forecast accuracy. You can read their conclusions here but the quick summary is that most years the winner for the most accurate forecasts was The Weather Channel (which is now an IBM subsidiary and I refer to a BlueMix), but in a few cases the winner was the Weather Underground (also an IBM company) or MeteoGroup (which was not one of the services I analysed). They analysed forecasts for several cities and they found that the best performing service varies significantly from city to city.

Thursday, December 29, 2016

How accurate are temperature forecasts for Dublin

I got a very positive reaction to my presentation about my weather forecast tracking application on Bluemix. Most people who saw this presentation asked which weather forecast service was best. Unfortunately I had to reply to them that I didn't know because I had only just built the app and never used it yet to do any detailed analysis. This post is an attempt start rectifying that error by looking at the accuracy of the various services for forecasting temperature in Dublin over the last month.

At the innovation showcase event a number of people spoke highly of  the Norwegian forecast service yr.no and claimed that it was the most accurate in their experience. Therefore, I decided to add this service into my data collection service (it is a testament to the flexible architecture that this was a relatively easy task) and wait until a month had passed before beginning analysis so that we had  enough data from them to compare.

I chose to initially analyse data from Dublin since this is where I live. I analysed temperature readings and forecasts for the period from 22nd of November to 21st of December 2016. I looked at the actual weather reported as well as the forecast for next day and the forecast for 3 days time. Some of the services offered forecasts for further into the future, but I chose to pick the 3 day forecast because this was supported by all services. If you want, you can see the actual data here.

The thing that most people commented upon at the innovation showcase was the fact that actual temperature data reported by each service did not match up exactly. When I analysed this, I noticed that some of this difference was down to data rounding. The temperature data reported by OpenWeatherMap  and DarkSky is given in celcius with 2 decimal places, in contrast WeatherUnderground and yr.no only give a single decimal place and both WeatherOnline and the BlueMix weather data are reported in whole numbers.

People asked me which service was actually correct, but the truth is that I have no way to tell. What I decided to do was to compute the average of the temperature reported by all services and then comparing the number reported by each service to this average. As you can see from the table below, the average error was actually quite small - not much more  than the average of 0.25 degrees which would be expected from rounding error. Interestingly, the yr.no service has the greatest level of difference from the average.

For assessing the forecasts I looked at the difference between the temperature that was forecast 1 or 3 days earlier and the actual temperature reported on the date in question. I also looked at the forecasts for one week ahead, although this could only be done for 4 of the 6 services since WeatherOnline and OpenWeatherMap don't supply 1 week forecasts.

The average level of error was slightly higher for 3 days in advance  (1.74 degrees) than it was for 1 day in advance (1.41 degrees) and higher again (1.95 degrees) for 7 day forecasts. The most accurate forecasts were from the BlueMix weather service across all 3 timespans. The second most accurate 1 daya forecasts were from the yr.no service although the 3 day and 7 forecasts from yr.no were definitely worse - the 7 day forecasts from yr.no were the worst of all services..


-->
ProviderDecimal PlacesAve ErrFcst1 ErrFcst3 ErrFcst7 Err
weatheronline00.391.201.37
openweathermap20.371.932.21
weatherunderground10.581.962.012.30
darksky20.521.591.791.30
BlueMix00.520.800.801.30
yr.no10.750.962.282.90
Average0.521.411.741.95

-->

Overall, I think the conclusion is that the temperature forecasts are actually quite close to the  actual values, but the details might vary if I looked at a longer time period and/or more cities.

In reality temperature forecasts are relatively easy since temperature doesn't vary widely from day to day in this part of the world. Next I will look at wind speed forecasts since these might be more variable and also because I have been told that they are closely watched by insurance companies since wind speed correlates with weather damage,



-->-->

Saturday, December 3, 2016

Where the streets have too many names

U2 had a big hit with a song named "Where the streets have no name", but in Ireland many streets have more than one name. Sometimes the change is minor, like when "Baggot Street Upper" becomes "Baggot Street Lower", but other times the streets have totally unconnected names. This is very confusing for visitors and locals alike.

One of the worst examples starts off in Rathmines, where you can travel 3 km along a straight road but officially be walking on 9 different street names:
  1. The journey starts on "Rathmines Road Upper".
  2. As you head north you will see that the road becomes "Rathmines Road Lower" which probably is no surprise.
  3. Continue straight and as you pass over the canal and you will see that for a short time you are travelling on "Richmond Street South". If this was not confusing enough, after a short while you will come to a junction where you can either continue straight or turn right and in both cases you would still be on  "Richmond Street South".
  4. Assuming you keep straight, the road will transform itself into "Camden Street Upper".
  5. Unsurprisingly this road changes its name into "Camden Street Lower".
  6. However, if you continue straight on the same road, you might be a little confused to find that the road transforms again into "Wexford Street".
  7. Many Dubliners know "Wexford Street", but relatively few realize that if you continue walking straight along this street you will be on "Redmond's Hill". If you are looking for this piece of the road, don't be fooled by the name into thinking that there should be some slope in the road - this is a perfectly flat stretch of road.
  8. If you are confused to find yourself on "Redmond's Hill", don't worry - it only lasts about 100 meters or so before transforming into "Aungier Street".
  9. "Aungier Street" is reasonably long, but clearly some city planners decided that it was too long since it changes without warning into "South Great George's Street". Don't be fooled into thinking that walking north on "South Great George's Street" would bring you to "North Great George's Street" - that street is several km away in a different part of town. Instead the road comes to an abrupt end in a T-junction with "Dame Street" (needless to say "Dame Street" also has several names)..
Is it any wonder that tourists get confused when they ask someone what street they are walking along and they are told "Aungier Street" and then 5 minutes later they ask someone  else and they are assured that they are walking along "South Great George's Street" despite the fact that they have been walking straight all the time.

Sunday, November 20, 2016

Confusing presidential ballot

I am lucky enough to have an absentee ballot in US presidential elections. Of course I knew that Clinton and Trump were battling it out for the Democrats and Republicans. I vaguely heard that there were additional candidates for the Libertarian and Green parties, so I was expecting to see 4 names on the ballot, However, when I got my absentee ballot, I was surprised to see 8 candidates that I could vote for, Closer scrutiny revealed that many of the candidates were listed more than once.

Hillary Clinton is the candidate for the Democratic Party, but is also listed separately as the candidate for the Women's Equality Party and the candidate for the Working Families Party (neither of which I heard of before). Likewise Donald Trump is listed as the Republican Party candidate and separately listed as the candidate for the Conservative Party (which I thought was based in the UK).

I had vaguely heard that Gary Johnson was running for the Libertarian candidate, but the ballot also lists him as the candidate for the Independence Party. Poor Jil Stein of the Green Party is the only candidate who has to make do with a single listing on the ballot.

What I am not sure of is if it makes any difference if I tick the box beside the Democratic Party or the box beside the Working Families Party? Could it be that Hillary and/or Donald are splitting their vote or do the counters amalgamate both sets of ticks?