Tuesday, November 24, 2009

External Drives on MacOSX

Another one of my external hard drives has failed, after only two years. I was very lucky not to loose important data!!

So here is my latest bug report to Apple.
I post it here because I do not expect a response from them, maybe one of my readers has an idea if there is a simple solution.


My hard drives connected to Apple equipment are wearing out faster than they need to.

When I have external hard drives connected to my mac via FireWire, I like to let them spin down to reduce noise and energy usage, however every single time I do something like go to save a file, all of the drives spin up, one by one. All activity on the machine is blocked during this and is very frustrating, specially when I did not need to access any of the external drives. It makes more sense IMHO to only spin up a drive if it is actually selected (in the Open/Save dialog).

This problem is causing unnecessary delays in the system and extra wear and tear on the drives.

To try to mitigate this problem, I moved one of my external drives to the USB connection on my TimeCapsule. Now another issues rises.

With the external TimeCapsule drive unmounted, every time the TimeCapsule is accessed via a computer on my network to perform a backup, the external drive spins up, then immediately spins down again!!

This is completely pointless and causes even more noise, delays and wear on the drive.

Monday, November 23, 2009

Compiling Asterisk 1.4.27 on MacOSX

Asterisk is a powerful Open Source telephony toolkit.
The latest version 1.4.27 does not compile on MacOSX 10.6, due to missing libraries.

The solution is simple and slightly strange as this bug was fixed 3 years ago :-/

In the file “Makefile” locate line 360 :

+@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)” $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all

and replace it with this :

+@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" AUDIO_LIBS="$(AUDIO_LIBS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all

Now at least it compiles on my system :-)

Sunday, November 22, 2009

A good winter meal

Channa Saag Aloo
(produces 4 or 5 servings)

Ingredients

2 tins of chick peas
1 lb spinach
3 potatoes
1 onion
4 cloves of garlic
1 green pepper
2 tomatoes
1 tsp turmeric
2 tsp ground coriander
2 tsp ground cumin
1 tsp black mustard seeds
1 tsp ground black pepper
salt to taste
green chillies to taste (try at least 4)
olive oil and/or butter (or ghee if you are really serious)

Preparation

Halve then coarsely slice the onion
Thinly slice the garlic
Remove seeds, cube the green pepper
Slice the chillis
Cube the potatoes (1 inch cubes are a good size)
Peel and dice the tomatoes (pour boiling water over the toms to make peeling easier)
Wash and tear up the spinach a bit
Drain and rinse the chickpeas

In your biggest pot, ideally with a thick base and a lid :

Warm the olive oil and/or butter (I mix them, butter has a good flavour, adding olive oil helps stop it burning)
Add the dry spices to the oil, keep on a low heat, when you hear the mustard seeds popping (a few minutes) add the onions and garlic and coat them in spices
Let the onions soften and begin to brown, stir often
Add the green pepper and chillis, let them soften, stir often
Add the tomatoes, let them develop a sauce, stir often
Add the potatoes, coat them in the sauce for a few minutes
Add a cup of water (enough so the potatoes are nearly covered), put the lid on, let it simmer on a low heat until the potatoes are nearly cooked, stir often
Add the chick peas, coat them in sauce, simmer gently for a few minutes, stir often
Add the spinach and salt, put the lid on, leave it on a low heat
When the spinach wilts, give it a good stir and you are ready to serve as soon as the potatoes are done

Serve with rice, pitta bread or wholewheat toast, mmmmm

enjoy !!

Friday, May 22, 2009

My Latest Hint

I just had this hint posted on MacOSXHints.com.

On my last project, I was collaborating with people in the States via iChat, using audio, video screen and document sharing.
We had such wide-ranging and complex discussions, I kept wishing I could record them.

Ironically, it was not until after the work ended that I found the iChat / Video / Record menu item (aarrgghh!!).

Well anyway, I thought it would be useful to automate the recording feature and wrote the script featured in MacOSX Hints.

You can attach this script to specific buddies, or to everyone. When an AV Chat starts, recording is automatically started ..... well actually the other party is first asked if they mind and can choose to reject the request.

It seems that only the person who initiates, records, so if both parties want a recording they both have to start it.

Many thanks to Ross and Dave for help testing :-)

