Monday, January 28, 2013

Bluetooth devices don't always admit all of their capabilities

The Bluetooth protocol is used to communicate between all manner of diverse types of device. In order to ensure that you don't try to do something silly like play music on your heart rate monitor, devices must declare which of the various profiles it supports. Of course it is becoming increasingly common for devices to be capable of multiple different functions and so the standard allows them to declare support for more than one profile.

The most common type of Bluetooth device, is a hands-free unit which allows you to make phone calls while driving your car without taking your hands off the wheel. These devices implement the Hands-Free Profile. These devices must be capable of outputting sound, so it should in theory be possible to use this device for listening to the music stored on your phone.

Unfortunately, many of these devices don't declare that they implement the A2DP profile. Perhaps this is  because the A2DP standard states that devices implementing this profile should be capable of outputting high quality audio and many hands free units have poor quality - but high quality is a subjective judgement which should be left to the user to decide.

If you have such a device, don't panic because  there is an android application called BT Mono which can solve the problem for you. It works by fooling your hands free unit into thinking there is a call in progress and then whatever sound you play on your phone will be directed to the hands-free unit.

Saturday, January 26, 2013

Do modern smartphones support magic?

Arthur C Clarke famously declared "Any sufficiently advanced technology is indistinguishable from magic." Modern SmartPhones are certainly close to passing this test.

I recently upgraded my phone from a Samsung S2 to a Samsung S3. I didn't upgrade for the new features (it should suffice to know that I also invested in a screen protector at the same time), but I am still excited to learn how far technology has advanced in the year or so since I bought my last phone.

The one feature which really amazed me is that if I open a contact record in my address book, I can call it without even pressing the "dial" button. All I need do is simply hold the phone up to my ear and it assumes that I want to call the contact on the screen. To be honest I don't know how it works, but I was just prompted to enable this feature when I first opened the address book. I assume the phone's accelerometer can detect the fact that I raised it up quickly before holding it still - but as Arthur said all those years ago, it is hard to be certain that magic is not involved.

Thursday, January 24, 2013

WiFi Ruler - an essential Android App

One of the good thinks about living in a well developed country is that you can get mobile internet access most places. What is even better is the fact that, you will nearly always be able to find a café or similar establishment which is willing to offer free Wifi internet access. However,  one thing that really annoys me is that many of these free access points will require you to click on a button to say that you accept their terms and conditions of use. I understand that mostly they have been advised to do this by overly cautious lawyers, but it is really quite ridiculous because nobody ever reads those terms and conditions anyway and if you were tempted to engage in illegal activity you would hardly be put off by the need to click on a button.

The reason why this feature is annoying is because many people would like to set up their phone to automatically connect to certain WiFi access points when encountered. This saves you the bother of explicitly configuring your phone to connect to the WiFi service every time that you enter the café. However, if the café has a "clickwall" connecting to the WiFi is not enough to give you internet access unless you explicitly launch your phone's browser and click on the button. What is even more frustrating is that your phone will probably disconnect from your mobile provider's 3G service on the assumption that you don't need this when you are connected via WiFi.

Luckily I recently found out that there is an Android app called WifiRuler, which can solve this problem. It allows you to set up rules for what to do immediately after you connect to a particular WiFi service e.g. click on the accept point or enter your username/password. This application will stay running in the background and automatically accept the terms & conditions on your behalf. There is even a blog where you can get new versions.

There is a paid and free version of the application, but to be honest I am not sure what the difference is.

Tuesday, January 22, 2013

Book Review: The Seven Deadly Sins

I have previously made my position on Lance Armstrong quite clear - I believe that he is a hero and I don't think particularly highly of the people like David Walsh who have spent so much time hounding poor Lance about his drug use. It is not that I believed that Lance never used performance enhancing drugs, it is just that I didn't think it was a really big deal since apparently practically all of the leading cyclists use such products. Therefore I probably would not have bought this book, but since I received it as a Christmas present I enjoyed reading it. I suppose it is always good to read materials which challenge your assumptions.

