Milestone 3: Interface

Dear Computer

Project: Spreadsheet

Milestone 3: Interface

In this third milestone, you'll develop an terminal-based user interface for your spreadsheet using the Curses library. The interface allows users to move around to different cells using the cursor keys, enter formula, and view the results.

Curses

Install a port of the Curses library—or some similar library for user interfaces in the terminal—using a package manager for your language. That might be gem for Ruby, cabal for Haskell, cargo for Rust, pip for Python, or npm for JavaScript. You will likely have several libraries from which to choose, and your very finite instructor can offer no opinion on which you should choose. Ruby users should revisit the installation instructions on installing and requiring the curses gem and the recipes on using it.

We are using a textual user interface (TUI) instead of a graphical user interface (GUI) because most GUIs greedily take over your design and engineering time, subverting the other goals we have for this course. Curses, on the other hand, is not a widget- or event-driven system. It keeps the responsibility for drawing content and handling events in your hands.

Layout

The interface of your program must display these three subwindows to the user:

Arrange the subwindows as you see fit—just make sure all are visible at the same time. Use your Curses library's routine for placing and sizing these subwindows.

You decide how many columns and rows to display. A fully-featured spreadsheet would show hundreds, thousands, or even an arbitrarily large number using a scrolling view. You are not expected to do that. Filling the visible window with a fixed number of rows and columns is acceptable.

User Interactions

Your spreadsheet must support the following user interactions:

Submission

To submit your milestone, follow the instructions. In particular, do these three things:

In your video, demonstrate interacting with the grid, entering new formula, editing formula that trigger updates, and displaying errors on malformed code. In particular, reconstruct this spreadsheet:

Don't comment on or show every single line of code in your video. Select a few representative snippets. Do comment on programming language ideas that interest you or challenged you.

← Milestone 2: InterpreterMilestone 4: Variables and Flow →