Категории: Все - development - visualization - environment - collaboration

по Dénes Harmath 5 лет назад

979

Computing for Humans

The document outlines a comprehensive framework intended to make software development an uplifting and joyful experience. It emphasizes the importance of a well-structured environment that supports versioning, undo/

Computing for Humans

DUX

Development as an Uplifting Experience

Develop with Joy!

Literature
Direct manipulation

Direct Manipulation for Comprehensible, Predictable and Controllable User Interfaces

Debugging

A Survey of Program Visualizations for the Functional Paradigm

Structure editing

Efficient Development of Consistent Projectional Editors using Grammar Cells

Modeless Structure Editing

A Structure Editor for the Program Composing Assistant

Advances in Structure Editors - Do They Really Pay Off?

Potential collaboration
Levente Mészáros
JetBrains
Stage N Software
Applications
Phlisped
MPS
Lamdu

structural editor

Mesh

structure editor

Flex
APX
Light Table

inline result & documentation

Debugger Canvas

code bubbles

Arrowsmith

augmented editor

Unison

immutable versioning

semantic editor

Observable

reactivity

data access

live programming

target runtime
frameworks
Cache

Hazelcast

Services

Scalatra

Play

Communication with services

Autowire

Framework

Spiral

Monix

OutWatch

language
GHCJS
Ceylon
Elm
Scala.js
backend
Firebase

full text search: Flashlight

Architecture

Roadmap

Programming
Detailed

Versioning, undo/redo, authentication

Collaborative

Parametrized types

Reactivity

Custom types

closures

More built-in

switch

string

boolean

color

graphic

Custom functions

Numerical functions

expressions

number literal

types

number

State synchronization

Editors

Side effects

Games

Simulations

Pure functions

Animations

Visualizations

Modeling
Custom editors
Derived properties
Bootstrapping
Views
Navigation

Specification

Functions

T stream

T state

"T state"

optional T

"maybe T"

T set

T list

"Ts"

Low-level

Programming-specific

Commands

Edit

surround with

with argument

literal

with given name

choice case: change to other case

list element: delete

create

function signature

test case from function

expected output

input

segment

with parameter reference

with function call

with literal

with parameter

with text

move in list

list elements

Navigate

highlight

automatically in workspace

references

identical

substitute with

show/hide

function's definition

signature

close

open

in same/other view

type

referencing parameters

referencing functions

referencing types

expression

parameter reference

function call

caller functions

expected type

workspace

function

with name

outgoing changeset

list of explicit changes

updates to consider

implicit changes implied by explicit change

open elements

change: record

implicit changes: list of reference to version

explicit change: reference to version

changeset: record

changes: list of change

type view: record

expression property: union

substituted definition

definition

substituted result

result

actual type

definition view: record

visible property: optional expression property

subexpression: expression

function view: record

related: list of view

result visible: boolean

actual type visible: boolean

expected type visible: boolean

definition views: list of definition view

signature visible: boolean

view: union

type view

function view

workspace: record

changeset: reference to changeset

views: list of view

Generic

Types

Specific modeling

label & children can be computed

Generic modeling

View: one of

Reference view

reference: reference to reference

Choice view

List view

filter: text

list: reference to list

Record view

visible computed properties: list of reference to

View group

views: list of

View

title: text

Mind map (tree with labeled edges)

Session (entity)

selection: list of

reference to

mode: Mode

Mode: one of

Adding child

Editing content

Navigating

focused node: reference to

Node

Node (entity)

collapsed: truth

children: list of

Child (entity)

slashed: truth

node: Node

label: text

note: text

content: widget

Commands by mode

adding child

editing content

Esc

discard changes, switch to command mode

accept changes, switch to command mode

navigating

mouse drag

reorder/move

click

focus

alphanumeric

start editing content (overwrite)

F6

split out subtree

F3

reference

change referenced object

choice

change type

F2

start editing first property

Ctrl+

show levels

Space

expand/collapse

Backspace/Delete

computed property