The sub-title of the book is "my pursuit of Lance Armstrong" and the cover photo shows a silhouette of a cyclist in racing gear. This makes it quite clear that the author thinks of himself as a hero. I was personally put off by the implication that his persistence and dedication in sticking doggedly to this story over the years is somehow comparable to the dedication required of a professional cyclist.

The first thing to note is that the book is very well written. David has been a journalist for many years and clearly knows how to lay out the narrative in a way that is quite gripping.  He really described the life of a sports journalist very well, even if I think he has an overly high opinion of the importance of his profession.

While I previously thought of David as a virulent anti-drug campaigner, it is clear from the story that he started out quite ambivalent on the topic and only developed these strong opinions after observing the effect that drug use was having on professional cycling. As I read the book, I also found myself constantly re-evaluating my own attitude towards drug use in sport.

However, while the author eventually becomes convinced that this is clear choice between right and wrong. He thinks that drug abuse in sport is a terrible cancer which must be fought at all costs, but I still think that there is a lot of moral ambiguity in this story. For example, David is gushing in his praise for Betty Andreu and the role that she played in bringing down Lance Armstrong - but I think the morality of her actions is very questionable.

The quick summary of her story is that she and her then fiancé Frankie Andreu (who was a professional cyclist) were visiting Lance Armstrong in hospital while Lance was undergoing treatment for cancer. She claims that she overheard Lance tell doctors about his use of performance enhancing drugs (in answer to the standard question "what other medication are you on"). Betty subsequently repeated this story to David Walsh when he was researching a his book LA confidentiel. Lance still claims not to remember this conversation, but Betty is adamant that she heard it because it caused her to tackle her husband Frankie about his own use of performance enhancing drugs. I tend to believe Betty accurately recalls the conversation, but I have serious reservations about the morality of her repeating it. Even according to her version of events, the doctor asked her to leave the room before he interviewed Lance, but Lance said it was OK for her to stay because she was a friend whom he felt he could trust completely. Admittedly Lance was particularly vicious in his treatment of Betty once she publicly spoke out against him, but I can hardly blame his for being annoyed that she would betray his trust in this way.

As I read this book it became clear that Lance Armstrong is ruthless in pursuing his goals. I suppose that this should not be surprising since he could not have won so many bike races without a ruthless determination to train and win. However, it was scary to read how ruthless he was in dealing with public relations. He went to great lengths to discredit anyone whom he saw as an enemy - especially if that person was a former friend (e.g. Greg LeMond). No doubt psychologists would have a field day analysing how this attitude arose from the tough environment in which he was raised, but this is outside my field of expertise.

Overall I recommend this book to both Lance Armstrong fans and detractors. It is an entertaining read and also a book which makes you rethink your attitudes - what more could you expect in a book. Clearly it was a very good choice of Christmas present - thanks!

Sunday, January 13, 2013

Looking for a Triathlon swimming coach - any tips

One of my proudest achievements last year was to complete a Triathlon. I did it shortly after passing the half century mark and it definitely helped me feel like I will have many productive years alive ahead of me. Therefore, I decided that I will complete one or two Triathlons again this year.

I am not necessarily aiming to be fast, but I do want to make sure I am able to comple the course. I am reasonably confident that I will be capable of finishing the cycling and running legs. Unfortunately, I am not as confident of the swimming leg - typically I need to stop a few times to catch my breath and check direction. I think it would be a good idea for me to team up with a formal swimming coach for a few sessions. Does anyone have any advice for me on who would be a good person to go to for advice?

Thursday, January 10, 2013

Young Scientists in action again

January is often a dull month after the excitement of the Holiday period, but in Ireland the highlight of the month for me is always the Young Scientists exhibition. This years event is kicking off today and I can see that there is a great batch of excellent projects on display This gives me great confidence in the future of the Irish economy to see young people with a great enthusiasm for getting involve in science and technology projects.

I will be helping run the IBM stand on Saturday afternoon and I am looking forward to viewing the projects myself in the morning. The IBM stand will feature a number of exhibits -  I will be involved in showing off the power of the scratch programming environment which is a popular programming environment for young children who are learning to code for the first time. I also believe that there will be a stand representing the CoderDojo movement so we will have a chance to see what young Irish coders are capable of acieving.

Best of luck to all participants!