Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to document procedural programming? [closed]

In college I learned how to use UML to document OO applications. In the real world I've been tasked with documenting an old procedural program, essentially re-creating the design specification documents that have gone missing.

Are there any "standard" documents or methods similar to UML for documenting procedural code? I'm sure there must be something that people used before UML.

Thanks!

like image 724
jmmr Avatar asked Jan 22 '10 22:01

jmmr


3 Answers

Yes. Flowcharts.

like image 125
Paul Nathan Avatar answered Oct 19 '22 23:10

Paul Nathan


You could use PSD(process structure diagrams) or NSD (Nassi Schneiderman Diagrams). I had to learn it for my first lessons of programming, before diving into OO and Java. It doesn't cover different aspects as UML, but it's starting point to visualize a procedural program.

like image 39
Tuxified Avatar answered Oct 19 '22 23:10

Tuxified


Remember what UML stands for Unified Modeling Language. It's not just for modeling Object Relations, which I believe is a common misconception of UML. It can also be used for state diagrams, business processes, database schemas, ... See : http://en.wikipedia.org/wiki/Unified_Modeling_Language .

I recently used IBM's Rational Software Architect to convert State Diagrams into Perl. But for Perl we had to write our own translation files since Architect didn't include them for Perl.

But if you are talking about C code, Architect has a built in feature to reverse engineer written code into a UML diagram. I've used that feature for Java and it works pretty well and creates a Object Diagram. I haven't used it for C before, so I don't know if it will turn it into a Sequence, Activity or State Diagram.

You can download the trial version of Software Architect and see if it works for your code.

like image 44
eSniff Avatar answered Oct 19 '22 23:10

eSniff