Wednesday, May 20, 2009

Logging to GTalk

I was reading yesterday that Apple is thought to be using XMPP the Jabber protocol for their new iPhone Push Notification technology.

That's funny I thought, I had just started using XMPP for logging!!!

I am experimenting with Asterisk at the moment. Asterisk for those that do not know is an Open Source PBX (Private Branch Exchange) a phone system in software. I have it running on my ancient 500 Mhz Mac Cube, it has been extremely reliable. My home office now has a ridiculously sophisticated phone system ;-)

IMHO most of the monitoring tools for Asterisk suck. They are written in nasty languages like PHP, Perl, Flash etc. that not only do I not want on my system, they are overkill.

What I wanted was to receive simple messages about the run-time status of the system. I wanted to be able to receive these messages securely, from wherever I was (because I can use my phone system from wherever I am, but more on that another time).

Asterisk has a Jabber module, so this was an easy way to go.

So, I have two GMail Accounts, one for personal email, one for mailing lists.
I have iChat on my desktop/laptop/iPhone already subscribed to GTalk on my personal GMail account.

First I added my spare GTalk account as a buddy to my personal account (requires some fiddling around, but if you know your IM client, it's pretty easy).

Then I configured Asterisk (beware, she's a complex beast, BTW a semi-colon marks a comment).

First configure /etc/asterisk/jabber.conf :
[general]
debug=yes ;Turn on debugging by default.
autoprune=no ;Auto remove users from buddy list.
autoregister=no ;do not auto register users from buddy list.

[gtalk-logger] ;label
type=client ;Client or Component connection
serverhost=talk.google.com
username=MY_SPARE_GTALK_USERNAME@gmail.com/asterisk ;Username with optional roster.
secret=************** ;Password for MY_SPARE_GTALK_USERNAME
port=5222 ;Port to use defaults to 5222
usetls=yes ;Use tls or not
usesasl=yes ;Use sasl or not
buddy=MY_MAIN_GTALK_USERNAME@gmail.com ;Manual addition of buddy to list.
statusmessage=Up and Running ;custom status message for Asterisk.
timeout=100 ;Timeout on the message stack.


This allows Asterisk to connect to GTalk to send messages.

The next thing to do is to emit messages from the appropriate parts of your dialplan.

First I defined a Macro, that can be used from anywhere in the dialplan, this goes in /etc/asterisk/extensions.conf :

[macro-logger]
; log message - to Jabber
; @param ${ARG1} - the message to send
exten => s,,Jabbersend(gtalk-logger,MY_MAIN_GTALK_USERNAME@gmail.com,${STRFTIME(${EPOCH},GMT,%C%y-%m-%d %H:%M%n)} ${ARG1})


This sends the message in $ARG1 with a timestamp.

Next is to use the macro from the dialplan. Here is an example of an outbound route to go via SipBroker, matching dialed numbers beginning with * :
[via-sipbroker]
exten => _*X.,1,Macro(logger,Outbound call to ${EXTEN} via SipBroker) ; log the call
exten => _*X.,2,Set(CALLERID(all)=${JQNAME} <${JQOFFICE}>) ; Set outbound CallerID
exten => _*X.,3,ChanIsAvail(SIP/${EXTEN}@sipbroker,j) ; Check to see if available (jumps to priority + 101 on fail)
exten => _*X.,4,Dial(SIP/${EXTEN}@sipbroker,,tTW) ; Dial, allowing transferring and recording
exten => _*X.,5,Macro(dial-result) ; Check result
exten => _*X.,104,Playback(all-circuits-busy-now) ; if ChanIsAvail fails, say message


I know, it looks really weird !!!! :-)

I left out a few details like, looking up the phone number in my AddressBook.app to show the recipient's name and using Growl.app to splash these messages received by iChat. I plan to cover these in a subsequent post.

I have found this to be a really simple and reliable solution.

There are XMPP libraries for many systems, I may start using this technique elsewhere as well.

Wednesday, May 06, 2009

Nested Screen Sharing

I am starting a new spare-time project (more on this later).

I am using Maven, Spring etc. etc. within IntelliJ.
While I have worked on projects started by other people using this tech, this is the first time I have started a new project using this stuff myself, so I reckoned I needed someone to review what I was doing.

So I contacted my good friend "M" (all names redacted).

We both fired up iChat and had a video conference for a while, M became interested.

Then we switched to an iChat screen sharing session to look through my code and show him what worked, this included me launching Screen Sharing.app to open a session to my server (so now we have one level of nested screen sharing).

M became even more interested.

M wanted to check out the code, so I fired up a Terminal and let him type in his own password into the htdigest command.

M then suggested that a mutual friend "G" would be really interested in this. iChat would not let me add G to it's screen sharing session, so M shared his screen with G via Skype. Now we have 2 levels of nested screen sharing.

G cannot type into my machine, but we can all talk to each other.

G wanted to check out the code, but as he could not type, I made a password for him using the Password Assistant in KeyChain.app, then pasted it into our iChat text session.

G could not read the text easily, so I used Control-ScrollWheel to zoom into the stuff we were discussing.

M had compiled the project and wanted to run it, but could not set up the complex server the project connects to, so we reversed the screen sharing session, so I could set up his machine to connect through my VPN.

M and G make their first commit, adding their names to the project's pom.

It was an incredibly constructive few hours.

And a very warm welcome to my two new collaborators !!!!

Saturday, March 21, 2009

Street View Celeb

Google Street View is out in the UK and what fun it is!!

My younger brother is now a Street View Celebrity, but he's not sure if he likes the idea or not.

Monday, March 16, 2009

Radio Uncompromising

I used to listen to the John Peel show.
Unfortunately he died a while ago, I still miss him.

Most of you have probably never heard of him, but I listened to his show for something like 30 years, I managed to record the last few years of his show and still enjoy listening to them.

Apart from being an incredibly nice guy, he was considered by some the most influential DJ in the history of the BBC.

He would play whatever he liked, which included a lot of stuff that would never otherwise get a chance to get on the radio, always surprising, always eclectic.

I recently found a kind of substitute, a radio show that streams over the net called Dandelion Radio. “The Internet Radio Station Inspired by John Peel. Independent. Original. Uncompromising”.

I use this stream URL in iTunes.

The same with John's shows, I cannot say I like everything that is played, some of it is pretty challenging, but if you have as deranged and confused a taste as me and you crave your “new music hit”, maybe you'll like it, give it a go!!

Thursday, March 12, 2009

My New Tripod

I have been yearning for a new tripod, ever since I found the old one was not sturdy enough for a DSLR.

I did a lot of research, some of it probably useful but in the end there is no substitute for actually getting your hands on something like this ...... and there lay the first problem, actually finding somewhere that keeps stuff in stock at a shop, where you can go ...... you'd think, living in London that this would be easy but even professional suppliers would have everything in their online catalogues but next to nothing in their physical shops.

In the last few months I watched different photographers use tripods in different situations, doing astonishing things with them, easily ..... they were all Gitzos, so that began to narrow the field, except Gitzo seem to have a ludicrously huge range.

I eventually found one in a shop in Tottenham Court Road, it had a broken leg, so I could not buy it but I had a chance to play.
It was one of their levelling range, there is a gimbal holding the centre column, which has a spirit level at the bottom, so you can adjust the level of the camera after setting up the legs. This interested me, I like low light panoramas.

You can do a lot with it. It's light and strong. No catches to catch my fingers. The legs are easy to use, they can lock at different angles so you don't just have to use the floor. I can place the camera anywhere from taller then me, to ground level.

I found this one, end-of-line, big discount.

So, it finally arrived. The first thing I tried was to get it really level, level enough so that when you rotate the camera, it stays level.

No way.

Maybe my eyesight is not as good as it was, maybe the spirit level is too small, maybe it's the slight nudge it gives as you clamp the gimbal, so far I have been unable to get it level enough for a panorama that did not drift.

The leveling is really useful for fine tuning your framing, but my expectations were too high regards panoramas.

So I went out on my first night shoot with it.

I was very pleased. It was a very windy night and I was doing long exposures, not a good combination but I could do what I needed and work quickly with it.

The unexpected problem was the law.

I got moved on by renta-cops from the South Bank. Later I heard Lambeth Council requires anyone using a tripod in the street to have a permit and pay by the hour, because if you use a tripod you must be (a) professional and (b) causing a potential public liability insurance issue.

Paranoia Britain, don't you love it.

Wednesday, March 04, 2009

Do Something About It

http://www.dosomethingaboutit.org.uk has just issued it's first vote to members, to choose the issues it will attempt to tackle in the next few months.

Their boilerplate text :

I've just cast my vote to decide DoSomethingAboutIt.org.uk's campaign priorities for the coming months. We can either wait for political parties to tell us what the next election is about, or we can take the initiative and tell them what matters to us. By logging on to www.DoSomethingAboutIt.org.uk, you can let politicians know what you want to see happen- and if they don't listen, then you can get rid of them by using DoSomethingAboutIt.org.uk to link up with thousands of other progressives across the country. Check out the website yourself, and cast your vote today!


Hopefully a worthwhile attempt at grassroots democratic lobbying.

Sunday, March 01, 2009

Birthday Present

It was my 50th birthday recently, I celebrated with a party in my local pub, the Effra Tavern, friends came from all over, it was a great evening, many thanks to you all.

Two friends Gab and Mau came all the way from Amsterdam, impressive in itself . . . but they topped that by giving me the most incredible present.

They chose a load of photos from my Flickr Photostream, downloaded them all, copied all of the captions and assembled it all into a book, using blurb.com.

Mau just made it public, so you can see it for yourself or even buy a copy!

Many thanks guys, you're the best :-)

Monday, February 16, 2009

“I’m A Photographer Not A Terrorist”

I was at the demonstration by photographers outside New Scotland Yard this morning, there even are a couple of glimpses of me in the BBC TV report, maybe the orange jacket was a good idea after all :-)

