12

I wanted to know how well people generally define a software product before actually beginning to code and how well it has worked for them? I am referring to defining use cases, analyzing risk, drawing class diagrams, etc.

I know that it is a good idea to have a good enough idea of what the final product will be to be able to avoid risks in the future, but it is also important to not define a product so well that it is hard to adapt to change.

Other more specific questions would probably be:

  1. What percentage of a project's time is normally spent in the planning stages before development?

  2. Do you have certain measurable criteria you try to meet before starting to code or is more of a gut thing?

  3. Do you diagram all classes before beginning to code, or is it mostly trying to create a dynamic design from the beginning expecting that things will change?

Any experience you are willing to share would be awesome!

6 Answers 6

9

The literal answer to "how well defined?" is

Well defined enough that you can get started.

Well defined enough that you can identify an initial scope of work (for an initial concept). This is just enough to help identify changes that will inevitably happen.

Well defined enough that you can prioritize the sprints.

I am referring to defining use cases,

Always helpful. But not all. You to prioritize and cover the important use cases first. Other use cases will be covered in later releases. Some use cases will be so low priority they'll never get done.

analyzing risk,

Generally a waste of time.

drawing class diagrams, etc.

If it helps.

What percentage of a project's time is normally spent in the planning stages before development?

It varies a lot. Buy a good book, like Software Engineering Economics to get "authoritative" numbers.

Do you have certain measurable criteria you try to meet before starting to code or is more of a gut thing?

"measurable". That's almost impossible to define.

"gut". Bad policy.

The issue is "do you understand what you're doing?"

It's not a gut thing. It's a Yes/No question.

It's not "measurable" since it's just a yes/no question.

And, further, you have to prioritize. You don't do everything. Just enough to handle the first few sprints.

Do you diagram all classes before beginning to code, or is it mostly trying to create a dynamic design from the beginning expecting that things will change?

You can't know everything in advance.

Don't try.

9
  • personally i find spending too much time writing class diagrams is a waste of time since the model and code with it changes anyway after you start.
    – AndersK
    Apr 15, 2011 at 5:38
  • I agree that you can't know everything in advance, but a good design document will at least help you identify scope and feature creep when it happens.
    – user131
    Apr 15, 2011 at 7:05
  • @Tim Post: Good suggestion. That's a way to define the "how well defined" in the question. It will "help you identify scope and feature creep." Not much more, right?
    – S.Lott
    Apr 15, 2011 at 9:54
  • @Tim Post: "identify scope" is misleading. It implies that there is some definite knowledge of "scope" available to you at the start of the project, which is not true. Scope will change throughout the lifecycle of the project as business needs change, because no market is static. Apr 15, 2011 at 15:16
  • @Rein Henrichs: I tweaked the answer slightly to incorporate your point. Enough scope definition to get started. I'm tempted to add "and no more."
    – S.Lott
    Apr 15, 2011 at 15:40
2

If your client actively joins the project as a member of the project team, who is available for the developers for questions and making quick decisions about functionality. Then the spec could be less detailed.

If your client is far away and not available for feedback in a long period of time, then your spec should be very detailed.

At our company we create user stories and play Planning Poker with the developers on the project. That gives us a fair indication of the hours to be spent on an user story.

2
  • A "Customer Representative" (the role you're suggesting for the client) is the most vital role in the entire team. If your team can't get answers on product and business questions, how are they supposed to make the right decision? Apr 15, 2011 at 15:49
  • That is a great point, thank you! I didn't consider how the client's involvement could so drastically change what works best for a given project. Definitely something I should keep in mind. Also, I had never heard of "Planning Poker" and that looks like it would be really valuable.
    – drewag
    Apr 16, 2011 at 0:08
2

How well defined the project needs to be is well enough to get you started and know where you're going to be heading for the next two weeks.

As a Scrum Master, I would simply say that you need to define gross features of your product in an Excel sheet or wherever else, only to keep track of your features. Making them User Stories helps a lot thinking about what feature you need next. Then, prioritize them: The Most Important or Imperative Feature to the Top, and the Least to the Bottom.

After you have listed some of the most important features, select the features you think you can develop bring to the state of Done after a two weeks period, or a month period if you prefer. Then, explode these selected feature so that you can start coding in a few.

While coding, you will certainly think of other elements needed to be develop in order to bring your selected features in a Done state. Done means you have nothing more to do, that is, testings, coding, assembling, documentation is Done!

In any time your selected features list may expand, as long as you meet with the goal, that is, you are able to develop everything you said you were to during the given period.

In short, nothing has to be perfect. Throw in some ideas, share with your comrades and see if what is written makes sense to meet with the demanded product requirements. If so, then you're in! To make it clear, I'll go with a simple Customer Management product. What is needed?

As a user, I may manage the Customers;
As a system, I persist changes to the underlying data store;
As a user, I need to enter my credentials to be able to manage customers;
As a system, I have to authenticate the user against the Active Directory;

Your first draft could be as simple as that! Then, we can see that security is an important part in our system, is it important enough to make the ultimate priority (Y/N)? This will depend on the requirements you have to meet. Let's say that Customer Management is the most crucial thing here. So, in the next Sprint, we need to be able to manage customers in a basic but acceptable way. What is Customer Management?

As a user, I may manage Customers;
    -> As a user, I add a customer to the system;
    -> As a user, I change a customer details;
    -> As a user, I delete a customer;
    -> As a system, I flag a deleted customer as being inactive instead of deleting it;
    -> As a user, I need to list the customers;
    -> As a user, I search the customers data bank for a given customer;
    -> ...

This already illustrates enough functionalities to be able to begin developing the application. If your programmers need further instructions, then perhaps one developer who is comfortable with class diagrams may design the Customer class and its properties and methods! But as far as I'm concerned, with this few I have written, I would have enough to get started. Some features may be added or changed along the way. What is important is to focus on what you said was going to be Done. In our example, it is the Customer Management thing. We don't need to care about the user authentication as of now This will come later in the next Sprint.

I hope this helps! =)

