From 9e6faae2241636defd5a2b458604b2e4206e5cea Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Fri, 6 Jan 2017 21:15:54 -0800 Subject: [PATCH 1/5] problems.md: Remove topics History: Thanks to the hard work of #167 and #127, we have topics in problems.md that tell why we ordered problems a certain way. After #229 (motivated by #179), we copied the topics into config.json, since now all tracks can take advantage of the "topics" concept. To reduce duplication, we can remove topics from problems.md now. What's left in problems.md is a bit of prose explaining why we order our problems the way they do, and the division of the problems into sections. Closes #236 --- problems.md | 108 ++++++++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 58 deletions(-) diff --git a/problems.md b/problems.md index 6993674c3..b969565c4 100644 --- a/problems.md +++ b/problems.md @@ -1,6 +1,6 @@ # 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. +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 @@ -14,75 +14,67 @@ The actual source of truth of problem order is [config.json](config.json), but t 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 +* hello-world +* gigasecond +* leap +* raindrops +* bob +* beer-song +* difference-of-squares +* sum-of-multiples +* grains ## 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) +* hamming +* pascals-triangle +* scrabble-score +* pangram +* nucleotide-count +* largest-series-product +* word-count +* atbash-cipher +* etl +* acronym +* sieve +* rna-transcription +* triangle +* roman-numerals +* all-your-base +* grade-school +* robot-simulator +* bracket-push +* queen-attack +* bowling +* sublist +* space-age +* allergies +* variable-length-quantity +* phone-number +* wordy +* tournament +* custom-set +* alphametics ## 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 +* anagram +* nucleotide-codons +* robot-name ## 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 +* ocr-numbers +* minesweeper +* dominoes +* parallel-letter-frequency +* rectangles +* forth +* circular-buffer +* react From c91e08cb88591fcb496a89ca4675986394bc6112 Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Fri, 6 Jan 2017 21:31:18 -0800 Subject: [PATCH 2/5] problems.md: Collapse problem lists into single sentence This reduces duplication and hopefully requires fewer changes to problems.md --- problems.md | 53 ++++------------------------------------------------- 1 file changed, 4 insertions(+), 49 deletions(-) diff --git a/problems.md b/problems.md index b969565c4..e2be5312b 100644 --- a/problems.md +++ b/problems.md @@ -14,67 +14,22 @@ The actual source of truth of problem order and topics is [config.json](config.j The first section contains the sort of stuff you expect when learning any programming languages: conditionals, booleans, looping and some higher-order functions. -* hello-world -* gigasecond -* leap -* raindrops -* bob -* beer-song -* difference-of-squares -* sum-of-multiples -* grains +This section starts at `hello-world` and ends at `grains`. ## 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. -* hamming -* pascals-triangle -* scrabble-score -* pangram -* nucleotide-count -* largest-series-product -* word-count -* atbash-cipher -* etl -* acronym -* sieve -* rna-transcription -* triangle -* roman-numerals -* all-your-base -* grade-school -* robot-simulator -* bracket-push -* queen-attack -* bowling -* sublist -* space-age -* allergies -* variable-length-quantity -* phone-number -* wordy -* tournament -* custom-set -* alphametics +This section starts at `hamming` and ends at `alphametics`. ## 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. -* anagram -* nucleotide-codons -* robot-name +This section starts at `anagram` and ends at `robot-name`. ## Putting it all Together These problems don’t necessarily require additional Rust knowledge, but they do require complex solutions. -* ocr-numbers -* minesweeper -* dominoes -* parallel-letter-frequency -* rectangles -* forth -* circular-buffer -* react +This section starts at `ocr-numbers` and extends to the end of the track. From ed5518d2c835930f8d15d7ea30a32a246372e959 Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Sat, 7 Jan 2017 10:00:15 -0800 Subject: [PATCH 3/5] problems.md: rename to problem_ordering.md Since it only has the ordering philosophy and not the actual topics, it's time to rename. --- problems.md => problem_ordering.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename problems.md => problem_ordering.md (100%) diff --git a/problems.md b/problem_ordering.md similarity index 100% rename from problems.md rename to problem_ordering.md From 12b54150c429338fa3a1feea73a7ba3c8c69dd4b Mon Sep 17 00:00:00 2001 From: Ian Whitney Date: Sat, 7 Jan 2017 10:01:26 -0800 Subject: [PATCH 4/5] problem_ordering.md: Describe approach abstractly Specific statements of "This section begins with..." seem like they'll go quickly out of date. This commit uses something more abstract, that states our values without going into the exact implementation. --- problem_ordering.md | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/problem_ordering.md b/problem_ordering.md index e2be5312b..da2de43ff 100644 --- a/problem_ordering.md +++ b/problem_ordering.md @@ -8,28 +8,34 @@ The actual source of truth of problem order and topics is [config.json](config.j - https://github.com/exercism/xrust/issues/127 - http://designisrefactoring.com/2016/07/09/exercism-shouldnt-make-you-cry/ -# The Problems, By Section +## Our Approach -## Introduction +We order our problems for students who are learning Rust. With that audience in mind, we follow two rules when adding new problems. -The first section contains the sort of stuff you expect when learning any programming languages: conditionals, booleans, looping and some higher-order functions. +- A exercise should introduce one new concept +- Exercises should progress from Rust basics to advanced Rust concepts -This section starts at `hello-world` and ends at `grains`. +### One New Concept -## Getting Rusty +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. -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. +If the track has several problems that rely on a concept, group them together to reinforce learning. -This section starts at `hamming` and ends at `alphametics`. +### Progress Through Rust -## Rust Gets Strange +#### Early Problems -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. +Early problems should focus on Rust syntax and concepts that are present in many programming languages: conditionals, looping, higher-order-functions. -This section starts at `anagram` and ends at `robot-name`. +#### Middle Problems -## Putting it all Together +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`. -These problems don’t necessarily require additional Rust knowledge, but they do require complex solutions. +Through the middle section of the track students should gain familiarity with a wide range of Rust concepts. -This section starts at `ocr-numbers` and extends to the end of the track. +#### 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 knowlegde students have gained to date From 9e4a3a14f2237b7f50d2c028af5603cbd56cb3cd Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Sat, 7 Jan 2017 10:18:58 -0800 Subject: [PATCH 5/5] problem_ordering: spelling s/knowlegde/knowledge --- problem_ordering.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problem_ordering.md b/problem_ordering.md index da2de43ff..51c9ecdf9 100644 --- a/problem_ordering.md +++ b/problem_ordering.md @@ -38,4 +38,4 @@ Through the middle section of the track students should gain familiarity with a 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 knowlegde students have gained to date +2. Require a complex solution that synthesizes all the knowledge students have gained to date