Here are mine.

Saturday, February 07, 2009

100 Today

I finally did 100 pushups for the first time today!

A few months ago, I started using the schedule published on hundredpushups.com (someone mentioned it on Planet Apache).

It worked well for me. Even though I could not always follow the course (it took me longer than 6 weeks) there was always somewhere I could fit in on the schedule and feel like I was advancing.

I have also been swimming several kilometers a week for the past few months, enjoying it and improving there too.

Eating more, loosing fat and putting on muscle, it is doing me a power of good.

(I hope this encourages you)

Friday, January 23, 2009

iWork Trojan

Slashdot etc. are reporting the first properly malicious Trojan for MacOSX has been released in a BitTorrent of iWork, Apple's productivity suite.

According to MacRumors, it has been downloaded over 20000 times.

The MacRumors article has instructions for it's removal.

So, who was naughty and got infected?

Thursday, January 22, 2009

Places to Visit

A colleague of mine recently asked me to come up with a list of my most favourite places in the world that I have visited, he is planning a world trip.

I really enjoyed writing it, so I thought I would offer it to you my readers as well ;-)

(Not that I am encouraging you to expend lots of CO2 flying around or anything)


Sanna, Yemen.
The Yemen may not be currently possible to get a visa for, but it is an incredible country.
The Old Souk in the capital Sanna, is like walking back into the middle ages ... a canon-ball dent in the main gates; buying frankincense, myrrh, saffron, local woven fabrics. The only other tourists we saw in the Yemen were architecture students on a field trip. The mountain villages outside the capital are incredible.

