Skip to content

ad-si/syvis

Repository files navigation

Syvis

Syntax visualization instead of syntax highlighting.

A graphical representation of code.

Bring Javascript code reviews to the next level. Stop dealing with badly formatted syntax and start reasoning about semantic.

  • Formatting independent
  • Partially language agnostic
  • Better overview
  • Simplifies reasoning over code

Usage

npm start -- path/to/javascript/file.js

Development

Start development environment:

docker run \
  --interactive \
  --tty \
  --volume "$PWD":/syvis \
  --rm \
  node bash
chokidar source/styles \
  --initial \
  --polling \
  --command 'stylus < source/styles/main.styl > public/screen.css'

User Interface

  • muuri - Responsive, sortable, filterable and drag-able grid layouts

Advantages Over Normal Code

  1. Easier readable - Humans are made to recognize visual patterns.
  2. Customizable
  • Consumer is not dependent on the author to choose appropriate formatting
  • Uncommon formatting preferences can be satisfied
  1. Less error prone - Erroneous and dangerous code can be additionally highlighted
  2. Better storage possibilities
  • Code could be stored and transmitted in a minified format (all insignificant whitespace removed)

Abstract

In most programming languages the semantic meaning of a program is disconnected from the formatting of the code and the naming of variables and keywords. This means semantically equivalent code can be written in a vastly different textual representations. This poses problems in terms of readability and understandability of code. Even minor modifications of punctuation or formatting in comparison to a developers familiar style can drastically decrease the performance. In order to mitigate these problems I propose to visualize code in a graphical and deterministic way. Instead of relying on the author of the code to format it in a acceptable manner, each developer can choose a visualization of their liking. This has the potential to decrease the error rate and increase the development speed of programmers.

Future Work

  • Touch based
  • Drag and drop

Related Work

Misc

Visual Programming

  • Alice - Object based educational programming language plus IDE.
  • Node-RED - Flow-based programming for the Internet of Things
  • Greenfoot Frames - Frame based editing environment.

Mobile Coding

Links on how to code on mobile/touch devices

Code Visualization

  • js2flowchart - Convert JavaScript code into SVG flowchart.
  • flux - Visualize Haskell programs as data-flow diagrams.

Talks

Online IDEs

  • CodeSandbox - Online editor that helps you create web applications.
  • observablehq - Interactive notebooks for data analysis, visualization, and exploration
  • Onelang - Cross compile/transpile code to several languages online.
  • runkit - Interactive notebooks with very version of every npm package pre-installed.
  • meemoo - Online flow based creative tool maker.
  • livecode - Develop apps "live", using a visual workflow language syntax.
  • touchdevelop - Adaptive editor with support for drag & drop but also normal code.

Visual Programming Languages for Haskell or Haskell-like Languages

Other Functional Visual Programming Languages

Links, Papers and Resources

  • Instant playful access to serious programming for non-programmers with a visual functional programming language (pdf)
  • The “Physics” of Notations: Towards a Scientific Basis for Constructing Visual Notations in Software Engineering_ (pdf)
  • I know what you did last summer: an investigation of how developers spend their time (pdf) (papers that cite it)
  • Evidence-based programming language design
  • Language design for programming reliability

    semicolon as separator is about ten times more prone to error than semicolon as terminator

  • Code Bubbles - Rethinking the User Interface Paradigm of Integrated Development Environments.

People

More Resources

TODO