hide

optional property

unset

clear

delete

Cmd+Up/Down

move up/down

Shift+Enter

add sibling above

Enter

list element

add sibling below

Tab

record

show/add/set property

list

add child

End

go to last sibling

Home

go to first sibling

Down

go to next node on same level

Up

go to previous node on same level

Left

go to parent

Right

go to first child

Concrete syntax
Lambda

lambda parameters in function signature

combine latest: when _reds_ is _red_ and _greens_ is _green_ emit _"Red: {red}, green: {green}"_

reduce:

filter: select _person_ in _people_ where _person.age < 18_

map: for each _element_ in _list_ yield _element * 2_

Function call

function signature is used as template

Abstract syntax
Versioning

stability: union

accepted

stable

unstable

review: record

reviewer: user

stability: stability

description: string

entity version: record

reviews: list of review

author: user

created: time

parent: reference to version

content: entity

versioned entity: record

versions: list of entity version

Function declaration

case: record

result: expression

choice: expression

argument: record

parameter: reference to parameter

expression: union

switch: record

cases: list of case

value: expression

parameter reference: record

parameter

function call: record

arguments: list of argument

function: reference to function version

literal: union

union: record

value: member initializer

members: list of member initializer

truth: boolean

number: number

parameter: record

function signature segment: union

parameter: parameter

function: record

definition: expression

expected type: optional type expression

signature: list of function signature segment

Data declaration

property reference: choice

computed property reference: record

computed: reference to computed property

field reference: record

data expression: choice

TODO filter

a data: record

data: reference to data

the subject: value

navigation: record

transitive closure: truth

property: property reference

source: data expression

field value: record

value: data expression

field: reference to field

constructor: record

field values: list of field value

value literal: record

value: value

truth literal: record

value: truth

text literal: record

value: text

number literal: record

value: number

computed property: entity

type of subject: reference to type

data: entity

definition: data expression

Type declaration

Complex

type expression: union

type parameter reference: reference to type parameter

type call: record

type arguments: list of type argument

type: reference to type

choice: record

cases: list of member

record: record

fields: list of member

truth: unit

text: unit

number: unit

unit: unit

type signature segment: union

parameter segment: record

parameter: type parameter

text segment: record

text: string

type parameter: record

member: record

name: string

type: record

signature: list of type signature segment

type argument: record

definition: type expression

type parameter: reference to type parameter

Simple

atomic type: choice

entity type: record

reference: truth

entity: reference to entity

type reference

truth type: value

text type: value

number type: value

type expression: record

multiple: truth

optional: truth

element type: atomic type

field: entity

type: type expression

type reference: choice

choice reference: record

choice: reference to choice

record reference: record

record: reference to record

value reference: record

value: reference to value

choice: entity

cases: list of type reference

record: entity

value: entity

entity: entity

fields: list of field

name: text

Workflows

Test
Debug
Understand
developer navigates to relevant related elements
developer opens element to inspect
Merge
maintainer selects merged version
environment offers potential merged versions by combining as many deltas as possible in various combinations
different users create different new versions from the same version
Review
maintainer accepts suggested new versions of elements
contributor fixes issues
maintainer of elements and other reviewers create reviews
environment marks open elements with suggested versions
Update
developer updates elements
environment offers update for open elements depending on outdated elements
Publish
environment marks developer's own changed latest stable versions as accepted
environment makes new versions public
developer gives description of changeset
Develop
environment displays closed dependent outdated elements
environment records all changes
environment updates open dependent elements

implicit changes

developer creates new (versions of) elements

explicit changes

environment displays latest changed or accepted versions

Status quo

case studies
Web (Scala.js)

Scala

IntelliJ IDEA

scalatest

sbt

Web (Elm)

features

elmjutsu

linter-elm-make

language-elm

Atom

elm-test

elm-reactor

elm-package

elm-make

node.js

Eclipse RCP (Java)

tooling

plugins

JDT

IDE

Eclipse

share

p2

test

JUnit

