Mark Needham

Thoughts on Software Development

Archive for September, 2006

Active listening

without comments

One of the first unusual (to me) things that I noticed from the trainers at ThoughtWorks University was that when they were listening to participants they would often ask questions and re-frame the participants' comments. Intrigued and impressed by this I spoke to one of the trainers and was told that they were engaging in 'active listening'. Wikipedia defines the term as follows:

Active listening is an intent "listening for meaning" in which the listener checks with the speaker to see that a statement has been correctly heard and understood. The goal of active listening is to improve mutual understanding.

I believe this is a very useful skill to acquire, and I certainly hope to improve my ability in this area.

It reminded me of the 5th Habit that Steven Covey speaks of in his book titled 'The Seven Habits of Highly Effective People': Seek First to Understand, Then to be Understood. Certainly easier said than done…but then again we do have two ears and only one mouth so perhaps there is a good reason for that!

Browsing the ThoughtWorks Blogs yesterday evening I came across a link to an interesting site which spoke of the 'Eight barriers to effective listening'. I found this particularly useful as not only does it point some of the common problems one can have when listening to someone else, but also suggestions as to how these can be overcome.

A couple of months ago I read a book titled 'Coaching Yourself to Leadership' – although I found it quite heavy going in places, it too touches on some listening barriers, namely:

Advising: After hearing only a few words, you believe that you know how to solve the person’s problem and you start offering advice.
Comparing: As you listen to the other person, your insecurities get triggered, and you start comparing yourself to the person—assessing which one of you is better, more knowledgeable, more competent, etc.
Daydreaming: You get triggered by something the other person says and you’re off in your own world. You don’t have a clue what the person said to you.
Derailing: You find the subject matter uncomfortable, so you abruptly change the subject or interrupt with a joke.
Filling-in: You don’t let the other person finish her sentence; instead you finish it for her.
Filtering: You only listen to the part of the message that is important to you, and tune out the rest. You either pay attention to things that might be emotionally threatening (and fail to hear anything good), or you only hear what is good (and fail to hear the parts that are negative).
Identifying: You identify with what the person is telling you and swing the conversation back to yourself, telling how something similar happened to you. You become engrossed in telling your story, and don’t really listen to the other person or allow her the space to continue her story.
Judging: You make hasty judgments about people before completely listening to what they have to say.
Mind Reading: You look for what you perceive to be the truth, and end up making assumptions that have little to do with what the person is actually saying to you.
Placating: You want to be nice and supportive; therefore, you voice agreement with everything that is being said, even if you don’t really agree. Because you don’t really want to disagree, you don’t listen deeply enough to fully examine the other person’s viewpoint.
Rehearsing: Rather than listening, you are mentally preparing what you are going to say. You might look interested, but you’re really concentrating on planning how you’re going to respond.
Sparring: You quickly disagree with the other person because you have a strong point of view. The other person feels like she hasn’t had a chance to be heard.

I hope this is ok to post on here – I've just written up the points straight from the book. Copyright of the author Peter O'Brien and all that.

I know I do at least 3 of those, and that's being kind to myself!

Written by Mark

September 3rd, 2006 at 3:39 pm

Giving effective feedback

with 2 comments

One of the most interesting things I have discovered since starting at ThoughtWorks earlier this month is the emphasis that is placed on giving feedback.

The first lesson we were taught about giving feedback was that it could be one of two types. Either it should Strengthen Confidence or Increase Effectiveness.

In Layman's term that means that if you want to make a positive comment about somebody's contribution then you should make reference to something specific that you believe they have done well so that they can continue doing it. Equally if you believe there is an area that they could improve it, a specific example of this behaviour/fault should be noted along with a suggestion for how they can improve.

As a member of Toastmasters since January I was already used to this concept of feedback and there are certainly parallels in the feedback system encouraged at Toastmasters and that used at ThoughtWorks.

Although Toastmasters do not define types of feedback, there is an expectation that evaluators will apply themselves in a certain manner when carrying out their job.

One of the things which is frowned upon is known as 'whitewashing'. This is where an evaluator would say that a speaker was 'brilliant' or give a summary just using complementary adjectives. Although the speaker may well be flattered, it does not really tell them anything or leave room for improvement. The use of the word 'brilliant' or 'superb' is only the perception of the person using it, and the failure to make use of the word with regards to a specific behaviour or action means that it is rendered meaningless.

Equally when the evaluator believes there is an area that the speaker can improve in they should make a reference to the specific negative behaviour or action so that the speaker can recall their mistake and go about making the improvement. When giving feedback it is very poor practice to attribute your own feelings to the speaker – you are giving them control over something which they do not have control over! For example, if an evaluator were to say: 'I felt bored listening to your speech, you should make the next speech more interesting'. In this case the evaluator is giving the speaker the power to make them feel bored. It is ridiculous to let someone have that amount of control over you and if we consider that another person listening to the same speech may have felt really engaged, a property of the speech cannot be that it was 'boring'.

