★ wanayoo — archive 1999 https://github.com/elixirschool/elixirschool/pull/2341Nouvelle recherche | Portail wanayoo
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

Add pattern matching and otp concurrency homeworks #2341

Closed
wants to merge 1 commit into from

Conversation

@wkulikowski
Copy link
Member

@wkulikowski wkulikowski commented Jun 27, 2020

This PR refers to issue #2295 where we considered adding homeworks to the Elixir School.
Here is my proposal:

Homework definition

A homework should consist of:

  • a markdown file with the task description
  • starter code referring to the lesson's topic
  • unit tests covering basic functionality of the task
  • solution code with all test cases passing

Integration with Elixir School

Not yet implemented
My opinion here: we should add the markdown file content to the lesson and give clear instructions for cloning the repo and running the code. But this remains open for a while

Implemented homeworks

In this PR I implemented 2 exemplary homeworks. Feel free to play with them and check if they are reasonably close to the lessons contents: pattern matching and OTP concurrency

Next steps

If you like the contents of those lessons we should implement them into frontend (as in Integration with Elixir School section) and produce more homeworks. Once we have a useful coverage (let's say 30% of basic/advanced section) we could release it to the public

@wkulikowski wkulikowski requested a review from elixirschool/english as a code owner Jun 27, 2020
@doomspork doomspork requested review from SophieDeBenedetto, elixirschool/developers and doomspork Jun 27, 2020
@doomspork
Copy link
Member

@doomspork doomspork commented Jun 27, 2020

So exciting 🎉

Not yet implemented
My opinion here: we should add the markdown file content to the lesson and give clear instructions for cloning the repo and running the code. But this remains open for a while

This repo is pretty hefty thanks to all the markdown. Should we consider repurposing the Homework repo into something to support this? We could have a folder per category, with subfolders matching a lesson name, homeworks and solutions inside?

We may also be able to fold some of those examples into these usage.

@wkulikowski
Copy link
Member Author

@wkulikowski wkulikowski commented Jun 28, 2020

This repo is pretty hefty thanks to all the markdown.

That's a valuable insight I haven't considered. Partially agree, but I don't think we are storage-constrained here. We could repurpose the second repo, however I would need more of your input here. After we have that figured out I will happily follow the structure

In terms of the actual Jekyll implementation I will experiment with it in the next week, but cannot promise anything release ready

@doomspork
Copy link
Member

@doomspork doomspork commented Jun 29, 2020

That's a valuable insight I haven't considered. Partially agree, but I don't think we are storage-constrained here

I know we're not terribly storage constrained but this repository has no Elixir code in it, I don't think we should start. It will be easier to set up CI for Elixir on separate repo. Since this is the main repo, the vast majority of changes people will be forced to pull down won't relate to actual homework.

We could repurpose the second repo, however I would need more of your input here. After we have that figured out I will happily follow the structure

I'm here to help 😁 I just want to talk this through to make sure we take the right appropriate out of the gate. I think what you have here is a good folder structure we can follow in a secondary repo. Throughout the lessons I envision a call out in a colored box that directs them to the appropriate homework for that section or lesson.

What do you think @elixirschool/developers?

@@ -0,0 +1,23 @@
# OTP concurrency / GenServer homework

This comment has been minimized.

@SophieDeBenedetto

SophieDeBenedetto Jun 30, 2020
Contributor

What do you think about using the tests like a guide, sort of like TDD? In other words, we instruct students to run the tests at the beginning, rather than only if they get stuck. This has the added benefit of giving students the chance to get familiar with running Elixir tests, reading test output and using that output to guide their decisions to get the tests passing.

Something like:

To get started, run the tests by executing elixir otp-concurrency.exs. The instructions below will tell you what you need to do to complete the homework assignment and get the tests passing.

This comment has been minimized.

@doomspork

doomspork Jun 30, 2020
Member

@SophieDeBenedetto I think this is great. I can't speak for @wkulikowski but I for one am not 💯 how to work this in in a non-invasive way and without reworking all the lessons to fit it. Do you have any suggestions or example material I could look at for ideas?

This comment has been minimized.

@SophieDeBenedetto

SophieDeBenedetto Jun 30, 2020
Contributor

@doomspork not totally sure what you're asking here? How to work what in in a non-invasive way?

This comment has been minimized.

@doomspork

doomspork Jun 30, 2020
Member

Sorry, the TDD approach you described.

This comment has been minimized.

@SophieDeBenedetto

SophieDeBenedetto Jun 30, 2020
Contributor

Ah got it 👍

I'm not sure why adopting this approach would require re-working existing lessons? I'm thinking of this more as a framing devise for homework assignments specifically.

This comment has been minimized.

@wkulikowski

wkulikowski Jul 1, 2020
Author Member

Also 💯 for @SophieDeBenedetto I didn't put much thought into wording and assumed that tests = TDD. Will change that

@SophieDeBenedetto
Copy link
Contributor

@SophieDeBenedetto SophieDeBenedetto commented Jun 30, 2020

@wkulikowski thanks for this awesome contribution! I'm so excited to see homework assignments getting off the ground!

Content looks good to me, I only had one small suggestion so far.

Regarding where these homework assignment should live though--I would love to see use utilize the existing homework repo for a few reasons:

  • We don't have executable Elixir code/Elixir code projects in the elixirschool/elixirschool repo primarily bc this repo is responsible for lesson and blog content only and people cloning it down/working with it are usually only working in those areas.
  • Putting homework assignments in a repo allows us to leverage the normal mix project setup, including standard testing set ups and practices. I think one of the big benefits of homework is that it allows students to get their hands dirty in a "real" Elixir development environment. So, to the extend that we can provide such an environment, we should.
  • It allows us to to organize homework solutions leveraging git--for example, I'm thinking we can create a branch solutions, and that branch will always have the solution for the assignments. This creates a little bit of distance between the prompt and the solution, encouraging the student to work through anything they're stuck on before reaching for the answer.

If that sounds okay to you @wkulikowski and @doomspork we should:

  • Make sure that both I and @wkulikowski are contributors to the homework repo (I think we're not)
  • Move these assignments to that repo under a file structure that mirrors the lesson structure. For example: homework/lessons/basics/pattern_matching/ where this directory contains a mini mix project with the README.md containing the instructions, a lib/ that contains the actual homework assignment file and a test/ directory.
  • Add some content to each respective lesson on Elixir School that calls out the homework assignment and links to the assignment's README.md in the homework repo.

Totally happy to work on any of these action items if they sound good to you guys. Let's finalize our next steps first then @wkulikowski can split up the work any way that works 🚀

@@ -0,0 +1,47 @@
defmodule SimpleQueue do

This comment has been minimized.

@SophieDeBenedetto

SophieDeBenedetto Jun 30, 2020
Contributor

I think this homework assignment is a great start for our beginners. What do you think of also including (and updating if need-be) this old homework assignment on the GenServer topic in which we prompt students to build a "bank" with a GenServer? https://github.com/elixirschool/homework/tree/master/simple_bank

I think it might be a nice "stretch" homework assignment for anyone looking for a challenge.

@doomspork
Copy link
Member

@doomspork doomspork commented Jun 30, 2020

@SophieDeBenedetto I've updated all of the permissions again, you should have access to do whatever you need on Homework as a part of the developer group. I've added @wkulikowski to the developer group as well 🎉

@wkulikowski
Copy link
Member Author

@wkulikowski wkulikowski commented Jul 1, 2020

Thanks for the detailed wrap up @SophieDeBenedetto. I don't have much to say as I agree fully with every idea.

Summary:
📚 We will use the Homework repo for all the projects
🔄 The homework repo will need some restructuring, but we will reuse all the projects already built (especially simple-bank)
🔝 The content of proposed homeworks is generally ok, but we need to improve on usage guidance
🛠 [suggestion from Sophie] With homeworks we should embrace the standard Elixir workflow (using mix and testing)

Action points:
Sophie and me should get access rights to Homework repo. Already taken care of by @doomspork. (Thanks btw, felt accomplished 😅)

  • Restructure the Homeworks repo so the folders/names match the Elixir School lessons. @SophieDeBenedetto you seem to have the best idea for it, especially with utilising mix. Update: PR here
  • Integrate homeworks into the frontend — I will have fun with it tomorrow 😃
  • Produce more homeworks! All hands on board here, I'll take some, once I finish the frontend
  • Let's discuss how / when do we want to release it. @doomspork how should we approach this? What homeworks must we have at the release?
@SophieDeBenedetto
Copy link
Contributor

@SophieDeBenedetto SophieDeBenedetto commented Jul 3, 2020

@wkulikowski thanks for the sum-up of action items above! I'll work on setting up the existing homework repo to include your new assignments (and re-location of the simple bank assignment) over the weekend 🚀

@SophieDeBenedetto
Copy link
Contributor

@SophieDeBenedetto SophieDeBenedetto commented Jul 14, 2020

👋 I'm going to close this PR in favor of this one adding the new homework assignments to the elixirschool/homework repo. elixirschool/homework#11

What remains to be done can be seen in this comment here. Looks like next on the list is updating the otp-concurrency lesson with some info on where to find the homework assignments 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.