PDA

View Full Version : drawing flow-charts for every single program??



LogicError
05-25-2005, 08:45 AM
I'm on first course in College.. We're studying VB.. Our IT teacher makes us draw a flow-chart for every single program.. I ask her why, and she says that when we'll be writing more complex programs, flow-charts will help a lot.. but I don't see it.. I wrote loads of complex programs and games in C++, NEVER used any flow-charts.. Design yes.. but no flowcharts.. Your opinion?

joshdick
05-25-2005, 08:47 AM
I'm currently writing a design document that will end up well over a hundred pages. Therefore, I have no sympathy for you. Sorry.

LogicError
05-25-2005, 08:52 AM
I have nothing against design documents.. But I'm talking about flow-charts of a program.. What if the programs is like over 10,000 lines.. how do I draw the flow-chart and why do I need it.. Then what if I want to change some code?

Govtcheez
05-25-2005, 09:03 AM
> why do I need it..

When you write a program, consider what someone else will think when they try and maintain it. With very large programs, it's a lot easier to determine what's going on if you've got a general idea already.

> Then what if I want to change some code?

If the design of the code changes so fundamentally, update the flow chart.

joshdick
05-25-2005, 09:04 AM
For large programs, your flowchart should have a high-level viewpoint, probably only depicting how various modules interact.

You don't need it here and now while you're programming something that you designed, programmed and tested. But other people will need all the help they can get to understand your program in the future when it's their job to maintain and extend your program. Heck, even you probably won't understand your own code a few months from now.

Furthermore, it's often the case that in professional situations, the designers, coders and testers are all different people.

As for how changes in your code, there are at least two schools of thought on that. According to some software life cycles, the design should be etched in stone before coding is begun. According to others, the design and the code should influence each other until both reach a high level of quality. Then again, in business applications, you might very well find yourself programming a whole application based on an e-mail from your boss and a drawing on a whiteboard and then writing a whole design document after coding is complete. Not that that's ever happened to me *grumble, grumble* ...

ober
05-25-2005, 09:44 AM
I used to hate flow-charting in college... I thought it was a complete waste of time, but for more complex programs, it helps you to visualize the flow of the parameters and understand what should be happening when.

Where I work, documentation is almost a 4-letter word. We're so understaffed and no one collaborates on projects, so we all just write our own stuff and hope no one ever has to modify it. I do try to add a lot of comments to my code, especially if it is fairly complex. But I don't honestly have time to sit here and flow-chart everything and spell out all the details of my programs. Right now I have at least 7 major projects going on at once, so my time is precious (which is why I'm sitting here responding to a thread on a board that is meant to help people with a language I don't use at work... HAHA ..... :( ).

nvoigt
05-26-2005, 05:09 AM
Ober, are you sure you aren't working in Hannover, Germany ? Your work description seems vaguely familiar.

DrakkenKorin
05-26-2005, 06:22 AM
you could always drop the class if you hate flowcharting so much ....

ober
05-26-2005, 07:14 AM
Ober, are you sure you aren't working in Hannover, Germany ? Your work description seems vaguely familiar.
Hmm.... does Volvo Trucks have a plant in Germany? ;) (actually, I think we do :( )

okinrus
05-27-2005, 01:17 AM
m on first course in College.. We're studying VB.. Our IT teacher makes us draw a flow-chart for every single program.. I ask her why, and she says that when we'll be writing more complex programs, flow-charts will help a lot.. but I don't see it.. I wrote loads of complex programs and games in C++, NEVER used any flow-charts.. Design yes.. but no flowcharts.. Your opinion?

For requirement gathering, flow charts(or activity diagrams) can be used, especially if there's a lot of conditions. But usually English is just fine. And you even have a few benefits because English forces you to use concepts whereas the flow chart doesn't. For design, you could use flow charts maybe by showing the actual function calls or perhaps showing the inner workings of a function.




I have nothing against design documents.. But I'm talking about flow-charts of a program.. What if the programs is like over 10,000 lines.. how do I draw the flow-chart and why do I need it.. Then what if I want to change some code?

You wouldn't use a flow chart of the entire program. Maybe each scenario through the program could be flow charted.

B0bDole
05-27-2005, 06:08 AM
I love UML class diagrams, especially for Java, by the time I'm done designing all I have to do is code in functionality.

nickname_changed
05-27-2005, 06:15 AM
What flow charts are we talking about? The stupid kind where you have a box for each function, then a line going to a diamond for an 'if' statement, then a circle as a 'for' loop? Or the useful kind where you have a box for a class or module and specify how they interact?

okinrus
05-27-2005, 08:33 PM
What flow charts are we talking about? The stupid kind where you have a box for each function, then a line going to a diamond for an 'if' statement, then a circle as a 'for' loop?

This kind is a flow chart, though the each box doesn't necessarily have to be a function.



Or the useful kind where you have a box for a class or module and specify how they interact?

I don't think you mean a flow chart here. Maybe a sequence or object diagram.

nickname_changed
05-27-2005, 09:24 PM
Correct, I guess thats not a flow chart.

In that case no, flow charts are stupid. If something is so complex you need a flow chart to understand it, you haven't broken it down enough.

LogicError
05-30-2005, 08:45 AM
Hmm.. talking about complex.. Here's the task: A guy gets into a building.. it has N floors with 3 flats on each floor.. The lift can stop only on odd floors.. What floor does the lift "deliver" the guy to if he wants to get to flat number X? .. So I wrote the program.. Showed my teacher my coding style (I didnt know a function in vb that would convert 1.01 to 2 so i wrote one myself..) .. she looked at my code and said.. "Oooh.. draw a flow chart please.. I don't understand what's going on" ... Unbelievable.. complex....

SMurf
05-30-2005, 09:02 AM
Am I missing something vital here? :confused:

I start my final year of a Computer Science degree in October and never have I done any flowcharts. UML use case diagrams, sequence diagrams, package diagrams yes, flowcharts no.

Will da big boss hit me up and fire me when I gets da job? :eek:

B0bDole
05-30-2005, 09:18 AM
flowcharts are usually used for non-OOP programs... since I am also a Comp Sci major I can say that we focus on OOP because non-OOP is easy to master within one course worth of work. Of course that might not be the case everywhere.

Govtcheez
05-30-2005, 09:25 AM
Will da big boss hit me up and fire me when I gets da job?
...

non-OOP is easy to master within one course worth of work.
...

You guys are adorable.

B0bDole
05-30-2005, 09:28 AM
i love you

edit: 411 holla

jverkoey
05-30-2005, 10:22 AM
Will da big boss hit me up and fire me when I gets da job? :eek:

I need that ES laughing smiley right now.