Friday, 11 November 2011

Third-World IT (on a shoe string)

Our focus today was the visit to a half-way house run by Oasis. It is home to six girls that have been freed from prostitution, with the aim of helping them return to a normal, self-sufficient life style.

Yet again, we were moved by both the scale of the suffering and the dedication and effectiveness of the Oasis staff.

This visit doubled up with Dave running a training session on Communication Skills and I one on IT (small topic really).

My session was prefixed by a morning working with Oasis's 21 year old IT administrator, to help figure out areas for improvement. He is the sole support to 30-40 users in Mumbai, spread across at least four different offices (in can take two hours to drive across Mumbai at rush hour). Most of their equipment is over ten years old (Windows XP on a P2 with 500MB RAM). We came up with a proposal for a (free) Google based architecture to help address their needs. Just wish I was here for four more weeks in order to help implement it.

Today was a turning point for me. For the last few years I've been wanting to use my skills to help people in the third-world, and I was not only finally doing just that, but I glimpsed how it could be applied to other NGO's too. This was combined by a deep appreciation of the difference that Oasis is making to the lives of Mumbai's poor. I don't know what will happen next, but I'll return to the UK with a passion to do much more to help Oasis India.






Wednesday, 9 November 2011

English men cause balloon riot in Mumbai

We returned to the Aruna Project Office today to help run a kids session. As the prostitutes work all night, their children are left unsupervised during the day, which can leave them vulnerable to abuse. Twenty children were there, aged approximately 5-15.

Tim did a fantastic job of entertaining them on the guitar. Despite his warnings, we then cracked open the modelling balloons. Even with two balloon modellers at work (plus Graham blowing hard and Lyndsay fumbling knots) chaos soon broke out.

The Oasis staff ended the session by providing lunch to the children, which calmed things down considerably. It was a privilege to be a tiny part of the work they do.


I'm providing IT training tomorrow, after Tim leads an acting session at an Oasis Boys Home. Prayers would be appreciated!

Tuesday, 8 November 2011

A battle of good and evil

The initial post title was Four white men spotted in Mumbai's red light district. Whilst this seems funny at first, the reality of what happens here is far from it.

Today was the hardest day of the trip so far. It was too physically dangerous to take photos, and the spiritual battle being waged was also tangibly fierce. Yet, despite this being the largest red-light area in the world, women, men and children are being freed from it. The Aruna Project that we visited works with approximately 1500 women and 30 children in this area, out of just one, small drop-in centre. It's fourteen workers do incredible work.

Please read more and provide your support via Aruna's Oasis page.

Oasis in the slums

Today is the Muslim festival of Bakri-Id. In my home of rural South England, this would go largely unnoticed, but in Mumbai, with its high percentage of Muslims, it meant there were approximately 15,000 Muslims assembled for prayer at the mosque near our YMCA.

