LED Brake light conversion for a 1993 Triumph Tiger (version IV)

So, a few years after version 1, I have now completed my 4th iteration of this idea.

Version 2, was more 5mm LED’s like the 1st, but was unreliable.  Version 3 used the same LED’s as version 4 but with a 556 timer as in version 1.  Version 3 got very hot – so hot in fact it started to smoke.

This version is an interim version as it still gets too hot on full brightness.  Fortunately, the brake light only requires a fraction of the maximum output, so is perfectly useable for long periods of time.

New for version IV is the 12F675 PIC Micro Controller.  This was my first dabble with Micro controllers and I am hooked.  The reason for the change is that the PIC can do PWM like the 556 timer, but with less circuitry.  It also enables me to modify the brightness of the output without the need for me to take the cover off and adjust variable resistors (and it can also do 0-100% duty cycle).  This is the source code for the PWM and the control on the 675 chip.  Todo: Add watchdog timer support and maybe add option to reduce brightness steps.  Having looked at some PWM code on the net, I decided to create my PWM code from scratch.   I did try a 2 timer approach, but found that a single timer worked better for me.

Continue reading LED Brake light conversion for a 1993 Triumph Tiger (version IV)

All-in-One Fix for HTML Content Synced to iCal or Outlook’s Calendar

This is a simple plugin I wrote to help out a colleague who looks after TVAM.  A lot of their calendar entries contain HTML content which renders horrendously in iCal and Microsoft’s Calendar application.  I made an enquiry on the developer’s website regarding the implementation of stripping HTML tags from events synced with desktop calendars and was informed this would be a chargeable customisation and not a bug fix (we had a little chuckle about that).  Given their time frame was at least a month to even look at the problem and that I wasn’t going to be parting with any cash to fix a bug, I figured how hard can it be to make a plugin to fix the problem…  Well, a few hours later, I have written my first WordPress plugin that does exactly what I need.

Many thanks to Jon Abernathy, aka Chuggnutt over at chuggnutt.com who saved me a lot of time with his HTML to Text class.  It was the second class I tried, and the better of the two by a good margin.

Having fixed the problem myself, I imagine that Timely will fix the problem in an upcoming release.  Until then, this is the support page for this plugin.  If you have any issues or requests, post them here and I will try my best to get back to you with an answer.

The plugin can be downloaded here.

People who have already subscribed to your calendar may need to re-subscribe to clear out the old HTML content.

The Collecting of my 1993 Triumph Tiger

This is the story of the day I collected Tigger.

Like a lot of things in my life, doing something simple like this had to be different.

I saw the Tiger on eBay back in August 2008 and immediately fell in love with the colour. It was too far away for me to visit before the auction ended, so I took a gamble and purchased it based on the photos and description. Although it was claimed to be rust free, I could see that the wheels were in poor shape and would need attention. The seller also noted that there was a problem with the “carbs” and that a “guy” was going to do a full inspection of the bike to ensure that it was 100% before collection.

The Auction finished in August but because of my commitments and because the seller was going off on holiday I wasn’t able to collect it until September. In the meantime, I paid a deposit and, as the TAX would run out at the end of the month, I applied for a new TAX disc online using the current owners details so that I would be totally legal when collecting the bike.

The eventful day arrived when I would be traveling up to Warwickshire to collect the bike. I had my flatmate drop me off at Reading train station to catch the train to Nuneaton and meet the seller who would pick me up from the station. Even though the seller was throwing in a helmet, I was carrying all my gear and a helmet as I am not a fan of using second hand helmets.

The journey seemed fairly quick and it wasn’t long before I was walking around Nuneaton station looking for my lift. I figured I was fairly recognisable, being 6’3″, sporting a goatee, and either carrying or wearing my motorcycle gear. On the other hand, the person I was looking for was a complete unknown, so I gave the seller a call. He asked if I was carrying a helmet, and I said I was. He then said he thought he could see me, so I started looking around. I could see a guy, some distance off, walking purposefully towards me with a phone in his right hand. I told him that I could see him and hung up.

Continue reading The Collecting of my 1993 Triumph Tiger

