# Software Flowchart



## Phishfry (Jul 14, 2017)

I want to make a nice flowchart of NanoBSD. I find making a visual model helps me to understand how something works.

I did this with Webmin when i was studying the internals and I used Dia as it seemed to fit the bill well.
I really did not know how to use Dia but got a real nice end product.
I was mapping the foobar module example webmin provides for a visual map of how things connect.

What kind of software code mapping program can I use to show programs innards visually.
Should I just bone up on Dia. It seems to have code support.


----------



## Phishfry (Jul 14, 2017)

Here is low rez graphic of my webmin flowchart:


----------



## leebrown66 (Jul 14, 2017)

You can use dot(1) to create something similar (although the layout can be quite tricky).
For example:

```
digraph p {
 rankdir=BT
 foobar [label="foobar folder"]
 lang [label="lang folder"]
 module [label="module.info"]
 module_desc [label="Provides module info to Webmin"]
 config [label="config.info"]
 config_desc [label="Webmin module meta-config file"]

 lang -> foobar
 module -> foobar
 config -> foobar

 module_desc -> module
 config_desc -> config
}
```
produces


----------



## Phishfry (Jul 14, 2017)

That is impressive.


----------



## leebrown66 (Jul 14, 2017)

The guide is pretty good too (40 pages).


----------



## leebrown66 (Jul 14, 2017)

Sorry, I missed the 'source code' part.  devel/doxygen can generate some nice graphs of class trees, include dependencies, function dependencies, all as html so it's linked.  Also if the source is yours, it's a good way to document in-line.


----------



## kpedersen (Jul 16, 2017)

I use Doxygen for my C projects to generate call graphs and reverse call graphs. I.e Something like this:
https://romanegloo.files.wordpress.com/2012/03/callgraph_mmap_region.png
It is also a great way to navigate your way round a foreign codebase too.

I find the call graph stuff doesn't work that well with C++ however. If you are looking at work with webmin, that is PHP? Doxygen reports it works with PHP, so it might be worth a shot.

Doxygen uses the GraphViz dot tool under the hood.
For class diagrams, I tend to use Dia


----------



## evanray (May 5, 2020)

```
digraph G {
size ="4,4";
main [shape=box]; /* this is a comment */
main -> parse [weight=8];
parse -> execute;
main -> init [style=dotted];
main -> cleanup;
execute -> { make_string; printf}
init -> make_string;
edge; // so is this
main -> printf [style=bold,label="100 times"];
label="make a\nstring"];
node [shape=box,style=filled,color=".7 .3 1.0"];
 execute -> compare;
 }
```
There is a way to implement custom node shapes, using shape=epsf and the shapefile attribute, and relying on PostScript output


----------



## grahamperrin@ (Jan 30, 2022)

Phishfry said:


> … making a visual model helps me to understand how something works. …







> I used Dia … really did not know how to use Dia but got a real nice end product. …



Before I decide which software to use: where might I *begin to learn the basics* of flowcharting and/or UML? For example:



– I can point to reveal descriptions, but many of the descriptions are not yet meaningful. 

I see Apps/Dia/UML Tutorial - GNOME Wiki!, things such as this, don't help me, sorry. I need something more basic. TIA

Background



grahamperrin said:


> … *crying out for a flowchart*, a flowchart to cover more than just graphics, for newcomers. … I'll probably go solo to produce something.





grahamperrin said:


> … the FreeBSD Project needs better onboarding for the gamut of people who require a desktop environment
> a flowchart will help.


----------



## kpedersen (Jan 30, 2022)

grahamperrin said:


> I see Apps/Dia/UML Tutorial - GNOME Wiki!, things such as this, don't help me, sorry. I need something more basic. TIA



There are many books discussing UML. If you need something basic, then it is best to start at the very beginning: http://patologia.com.mx/informatica/uug.pdf

A great opportunity to learn something new.

One of the authors is G.Booch himself who probably knows a bit about UML


----------

