-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
[v3] Add prerequisites to Practice Exercises #583
[v3] Add prerequisites to Practice Exercises #583
Conversation
"prerequisites": [ | ||
"recursion", | ||
"structs", | ||
"protocols", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think protocols are necessary to solve this exercise, but the boilerplate code includes a protocol implementation (https://github.com/exercism/elixir/blob/main/exercises/practice/zipper/lib/bin_tree.ex#L15-L33) so I added it here to avoid students being confused by the boilerplate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Zipper used to appear after Clock, so they were introduced to protocols by that point. I don't think students that I have encountered have been confused by this at this point with Clock having been removed from the core pathway.
2c889ec
to
f94c12d
Compare
"case", | ||
"pattern-matching", | ||
"strings", | ||
"binaries", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of solutions chose binary pattern-matching for splitting the string into three-letter substrings.
"binaries", | ||
"regular-expressions", | ||
"errors" | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example solution for this exercise uses metaprogramming like this:
https://github.com/exercism/elixir/blob/main/exercises/practice/protein-translation/.meta/example.ex#L49-L52
I wonder if this should become a concepts of its own? How would it be called, which parts of metaprogramming would it cover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it could cover quote
and unquote
so that those are not new concepts when macros are introduced?
I'll keep this PR open, waiting for feedback, for at least 2 more weeks (28.02.2021). |
Prettier attacked your formatting. 😬 I added a few here and there. I also added I think for the most part, most concepts are covered somewhere, I don't think there is a perfect coverage to have everything covered evenly and maybe once we can see it visually that one concept is disproportionately high/low we can make further adjustments. |
c53ebd3
to
6bd38a0
Compare
removed js-specific things
"nil", | ||
"macros" | ||
], | ||
"practices": ["keyword-lists", "structs", "macros"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be that I misunderstood the structure of this file -- but it seems to me that there is no such concept as macros
(yet?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not yet, but there should be. @angelikatyborska had a list of concepts that likely should be implemented at some point in one of her comments ☝🏻 up there. Concepts that don't exist, shouldn't affect things (afaik), but then this way we can be planning for their hopeful addition someday
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll see what Jeremy or Erik say about this. I think I would personally prefer configlet to trip over non-existing concepts in prerequisites to warn me about typos. If we have to remove the non-existing concepts, they already have corresponding Github issues that list to which exercises it needs to be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is definitely good to list concepts that are not there yet, as the v3 website will just ignore them but you'll have them defined for when the concept is added later. configlet should indeed warn about using concepts in Practice Exercises that are not yet defined. For Concept Exercises, I feel like it should error if the concept is not specified.
I will merge this PR on 01.03.2021, in 3 days. |
EXCITING. |
closes #567 , closes #457
To launch v3, all practice exercises need to define which concepts are necessary for solving the exercise. The
"topics"
key becomes obsolete. Two new keys are added:prerequisites
- a list of concepts that they students need to learn before they are able to solve the exercise well. It doesn't mean that they need to use all of those concepts while solving the exercise, but they need to know them to be able to choose the right one for the job. This key will be used to block students from solving an exercise too early.practices
- one or two concepts on which this exercise focuses. Those concepts should be used to solve this exercise well. This key will be used to suggest to users which exercises to do in order to practice a concept they're interested in.Ideally every concept would have at least one exercise that
practices
it.Approach
When assigning concepts to exercises, I used this approach:
prerequisites
list can be used to steer students away from difficult exercises too early.recursion
vsenum
,case
vsmultiple-clause-fuctions
,agent
vsgenserver
). For this reason, a lot of exercises listcond
,case
,if
,multiple-clause-functions
,pattern-matching
and so on as necessary concepts, when only one or two of those is actually needed, because there is no single objective answer to which one is better :).erlang-libraries
to solve an exercise, we don't need to explicitly listatoms
orbasics
as a prerequisite. I only listed the very simple concepts likeatoms
,integers
, ortuples
for exercises where they played a bigger role.practices
.During this process, it might become apparent that some concepts are missing. Adding, or planning for adding, new concepts is definitely possible, and even welcome! However, removing existing concepts or modifying them (changing their scope) might be difficult and hopefully we can avoid it.
Existing concepts
Concept tree: https://exercism.lol/tracks/elixir/concepts
access-behaviour
agent
anonymous-functions
atoms
basics
binaries
bit-manipulation
bitstrings
booleans
case
charlists
closures
cond
dates-and-time
default-arguments
dynamic-dispatch
enum
erlang-libraries
errors
exceptions
file
floating-point-numbers
guards
if
integers
io
keyword-lists
list-comprehensions
lists
maps
module-attributes-as-constants
multiple-clause-functions
nil
pattern-matching
pids
pipe-operator
processes
protocols
randomness
ranges
recursion
regular-expressions
streams
strings
structs
tail-call-recursion
try-rescue
try-rescue-else-after
tuples
Planned concepts
For planned concepts, we can only add them as prerequisites after they were implemented. Their corresponding issues should list which practice exercises need them.
genserver
with
task
macros
Exercise reference
hello-world
rna-transcription
word-count
roman-numerals
bob
beer-song
robot-simulator
list-ops
markdown
bank-account
zipper
bowling
forth
resistor-color
two-fer
nucleotide-count
pig-latin
protein-translation
rotational-cipher
secret-handshake
space-age
strain
accumulate
acronym
raindrops
run-length-encoding
series
dnd-character
pangram
scrabble-score
sum-of-multiples
grade-school
isogram
twelve-days
collatz-conjecture
sublist
triangle
flatten-array
matching-brackets
anagram
hamming
matrix
phone-number
say
nth-prime
binary-search
isbn-verifier
leap
tournament
all-your-base
binary-search-tree
grains
meetup
simple-linked-list
etl
binary
change
transpose
ocr-numbers
kindergarten-garden
diamond
luhn
scale-generator
rail-fence-cipher
gigasecond
hexadecimal
perfect-numbers
prime-factors
diffie-hellman
parallel-letter-frequency
palindrome-products
pascals-triangle
spiral-matrix
custom-set
saddle-points
connect
minesweeper
queen-attack
armstrong-numbers
simple-cipher
allergies
crypto-square
largest-series-product
clock
sieve
poker
atbash-cipher
grep
difference-of-squares
dominoes
alphametics
pythagorean-triplet
wordy
dot-dsl