Histogram: You have to know the past to understand the present
Programs are created through a variety of interactions. A programmer might write some code, run it interactively to check whether it works, use copy and paste, apply a refactoring or choose an item from an auto-complete list. Programming research often forgets about these and represents programs as the resulting text. Consequently, thinking about such interactions is often out of scope. This essay shifts focus from programs to a more interesting question of programming.
We represent programs as lists of interactions such as triggering an auto-complete and choosing an option, declaring a value, introducing a variable or evaluating a piece of code. We explore a number of consequences of this way of thinking about programs. First, if we create functions by writing concrete code using a sample input and applying a refactoring, we do not lose the sample input and can use it later for debugging. Second, if we treat executing code interactively as an interaction and store the results, we can later use this information to give more precise suggestions in auto-complete. Third, by moving away from a textual representation, we can display the same program as text, but also in a view inspired by spreadsheets. Fourth, we can let programmers create programs by directly interacting with live previews as those interactions can be recorded and as a part of program history.
We discuss the key ideas through examples in a simple programming environment for data exploration. Our focus in this essay is more on principles than on providing fine tuned user experience. We keep our environment more explicit, especially when this reveals what is happening behind the scenes. We aim to show that seeing programs as lists of interactions is a powerful change of perspective that can help us build better programming systems with novel features that make programming easier and more accessible. The data exploration environment in this interactive essay may not yet be that, but it gives a glimpse of the future.
(Please note that this submission is an interactive web essay and can be found at: http://tomasp.net/histogram).
Tomas is a Lecturer at University of Kent and a Collaborating Fellow at the Alan Turing Institute in London. He is building programming tools that integrate with modern data sources (open government data, data published by citizen initiatives) and let users easily create analyses and visualizations that are linked to the original data source, making the analyses more transparent, reproducible, but also easy to adapt. His early work on the project can be found at http://thegamma.net.
Tomas’ many other interests include open-source and functional programming (he is an active contributor to the F# ecosystem), programming language theory (his PhD thesis on “coeffects” develops a theory of context-aware programming language language), but also understanding programming through the perspective of philosophy of science.
Tue 22 Oct (GMT+03:00) Beirut change
|14:00 - 14:30|
|14:30 - 15:00|
Taku TadaYokohama National University, Yuka AkinobuJapan Women’s University, Makoto SakaneJapan Women’s University, Kimio KuramitsuJapan Women’s UniversityMedia Attached
|15:00 - 15:30|
Tomas PetricekUniversity of Kent