How useful is UML?

E

Electronic75

Hello, I program in C and c++ for 5+ years but I am still not satisfied with
my development process. for a big MFC project I usually start by thinking
what classes do I need then for each class I ask what function and variables
do I need and I start writing codes. but many times at the middle of project
I will realize that I could have written program somehow else that possibly
was more user friendly or more efficient or,... and I start rewriting it and
it is very time consuming. I heard about UML and even played with it for
awhile. I thought if I can see the whole picture and go deep into details of
each scheme with a few mouse clicks change something and go back and again
look at the whole picture It may help to find the best possible scheme at the
beginning so I do not have to change my codes in middle of project.
Of course I found it very time consuming to model a complex project with UML
so I like to ask from other software engineers do they use UML? dose it worth
to first model a project that may take a few months with UML? are there
better ways so I can find the best programing schema before start coding so I
don't change my codes in middle of project?

thanks
 
D

David Lowndes

Hello, I program in C and c++ for 5+ years but I am still not satisfied with
my development process. for a big MFC project I usually start by thinking
what classes do I need then for each class I ask what function and variables
do I need and I start writing codes. but many times at the middle of project
I will realize that I could have written program somehow else that possibly
was more user friendly or more efficient or,... and I start rewriting it and
it is very time consuming.

Welcome to the paranoia feeling of "there must be a better way of
doing software" - that I suspect most developers feel.
Of course I found it very time consuming to model a complex project with UML

Have you found that the time spent doing it exceeds the time you'd
spent if you hadn't, or are you still feeling that it's not quite as
useful as you'd have thought it might be?
so I like to ask from other software engineers do they use UML?

I don't, and where I have heard of it being used, it's often done as
lip service because some aspect of the contract required it. Some
people swear by it though!
are there
better ways so I can find the best programing schema before start coding so I
don't change my codes in middle of project?

Experience may be the best I fear!

Dave
 
D

David Wilkinson

Electronic75 said:
Hello, I program in C and c++ for 5+ years but I am still not satisfied with
my development process. for a big MFC project I usually start by thinking
what classes do I need then for each class I ask what function and variables
do I need and I start writing codes. but many times at the middle of project
I will realize that I could have written program somehow else that possibly
was more user friendly or more efficient or,... and I start rewriting it and
it is very time consuming. I heard about UML and even played with it for
awhile. I thought if I can see the whole picture and go deep into details of
each scheme with a few mouse clicks change something and go back and again
look at the whole picture It may help to find the best possible scheme at the
beginning so I do not have to change my codes in middle of project.
Of course I found it very time consuming to model a complex project with UML
so I like to ask from other software engineers do they use UML? dose it worth
to first model a project that may take a few months with UML? are there
better ways so I can find the best programing schema before start coding so I
don't change my codes in middle of project?

Electronic:

For an alternative viewpoint on the software development process (one which
personally I prefer), see the books

Kent Beck: "Test Driven Development: By Example"

Martin Fowler: "Refactoring: Improving the Design of Existing Code"

Michael Feathers: "Working Effectively with Legacy Code"
 
E

Electronic75

David Lowndes said:
Have you found that the time spent doing it exceeds the time you'd
spent if you hadn't, or are you still feeling that it's not quite as
useful as you'd have thought it might be?

Thanks Dave, I actually didn't develop a whole project with UML, neither I'm
a UML expert. I only tried to model a project with UML for some days and I
found out that if I'm going to take care of all nitty-gritty stuffs(I mean
define local variables etc) it will be hugely time consuming maybe it was me
that hadn't enough expertise in UML, maybe it was unnecessary to care about
small details, I don't know but of course when I wanted to change the schema
of project it was much easier in UML than rewriting a whole new set of
classes and functions.

cheers,
 
E

Electronic75

:

Electronic:

For an alternative viewpoint on the software development process (one which
personally I prefer), see the books

Kent Beck: "Test Driven Development: By Example"

Martin Fowler: "Refactoring: Improving the Design of Existing Code"

Michael Feathers: "Working Effectively with Legacy Code"
Thanks david, I will try to read them but I have a vague familiarity with
test driven development and my impression always had been that test driven
development is hugely time consuming and it dose nothing to speed up
development process but only make codes more robust and I think if I adopt
such methodology it dose not prevent me from altering codes in middle of the
project.
my current methodology is to use a lot of trace and assert codes that both
help documenting the project and help in debug process but I think it dose
not help me to reach the best scheme for development before writing down the
code and I still change a lot in development process.

cheers,
 
D

David Wilkinson

Electronic75 said:
:


Thanks david, I will try to read them but I have a vague familiarity with
test driven development and my impression always had been that test driven
development is hugely time consuming and it dose nothing to speed up
development process but only make codes more robust and I think if I adopt
such methodology it dose not prevent me from altering codes in middle of the
project.
my current methodology is to use a lot of trace and assert codes that both
help documenting the project and help in debug process but I think it dose
not help me to reach the best scheme for development before writing down the
code and I still change a lot in development process.

Electronic:

I think the rationale behind this approach is that no matter how well you design
your application up front, over the course of time it will have to be modified
to provide added functionality. Often, the original design will not be well
suited to the new feature, and you will need to refactor the existing system
before adding it. In order to do this reliably, you need tests in place.

For me, the main benefit of TDD is to ensure that you have tests in place. If
you wait until after the code is working, you may not create the tests. I also
think that the discipline of writing the tests first encourages you to develop
simple interfaces for your classes.
 
P

Pavel A.

Electronic75 wrote:
..........
my current methodology is to use a lot of trace and assert codes that both
help documenting the project and help in debug process but I think it dose
not help me to reach the best scheme for development before writing down the
code and I still change a lot in development process.

Then you have no choice but grow up and become a manager.
You'll get all the architecture delights, while the peons write and test.

--PA
 
H

Howard Swope

I have found UML to be a wonderful modeling language that is an invaluable
part of my development process. It allows me to document my thoughts,
communicate with other developers, and even communicate with non developers.
It is important to sketch out your thoughts and see how some of the pieces
will fit together before you start to write. However, you can also commit
the error of over-engineering. For some design issues it is better to write
first and then when the need of the project pushes you to change, you
refractor to meet the change. Often all the wonderful designs you create up
front will be rendered useless because of a changing domain landscape.

But it seems to me you are not really asking about modeling. You are talking
about a tool that does UML to code generation. I have not found one that can
really do model to code and code to model well. I just purchased the Altova
UModel, but haven't really played with their code generation stuff yet
because I know this is the holy grail that has yet to be gained. Borland had
a tool that was very invasive into a VisualStudio project that looked like
it had promise, Borland Together (or something like that). If you ever used
a tool called JBuilder you would have seen the roots of that product in
action. The JBuilder implementation was quite elegant.

It seems to me that you are really looking for a science to help you manage
change in your software development and engineering efforts. There are many
sciences and schools of thought that have been created to help this. Look at
some of the modern schools of software engineering, RUP, Extreme
Programming, Agile Development, etc. All of these approaches assume change
to be an active member of the software development team. All of the modern
philosophies look to strong skills in unit testing and refactoring as a
reasonable way to manage change from a code perspective. They also heavily
embrace iterative development from a philosophical perspective.

Software systems are living breathing entities that evolve and change over
time, like the systems they run on. The black box of analog circuitry or
even hard digital code embedded in silicon is less pervasive than
programmable logic chips and EEPROM. It seems the only way to find success
in modern projects is not to more tightly define the black box, but embrace
the change that lives with in it.

Remember don't drink wine and read news groups in the evening...
Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top