Kotakinabalu, Sabbah, Borneo.
We ate at the Philippines Market in Kotakinabalu, the capital of Malaysian Borneo.
On the surface it looks squalid and dangerous, but in reality while alien it was warm and welcoming. You can take trips to Kinabalu National Park, to see wild orangutang and climb Mount Kinabalu, at 4101m the highest mountain in Borneo, reach the summit at daybreak!!

Koyasan, Japan.
Near Osaka, a mountain village of over 100 Buddhist Temples, you reach it via vernicular railway. Stunningly beautiful architecture and setting, amazing food, very peaceful. Some of the Temples act like hotels (Shukubo). We stayed in a traditional room, sliding doors, tatami mats, etc. We were served the most exquisite vegetarian food I had ever had. You must of course also visit Kyoto!!


You really must see Australia, it is an astonishing place, I was in Queensland in the winter, lovely climate. The whole Queensland coast, flora and fauna are incredible. These two islands really stuck out in my mind:

Fraser Island, Queensland.
A small sand island just off the coast, wild dingos, beautiful pockets of tropical rainforest. You can take a day-trip on a wacky amphibious vehicle from the mainland. 

Lady Eliot Island, Queensland.
A tiny island at the southern end of the Barrier Reef. Just large enough to land a light aircraft on. Flew there on an old Otter 7 from Bundaberg, we saw migrating whale pods below us.
The island has a bar a canteen and a dive shop, no phone, no net. Perfect! My first snorkel and I was mixing it with Manta Rays!!