Repairing Schuberth SRC System

OK, so my Schuberth SRC system kept turning itself off within minutes of it being turned on. At first, I thought it might have been because it wasn’t fully charged, but I ruled that out quite quickly. Having opened my SRC system in an attempt to improve the radio reception, I anticipated that Schuberth would not be interested in fixing the unit so it was up to me to see if there was anything I could do to solve the problem.

[singlepic id=107 w=320 h=240 float=right]It didn’t take long to get everything apart and see that my assumptions about the location of the battery and the components was incorrect.

It also didn’t take long to find out where the problem was. There was a ribbon cable between the two sides shielded by quite a thick metal sheaf.  Clearly, there had been a lot of movement of the shield as it was no longer soldered to the units at either side. Within the metal shield, and near the one end, the ribbon cable had been folded and flattened. Constant movement of the shield and the cable had caused the ribbon cable to fail where it had been folded.

Getting a new ribbon cable of the same size and type proved to be difficult, so I had to search for a 12 pin 0.50mm pitch ribbon cable that was longer than the original. In the end, I was able to get two off eBay for around £7.00 each which I was really pleased about; £14.00 instead of £200.00 for a new unit or the unknown cost of having had it serviced by Schuberth.

I did make one mistake whilst servicing the cable. I was a little impatient with one of the locking tabs of the ribbon cable and broke it off in my haste. I thought this was going to cause me a lot of grief, but I was able to to use a strip of plastic from the top of a headache tablet strip, fold it in half, and wedge it behind the ribbon cable like the original tab would have done. It took a long time to get the cable and the plastic wedge into place and ended up being as snug a fit as the original plastic tab. I doubt it will move before I have to replace the cable again (which I hope I won’t have to do).

[nggallery id=10]

Truly Awful Code

So, on the back of my previous post about people designing applications for mobile devices having never even used one, I am now working for an employer who would appear to have never read any guides on how to code in Objective C – or any kind of language for that matter.

We’ll start with this simple bit of code that is not only written badly, it also contains 2 errors!  Assuming this person had any schooling, I think they missed the classes on “else if”, “switch statements”, “enumeration” and “top down programming”.

