# Can graphical notation count as code or should questions with exclusively graphical notation be considered off topic?

As a community, are we willing to accept graphical notation as a form of code that is subject to code review?

I recently answered a question that asked for review of a database model as presented in an entity-relationship diagram. With this question, the the OP's intention would be clear to anyone who is familiar with ERM notation. However, because it was not encoded with symbols contained within the Unicode Standard, it was closed as off topic. Understanding that many Code Review users may be unfamiliar with ERM, I edited the question by providing SQL CREATE TABLE statements that were directly analogous to the OP's ERM diagram. I then flagged a moderator for reopening. My edits were subsequently deleted. If anyone is interested, the (now-deleted) referenced question is here.

Graphical modeling has been recognized as a valid form of encoded logic since the late 1800s. As a developer and architect, I often use visual models to clarify and effectively communicate complex concepts. ERM has been a standard in the software industry since the 1970s. UML has been common place since the 1990s. The Code Review FAQ states that Code Review is "the right place" for questions about design pattern usage. The seminal textbook on design pattern usage contained multiple diagrams for each design pattern as well as an appendix for modeling notation.

In addition to the established, historical usage of modeling in software development, there is significant evidence that suggests that a shift in methodologies towards graphical programming would greatly improve developer productivity.

Should we continue to ban interchange about modeling from Code Review? Or, does it make more sense to permit questions that express software designs through standardized, graphically encoded notation?

• The issue that I see as potentially problematic is the requirement that code be working before it submitted here. What would that mean in terms of these diagrams? – Winston Ewert Oct 9 '12 at 17:05
• Possible exception: programs in Piet :-) – svick Oct 9 '12 at 18:20
• @WinstonEwert Isn't that requirement there more to exclude the “How can I make this code work?” kind of questions, even if it isn't worded that way? – svick Oct 9 '12 at 18:25
• @svick, yes, that's part of it. But I think it also serves to force people to have put effort in before showing it to us. See this question: meta.codereview.stackexchange.com/questions/594/… – Winston Ewert Oct 9 '12 at 19:41
• @WinstonEwert, How is "working code" defined? Compilable? Dereferenceable? – smartcaveman Oct 9 '12 at 19:47
• dereferenceable? what? In the case of code, I expect it to be compile and be tested such that the author believes it to be bug free. – Winston Ewert Oct 9 '12 at 20:17
• The problem with this kind of post is that it promotes working/viable answers. This means that the person answering the post needs to come up with all the code and the OP has learned nothing. They have done no legwork or research, no coding, no experimenting, nothing except thinking about it. Diagrams are fine when discussing strategy, but then those kind of questions are better suited for Programmers.SE. If the questions used diagrams for clarity that would be fine, but the code is necessary to determine if the OP understands the topic. – mseancole Oct 10 '12 at 13:43
• @mseancole I think you're not considering that diagrams can very easily be the final step in programming a class. For example, I routinely create UML diagrams visually and then run a code-generator to produce the object-model, database and mappings. With something like this, I already know the output compilable code will 'work', and the only part that I have to consider or might want reviewed is the design. – smartcaveman Oct 10 '12 at 14:24
• @WinstonEwert, (1) That would make all markup code off-topic. (2) Would you be more accepting of an .svg xml document that created the visual diagram, even if (a) the visual diagram was all that I wanted reviewed in the first place, and (b) the visual diagram is much more simple to interpret? – smartcaveman Oct 10 '12 at 15:27
• @smartcaveman, no it wouldn't make markup code off-topic. In the case of HTML, the poster would be expected to have something which displays correctly. – Winston Ewert Oct 10 '12 at 16:25
• The issue isn't text vs visual. If you were using an actual visual programming language I probably wouldn't object. The fact that the artifact is displayed in a visual format isn't the issue, my concern is whether the artifact is really reviewable in the first place. – Winston Ewert Oct 10 '12 at 16:31
• @smartcaveman: If you are using a program to generate the code from a diagram, then there is nothing to review but the strategy. So my point still stands. This is not a "code review", but a review of the selected strategy, which is more appropriate for Programmers.SE. – mseancole Oct 10 '12 at 21:22
• @YannisRizos: Programmers.SE is the only site I know of that specifically says in their FAQ that they allow questions about design patterns and structures. Besides, how is it too localized? Its a concept. It hasn't been applied to anything yet. It should still be vague enough to be helpful in many different situations. Or am I misinterpreting it? Please let me know, I don't want to keep sending people to the wrong site if this is truly an issue. But if it is, where then do I send them? This is a topic I believe should be allowed somewhere, and everywhere else dismisses it. – mseancole Oct 12 '12 at 4:48
• @mseancole, by that logic, C# is "nothing but strategy" because I am using a program (the jitter) to generate code (CIL) from it. So, I guess higher level languages should be off topic as well? – smartcaveman Oct 12 '12 at 8:26
• @smartcaveman: There are a couple of problems with that assumption. The diagram-to-code generator you mentioned expresses a design concept. Correct me if I'm wrong, but it is more or less a scaffolding. So the base code it generates is still an "idea". From my vastly naive experience with code generators for C# you are still "coding", just with an immensely intricate GUI. Besides, C# is not JUST dynamically generated. There are people who hard code it as well. C# and UML or ERM are completely different. This is kind of hard to express in words, so my apologies if I'm not doing it adequately. – mseancole Oct 12 '12 at 13:57