Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Ordering #127

Closed
IanWhitney opened this issue May 27, 2016 · 4 comments
Closed

Problem Ordering #127

IanWhitney opened this issue May 27, 2016 · 4 comments

Comments

@IanWhitney
Copy link
Contributor

IanWhitney commented May 27, 2016

As brought up in #126 (and elsewhere), our problem ordering is weird. I've certainly put some problems in the wrong spots, for sure.

I ran through the example solutions for all of our problems made a table of what skills each problem (probably) requires. Implementations can vary, obviously.

problem topics
hello-world Some/None. Really? We did that in Hello World?
gigasecond Crates, type stuff.
leap Math, booleans
anagram lifetimes, str vs string, loops, iter, vector
difference-of-squares fold & map
allergies struct, enum, bitwise (probably), vectors, filter
word-count hashmap, str vs string, chars, entry api
hamming result, chars, filter
rna-transcription match, struct, str vs string
nucleotide-count filter, entry api, mutablity, match
nucleotide-codons struct, hash map, lifetimes, Result
scrabble-score chaining map/fold. Hashmap (maybe)
roman-numerals mutable, results, loops, struct, traits
robot-name struct, slices, randomness, lifetimes, self mut
etl btree?
raindrops case (or formatting). Mutable string
bob chars, string functions
grade-school struct, entry api, Vec, Option
phone-number option, format, unwrap_or, iters, match
hexadecimal Option, zip/fold/chars, map
queen-attack struct, trait (optional), Result
beer-song case, vector (?), loop
sieve vector, map, while let (optional)
minesweeper board state, Vec, heavy logic
dominoes I do not even know, man
parallel-letter-frequency multi threading? heavy
sublist enum, generic over type
custom-set generic over type, vector, equality, struct
tournament enum, file io, try!, result, hashmap, struct
rectangles traits and structs, enum
forth like, everything but lifetimes
circular-buffer same

So, some stuff is at the bottom that clearly should be (rectangles, forth, circular-buffer). But the start of our problem list is not well geared towards newcomers. Let's discuss better options.

@IanWhitney
Copy link
Contributor Author

And here's my first suggested order, grouped into sections just so I could explain why I put certain problems together:

Getting Started

This ordering feels pretty good to me. These problems tend to show up early in tracks and they don't seem to hit any of Rust's weirder edges.

problem topics
hello-world Some/None. Really? We did that in Hello World?
gigasecond Crates, type stuff.
leap Math, booleans
raindrops case (or formatting). Mutable string
bob chars, string functions
beer-song case, vector (?), loop
difference-of-squares fold & map

Getting into Rust

Now we start to hit some more Rust-specific stuff. And the order here I'm less clear on.

problem topics
hamming result
scrabble-score chaining map/fold. Hashmap (maybe)
nucleotide-count filter, entry api, mutablity, match
word-count hashmap, str vs string, chars, entry api
etl btree
sieve vector, map, while let (optional)
rna-transcription match, struct, str vs string
roman-numerals mutable, results, loops, struct, traits
hexadecimal Option, zip/fold/chars, map
grade-school struct, entry api, Vec, Option
queen-attack struct, trait (optional), Result
allergies struct, enum, bitwise (probably), vectors, filter
sublist enum, generic over type
phone-number option, format, unwrap_or, iters, match
custom-set generic over type, vector, equality, struct

Lifetimes

Now for the real Rust-specific stuff. We only have three exercises that require lifetimes. Anagrams is the easiest, since it doesn't use structs & randomness

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 are the ones where I looked at the example code and said "I dunno what this is even doing." I have no opinion about the order of these, since I don't fully understand them.

problem topics
minesweeper board state, Vec, heavy logic
dominoes I do not even know, man
parallel-letter-frequency multi threading? heavy
tournament enum, file io, try!, result, hashmap, struct
rectangles traits and structs, enum
forth like, everything but lifetimes
circular-buffer same

@kytrinyx
Copy link
Member

@IanWhitney this is so good!

IanWhitney pushed a commit to IanWhitney/xrust that referenced this issue May 27, 2016
Note: This won't pass CI. I haven't yet put the problem into
config.json. Waiting on exercism#127

Implements the Pangram problem and follows the current canonical test
suite.
@IanWhitney
Copy link
Contributor Author

I'm about to do a PR to add the Pangram exercise. My example implementation may not be the way most students go, so I'm not sure we can rely on it to figure out where the exercise should go.

But, most solutions will almost certainly use

  • iterators
  • Higher-order functions
  • Sets

Based on that, I think it would go towards the start of the Getting Into Rust section. Somewhere in the first 3 problems.

@IanWhitney
Copy link
Contributor Author

And #131, when it's ready for merge, should probably be in the 2nd half of Getting Into Rust. Somewhere around hexadecimal, I think.

IanWhitney pushed a commit to IanWhitney/xrust that referenced this issue Jun 1, 2016
Fixes exercism#127

This commit follows the problem order I suggested in exercism#127, with one
exception. I've put sublist ahead of allergies. Both use enum, but the
enums in allergies can be more of a hassle, as evidenced by all of the
ways I've seen students implement them.

Sublist does have the disadvantage of also requiring a solution that is
generic over multiple types. But I think the best thing to do is keep an
eye on students that reach this part of the track.

Or the later introduction of new exercises could improve this flow.
petertseng added a commit that referenced this issue Jan 8, 2017
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 the topics and specific problems.

This commit uses something more abstract, that states our values without
going into the exact implementation. This requires less maintenance, and
is less likely to go out of date than specifically listing problems.

Since it only has the ordering philosophy and not the actual topics,
it's time to rename it to problem_ordering.md.

Closes #236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants