My third iPod

That’s right. My third in eight months. My second iPod, which arrived February 23rd 2005 broke a couple of weeks ago. Today I have received my second replacement. Suffering from similar symptoms as the previous plus I couldn’t update it and then screen stopped working.

Apple have been pretty good though. I called them last Monday, they picked it up on Tuesday and now I have a brand new one. Lets hope this one lasts.

Extracting email addresses

Recently I had to send an email newsletter to many recipients. The email addresses supplied were in a single column of a spreadsheet. My mass email sending application uses a comma separated list of addresses. Not usually a problem, a simple CSV export of this list does the job. Only in this case some email addresses were not in a valid format.

For examaple:

foo@domain.com [foo@domain.com]

I needed a quick way to identify each of these non-valid addresses and manipulate them into a usable format.

Using Excel, I came up with the following formulas to check and correct each bad address.

Step 1 – Identifying a bad address

With one address in each cell starting in cell A1, I placed the following formula in B1 to discover if A1 contained an opening square bracket.

=FIND("[",A1)

If A1 does contain a bracket, then B1 returns the numeric position of the first occurrence. If there is no bracket, then an error is returned. To avoid this error we can place an ISERROR statement around the FIND statement as follows:

=ISERROR(FIND("[",A1))

Now the B1 cell will return either TRUE or FALSE. Therefore if the cell in question does contain a square bracket, then there is no error and we need to do something, otherwise we’ll be happy returning the valid email address. We can do this with the IF statement.

=IF(ISERROR(FIND("[",A1)),A1,"do something")

Step 2 – Locating the email address

The way I have chosen to return the email address is by extracting the string from inbetween the two square brackets. To do this I used the MID function. This allows me to return the characters from the middle of a text string, given a starting position and length.

=MID(text,start_num,num_chars)

The first property of this function is easy, A1. For the second part I need to find the opening bracket. This can be done by using the previous function FIND. As this returns the location of the bracket, I need to add 1 so the bracket itself is not returned.
For the last property (num_chars), I’ll use FIND again, but as this property is a count and NOT the end position I need to subtract from the position of the first bracket.
The final MID function looks like this.

=MID(A1,FIND("[",A1)+1,(FIND("]",A1)-(FIND("[",A1)+1)))

Step 3 – Joining the two functions together

Copy and paste the MID function in place of the “do something” statement (whilst remembering to remove the = sign). The final statement looks like this:

=IF(ISERROR(FIND("[",A1)), A1, MID(A1,FIND("[",A1)+1,(FIND("]",A1)-(FIND("[",A1)+1))))

Step 4 – Apply to all rows

Now we simply double click the little square in the bottom-right corner of the A2 cell to copy this formula to the rest of the rows containing data. Then, copy column B paste the values into a new worksheet and save as a CSV.

Nintendo Revolution

Nintendo have announced their contribution to the next generation of consoles with the new Revolution. I’ve always had a soft spot for Nintendo. Maybe it’s their toy-like approach or the nostalgic memories. Maybe it’s Mario Kart and Goldeneye. The Revolution is surely the underdog here against the Xbox 360 and the PS3. I certainly think they’ve got the design and the size right though. Let’s hope it has some good games to back it up.

PlayStation 3 announced

Today Sony has announced the new PlayStation at E3. It’s only fair that I mention it. Nintendo are also set to announce their new Revolution console in about 5 hours time. I don’t like the look of it. I was hoping for a smaller unit like the second PlayStation 2. The controller looks awkward, like … Continue reading “PlayStation 3 announced”

Today Sony has announced the new PlayStation at E3. It’s only fair that I mention it. Nintendo are also set to announce their new Revolution console in about 5 hours time.
I don’t like the look of it. I was hoping for a smaller unit like the second PlayStation 2. The controller looks awkward, like it’s going to fall out of my hand too and when I get frustrated with it and launch the thing across the room – it’s gonna come straight back! I just watched the trailer for Killzone and that really is impressive.
Only time can tell what’s going to be the better of the two. Personally, I can’t wait!

New Xbox 360

Microsoft have announced their new console – the Xbox 360. Promising launch by Christmas this year backed by an affordable price of around £160. It’s certainly a lot smaller and nicer to look at. Rare are developing Perfect Dark Zero, which will be a highlight for me. The original and Goldeneye both on the Nintendo 64 were pioneers of the first person shooter genre.
And at last they’re introducing cordless controllers – how long has that taken!?

Soulwax gig

I’ve been very busy lately and still trying to recover from the stag do last weekend. So this is a little late. James and I found ourselves at the Highbury Garage on Thursday to check out the electro-rock 5 piece Soulwax (aka 2 Many DJ‘s) for the first time in about 4 years.

I’ve been very busy lately and still trying to recover from the stag do last weekend. So this is a little late.
James and I found ourselves at the Highbury Garage on Thursday to check out the electro-rock 5 piece Soulwax (aka 2 Many DJ‘s) for the first time in about 4 years.

Continue reading “Soulwax gig”

Barcelona stag weekend

Jai in a kilt
Jai in a kilt

Spent last weekend walking around the beautiful city of Barcelona for Jai’s stag do. I’ve been there before on a 3 day training course and managed to get up to the Gaudi Park, albeit at night.
It’s amazing to me how little of a place you can see on a 2 day stag do. Trying to make 17 half-cut men walk 100 yards and not lose each other is hard enough as is it, so it’s not surprising that we didn’t see a single Gaudi bulding.

Continue reading “Barcelona stag weekend”