23. Questions

  1. Does it make a difference how i write the HTML-Colour-Code (#ffcccc vs. #01DF01)?

    There is no difference except lower/uppercase in your examples. Both are hexadecimal specifications of RGB colors.

  2. You show me some things with Sphinx, but what are the tasks for me to do with Sphinx.

    Sphinx is used to write documentation.

  3. Is gen_plantuml.py a python snippet for creating a fast UML Diagram?

    No it is a script, but it does not produce UML class diagrams the way they must be.

    1. if yes, should I use it?

      No, not now. Yes, for other modules.

      1. if yes, how?

        As it is intended (see output of command gen_plantuml.py for usage).

  4. What is a programming language pre-processor

    Look up C-preprocessor. The pre-processor does not generate target code (assembler) but transforms the source code into another version of source code.

    • substitue constants, e.g. #define CONSTANT 23456
    • expand macros, e.g. #define MACRO(x, y) (x + y)
    • include files, e.g. #include “xyz.h”
    • keep or remove source depending on conditions, e.g. #if defined(abc) … #endif
    • Remove comments
  5. Enum == normally a list of all variables in the whole programm?

    No, an enum is excatly the same as an enum in C/C++:

    enum { xyz = 2, abc, def=5, ghi };
    const int xyz = 2;
    const int abc = 3;
    const int def = 5;
    const int ghi = 6;
  6. If I have multiple classes, should I write for evey class class “different_class_names” as C ?


    • “Class 0” as C0
    • “Class 1” as C1
    • Class2
  7. Should I write {} in the UML for die type description of a dictionary, even though, I should use a other Syntax for Dictionaries?


class X {



    Do not confuse modeling with an actual language syntax!

  8. I’ve never used private attributes and methods in python (I know, I told me what is going in with private things in pyhon, but I forgot it. I only know, that _private tells an other programmer, that it is private and SHOULD NOT be changed, because if you do, you could collapse the whole thing.

    That is all there is to know.

    1. Should I use private attributes and methods in python?

      1. If yes, when and how?

        Yes, if you do not wish to guarantee an API.

      2. If no, should I though use the private declarations in the UML to describe the programm, in case, some one will the UML to write the Programm in a programming language in which you use privates?

  9. Do I need more than E, C and G for describing every thinkable programm?


  10. Is the name of a method/function/attribute/variable etc. enough, or should/could I also add a small commend to describe it?

    As you please.

  11. Quote: “It is possible to replace – by .. for broken lines”. What does broken lines means in this context?

C --> B
B ..> D

  12. Is Directed Association like two telefones, where one only can transmit voice and the other only can receive it?

    Good question. But no, it is not a strictly unidirectional thing.

  13. What’s about Dependency, Gerneralization/Extension, Realization?


  14. Syntax question: In your first example you wrote class “ClassDiagram” as C and in your Diagramm appeared a C. In your BB example, you wrote … as BB, but no BB appeared in your diagramm. Why?

  15. Why is the ws-cartoon-logo a puml type?

    Check !include statement in Reference Guide.

  16. Is the logo also saved in the _static directory?

    Check TXT + Files.

  17. Why is who[] and who_not[] from type list and not from type dict?

    Because they are references to data, stored in other places.

    It implies that there is a dictionary somewhere. But it should be a global registry of all persons (usu. a database).

    who and who_not are categories and should not contain the entire person object, just an ID (name or whatever).

    There is not even a need for a persistent list, it might as well be the temporary result of a database query:

    SELECT * FROM PERSONS WHERE status = "suspicious"
  18. I assume the text after the methods and the : is the short description a asked some questions above. Is that right?

    Feel free.

  19. Would you get a Syntax Error, if you would’nt use the // in your long descriptions (for instance after suspect(p) )

    No, since // is Creole wiki syntax for italics, as used by PlantUML.

  20. Is the uml directive only visual in HTML output?

    No, it is also in PDF, EPUB is just a HTML archive, so it is obviously there.

  21. What does BB circle do?

    The command starts at the beginning of the line:

    hide BB circle

    It hides the circle (with the C) for the class BB.

  22. Why does everybody use Foo and Bar for examples????

    FUBR -> Fucked Up Beyond Recognition (military slang)

  23. M-x plantuml-preview == Ctrl-c u u v in your emacs?

    Not quite, but almost. Help for key: Ctrl-h k Ctrl-c u u v:

    C-c u u v runs the command x-plantuml-preview-current-block, which is
    an interactive Lisp function in `x-plantuml.el'.
    Find next UML diagram and call
  24. Should I also handle yUML although it’s not easy to use it offline?

    No, it is just listed as evaluated alternative. The need to be online disqualifies it. As does the limited amount of diagrams and the bad readability of the diagram definitions.

  25. Do I need to handle the Other UML Tools (GUI with UML standart support, Generic Diagrams … )

    No. I have just evaluated them to give a hint as to which ones are most useful, most up to date.