Introduction
PLX is a project developed to enhance the learning of programming languages, with a focus on a smooth and optimized learning experience. The goal of this project is to reduce the usual friction involved in completing coding exercises (such as manual compilation, running, testing, and result verification) by automating these steps.
PLX offers a terminal user interface (TUI) developed in Rust and supports multiple languages (currently C and C++). It enables automatic compilation as soon as a file is saved, automated checks to compare program outputs, and instant display of errors and output differences. The solution code can also be displayed. The project draws inspiration from Rustlings and aims to create a more efficient learning experience, particularly for programming courses at HEIG-VD.
Features
We described a lot of details about the a better experience, problems of the current experience, but here is a complete central list of features we need to develop during PDG and some other ideas for later. Some of them will have a dedicated issue on GitHub, but this is easier to see the global picture and progress here.
Functionnal requirements
Feature | Status | Description |
---|---|---|
View the Home page | DONE | |
View the List page | DONE | With the list of skills and exos |
C++ exo build+execution, but without configuration and without build folder visible | DONE | Support compiling C++ in single or multi files via Xmake without config in a separated build directory |
Java exo build+execution, but without configuration and without build folder visible | TODO | Support compiling Java in single or multi files with javac |
Exo creation with one main file or possibly more starting files | DONE | Support a way to describe those metadata and indicate which files are relevant. |
Definition of automated check verifying outputs | DONE | |
Run automated output checks on starting files | DONE | Run check, generate result and diff if it differs |
Run automated output checks on solution files | DONE | Adapt the compilation to build the solution files instead, and do the same things, after having checked the base files. |
Execute a check on a given binary file | DONE | Check and display if exercices passed or failed |
Show why checks are failing | DONE | Show why exercice failed (diff output / solution) |
Start of the app | DONE | It's possible to resume to the last exo or to the next logical one by pressing r . |
Preview of exos | DONE | When searching for an exercice to do -> a preview of the exo with the metadata but do not run compilation. |
Save and restore exos states | TODO | Save exos states (done / not done / in progress) and restore it on subsequent app launches. Shows immediately the states in list with colors. Enable exo resuming. |
Code Editor opening | DONE | Open code editor when launching or switch to another exercice, the editor is defined via $EDITOR |
Provide integrated documentation | DONE | Press ? to get an integrated documentation of all the keybinds available |
Non functionnal requirements
- It should be easy to create new exos and maintain them, converting an existing C++ exo should take less than 2 minutes.
- The watcher should be performant: it should only watch files that could be modified by the student or teacher, it should take less than 100ms to see detect a change.
- PLX should be usable during exo creation too to make sure the checks are passing on
- Once an exo is opened, with one IDE window at right and the terminal with PLX at left, the students should not need to open or move other windows and should be able to only
Alt+Tab
. All the automable steps should be automated to focus on learning tasks (including build, build configuration, running, output diffing, manual entries in terminal, detecting when to run, showing solution, switching to next exo). - Switching to next exo should take less than 10 seconds. After this time: the IDE should be opened with the new file, and PLX should show the new exo details.
- Trivial exo files shoud not need any build configuration, PLX should be able to guess how to build the target with available files.
- Cross-plateform comptability meaning that PLX should work on all linux, windows and MAC machines.
- PLX shoud be designed in a modular way that allows for any easy addition of the features.
- Compiling an exercice should take less than (10 seconds).
- When saving a file, the compilation starts. If a compilation is already running when saving a file, it should kill the actual compilation and launch a new compilation.
- When launching the tests, if tests are already running they should be stopped and relaunched again.
- PLX must have a file watcher and file parser to be able to watch the edited file(s) and return it states. This is necessary to be able to flag the exercice (in progress, done, not started) and return errors descriptions or status (passed / failed) of the exercice.