run

Eclipe Application

build

Tycho

Maven

bootstrap

Oomph

accidental complexity
execution model: imperative
unrestricted side effects

can be bad UX

not testable

not reusable

package manager: only whole libraries can be reused
reference is complex and can be ambiguous

file path

name

local registry

conflicting transitive dependency versions
compiler: evaluation is
slow
manual
isolated

Eclipse builder vs. Maven builder

VIATRA

Java

environment-dependent

has to be reimplemented everytime

IDE: text manipulation
whitespace

style debates

version control

refactoring is hard
textual languages are not composable
programmer has to remember syntax
root problem: programmer directly manipulates local text files with applications

Requirements

Library
Domains

audio

graphics

math

orthogonal primitives

Properties
expanded form (function call expansion)
substituted form (expression substitution)
actual type (inference)
warnings (analysis)
errors (validation)
result (evaluation)

traceability

backward

navigate from every part of the result to the expressions which resulted in it

forward

Environment
the set of possible commands should be

quickly accessible

explorable

navigation should be as modeless as possible
properties should be shown

properties

kind-specific derived properties

element kind

time

continuous

temporary

proximity

semantic

physical

calculation of properties should be

quick

cached

lazy

automatic

reproducible

visualization of structure should be clear

cross-reference

containment

syntax should be flexible to be close to domain-specific thinking
unified data access
correctness should be easy to achieve
concepts should be

related to familiar ones

few & orthogonal

every relevant part of the model should be

versioned

always refer to versions

versions are immutable

reference by URL

Principle
Everyone should see the same running code

Reusing

types!

understanding

finding what you need

When sharing, provide stability

Minimize effort from idea to running code

Editing

discoverable

efficient

When working, quickly see effects of changes

Computing for Humans

Inspiration

p5.js-editor
HARC
Flex Group
lively.next
Natural Programming
Designing a Flexible and Supportive Direct-Manipulation Programming Environment
Visualization
Lyra
Polestar
Apparatus
Luna
Chris Granger
Eve
Mikaël Mayer
Sketch-n-Sketch
MikoWord
Bret Victor
Drawing Dynamic Visualizations

Playfair

Reform

Spreadsheet interface
ZenSheet
Object Spreadsheets

Espalier

Gneiss
SIEUFERD - Direct Manipulation of Queries

Reltron

Coda
Jonathan Edwards
Schematic Tables
Reifying Programming
Direct Programming
Two-way Dataflow
Chorus

Transcript

Demo

Implementation

Spreadsheet component
ReactPivot?
Tabulator
ag-Grid
Handsontable
Data binding
VueFire (Vue)
Fiery (React)
UI Framework
Vue
React

Computation

Language
conditional (switch)

subcolumns: cases

header: column reference

create record

subcolumns: fields

header: type

sort
filter
union
aggregate

custom: reduce

recursive reference

example: linear layout

element's left = if is first then 0 else previous element's right element's is first = previous element is null element's previous element = element whose index is the element's index - 1

built-in: count, sum, average etc.

refer property

map

Derived property
concreteness

create by example, then abstract

operations

split data set

make conditional based on another property

bind property to data set (map)

= name object

bind property to another property

new

existing

default values of types

direct manipulation

visualize structure clearly

continuously display the output and operate on it

Information management

Representations
special derived property
Generic data browser
Key concepts
Activity

special content that stores state of manipulating content

Data source

API

whose : Set of Data

Condition

one of

String

matches

contains

ends with

starts with

Numeric

>=

>

<=

<

In

objects: set of Value

Equals

object: Value

Negated Condition

negated condition: Condition

's : Data

Property

Built-in properties

type's

main representation: Property

containment: Truth

object's

name: String

type: Type

relationship

Content

a piece of information

Principles
extensible

arbitrary relationships

shared

access-controlled

persistent

version-controlled

Philosophy

Capabilities of the dynamic medium
connected
can show multiple representations
reactive
Capabilities of humans
symbolic
visual
interactive