PROJECT DOSSIER // [GROUNDHOG]VIEW SOURCEBACK TO PROJECTS →

01 // PROJECT AT A GLANCE

GROUNDHOG

Rust

Reading a stream of temperatures and deriving, at every value received, the trend under way.

The title refers to Groundhog Day: the program receives temperatures one at a time, live, and must immediately derive what it can — the trend under way, its magnitude, its regularity — then flag reversals as soon as they happen. At the end, it reports the most aberrant values of the whole series. It is an analysis problem over data arriving as it comes rather than in a neatly ordered file, and it is also the occasion of a first real project in Rust.

A Rust program looping on standard input: at every temperature received, computing three sliding indicators over a period given as an argument (mean of the rises, relative change, standard deviation), detecting trend reversals, then listing the aberrant values on the STOP keyword.

PRIMARYRust
DELIVERYTEAM RECORD
VERIFICATIONcargo (via make)
SOURCEINSPECTOR READY
MEDIA ATTACHMENTS (Images, Photos, Videos)

03 // KEY OUTCOMES

  • Project carried out in Rust when the language was free
  • Three indicators maintained over a sliding window, recomputed at every value received
  • Idiomatic error handling: Result propagated up to exit code 84

BEYOND THE BRIEF

  • Rust chosen for an exercise that did not impose the language

04 // SOURCE TREE

READING SOURCE…