ArticleslgStudy

computer science

Live coding

Live coding is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Live coding rather than just read about it. In short: Live coding, sometimes referred to as on-the-fly programming, just in time programming and conversational programming, makes programming an integral part of the running program. It is most prominent as a performing arts form and a creativity technique centred upon the writing of source code and the use of interactive programming in an improvised way.

Live coding — main illustration
Live coding — illustration

Key takeaways

  • Live coding belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Live coding to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Live coding from memory before moving on to harder problems.

Reference excerpt

Live coding, sometimes referred to as on-the-fly programming, just in time programming and conversational programming, makes programming an integral part of the running program. It is most prominent as a performing arts form and a creativity technique centred upon the writing of source code and the use of interactive programming in an improvised way. Live coding is often used to create sound and image based digital media, as well as light systems, improvised dance and poetry, though is particularly prevalent in computer music usually as improvisation, although it could be combined with algorithmic composition. Typically, the process of writing source code is made visible by projecting the computer screen in the audience space, with ways of visualising the code an area of active research. Live coding techniques are also employed outside of performance, such as in producing sound for film or audiovisual work for interactive art installations. Also, the interconnection between computers makes possible to realize this practice networked in group. A live coder is someone who performs the act of live coding, usually "artists who want to learn to code, and coders who want to express themselves" or in terms of Wang & Cook the "programmer/performer/composer". Live coding is also an increasingly popular technique in programming-related lectures and conference presentations, and has been described as a "best practice" for computer science lectures by Mark Guzdial.

Techniques A range of techniques have been developed and appropriated for the purposes of live coding.

Representation and manipulation of time The specific affordances of time-based media and live interaction with code has led to a number of novel developments and uses in programming language design. Through mutual embedding of imperative and declarative subsystems, the programming language SuperCollider permitted to build a library that allows incomplete and provisional specifications which can be rewritten at runtime. The ChucK language introduced an approach to "strongly timed" programming in 2002, embedding precision timing into control flow through a concise syntax. "Temporal recursion" was a term initially coined in relation to the Impromptu programming environment. Technical elements within a programming environment continue to locate compressors and recursion solutions, but timing had been a major issue. While the general form of a temporal recursion, being any asynchronous function recursion through time, is available to any event driven system, Impromptu has placed a special emphasis on this particular design pattern, making it the centre piece of the concurrency architecture on that platform. Temporal recursion had repeatedly been used in SuperCollider and has since been implemented in the Fluxus environment. Another functional approach to the representation of time is shown in the Tidal pattern DSL, which represents patterns as combinators operating over functions of time, similar to techniques in functional reactive programming.

Multi-user programming and shared memory Multi-user programming has developed in the context of group music-making, through the long development of the Republic system developed and employed by members of the network band PowerBooks Unplugged. Republic is built into the SuperCollider language, and allows participants to collaboratively write live code that is distributed across the network of computers. There are similar efforts in other languages, such as the distributed tuple space used in the Impromptu language. Additionally Overtone, Impromptu and Extempore support multi-user sessions, in which any number of programmers can intervene across the network in a given runtime process. The practice of writing code in group can be done in the same room through a local network or from remote places accessing a common server. Terms like laptop band, laptop orchestra, collaborative live coding or collective live coding are used to frame a networked live coding practice both in a local or remote way.

Organizations TOPLAP (The (Temporary|Transnational|Terrestrial|Transdimensional) Organisation for the (Promotion|Proliferation|Permanence|Purity) of Live (Algorithm|Audio|Art|Artistic) Programming) is an informal organization formed in February 2004 to bring together the various communities that had formed around live coding environments. The TOPLAP manifesto asserts several requirements for a TOPLAP compliant performance, in particular that performers' screens should be projected and not hidden. On-the-fly promoted live coding practice between 2020-2022. This was a project co-funded by the Creative European program and run in Hangar, ZKM, Ljudmila and Creative Code Utrecht.

Research A number of research projects and research groups have been created to explore live coding, often taking interdisciplinary approaches bridging the humanities and sciences. First efforts to both develop live coding systems and embed the emerging field in the broader theoretical context happened in the research project Artistic Interactivity in Hybrid Networks from 2005 to 2008, funded by the German Research Foundation. Further, the Live Coding Research Network was funded by the UK Arts and Humanities Research Council for two years from February 2014, supporting a range of activities including symposia, workshops and an annual international conference called International Conference on Live Coding (ICLC).

Examples of live coding environments

See also Algorave—event where music and/or visuals are generated from algorithms, generally live coded Demoscene—subculture around coding audiovisual presentations (demos) Exploratory programming—the practice of building software as a way to understand its requirements and structure Interactive programming—programming practice of using live coding in software development NIME—academic and artistic conference on advances in music technology, sometimes featuring live coding performances and research presentations Creative coding—programming approach to create something expressive

References

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Live coding

Start with the simplest possible case. Write down what Live coding claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Live coding before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Live coding ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Live coding

In research
Live coding appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Live coding in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Live coding is common in secondary-school and first-year university syllabi. It links to neighbouring topics Algorave, Computer music, Computer programming, so understanding it makes those chapters shorter.
In everyday life
Look for Live coding outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Live coding in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Live coding means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Live coding out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Live coding in simple terms?

Live coding, sometimes referred to as on-the-fly programming, just in time programming and conversational programming, makes programming an integral part of the running program. It is most prominent as a performing arts form and a creativity technique centred upon the writing of source code and the…

Why does Live coding matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Live coding?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Live coding.

Tags

  • Algorave
  • Computer music
  • Computer programming
  • Digital art
  • Experimental music
  • Live coding
  • Live music
  • User interface techniques

Keep exploring