Monthly Archives: June 2010

Build a Rough Plan for Your Work

Planning is a topic that I find myself coming back to time and time again. I’m asked enough questions about it so I decided to write down some of the answers. Folks who have not had to do any planning are stumped when asked to make a plan. I found that planning can be rather intimidating until you start with writing down what are the deliverables and what is the time frame. This will get your thinking started in the right direction. This and upcoming notes are here to help you get started on planning your own work.

Consider this scenario: you get assigned to a project, but instead of being the one you dreaded, this is one that you are excited about! The technical lead held an effective iteration kick-off meeting. You picked up work on a couple of features that you thought were really cool. You are expected to make a commitment to deliver the features at the end of the two-week iteration. Can you do it? How sure are you? How do you begin to build a plan for your work?

The first step is to decide how much time you can afford to spend on each feature.

  1. Kickoff (1 day)
  2. First feature (4 days)
  3. Second feature (4 days)
  4. Wrap up and demo (1 day)

Next, estimate how you intend to spend the 4 days you budgeted for each feature. You must think of your time as money. Spend it well. Let’s suppose that your technical lead had done a good job coming up with granular features, and you can indeed implement each feature in 2-4 days. Here is how you can “spend” your time during the iteration:

  1. Iteration kick-off meeting (1/2 day)
  2. Plan the iteration (1/2 day)
  3. Design the first feature (1 day)
  4. Implement the first feature (1 1/2 days)
  5. Test the first feature (1/2 days)
  6. Prototype the second feature (1 day)
  7. Design the second feature (1/2 day)
  8. Implement the second feature (1 1/2 days)}
  9. Test the second feature (1/2 day)
  10. Fix the defects found in integration & system test (1 day)
  11. Demo the iteration results to the team. (1/2 day)
  12. Buffer (1 day)

That’s it. This is your rough plan for the iteration. If you wish, you can call this a time budget and not a plan. If you are to deliver the features at the end of the two weeks, this is all the time you have. The key point is that this plan, even with its limited details, shows you what time can you afford to spend on each feature. The presence of the buffer in your plan is the clearest acknowledgment that you don’t yet know enough. When new things come about, you won’t have to replan your entire plan. You can just eat into your buffer. However, once your buffer gets exhausted, then you need to rework your plan.

Looking at this plan you might think that you won’t be looking at times at both features. That should not be the case, especially if they are related. It just means that now you have a way to get the work started. As you get into the details of the work, you will refine this plan. For ideas on how to move forward take a look at What do you know? and Guidelines for Detailed Planning. There are many other aspects of planning, e.g. getting some data on how you are doing, and how to improve your planning skills. For now though, just get started. As the old Chinese proverb puts it:

The one thousand mile journey starts with the first step.”

Ready! Set! Plan!

Understanding a Software System

The need to understand a software system comes up many times during the career of a software professional. A common situation is that you have just been assigned to a new software project. You’ll be working on a system that is unknown to you. Your first task is to fix a defect. Where do you start?

Undoubtedly, you first have to understand the system, or at least understand a portion of the system that you have to modify. Without understanding the system your changes will result in new defects. Here is how to get started:

  1. Identify which use case is affected by the defect. The defect report should give you a lot of clues about this. If a written use case doesn’t exist, then write it. Expand out those areas of the use case where the defect is. Ask folks who worked on the system to review the use case that you wrote. At least ask some of your peers to review it.
  2. Draw a block diagram of the system. Start with the externally identifiable structure. Are there any libraries, packages, modules of code that stand alone? Draw a rectangle for each module. Draw a line between them for each dependency that you find. Have a peer review this for you as well.
  3. Draw a sequence diagram for key interactions from the use case. Of special interest are initialization sequences, the action sequence of the use case that has the defect, and any interrupt or service request sequences that might influence the action sequence’s outcome. Walk a peer through the sequence diagrams and see if they find anything missing from them.
  4. Identify which modules of the software system are involved in the use case. Identify the source files that belong to those modules. Look through the files, assess their sizes, and see how long will it take for you to grasp them. You can review code at about 200 lines of code per hour, so it will take you about 5 hours to understand 1,000 lines of code, or about 25 printed pages.
  5. Identify the most likely parts that you will be working on. What files will you have to change? Ensure that you can check those out of the revision control system. Setup a private branch for your fix to avoid disturbing other people’s work.

By capturing a use case, a system diagram, and a few sequence diagrams you are well on your way toward understanding the system. These artifacts help you identify the root cause of the defect as well as provide you the starting point to devise and implement a fix. There is more to understanding a system, but this is the minimum in order to improve your odds of success!