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

FeatureStatusDescription
View the Home pageDONE
View the List pageDONEWith the list of skills and exos
C++ exo build+execution, but without configuration and without build folder visibleDONESupport 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 visibleTODOSupport compiling Java in single or multi files with javac
Exo creation with one main file or possibly more starting filesDONESupport a way to describe those metadata and indicate which files are relevant.
Definition of automated check verifying outputsDONE
Run automated output checks on starting filesDONERun check, generate result and diff if it differs
Run automated output checks on solution filesDONEAdapt 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 fileDONECheck and display if exercices passed or failed
Show why checks are failingDONEShow why exercice failed (diff output / solution)
Start of the appDONEIt's possible to resume to the last exo or to the next logical one by pressing r.
Preview of exosDONEWhen searching for an exercice to do -> a preview of the exo with the metadata but do not run compilation.
Save and restore exos statesTODOSave 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 openingDONEOpen code editor when launching or switch to another exercice, the editor is defined via $EDITOR
Provide integrated documentationDONEPress ?to get an integrated documentation of all the keybinds available

Non functionnal requirements

  1. It should be easy to create new exos and maintain them, converting an existing C++ exo should take less than 2 minutes.
  2. 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.
  3. PLX should be usable during exo creation too to make sure the checks are passing on
  4. 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).
  5. 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.
  6. Trivial exo files shoud not need any build configuration, PLX should be able to guess how to build the target with available files.
  7. Cross-plateform comptability meaning that PLX should work on all linux, windows and MAC machines.
  8. PLX shoud be designed in a modular way that allows for any easy addition of the features.
  9. Compiling an exercice should take less than (10 seconds).
  10. 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.
  11. When launching the tests, if tests are already running they should be stopped and relaunched again.
  12. 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.