exercism / go

Exercism exercises in Go.
https://exercism.org/tracks/go
MIT License
948 stars 644 forks source link

Choose 'core' exercises #829

Closed robphoenix closed 6 years ago

robphoenix commented 6 years ago

From #825 See also #794

Roughly 20 exercises.

Core Exercises [difficulty] (Ordering to be finalised)

  1. hello-world [1]
  2. two-fer [1]
  3. hamming [1]
  4. raindrops [1]
  5. scrabble-score [1]
  6. isogram [2]
  7. difference-of-squares [2]
  8. luhn [2]
  9. grains [2]
  10. clock [3]
  11. parallel-letter-frequency [3]
  12. tree-building [3]
  13. robot-name [3]
  14. tournament [3]
  15. twelve-days [4]
  16. matrix [4]
  17. error-handling [5]
  18. bank-account [4]
robphoenix commented 6 years ago

An initial list to get us started:

  1. hello-world
  2. two-fer
  3. hamming
  4. raindrops
  5. scrabble-score
  6. pangram
  7. difference-of-squares
  8. acronym
  9. triangle
  10. clock
  11. word-count
  12. parallel-letter-frequency
  13. grains
  14. series
  15. twelve-days
tleen commented 6 years ago

lol I was typing the list of current ones as this popped up :+1:

robphoenix commented 6 years ago

lol I was typing the list of current ones as this popped up

great minds... :laughing:

tleen commented 6 years ago

The first 4 are perfect. I had them pegged as the starter core too. pangram and acronym are probably too alike to be both in core. I figured one of the *gram exercises would have the others as bonus.

Some others I think warrant discussion for core:

These were ones I noted going through the track so far...

robphoenix commented 6 years ago

pangram and acronym are probably too alike to be both in core. I figured one of the *gram exercises would have the others as bonus.

Agreed, I think pangram would be good core, unlocking acronym and the other *gram exercises.

robphoenix commented 6 years ago

tree-building - Mostly because it introduces the concept of refactoring.

:+1:

robot-name - The idea of preventing collisions makes this an interesting exercise. Randomness is a good thing to explore.

:+1: Yep, I like this, I do think though it's probably worth bringing the bonus tests into the main test suite. I don't think anything's gained from splitting them. If needs be we can describe in the readme how to only run certain tests with go test so the user can work on them incrementally.

bank-account - I think one core exercise should deal with state management. I learned a lot on this one. That it has concurrency protection is a nice bonus.

I had thought of this being unlocked by parallel-letter-frequency being as they're both concerned with concurrency, but they consider it from different angles I suppose. plf as in intro to goroutines and channels and this as an intro to mutexes. I think they could both work as core, rather than having a separate concurrency series of exercises unlocked by each other. Ok :+1: and I'd like to see plf as core before it.

allergies - Bitmasking is such a useful concept, ideeally one of the core exercises would use it and then it can gateway into other bitwise exercises, like secret-handshake.

Couldn't agree more about bit-shifting. I had grains down as a core exercise to unlock allergies, secret-handshake, & variable-length-quantity, what do you think?

error-handling - Error handling is such an important topic in Go. This exercise may actually be too hard to introduce it but it's what we have for now. Eventually I would like to add an simple early core exercise that deals with multiple return values and the idiomatic err pattern.

I think this could be core, I don't think it's necessarily too hard, I think it's just a little confusing, with some clearer explanation in the README it could be easier to digest. So :+1: with the caveat that the documentation is improved.

paasio - Because it uses standard interfaces Readers/Writers and is an example of some good patterning.

Ok I can get down with that :+1: though it should come after bank-account due to it's use of mutexes and I think the documentation could be improved to help getting started.

robphoenix commented 6 years ago

For your consideration...

tleen commented 6 years ago

Ok liking this sofar. Liking parallel-letter-frequency as a concurrency concept unlock. We should probably freeze here, put this into config and see how it looks via the visualizer.

