Friday, December 12, 2014

Effective communication in projects


Not so long ago I was writing about Software Developers problems (see this post for details). Today I want to tell you about one of the most common problems that happen in many projects.This problem touches not only Software Developers, but everyone involved in the project. As programmers we can feel it much too often. Let's talk about communication (on the Scrum team example).


Image from: http://www.luxurystnd.com/

A few days ago I was asked to create syntax highlighting for a simple configuration editor. Project Manager said that it's not a big deal. I have asked about the details and  I got a feedback, also with the documentation, which confirmed what I had heard before. Functionality that was to be made recognizes:

1) Commands
2) Comments
3) Paths, registries, hosts and ports

In case of that I prepared a simple solution for some SWT editor component. It was based on two classes: ColorEngine, which was responsible for colorizing each line, and ColorValidator which confirm what type is currently checked value. You can imagine them to look like this:

public class ColorValidator {

 public Boolean isValid(final String line) {
  final Boolean flag = Boolean.TRUE;
  // Some validation here.
  return flag;
 }

 public Boolean isComment(final String line) {
  final Boolean flag = Boolean.TRUE;
  // Some validation here.
  return flag;
 }

 public Boolean isCommand(final String line) {
  final Boolean flag = Boolean.TRUE;
  // Some validation here.
  return flag;
 }
}


public class ColorEngine {

 private final StyledText editor;
 private final ColorValidator validator;

 public ColorEngine(final StyledText editor) {
  this.editor = editor;
  validator = new ColorValidator();
 }

 public void colorize() {
  // This method put styles into StyledText component.
 }

 private StyleRange getInvalidStyle() {
  final StyleRange style = new StyleRange();
  // Something setting style here.
  return style;
 }

 private StyleRange getValidStyle() {
  final StyleRange style = new StyleRange();
  // Something setting style here.
  return style;
 }

 private StyleRange getCommentStyle() {
  final StyleRange style = new StyleRange();
  // Something setting style here.
  return style;
 }

 private StyleRange getCommandStyle() {
  final StyleRange style = new StyleRange();
  // Something setting style here.
  return style;
 }
}

Well it seems to be simple, but... and here we come to communication. After finishing this task I gave it to the QA. Few days later I got the feedback, that it works quite good, but...

- there are few requirements that weren't implemented, and we need them Michał!
- ...for example?
- we need some wildcards, like "*" and "?" in paths and registries.

OK, no problem. But then:

- we need also variables in this editor!
- is it in the documentation?
- documentation? It's only for client, we have some functionality which they don't know about.

Additional requirements show some time later, causing implementation of next validations. After all "new" needs added, ColorValidator class contains more than 10 different validation methods, which must run in specific order (one validation creates some temporary objects, used by others). It works, but mess inside code was bigger and bigger. After all, I suggested to the PM that we need to refactor this mechanism.

As you can see in this story, it's really important to focus on communication. If I had known about all requirements at the beginning I could have prepared some better implementation. For that kind of task there are many possibilities (use xText library, make some factory to managed the validations etc.).

Communication problems force us to do same work over and over like in this case ( I have already done working implementation of the problem, but I have to write it once more). In theory it shouldn't happen, a lot of methodologies helps to manage the communication (for example Scrum, where you can react on changes fast - that happen in this case, when I talked to PM about it). No matter how good your methodology is - it might happen, especially when you work with people around the world, many times in the different time zones, which provides that you get a feedback with a one-day delay. Here are few rules, which in my opinion could help with communication in the team:

1. Fake hope

Same as success, clear communication depends on all members of the team. Don't give the promises which you can't keep. If you need 2 days to end some functionality in the best case, don't give that number to your PM. It's just first step into giving you "free evenings and weekends" with your favorite application when the deadline comes.

2. Bad news are also important

Don't agree on irrational working plans. Creating software takes time. There is nothing to complain about it. Better to be safe than sorry. If terms are impossible to predict someone must say it at the beginning or at least during the sprint. Information that we need more time or we have to cut some functionality maybe isn't exactly this, what the customer wants to hear, but it's much better than software crash on launch day.

3. Ask questions

Ask questions. Don't base on your intuition, even if you'll be right in 90% of cases, sooner or later you will be wrong, and this mistake will duplicate your work. And you don't want it. Really. Just don't.

4. Say what you think

Don't be afraid, say what you think. Every leader wants in his team people with strong personalities who think for themselves. It doesn't mean that you have to do it everything in your way. Just be sure that your leader knows about the things you noticed. Maybe your solution is better?

5. Teach & learn

Flow of knowledge is a good thing. Share your lore with your team. The best programmers do so. If your team has enough skills, you will have less work. It's the easiest way to avoid burnout.

6. Report the risk

Report the risk. Your leader should know functionality you are working on now is difficult, and it's possible that it will take you more time than expected. It's normal thing, especially when new team starts working on some old functionality.

7. Team relations

Sometimes you meet people with whom you cannot communicate. Not because you don't want to. Definitely not. Your human interfaces are just not compatible. It happens. Don't try to fix it with force. This will only make it worse. Use your team leader or PM as an adapter and do your job.

Conclusion:

Nothing goes the way you planned in 100%. Each developer should be prepared for that. I wonder with which communication problems had you face in your work, and - as always I'm waiting for your comments.

2 comments:

  1. IMO that's the best post so far. Section 7 is really funny - 'human interfaces', 'PM-adapter' :-D I agree with all sections, that's all true.
    You're doing really good work here, I always willing gets back there.
    Regards

    ReplyDelete
    Replies
    1. Thanks for comment. I am glad you liked it :)

      Delete