Processing is now an interesting alternative to other programming languages at many universities in courses.
As far as algorithms are concerned different graphical representations are used: UML, flow charts, structure diagrams (Nassi-Shneidermann).
When it comes to imperative programming, flow charts are certainly “out of date”:
"Goto considered harmful ! " (see the lecture of Dijskstra68)
It may be due to the consistent graph-theory-based diagram paradigm of UML that they nevertheless became the blueprint for activity diagrams, which may be lamented. Their original advantage easily to be sketched on a sheet of paper, where space problems could be circumvented by “spaghetti drawing”, had long turned into a clear disadvantange, particularly regarding the efforts in computer-based design. (To derive structured code from a “wild” flowchart is anything but trivial.)
Structure diagrams offer a good alternative for graphically representing code parts that are not so extensive.
There is an interesting tool called “Structorizer” (open source, several developers).
https://structorizer.fisch.lu
What I find interesting is that recently this tool can import PROCESSING code
and display it as a structure diagram. Export to Latex also works.
This may be very practical for scientific publications or in courses where algorithms are to be presented in a rather language-independent way. (It might be mentioned here that the diagram export to several programming languages is also supported: An export as Java code could easily be tweaked to a PROCESSING source.)