tleen commented 6 years ago

Ok here is how the early track looks now...

screenshot from 2017-08-24 19-59-45

tleen commented 6 years ago

Thinking out loud here about combining the scrabble-score and *gram sub-tracks.

That would be a tidy sub-track with all the sub-string finding stuff, scrabble stuff, DNA stuff, and Maps.

You get a bunch of exercises that are basically string/rune search/manipulation, leading into more themed exercises (dna, scrabble). So you get a start that is a rote "find things in strings" which moved into more real world string exercises. And overall in the sub-track Maps can be used for solutions for a number of the exercises, but actually have to in etl.

This takes care of a bunch of the exercises, can get in the track early and has some depth to it.

I was thinking of the four *grams. isogram is the easiest. In fact it may be a 2. And on top of that it may actually be the place to start the the sub-track. So it could go:

isogram |- pangram |- acronym |- anagram |- scrabble-score -> etl |- rna-transcription -> protein-translation

tleen commented 6 years ago

and have accumulate unlock strain? both are the functional programming exercises.

tleen commented 6 years ago

I've been playing with it. Starts to get to be a really long aside. Perhaps we should stick all the dna stuff together with hamming?

tleen commented 6 years ago

Here is a possibility sticking the dna stuff in hamming. raindrops would need some bonus unlocks (the only one I think is suitable is bob but we have that as an initial bonus) and I think clock would need to be earlier:

screenshot from 2017-08-25 15-35-15

tleen commented 6 years ago

Lets try to define the core exercises up to clock, then the associated unlocks. That will take a swath of exercises off the table for the next section. We can always refine later if something pops up.

May want to switch hamming and isogram, the hamming unlocks are harder. difference-of-squares we should review the unlocks, I think the exercise itself is good as a TDD example. But its also one of the mathy exercises so its unlocked should be the mathy stuff: just not too difficult yet. grains is perfect in placement + unlocks.

tleen commented 6 years ago

Future note: tree-building can unlock ledger, also binary-search-tree perhaps. The user should encounter binary-search somewhere before binary-search-tree even if it has to be an unlock off of tree-building first...

tree-building hits that refactor milestone & is data-structurally related to binary-search-tree.

robphoenix commented 6 years ago

Lets try to define the core exercises up to clock, then the associated unlocks. That will take a swath of exercises off the table for the next section. We can always refine later if something pops up.

Okay, core up to clock are currently:

  1. hello-world [1]
  2. two-fer [1]
  3. hamming [1]
  4. raindrops [1]
  5. scrabble-score [1]
  6. pangram [2]
  7. grains [2]
  8. clock [3]

@tleen pangram is currently core, do you want to switch that for isogram? If so, we should perhaps adjust their difficulties. Do you want to add difference-of-squares to core?

sticking the dna stuff in hamming. raindrops would need some bonus unlocks (the only one I think is suitable is bob but we have that as an initial bonus)

I'm starting to think we shouldn't worry so much about grouping these exercises together around themes within the subject matter of the exercises (dna for instance). I think we have a pretty good set of core exercises, and we should go through defining 1-3 exercises of suitable difficulty that each of these can unlock. For instance:

I'm also conscious of filling up the repo's log with commits changing things around over and over, so I think we should wait until we've at least got the majority of core exercises and what they unlock defined before we commit the structure again. If needs be we can start another branch off the nextercism branch that we can commit to without care, and then rebase it and remove all the unnecessary commits, leaving only one that makes the change?

tleen commented 6 years ago

ok sounds good. I like difference-of-squares as an earlyish core exercise because it really emphasises TDD. Lets outline in here then commit.

robphoenix commented 6 years ago

I like difference-of-squares as an earlyish core exercise

What do you think of it between isogram & grains?

kytrinyx commented 6 years ago

I just came by to drop this link: https://twitter.com/billglover/status/906017681148481537 as an extra vote for having error-handling as part of the core 👍

robphoenix commented 6 years ago

closed by #835