I spent 6 weeks sailing from Antigua to Grenada, we went off-season in July, far more peaceful. As for the locations, a very difficult choice to make .... all of the islands are beautiful, avoid the resorts. You could island-hop via ferry or light aircraft.

Les Saintes, Guadeloupe.
In the French Caribbean, the most memorable place I visited was Terre de Haut, Les Saintes, a small island just south of Guadeloupe. A wild and beautiful French-speaking islands (lovely walks, amazing beaches) with a gorgeous laid-back ambience and very mixed culture. Ferry from Basse-Terre.

St Vincent and The Grenadines.
My all round favourite of the ex-British Caribbean. Beautiful, relaxed, relatively undeveloped, lovely food. Try to get a sailing trip in the Grenadines! My favourites were Bequia and Union Islands, then you have the outstanding Tobago Cays in between.


My list for Europe would obviously be massive, I'll just add a few places in the Mediterranean and Ireland .... off the typical tourist map.

Syracusa, Sicily.
An ancient port in the south of Sicily. Unbelievably warm, sophisticated, fantastic cuisine, some of the best Roman and Greek remains in Italy. The market is sublime, wandering the streets of the old town at night, gives you a real impression of warmth of Italian culture.

Isola Di Ponza, Italy.
You get there by hydrofoil from the port near Rome, or from Naples (Both of which you ought to visit). Very beautiful, excellent sea food, very popular with Italians, busy on the weekend. I spent an utterly glorious week there many years ago. Wonderful place, lots of history, beautiful buildings and people.

The Skelligs, Co Kerry, Ireland.
An 800 ft pinnacle in the Atlantic. Used to be the home of monks and hermits in the Dark Ages. Fascinating place and history. You get there by boat from the mainland, only in good weather, there are no facilities, you need good sea legs. If you can dive, this was in Jacques Cousteau's top 5 dive-sites of the world.

Cahersiveen, Co Kerry, Ireland.
Cahersiveen on a Saturday night, I've never seen anywhere else quite like it, one road through a small village with something like 20 pubs. Good fun, good music, lots of Guinness. Both Kerry and West Cork are full of friendly places and beautiful scenery, hospitable and surprisingly cosmopolitan, your waitress will just as likely be from Normandy or Galicia as be a local.

(Islands seem to figure very highly on this list, must be all of my diving and sailing trips)

(I should probably add my local pub on a Friday night, but TBH it is getting too crowded already)

Thanks Ted

My good friend TedDave just sent me this link to a collection of my Flickr photographs on HiveMind.
A very pleasing collection, thanks Ted!!
He thought my palette was predominantly blue and subject matter full of nicely swishing technology. Interesting (to me at least).
Enjoy.

Monday, January 19, 2009

Tax Hell

Filling in my tax form again.
Ugh! They have changed the form so much this year, it is almost impossible to check for errors against previous years!

Why Oh Why every year am I stuck in this position where :
  1. I am sure something is wrong with the calculation, my tax looks too high
  2. The help pages I need are blank
  3. The help pages I can find, I cannot understand
  4. It is impossible to get through to the help line
  5. I have to meet the deadline
UK Inland Revenue have this despiteful scheme whereby they charge you this year for some estimate of next year's tax, then make you manually enter the figure for last year in this year's return. Not only is the whole concept heinous, but it is a source of unnecessary error, why make me enter a figure they could supply. I think I have fallen foul of this field before and paid too much tax. 

It is a RIP OFF, and what's bugging me now is I cannot work out how or where (or even what) this figure is and where it should be entered.

I do not feel that I am being offered "Public Service".

And to whoever is in charge of the design of this annual joy of a web application: may the fleas of a thousand camels infest your armpits!