Sandboxed live programming helps users safely edit shell scripts

ShellVis: Sandboxed Live Programming for Shell Scripts

Human-Computer InteractionProgramming Languages

Summary

Editing and testing shell scripts can be risky because mistakes might cause real damage to files or systems. The authors created ShellVis, a tool that lets users see what happens in their shell scripts as they write them, but in a safe fake environment that blocks harmful effects. This makes it easier and safer to write and debug shell scripts. Users found it helpful and replacing tedious manual checks, but the authors also identified ways to make the tool even easier to use in the future.

What this means in practice

  • For shell script developers: See real-time, safe feedback on script behavior while editing to avoid costly mistakes.
  • For devops engineers: Safely test shell automation scripts before deploying to production environments with live sandboxing.

Authors

Joshua Horowitz, Jeffrey Heer

Abstract

Live programming provides visibility to programmers by running and tracing programs as they are edited. However, for programs with potentially harmful side effects, liveness can turn mistakes into disasters. We propose enabling live programming in environments with side effects via sandboxing: confining effects to a simulation of the true environment. We apply sandboxed live programming in the challenging context of shell scripting: a ubiquitous and powerful---yet notoriously opaque and error-prone---tool. ShellVis provides line-by-line feedback on a shell script's run-time behavior, with file operations sandboxed via a safe overlay of the file system. A qualitative user evaluation finds ShellVis to be helpful to participants, replacing tedious existing practices and instilling confidence. Participant responses also reveal areas for future research, particularly bridging the gulf of execution alongside the gulf of evaluation. ShellVis serves as a case study of how sandboxing can bring live-programming techniques into the many real-world programming contexts where side effects are important.