Team Project: SLogo
Logo is the name for a philosophy of education and a continually evolving family of programming languages that aid in its realization. — Harold Abelson
Submitting Your Work
Use GIT to push your team's implementation to the main
branch of the provided, shared, slogo_teamNN
repository hosted in the course's Gitlab group.
As your submission for this project, use GIT to add
, commit
, and push
the following
doc
folder: all design documentation and any supporting images
src/main/java
folder: all project code
src/main/resources
folder: any images or program resource files
src/test/java
folder: all JUnit test code and test specific configuration files
src/test/resources
folder: any test specific configuration files
data
folder: all example program files
- top-level (no separate folder): project README, and otherwise no other files created by you
Deliverables
This project will be submitted in stages:
- Plan: plan your design for the project
- Test: thoroughly test fundamental design of the project
- Basic: build the core features of the project to verify your design plan
- Change: extend the project by adding new features to improve your design
Specifications
In teams, write a Java program using straight OpenJFX that provides an integrated development environment, IDE, for users to command a turtle to create drawings. Developers will be able to write programs in the "Simple Logo" (SLogo) language, a simplified version of Logo that is easier to parse but retains the most common features used by novice programmers. Unlike IDEs such as IntelliJ, which are designed around editing multiple files that represent a complete program, SLogo users should be able to command the turtle interactively on a per expression basis. Thus your IDE should focus on helping users to experiment with and manage expressions, building up complex expressions from previously entered ones and keeping the visual representation of the turtle appropriately updated. You must be able to properly run these example programs.
Builtin SLogo commands will be written in Java code but all other information will be read from an eXtensible Markup Language, XML, formatted configuration file (the exact tags of this configuration file should be decided by your team).
The full list of requirements is given here.
CompSci Context
This project highlights the following interesting and foundational Computer Science concepts. You are not expected to write a general or complete version of any of these concepts, but learning about them may help provide a context to begin thinking about some design issues or connect your work in this course to the broader computing community.
- Application Programming Interface, or API, is a standard or contract for another class or program to access a class or program as a service, allowing programmers to create new applications of the original service. In general, APIs should be designed to be minimal but complete; powerful; consistent; hard to misuse; easy to extend; and lead others to write readable code well designed code. Thinking deliberately about each class' public methods as an API for others on your team can really improve how you approach the task of programming and design because it changes your perspective from simply trying to support specific features to trying provide a service that others can use but also extend. Thus API design is arguably the most critical part of designing a program, because it encourages you to create a collection of interconnected services that work together.
- Turtle Graphics was invented as part of the Logo programming language designed to teach programming to children by allowing them to learn programming by body syntonic prediction and reasoning and see the results by controlling a physical robot. Users could issue commands such as FORWARD 50 to make the robot actually move 50 steps or RIGHT 90 to make it turn ninety degrees. The turtle robot carried a pen to produce drawings on paper put down under the robot. The turtle, which has since moved on to the computer screen, has become Logo's most familiar feature. In fact, most modern languages and platforms have an implementation, including being the core of the current modern children's programming environment Scratch. Additionally, it has helped people think differently about teaching geometry, social science, embroidery, and especially programming.
- Abstract Syntax Trees are the data structure underlying all programming languages, from HTML to JavaScript to Java, in which the leaves represent values in an expression and the internal nodes represent operations on those values. The inherent hierarchical nature of trees precisely captures operator precedence and provide a convenient mechanism for storing, traversing, and transforming expressions. Note that, unlike binary trees, each node of an Abstract Syntax Tree can have any number of children, modeling operators with one, two, or even arbitrary numbers of arguments.
- Parsing the tree's structure from a simple string requires knowing the set of separator characters (e.g., whitespace and semi-colon in Java) and recognizing the expected tokens in the separated strings and their relationship (e.g., Java keywords, operators, and parentheses). During the parsing process, tokens are converted into useful objects and separators are typically thrown out. An error is thrown if the input string contains structural errors (e.g., an incomplete expression or an unrecognized word). The resulting parsed commands will be evaluated to run the program (e.g., to control a "turtle" that can move, turn, and draw).
- The read-eval-print loop allows users to build their programs interactively on a per expression basis and is available for languages such as the command line, Python, JavaScript in your Browser, and even Java (the command-line shell could also be considered such an environment). In this way, the view sends a program to the model, which returns it as a set of commands for controlling the turtle (or its pen) that the view uses to display the results. So the two sides combine to receive, parse, and evaluate commands from the user, then displaying their results or reporting any errors encountered along the way (and not crashing!).
As a dialect of Lisp, Logo is a powerful language for expressing programs. Although most of its complexity (and power) come from other elements than those that control the turtle, it is still amazing how expressive and compact it can be.
Individual Responsibilities when Working as a Team
This project requires steady, consistent, work — only by putting in consistent time each week will you see measurable progress and not have to pull "heroic" all-nighters.
Although this is a team project, everyone has individual responsibilities to the team that can be summed up as follows:
- actively participating in all team meetings
- regularly contributing clean code to the shared repository in reasonably sized chunks
- solving and coding at least one significant design problem
- helping teammates at least once by going above and beyond
Unfortunately conflicts are likely to occur, so please let the Teaching Team know as soon as possible — even if it has happened just once or twice since it is better to deal with the situation early rather than having a disaster at the end when little can be done to get back on track.
Resources
Here is an in browser Logo environment (used to power this interactive programming workshop).
For background and more complete information about logo consult these links:
Videos