views:

192

answers:

10

Hi. I would like to know what do you use to sketch relations between different entities in C/C++. This can be a very broad issue, so I'll try to clarify a bit more my question and give an example.

I'm looking for something that is simple enough as a user, and let me sketch easily containers, pointers, etc... in an informal way. The aim is to document some structs relations to pass them to junior developers. A look at the drawings is supposed to accelerate the understanding of the code.

My solutions at this moment are to use:

1) Paper & pencil. 2) Microsoft PowerPoint/Word Autoshapes. 3) Freeware Dia.

Other ones could be:

4) Microsoft Visio, but my company does not own licenses. 5) UML tools. I don't want to go this way. This is what I mean a more formal solution. I know tools like Rational Rose are great, and I tried boUML and violet and they are fine in some parts, but I prefer the flexibility of options 2) or 3).

Finally, let me write down a more concrete example:

Let's say I what to sketch a map that contains another map as the mapped value, and that one contains a struct as the mapped value, that holds a vector of pointers of a type and a pointer to other type. Also, there exist other structs that hold pointers to the objects pointed by the previous map, so there are objects pointed from different places.

This is just one example I have, but you can easily come with one from you experience.

What would you use to sketch this example or another similar you have dealt with?

Best regards, Tomas.

+2  A: 

Visio is great for quickly creating these types of illustrations / diagrams. I recommend at least trying to get your company to purchase a license.

If Visio is truly not an option for you, the next step may be to consider Open Source alternatives to Visio.

Justin Ethier
+1  A: 

I would probably use graphwiz, but since you say "something that is simple enough as a user", dia is probably a better alternative.

Rasmus Kaj
A: 

I've used ArgoUML but you'll have to decide whether it's simple enough for what you have in mind.

Kelly French
+2  A: 

I have two things I use.

  1. My whiteboard. Whiteboards are really tough to beat for diagramming something quickly.
  2. UMLPad. It's small, so it doesn't have a ton of unrelated features to deal with, it is targeted to UML diagrams, and it is GPL.
T.E.D.
A: 

For the sake of completeness: there's also StarUML, which is (windows) freeware and let's you create uml-diagrams pretty quickly.

stefaanv
+1  A: 

For design issues, involving thoughts by a good many people, we've used "Post-It Design". The idea is simple:

  • Pick a whiteboard
  • Represent an entity as a Post-It (name + some comments)
  • Draw the relationships on the white board moving the post-its around as required

And when you're done ? Photo of the whole thing for perenity emailed to the persons involved :)

It may seem artisanal but it really remind me of the paper design approach to GUIs.

Matthieu M.
@Matthieu: This is really good for brainstorming sessions - highly recommended.
Johann Gerell
+1  A: 

Have you tried Google Doc's Drawing? The link is one of the diagrams I've done with it.

Xavier Ho
A: 
  • Visual Paradigm UML the community edition is free and is good enough for sketching
  • Open Office Draw works for most of what you want to do too
Harald Scheirich
A: 

If you have an existing codebase you wish for a developer to understand (it sounds like you are trying to help junior devs come up to speed quicker) why not run your code through doxygen

With various output types and the ability to draw class hierarchies it really is a useful tool. The added benefit of something like the html output is that you dont have to cram everything into a finite amount of space since all relationships are hyperlinked. Users can just browse the source - at a type-level - without having to worry much about the details.

ezpz
A: 

I like yuml as a very easy way to create diagrams, that also keep that informal look. And no real drawing needed :)

nathanvda
Nice tool for UML stuff.
tomasorti