2
  • Thanks so much! It was great to see this in such a specific scenario. I feel like this is a good framework to have something that is at least somewhat measurable pertaining to what you define about the overall product but stressing subgoals and a feature oriented approach. This approach will definitely be important as I begin new projects in the future!
    – drewag
    Apr 16, 2011 at 0:06
  • You're welcome! I'm glad my grain of salt could help you! =) It is important not to define too much in depth features, as product requirements may change along the way because the client, when he will see what you have Done so far, may have other ideas or changes to make to what you've Done. You will need to adjust the product accordingly so that it meets the new requirements. So, if you established the whole thing at once in the beginning of the project, imagine the lost of work this may cause! Perhaps will you have worked hours just to throw it away and restart from scratch. Let it evolve =) Apr 18, 2011 at 13:18
1

Well, what works great for me is having the functionality "fairly well" specified and the software architecture only very loosely spec'd.

In order for me to start working, I need to know what I'm working towards. It doesn't work for me when I merely understand the customer's needs. Even if I am writing a tool for my own use, I draw the screens, describe the functionality, what each button does, everything. Otherwise I find I can't get started.

On the other hand, I've given up on really drawing out exactly how I will develop the code. Maybe this is a worst-practice, but it works for me. I might define a set of database tables I will create, but not what columns are in each one. I might think about what objects and classes I need, but I definitely don't draw diagrams.

Hell, sometimes I don't even know how to do it right until after I've done it wrong. I build it once, tear it down, and do it again, now that I know how. At this point I can draw a pretty detailed roadmap and restart.

1
  • Thanks for sharing your experience. It seems to go along with the consensus that the important thing is that you, as the developer, feel comfortable enough to get started. Of course you will discover things you would change if you were to do it again, otherwise you spent too much time planning. I know the feeling of wanting to do a complete rewrite as soon as a product is finished, and that is sort of what I am trying to avoid ;) (at least to a reasonable degree).
    – drewag
    Apr 16, 2011 at 0:12
1

What language and methodology are you using?

Some languages, like Java and C++, require more initial structure than languages like Common Lisp or Python (C++ more than Java, because refactoring is easier in Java). Leo Brodie (I think in "Thinking Forth") gave two pieces of advice about when to start coding: sooner than you feel comfortable with in Forth, later than you want in other language.

Waterfall methodology (particularly when the early design is a deliverable) will require more up-front work than agile (although you don't want to neglect early planning in agile methods, either). Having a good set of automated tests makes it safer to change larger things, and therefore allows you to get by with less up-front work.

Also, it depends on individuals and their familiarity with the type of software to be created. At one point, when doing primarily CRUD apps, I could write a whole program starting with a few specs and a 3"x5" piece of blank note paper. I can't write the stuff I write now like that.

1
  • Thanks for the perspective. I hadn't considered how the language and platform could affect best practices when it comes to project management. I happen to be talking mostly about Objective-C,UIKit, and AppKit. However I also do work in a bunch of other languages (C, C++, C#, Java, Python, etc). That means that I should be careful not to assume a certain method will be best for all projects, I should adjust my methodology base on the target platform and language (and maybe choose a language based on that if I have a choice).
    – drewag
    Apr 16, 2011 at 0:15
1

Two useful terms here are MVP (Minimum Viable Product) and MMF (Minimum Marketable Feature). An MMF is the smallest version of a feature that delivers business value. An MVP is the fewest MMFs that is viable as a product. When starting a project, the best thing to do is identify the MMFs and MVP and start from there.

Release your product as soon as it is viable, then continue incrementally improving it.

1
  • That is some really great terminology, thanks! That is by far the best thing on here for coming up with something measurable. Of course it isn't perfect, but it seems like it will be reasonably easy to decide if a feature is marketable and / or it adds value to the product.
    – drewag
    Apr 16, 2011 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.