[sourcecode lang=”c”]
if (yourScore < 12) { gameState = 1; } if (yourScore > 12) {
gameState = 2;
if (yourScore > 24) {
gameState = 3;
if (yourScore > 37) {
gameState = 4;
if (yourScore > 49) {
gameState = 5;
if (yourScore > 62) {
gameState = 6;
if (yourScore > 74) {
gameState = 7;
if (yourScore > 87) {
gameState = 8;
if (yourScore == 100) {
gameState = 10;

The two errors are:

  • How does one achieve game state 9
  • And what if a persons score == 12

Continue reading Truly Awful Code

How not to design an application for the iPhone

I recently did some work for a company on the south coast:  It was a five day project that turned into three weeks.

When the project finished, I was asked if I could create an iPad version of an iPhone application they had written for a very large proprietor and lender of DVDs, here in the UK.

I began by looking at the source code and function of the existing application and was horrified by its lack of integration into the whole iPhone experience.  There was a very small, and poorly implemented version of coverflow on the main page with a UITableView immediately below it.  If the UITableView contained content that expanded upon the selection of  the current item in the coverflow, I think it would have worked, but the two items contained no correlating information.  What I found worse, was that coverflow was the ideal presentation for this reseller and it was only used to showcase 25 items on the landing page and all other DVDs and titles were presented in a table view with no option to tilt the phone sideways to get a coverflow representation of the content.

For me, the biggest problem in the design, was the director, who was an Applephobe, taking every opportunity to slate their products without any real knowledge of their use – to be fair to him, he was not very “PC” and belittled everyone who worked for him and actually said, “c’mon play the white man”, when talking about an alarm company who wouldn’t give him discount.  When I began querying him on the design, he openly admitted that he hadn’t actually used an Apple handheld device and that he had certainly not used any other applications or Apple’s own applications to compare form and function.  True to my nature, I blurted out “I can’t believe you have designed an app without looking how other applications work on the iPhone”.  Immediately he replied that he was putting the iPad project on hold and that it would be designed “in house” – great, here I am, a paid technical resource trying to help with your products and you chose to ignore that knowledge and stick with what you know – or don’t know in this case.

Mark Twain on this matter:

All you need in this life is ignorance and confidence, and then Success is sure.
– Notebook, 1887


Triumph Configurator iPhone App

[singlepic id=91 w=64 h=64 float=left] This is my take on the the Triumph bike configurator for the iPhone.

It is currently Beta as there are still a few bugs and features that need to be removed/added.

The following are screen shots from the App.  There is the main screen where you choose the bike and the language in which you want to view prices and information, followed by sample customisation screen shots :

[singlepic id=87 w=320 h=240 float=] Continue reading Triumph Configurator iPhone App

Lame Interviewers and Techniques

I have just come back from an interview for a job that I really wanted.  I found the person asking the technical questions to be vague; “an application is having issues, how would you go about troubleshooting the problem”.  Hello?  Is it web based?  Is it reliant on a database or storage?  For fucks sake, give a candidate more to work on than that.  If possible, give them a real world example that you have come across yourself.  I wonder how much real world experience people like this have themselves if the best question they can ask is as vague as this.  I was asked four similar questions like this and felt that I was let down by the interviewer rather than by myself.  The only technical question I was asked, was about the configuration of Apache and Tomcat.  Now, I have done lots of Tomcat and Apache, but it has been well over 6 months since I actually had to configure anything, so asking me what the Apache configuration file should look like is stretching my memory at the very least.  Given that most System Administrators support any number of applications, expecting someone to have detailed configuration knowledge of something they haven’t been working on the day before is expecting a lot – especially in an interview environment.  I have given technical interviews and know that you don’t expect exact answers, and if you want to get the most from the person you are interviewing, you give them specific problems for them to work through and not just some vague randomness.  If they can’t answer one question, move onto something else, maybe ask what they have been working on more recently and quiz them on that or ask them if they any projects they have worked on outside of the office, etc.  By adapting your interview to the person being interviewed, rather than having a rigid (read lame) structure, you are likely to find a more skilled candidate.

Now, if I could only get that retard to read this.

About the best analogy I could come up with, would be asking a cook what are the specific ingredients for a sponge cake they haven’t made in 6 months when all they have been making recently, is main course.  Both involve cooking; either they can cook or they can’t, so asking them details about the the more recent items will let you know whether they are up to making a sponge cake (after all, configuring Apache+Tomcat is not difficult is it?).

Review of Schuberth SRC for the C3

Having owned a black C3 helmet for almost 2 years, I recently bought a new Schuberth C3 helmet in Fluo Yellow for my daily commute.  I was offered a good deal on buying the helmet with the Schuberth SRC system that I couldn’t refuse.  I would like to point out to Schuberth, that paying the full RRP, of £280, for this system is way too expensive, and will deter a lot of people making this purchase.  Knock a £100 off the asking price and I am sure most C3 owners would save their pennies and buy one of these.  I would even go as far to say, that some people might actually go out and buy the C3 helmet just to have the easy integration of wireless communication, bluetooth and radio.

I absolutely love the way the SRC system integrates into the helmet.  Yes, it adds a bit of weight, but it is barely noticeable, and the convenience far out ways the minimal weight increase.  The only real issue I have had with the installation is that the flip lid requires a bit more effort to close than it does without the SRC system installed.  Maybe this will get easier with use.


Although I have not been able to test the rider communication, I have been able to test the bluetooth integration with my mobile phone and TomTom GPS unit, as well as the radio.

I have to say, the radio reception has been really poor.  I live in Berkshire and ride to London most days.  Outside of London I have hardly been able to receive a signal of any quality.  The radio constantly crackles and the signal fades in and out – so much so, that I have elected to void the warranty and take the system apart to see if there was anything I could do to improve the reception myself (video after the break).  I have soldered a wire onto the thick metal strip that runs around the back of the helmet and will let you know how I get on.  I would be interested to know if I had a faulty unit or whether or the SRC systems are this bad.

Continue reading Review of Schuberth SRC for the C3