It's ten years since I covered my first Somali peace deal story. It was on a scorching hilltop in Djibouti and everyone was talking hopefully about how this, the 13th peace process I think, would finally end the anarchy and violence. It didn't and nor did the many deals that followed.
Somalia breeds pessimism more assiduously than any other country I've covered as a journalist. It is very tempting to conclude that this week's bombings in Uganda mark the beginning of a new, regionalised and increasingly dangerous stage in the conflict.
"The kaleidoscope has been shaken," was how one western diplomatic source put it to me.
A bomb attack somewhere beyond Somalia's borders was almost inevitable. If an international naval taskforce patrolling the coast couldn't stop Somalia's pirates, then a dangerously under-resourced peacekeeping force in Mogadishu protecting an embattled and feuding transitional government was hardly going to contain al-Shabab. The organization had made its intentions clear beforehand.
So what happens next? How should Somalia's neighbours and the wider international community respond?
The same, but better, seems the most likely answer, at least in the short term. As Ethiopia and the US have learned to their cost, heavy-handed foreign intervention in Somalia is unlikely to advance the cause of peace.
The trouble with the current carrot-and-stick approach has been that the stick is too short and weak, and the carrot too often ends up in someone's back pocket in Mogadishu.
Donors, regional and international, need to help beef up the African Union force in Mogadishu to its intended strength or beyond, and to accelerate the training of Somali troops in Uganda. "More needs to be done, and quickly," said the diplomatic source.
There's been talk for months of a big offensive against al-Shabab in Mogadishu. The Ugandan peacekeepers, sinews stiffened, may well feel more inclined to take robust action. But this is where the carrot starts to come into play.
There's no point in seizing territory if you can't keep it. Somalia's transitional government is hopelessly factionalised and weak, but it is the only show in town and it has had some success in forging alliances with other groups in Somalia. Somehow this needs to be encouraged and supported.
As this recent report spelled out, al-Shabab itself is not a united front. The Ugandan bombs are likely to encourage divisions in a group that seems increasingly torn between its original and purely Somali agenda, and the cause of global jihad.
Last year I made a couple of short trips to south and central Somalia, and met members of al-Shabab. It was clear then that the flood of foreign jihadists joining the group was a source of potential tension, which might now be exploited. Attacking Ugandan peacekeepers in Mogadishu can be squared with al-Shabab's nationalist agenda, but killing foreign civilians in Kampala reveals an entirely different, imported and alien ideology.
"If we're learning anything from other conflicts it is that you need to hold your nose and talk to the bad guys," said the western diplomatic source. "This may be an opportunity to split off some of the more moderate elements."An opportunity? Don't hold your breath, but Somalia needs to grab at every straw.