Somalia is a Muslim country. As such, be sensitive about where you point your camera. There are many great photo opportunities around every corner (the question is usually what to leave out of each image), but when photographing people, always ask first. Don't ever, ever try to take pictures of women, even if you're a woman yourself. This is considered a great offence and can even result in more than a few harsh words.
Also don't try to take pictures of anything that looks as if it could be of any strategic importance (i.e., has at least one soldier, policeman or, more likely, armed militiaman, guarding it).
Respect the Islamic beliefs of Somali people: Women shouldn't wear tube tops or skimpy outfits. It is absolutely acceptable for any nationality to wear traditional Somali clothes.
Do not eat in public during the holy month of Ramadan you may be fined or even go to jail. The Al-Shabab Islamist militia can be found in many inhabited areas. They absolutely do not take kindly to any kind of violation of Sharia law and as they are not affiliated with any kind of government, they do not have to abide by any kind of laws per se, they will feel free to punish any aberrant behaviour any way they please, often by floggings, amputations, or even executions.
Government authorities also punish violations of Sharia law, but these are generally less harsh than those imposed by insurgents.
Alcohol is prohibited in Somali culture and possessing alcohol will get you into a lot of trouble and never drink and drive.
If you're dining with a Somali, don't expose the bottoms of your feet to him/her. Don't eat with your left hand either, since the left hand is seen as the 'dirty hand'. Similarly, don't attempt to shake hands or hand a package with your left hand.
If your Somali friend insists on buying you something - a meal or a gift - let him! Somalis are extremely hospitable, and typically there are no strings attached. It is generally a custom to argue for the bill.
Never discuss religion from an atheistic or similar point of view. Even highly-educated Somalis who studied abroad won't appreciate it and doors will close for you. Also, be aware that the Islamic "call to prayer" happens five times daily and can be heard loudly almost anywhere you go.
Just understand that most Somali people are used to it and enjoy it as part of the cultural experience. If you aren't Muslim, it is not expected for you to participate, but you should always sit quietly and respectfully until the end of the prayer.
Staring is quite common in Somalia; children, men and women are likely to stare at you simply for being a foreigner, especially if you travel off-season and in out-of-the-way places. This is not meant as an insult; it rather shows an interest, and a friendly smile will leave the kids giggling and showing off, and the adults happily trying out their few English phrases.
BE AWARE: Somalis may be armed, and a gift you receive may possibly be something dangerous. Their food can be poisoned. If you are a woman, you may be in danger of being raped. As with any travel in a war zone, exercise extreme caution.
Men wear trousers or a flowing plaid ma'awis (kilt) western shirts, and shawls. On their heads, they may wrap a colourful turban or wear a koofiyad (embroidered cap).
Due to its Islamic heritage, many Somalis wear long dresses known in the Arab and Islamic worlds as khameez/thobe. In recent years, many men in Somalia choose to wear suits and ties to look more modern. This western dress code is dominant amongst members of the Somali upper class and the government.
Homosexuality is punishable by up to death. It is common for Somali men to walk hand in hand as a sign of friendship, but it would be unwise for Western men to attempt the same. Sharing a hotel room as a way of cutting costs is normal, but don't even think about asking for one bed for two.
Women usually wear one of the following dress: Direh, a long, billowing dress worn over petticoats; coantino, a four-yard cloth tied over shoulder and draped around the waist. They also wear an abaya, a long and loose black robe.