diff --git a/problem_ordering.md b/problem_ordering.md new file mode 100644 index 000000000..51c9ecdf9 --- /dev/null +++ b/problem_ordering.md @@ -0,0 +1,41 @@ +# Rust Track Problem Order + +The actual source of truth of problem order and topics is [config.json](config.json), but this file documents our reasoning behind the problem order in that file. + +## Background + +- https://github.com/exercism/xrust/issues/126 +- https://github.com/exercism/xrust/issues/127 +- http://designisrefactoring.com/2016/07/09/exercism-shouldnt-make-you-cry/ + +## Our Approach + +We order our problems for students who are learning Rust. With that audience in mind, we follow two rules when adding new problems. + +- A exercise should introduce one new concept +- Exercises should progress from Rust basics to advanced Rust concepts + +### One New Concept + +If a problem solution requires students to use both `Result` and `HashMap`, then at least one of these concepts should be introduced by an earlier problem. + +If the track has several problems that rely on a concept, group them together to reinforce learning. + +### Progress Through Rust + +#### Early Problems + +Early problems should focus on Rust syntax and concepts that are present in many programming languages: conditionals, looping, higher-order-functions. + +#### Middle Problems + +Problems in the middle of the of the track should introduce concepts that are less common. `Result` and `Option` and Traits, for example. Or syntax such as `while let`. + +Through the middle section of the track students should gain familiarity with a wide range of Rust concepts. + +#### Later Problems + +Problems late in the track should do one of two things: + +1. Introduce advanced concepts -- Lifetimes, Concurrency, Unsafety +2. Require a complex solution that synthesizes all the knowledge students have gained to date diff --git a/problems.md b/problems.md deleted file mode 100644 index 6993674c3..000000000 --- a/problems.md +++ /dev/null @@ -1,88 +0,0 @@ -# Rust Track Problem Order - -The actual source of truth of problem order is [config.json](config.json), but this file documents our reasoning behind the problem order in that file. - -## Background - -- https://github.com/exercism/xrust/issues/126 -- https://github.com/exercism/xrust/issues/127 -- http://designisrefactoring.com/2016/07/09/exercism-shouldnt-make-you-cry/ - -# The Problems, By Section - -## Introduction - -The first section contains the sort of stuff you expect when learning any programming languages: conditionals, booleans, looping and some higher-order functions. - -problem | topics ------ | ----- -hello-world | Some/None. println! -gigasecond | crates, math -leap | math, booleans, conditionals -raindrops | case (or `format`). Mutable string -bob | chars, string functions -beer-song | case, string concatenation, vector (optional), loop -difference-of-squares | fold & map -sum-of-multiples | algorithm, borrowing -grains | math, panic - -## Getting Rusty - -Problems begin to use more Rust-specific features. Try to only introduce one new language feature at a time. And if several problems rely on a feature, try to group them so as to reinforce its usage. - -problem | topics ------ | ----- -hamming | Result -pascals-triangle | Math, Vec, Index (optional) -scrabble-score | chaining higher-order functions, HashMap (optional) -pangram | filter, ascii (optional) -nucleotide-count | Result, filter, entry api, mutablity, match -largest-series-product | Result, windows, higher-order functions, char -word-count | hashmap, str vs string, chars, entry api -atbash-cipher | str vs string, primitive types, iterators, chars, ascii -etl | btree -acronym | map, flat_map, filter, loops, Vec -sieve | vector, map, while let (optional) -rna-transcription | match, struct, str vs string -triangle | Math, Struct. Enum, Trait, Box -- depending on implementation -roman-numerals | mutable, results, loops, struct, traits -all-your-base | Result, enumerate, fold, map -grade-school | struct, entry api, Vec, Option -robot-simulator | Immutability, enum -bracket-push | From trait, stack or recursion -queen-attack | struct, trait (optional), Result -bowling | struct, Result, goofy bowling logic -sublist | enum, generic over type -space-age | Custom Trait, From Trait, Default Trait implementation -allergies | struct, enum, bitwise (probably), vectors, filter -variable-length-quantity | Encodings, slices, bitwise, Result -phone-number | option, format, unwrap_or, iters, match -wordy | Result, string parsing, operators (optional) -tournament | enum, sorting, hashmap, structs -custom-set | generic over type, vector, equality, struct -alphametics | string parsing, combinations, math, external crates (optional) - -## Rust Gets Strange - -Exercises that pay the cost of Rust's [strangeness budget](http://words.steveklabnik.com/the-language-strangeness-budget). Features that are very specific to Rust. - -problem | topics ------ | ----- -anagram | lifetimes, str vs string, loops, iter, vector -nucleotide-codons | struct, hash map, lifetimes, Result -robot-name | struct, slices, randomness, lifetimes, self mut - -## Putting it all Together - -These problems don’t necessarily require additional Rust knowledge, but they do require complex solutions. - -problem | topics ------ | ----- -ocr-numbers | Lines, Chunks, slices -minesweeper | Board state -dominoes | Graph theory, searching -parallel-letter-frequency | multi-threading -rectangles | Enum, structs, traits, Lifetimes -forth | Parser reimplementation -circular-buffer | Buffer reimplementation, Generics -react | Lifetimes, generics, closures