CodeFocus |
The CodeFocus project is in fact a series of subprojects all of which are concerned with the visualization of and interaction with computer programs. The ultimate goal of these projects is to create an interactive programming environment which makes the process of programming and the actual programs more intuitive and accessible. Hopefully, this will make learning to program easier and make less daunting the task of interpreting another person's code.
There are several reasons why programming is difficult. One of them is typing. Unfortunately, CodeFocus does not address this issue. Seriously, programming is difficult because it requires learning a new language in order to tell the computer what to do. Oftentimes, programming involves memorizing commands with abbreviated names which hardly hint at their meaning. Making matters worse is the bizarre syntax which must be followed exactly, including every strangely placed semicolon, bracket and ampersand. On top of this is the fact that programs operate on an invisible substance called memory. As if these reasons alone were not enough, when programs are running, they continually jump from point to point, completely switching contexts and leaving the programmer lost in the sea of code. The solution to these problems (and many others) begins with an integrated development environment (IDE.) While IDE's exist today, they are not so integrated as one would like. Rather, they consist of loosely tied together text editors, program compilers, and code debuggers. The text editor knows a little bit about the language, the compiler knows an even smaller bit about the text editor, and the debugger is left to the bridge the gap in the case of emergency. However, in a truly integrated environment, such as the CodeFocus environment, the text editor knows all about the language, the compiler has access to the full text editor, and the debugger has transformed into a continuously operating memory display, called the memonitor. The text editor could help with the programming syntax, and provide an instantaneous reference for all available commands. It could also segment the text into distinct sections (for loops, functions, objects, etc.) and lay them out more intelligently about the screen, rather than in the standard linear column style (think New York Times.) The CodeFocus compiler will allow the user to compile and run the resulting program without leaving the familiar environment, and report errors exactly where they occur in the code, with suggested fixes. In close cooperation with the compiler and the text editor, the memonitor will selectively display the contents of the program's memory (variables, arrays, structures, etc.) and update them instantly as they are altered by the code. The program runner will have variable speeds so that the user may slow down the program to see the code operate on individual memory objects. Additionally, when the code jumps from function to function as it is running, the code-viewer will slowly move the active function to the front and center, so that the context switch is smooth and seamless. These design enhancements to the integrated development environment will hopefully make the programming experience simpler and more pleasant. Several projects within the CodeFocus umbrella have already been completed. Jaredit, an OpenGL-based, scriptable text editor, was completed during the Fall of 1999. It will provide the basic text editing functionality for the CodeFocus environment. Turing, which was also completed in the Fall of 1999, is a simple interaction visualization of Alan Turing's famous automation. While Turing will not likely be a part of the final environment, its development provided many solutions to general problems of code/memory interaction and program layout. In progress now is the relatively malleable Eco code-interpreter which will drive the actual computation and provide the language to be used in the final environment. |
CodeFocus is a project by Jared Schiffman of the Aesthetics & Computation Group at the MIT Media Lab. |