Our morning was spent at the main Oasis office, located in the middle of a Muslim part of Mumbai. Four goats had just been slaughtered next door, as part of Bakri-Id, and were strung up to be skinned (taking a photo was not appropriate, so I'll let you imagine the scene).


The Oasis team gave us a fantastic, family welcome (my reading of Mark 3:31-35 that morning was particularly poignant). Jeanie and Aabuu briefed us on Oasis's work, which was both distressing and encouraging at the same time. The numbers are devastating:
  • According to the UN, 58% of Mumbai's population live in a slum, or on the streets.
  • This figure has increased by 5-8% over the last 5 years.
  • Human trafficking (e.g. forcing women into prostitution) is now the world's second largest industry (the first being arms, the third, drugs) and has an estimated annual revenue of $5-9 billion.
  • 50% of trafficked victims are under 18.
  • It takes 1-2 years to rehabilitate someone freed from forced prostitution.
  • The global recession has had a noticeable impact on Oasis's fund-raising over the last two years - less money is being given to support their work. 
Whilst this figures make the task seem near impossible, Oasis is unswervingly focused on transformation, one life at a time. We visited two slum projects today, which clearly showed the difference they were making:
  • A sewing training centre, which has helped over 500 women in the last five years to learn to sew and thus start earning an income. Over the next few months Oasis are exiting from this project, as its women convert to their own self-run and self-managed federation.
  • An office training centre, which has trained over 300 students in English and basic IT skills. This is funded out of DHL's (Blue Dart in India) Corporate Social Responsibility (CSR) budget. This project has now been replicated in two other Indian cities.
During our visit to the slum, we also went to see the family of Mina, who Dave knew from a previous visit. She was a single mother, with two children, one of which has Cerebral Palsy. They live in a 4ft x 10ft room, which is not bad by Mumbai's standards.

I was stunned by my first experience of the slums. The smells and claustrophobic living was overpowering, but as was the friendliness of the people we met, and the seeds of hope that Oasis has planted there.


The day was capped off with an after dusk walk through a back-street, Muslim community, to have a shave and head massage at a local barbers. It was, again, a unique experience. The sights, smells and sounds were deafening: people lived as much on the street as in the densely packed houses. Tuk-tuks, cars and bikes wove through the people. Choosing where to walk was a balance between being nearly run over or stepping  through someone's kitchen. It was surreal.

Today has left me speechless, but thankful. God is at work, through Oasis, in bringing restoration to these communities.

Sunday, 6 November 2011

Lighting up Mumbai

We made it to Mumbai in one piece, via an overnight flight through Dubai. An Oasis worker kindly drove us to our base for the week, the YMCA. His driving was excellent, especially when compared to the taxi rides we had later in the day. Driving in Mumbai requires lots of honking, no lights (especially after dark) and optional observance of traffic lights and any other suggestion to stop. As a passenger, its best to keep one's eyes shut.

I dislike cities because I feel threatened by them, and I was unsure how I'd cope with Mumbai's crowds. There were fewer beggars than I expected, though seeing the one child tapping on our taxi window was saddening enough. He was about eight-year's old and was showing us his right leg, which was just a stump below the knee.

A local church, with links to Oasis, had invited to us to speak. We were very humbled by the warm, loving welcome we received. I was particularly struck by one of the congregation, Jabbal, who was converted to Christianity from Islam when he was 25. He now pastors his own church further north, with a strong emphasis on meeting and discipling Muslims and Hindus. Dave talked about forgiveness, which Tim illustrated using some touch paper. Graham and I then joined them in praying for those wanting help with forgiving others.

Pastor Jabbal and his wife

Tim lighting up Mumbai

Hindi and English versions of  passage on forgiveness 


Sunday, 30 October 2011

Mumbai, here I come

In just under one week from now, I'll be starting a week long visit to Mumbai.

The trip is inspired and being led by my good friend, Dave, who works for a charity with strong connections to the area. Mumbai has Asia's second largest slum. We'll be visiting various parts, including the red-light district.

The aim for our team of four is to share, learn and enable growth. Although I've done this kind of thing before, I expect this is to be the toughest trip I've ever been on, so please pray for me - I will need all the help I can get!

Tuesday, 16 August 2011

Posting JSON to a Restful WCF service

This should be simple, but WCF isn't very forthcoming when it comes to deserialization errors.


To get this working with an out-of-the-box .Net 4 Rest WCF service:

  1. Start Fiddler.
  2. Go to Fiddler's Request Builder, and select the Raw tab.
  3. Establish the POST URI, and the format of the POST data (this will be shown on the service's help page).
  4. Copy, paste and edit the below sample request.
  5. Execute the request.
Points to note:

  1. The POST address must end in a slash: http://localhost:57036/endpoint/.
  2. The Content-Type must be set to application/json.
  3. The Content-Length must be match the size of the body.
  4. The body's format must be the correct JSON representation of the object. If in doubt check the service's help page.

Saturday, 13 August 2011

Julian Treasure: 5 ways to listen better | Video on TED.com

Julian Treasure: 5 ways to listen better | Video on TED.com

Just watched this great video on listening. Julian provides five steps, of which I found the following useful:

1. Practice 3 minutes a day of silence.
2. Listen in a noisy environment - how many different channels of sound can you hear?
5. RASA - receive, appreciate, summarise, ask.

Tuesday, 2 August 2011

Making a Restful WCF service vary its response

A natural fit with the HTTP architecture is to have a WCF service vary the response contents according to the MIME type set in the Accept header by the client.

Whilst this is easy to do using the WCF Web API, it is slightly more challenging in an application using regular WCF (even WCF 4).

The specific scenario I needed to handle was:

  1. Given a request for a resource.
  2. When the Accept header is not set, respond with the appropriate default representation (e.g. XML/JSON object).
  3. When the Accept header is set to a relevant MIME type, e.g. application/png, respond with a stream containing the PNG representation of the resource.
  4. Due to the architecture being used, the method's response type could not be the Message type, but had to be that which represented the default resource representation.

The solution I finally arrived at was greatly added by this great post on IOperationBehaviour and the WCF Web API PngResponseFormatter. A sample solution can be downloaded as a zipped VS 2010 solution.

Thursday, 28 July 2011

Publishing a website to the filesystem with msbuild and config transforms

Ever since I read Scott Hanselman's post Web Deployment Made Awesome: If You're Using XCopy, You're Doing It Wrong I've wanted to leverage Visual Studio's config transforms, but never had the opportunity until last week. I also took the opportunity to investigate Web Deploy. Here's a summary of my findings:

On Web Deploy
I followed Troy Hunt's excellent series on this topic, in order to learn how to set up an end-to-end build process that uses Web Deploy. Whilst it is indeed an excellent technology, the following notes need bearing in mind:
  1. The target web site, file-system folder and app-pool must all exist to start with. I was quite disappointed to find this, as it means an alternative technology is required to create these in the first place (such as the MSBuild Extension Pack's Web tasks or MSDeploy).
  2. Visual Studio needs to "know" about all files and folders that need deploying. Most cases are covered by marking the file as either Content or as a reference. If your project had files copied into the distribution by either a pre or post-build event then these files won't be deployed.
On MSBuild
The build pipeline I was integrating into used MSBuild Extension Pack's web tasks to deploy to IIS. This meant that my part of the build had to create a transformed web-site as a complete file-set, ready to deploy. I achieved this using the following MSBuild command:

<MSBuild
   Projects="$(SolutionPath)"
   Targets="Clean;Rebuild;ResolveReferences;Package"
   Properties=
"Configuration=$(Configuration);
OutDir=$(MSBuildProjectDirectory)\bin\; 
AutoParameterizationWebConfigConnectionStrings=false;
_PackageTempDir=$(OutDir)"
/>


The items in italics are the important ones:
  1. Package invokes the package step (creating the web-site as a complete file-set), which includes transformation of web.config.
  2. _PackageTempDir=$(OutDir) tells msbuild where to place the resultant package.
  3. AutoParameterizationWebConfigConnectionStrings=false ensures that the package step fully transforms ConnectionString elements. Read more on what happens if this is omitted, or set to true at Troy Hunt's Stack Overflow question.

Monday, 20 June 2011

Get name, table and column of all indexes in a SQL Server database

Inspired by a Stack Overflow post:

select
t.name as [Table Name], col.name as [Column Name], ind.name as [Index Name]
from
    sys.indexes ind
inner join
    sys.index_columns ic on
      ind.object_id = ic.object_id and ind.index_id = ic.index_id
inner join
    sys.columns col on
      ic.object_id = col.object_id and ic.column_id = col.column_id
inner join
    sys.tables t on
      ind.object_id = t.object_id
where
    ind.is_primary_key = 0
    and ind.is_unique = 0
    and ind.is_unique_constraint = 0
    and t.is_ms_shipped = 0
order by
    t.name, ind.name, ind.index_id, ic.index_column_id