This is very similar to the way that ThoughtWorkers are expected to give feedback, although it is also emphasised that when giving feedback one should speak only for themselves, and not try and speak for a group of people. Doing this would assume that mind reading is possible and as far as I'm aware this feat has yet to be achieved. An example of committing this mistake would be to say something along the lines of: 'It would be better for us if you could do x'. In this case 'us' is not defined and it is unlikely that one person can speak precisely of the feelings of other people.

This concept is very similar to that of Generalisation in the NLP Meta Model, which states the following:

"Generalization is the process by which elements or pieces of a person's model become detached from their original experience and come to represent the entire category of which the experience is an example."

This is an area that I am actually working on myself, and I am finding it very difficult to speak only for myself because I'm so used to generalising! Of course there are still times when generalisation is vital, and we would find it very difficult to live our daily lives without generalising on some things. Giving feedback, however, is one area where this 'technique' is counter productive.

Written by Mark

September 2nd, 2006 at 3:07 am

Inheritance and Delegation

with one comment

One of the major learning points this week at TWU has been understanding when it is appropriate to use inheritance and when delegation is the better choice.

I had heard stories about how inheritance could be misused but I didn't think I would be stupid enough to fall straight into that trap! We were taught the concept using 'Measurement' as the problem domain. So to translate the previous sentence into English: The aim was to design classes which could handle old school measurement types such as Inches, Feet, Yards, and so on.

I went about the task by first creating a base Measurement class and then created Inch, Foot and Yard as sub classes of this. The code looked pretty slick to me and I was quite pleased with how it had turned out. I was feeling pretty confident that I had nailed the objective of the session. Alas, it was not meant to be!

Upon reviewing the code my partner and I had created, one of the trainers pointed out that the sub classes did not actually do very much at all. They were effectively useless classes and there was barely any difference between them! One of the other requirements for the code was that it should be possible to compare an instance of the Inch class with an instance of the Foot class, an instance of the Yard class with the Inch class and so on. No problem I thought and promptly created methods called 'ConvertToFoot' in my Inch class and 'ConvertToInch' in my Foot class.

One of the cardinal sins of object orientated programming had been committed! I now had 2 methods which did almost the exact same as the other for no additional benefit. What if there were 100 different measurements? That would mean 99 different conversion methods each to convert to all the other types of measurement. Clearly not an optimal solution – I had taken the bait and fallen into the trap of over use of inheritance.

Anyway, the lesson of the session was that in this particular case it was better to use delegation or composition. In this example it means that there is only the need for one Measurement class, each instance of which comprises of a Unit object. The concept of a 'slug' was introduced – no not one of those nasty little insects, but in this case meaning an instance of an object with a private constructor and one public static instance. In other words slugs are like a poor man's Singleton. The code looked something like this:

class Unit
{
public static readonly Unit INCH = new Unit(1);
public static readonly Unit FOOT = new Unit(12);
}

This made it far easier to add future measurement types, and meant that only two classes were needed instead of a potentially infinite amount.

I read an interesting article on this topic by Robert Martin, titled 'Template Method & Strategy: Inheritance vs Delegation' which explains the reasoning much better than I have here along with a code example.

Written by Mark

September 2nd, 2006 at 1:31 am

Posted in Coding

Tagged with , , ,

Watching a master at work

without comments

I've always found it fascinating watching people who really excel in their field going about business, be it footballers, tennis players, actors, whoever.

This week at TWU I've been playing around with some Ruby on Rails as I mentioned in the previous post, and yesterday I had the opportunity to watch one of the leading figures in the Ruby on Rails field at work. Take a bow Obie Fernandez, who gave several of the TWU attendees a demonstration of how to develop applications using Ruby on Rails. It was actually bordering on the severely impressive watching the speed at which he thought through concepts and then transformed them into code.

I also realised that the way I'd been using the language previously had been dubious at best. I hadn't realised that you can take care of database creation without using MySQL Administrator, nor had I realised quite how 'clever' Ruby on Rails is at mapping database tables to models created in the application.

It was almost painful watching how simple it is to do arduous tasks, such as creating textboxes and drop down boxes, in Ruby on Rails and it almost made me want to weep as I recalled the many hours I've spend using PHP and C# tweaking interaction between code and stored procedures/queries.

So +1 for Ruby on Rails and I certainly hope to improve my ability with it over the next few weeks.

Written by Mark

September 2nd, 2006 at 1:01 am

Posted in Ruby

Tagged with , , ,