freeCodeCamp / python-coding-challenges

freeCodeCamp's stand-alone Python coding challenges
BSD 3-Clause "New" or "Revised" License
174 stars 209 forks source link

Curriculum Outline #8

Open Ethan-Arrowood opened 7 years ago

Ethan-Arrowood commented 7 years ago

Curriculum Outline

In the root directory of the project there will exist a directory: challenges, and a file called classroom_settings.json

The challenges directory will contain each lesson directory title like so: [C#].[L#].<name> i.e. 2.1.Addition (means the Addition lesson is Lesson 1 of Chapter 2). Due note that chapter and lesson numbers is for our organization purposes and will not be reflected in the Repl.it Classroom.

Each lesson directory will contain four files:

  1. lesson_code.py
  2. lesson_tests.py
  3. lesson.md
  4. lesson_settings.json

lesson_code.py will be loaded into the initial-code section (top left container) of the classroom.

lesson_tests.py will be loaded into a hidden unittest file (behind the scenes).

lesson.md will be loaded into the markdown section (bottom right container) of the classroom.

lesson_settings.json will be used to store information such as Title, Chapter, Lesson number, ID(?). This will mainly be for FCC, but repl will be able to utilize the Title property and maybe the ID property.

Each Repl.it Classroom lesson url will be added to the challenges.json file in the project root directory.


[Down The Road] - implement a python script that auto builds the challenges.json file


The current structure for the FCC Python Curriculum is: Beginner Section, Intermediate Section, & Special Topic Section.

Beginner Section:

Intermediate Section:

Special Topic Section:


Ethan-Arrowood commented 7 years ago

Challenges/Lessons posted on previous thread https://github.com/freeCodeCamp/freeCodeCamp/issues/14588#issuecomment-299176138

https://github.com/freeCodeCamp/freeCodeCamp/issues/14588#issuecomment-299224207

https://github.com/bgroveben/FCC_Python

Ethan-Arrowood commented 7 years ago

In the root directory of the project there will exist a directory: challenges. Inside will contain each lesson directory titled as so: [lesson title]_C[chapter#]_L[lesson#]

For example: Addition_C2_L1<- This means the Addition lesson is Lesson 1 of Chapter 2

Each lesson directory will contain four files:

  1. lesson_code.py
  2. lesson_tests.py
  3. lesson.md
  4. lesson_settings.json

lesson_code.py will be loaded into the initial-code section (top left container) of the classroom.

lesson_tests.py will be loaded into a hidden unittest file (behind the scenes).

lesson.md will be loaded into the markdown section (bottom right container) of the classroom.

lesson_settings.json will be used to store information such as Title, Chapter, Lesson number, ID(?). This will mainly be for FCC, but repl will be able to utilize the Title property and maybe the ID property.

Here is an EXAMPLE layout:

screen shot 2017-05-10 at 11 25 32 pm

*Special Note - the challenges.json file will be used to track user progress via localStorage. May be worth writing a py script to build this automatically based on the challenges directory using the lesson_settings.json file inside each lesson directory. [Down the road feature?]

Ethan-Arrowood commented 7 years ago

@bgroveben @QuincyLarson @ginoskotheon Can I get some feedback on the previous comment before I send it to Amjad?

amasad commented 7 years ago

This looks good! One question: how do you see the Chapter mapping on the Repl.it's taxonomy? Would it be the Classroom? Alternatively, it doesn't have to map to anything and we just prefix the assignment name with the chapter.

Ethan-Arrowood commented 7 years ago

@amasad I don't think it needs to map to anything on Repl.it's taxonomy (unless you plan on implementing chapters into classrooms in the future πŸ˜‰). For the moment it'll just keep things more organized on our end.

amasad commented 7 years ago

Yeah we might add chapters, some users asked for it, but for now we'll just leave it out. Are you ok with having the titles (directory names) have spaces and special characters? I'm fine with it, it just might make it harder for the authors.

Some other thoughts:

  1. We can use book-like format since people should be already familiar with [C#].[L#].<name> e.g. 2.1.Addition
  2. I think we'll need a top-level json settings for Repl.it to specify things like the classroom name, language, and if you want students to finish a lesson to unlock the one after etc.
Ethan-Arrowood commented 7 years ago

We can use book-like format since people should be already familiar with [C#].[L#]. e.g. 2.1.Addition

Yes! I like this layout a lot. What would we do if the name is multiple words? i.e. Logic Operators Would it be: 1.5.LogicOperators or 1.5.Logic_Operators or (something else entirely). Directories can have special characters and underscores, but no spaces (keeps scripting easier).

I think we'll need a top-level json settings for Repl.it to specify things like the classroom name, language, and if you want students to finish a lesson to unlock the one after etc.

Would you like me to add a classroom_settings.json file in the challenges directory?

amasad commented 7 years ago

I think underscores for spaces might work best. classroom_settings.json works well.

Ethan-Arrowood commented 7 years ago

sounds good to me. I'll start implementing this structure tomorrow πŸ‘

bgroveben commented 7 years ago

@Ethan-Arrowood @amasad I like the layout and the naming conventions -- looks good!

bgroveben commented 7 years ago

@Ethan-Arrowood We may want to update the gulpfile to watch for changes to the .py, .json, and *.md files we're writing for the lessons.

Ethan-Arrowood commented 7 years ago

Okay challenge directory has been pushed to master. Lets start writing challenges directly in the appropriate directories. Also, feel free to reorganize things as you see best fit I just pre filled it so there was some sort of structure present.

whmcdonaldiii commented 7 years ago

@Ethan-Arrowood Looks great. I'll start trying to get some challenges going.

bgroveben commented 7 years ago

Outstanding @Ethan-Arrowood ! I have written some of the lessons included in your challenges directory (as well as a few others); you can preview them in this Repl.it Classroom. I just need to make sure that the file and directory structure is consistent, update the tests, and see that everything works. Great job and thanks again!

Ethan-Arrowood commented 7 years ago

@bgroveben thank you πŸ˜„ when you're able to move your challenges over make a pr against master and I'll merge it πŸ‘

bgroveben commented 7 years ago

@Ethan-Arrowood you got it.

amasad commented 7 years ago

@bgroveben your course looks awesome! I hope the authoring experience on Repl.it was good. (I don't want to take this thread on a tangent but if you have any feedback for us we're at contact@repl.it).

amasad commented 7 years ago

Hey all, meet @vpavlenko he's an engineer at Repl.it and will be working on implementing this Repl.it Classroom / Github integration.

vpavlenko commented 7 years ago

Hey guys, I'm going to implement everything necessary inside Repl.it. @bgroveben It would be super helpful if you could upload any single challenge to this repo soon, so I could have a real example as a reference. Happy to work with you all :)

Ethan-Arrowood commented 7 years ago

@vpavlenko I'll be able to get one or two up if @bgroveben is busy.

bgroveben commented 7 years ago

Greetings @amasad @Ethan-Arrowood @vpavlenko ! Thank you for the kudos on the lessons I've made so far. I just have to fix a few more of the tests, and I'll be ready to submit a PR for the beginner/math challenges this morning. Please contact me if there is anything else I can do for you.

bgroveben commented 7 years ago

I just submitted a PR for 14 beginner/math challenges that can be found in Chapter 4.1 through 4.E (I ran out of base ten digits, so I moved up to hexadecimal). Please feel free to review, revise, and so forth. I'm going to be working on a PR for beginner/operators next. Cheers!

bgroveben commented 7 years ago

@amasad @vpavlenko Many Thanks and Cheers to you and the rest of the folks at Repl.it for helping us out with this project! You are all extra-special awe-sum. BTW I really like the new Classrooms you have been working on. I'm still learning my way around, but if I have any suggestions I'll contact you. Great Job!

Ethan-Arrowood commented 7 years ago

@bgroveben great work on the challenges. I went ahead and merged them in. For future PR's try to ref at least 1 issue just so we can track commits. We will have to be more strict about that in the future once we 'go live'.

Next step: auto building the challenges.json file. Any ideas on how we can do that? We may need to wait for Repl.It Github/Classroom integration so we can retrieve the links for each challenge. I'm thinking we use some sort of Node.JS FileSystem script to read the challenges directory and write certain data to the challenges.json file.

vpavlenko commented 7 years ago

@bgroveben Thanks a lot for the PR.

I wonder if you're going to store model solutions in the repo or somewhere else as well?

Ethan-Arrowood commented 7 years ago

@vpavlenko I don't think we are currently planning on providing model solutions; however, that may be a useful feature so if you can set it up, we will probably be able to use it down the road.

vpavlenko commented 7 years ago

@Ethan-Arrowood I'm asking because in @bgroveben 's Repl.it classroom every assignment already has a model solution added. However, I don't see it in the PR #17 .

Another question: what is gonna be the source of truth for Assignment ID - the ID in lesson_settings.json or the directory name in the repo? Consider the following scenario: you pushed changes to assignment statement and you want to update your existing classroom backed by Github Repo based on the newest repo version. Then we need to understand which assignment from the repo belongs to which assignment in the Repl.it classroom.

Ethan-Arrowood commented 7 years ago

@vpavlenko I do not know whats going to power the Assignment ID. I was thinking about just using the chapter and lesson title something like:

For the Addition lesson in the Math chapter, the ID for Addition would be = math_addition.

Will this be sufficient? Or do we need to implement something different?

Ethan-Arrowood commented 7 years ago

@vpavlenko just spoke to Quincy about the ID stuff. I'm going to use MongoDB objectid() method to generate ids. Will have to be done manually for each new challenge.

vpavlenko commented 7 years ago

I'm trying to scope the initial implementation of the integration and I'm feeling like I lack some context. Could you please describe how do you plan to use Github and Repl.it Classroom integration? I'd like to understand what kind of use cases do you have in mind.

For instance, pretend that there's no integration implemented. Why it's not sufficient for FreeCodeCamp to have the assignments in the Repl.it interface? Are you gonna be using Github for just a backup option or for something else?

If you plan to collaborate when designing assignments, are you going to use edit files on Github first and use Github PRs or are you gonna share the same Repl.it account to do it on our platform? Pretend that we sync a single assignment existing both in Github and in the classroom, then what wins - a Github content for it, a Repl.it content, last write (last timestamp), or the direction of synchronization is manually picked every time?

Model solutions that we have help content creators to verify they configure unit tests properly. Do you plan to store them on Repl.it side only or ignore the entire feature altogether? I'm asking because @bgroveben already used it for all assignments.

Are you going to have input/output tests for some problems, or only unit tests all the time? Are you going to use "project mode" - several files of template per assignment?

bgroveben commented 7 years ago

@Ethan-Arrowood Thanks for reminding me to include the issue number in my PR's. When I submit more lessons/challenges, I think #2 is most appropriate.

@vpavlenko @Ethan-Arrowood These are all excellent points; thank you for bringing them up.

So far I have been drafting and refining the lessons using the Github integration, and then implementing the lessons using Repl.it. Basically, I have written all of the lessons and challenges so that they will work in both environments. However, as @vpavlenko pointed out, we are going to have to deal with the complications that come with using both Github and Repl.it. For the MVP, I like the idea of hosting the lessons on Repl.it using a shared account and keeping the Github code as a backup (and testing/sandbox) environment, but I am very flexible on that.

I have written model solutions for the lessons (here is my challenge 'recipe'), but I haven't included them in the Github files because I'm not quite sure if we will be using them or where to put them if we do. The Repl.it Classrooms already have a section that accommodates a model solution, so it was easy to just paste one in after writing the tests. I like the idea of using model solutions that will be revealed after the user has implemented their own solution that passes the tests (which Repl.it does); if we choose to do things that way, we just need to work out how we will implement the solutions for the Github code.

As for the tests, unit tests are okay for the MVP and for the beginner level challenges that I have written so far, but there is definitely room for improvement. As the lessons and challenges become more complex, there will be a need for more comprehensive testing, including (but not limited to) input/output tests (which are a great idea... thanks @vpavlenko!). My testing skills need upgrading anyway, so any help on that is appreciated.

The other issues you have brought up are beyond the scope of my engineering skills (for now at least). I'm probably most useful to you as the dev who can write Python lessons and code challenges. If there is anything else I can do to help move this project along and make it work better, please let me know and I'll do my best.

bgroveben commented 7 years ago

@vpavlenko

Are you going to use "project mode" - several files of template per assignment?

I haven't used project mode in my lessons yet, but I believe that we will reach a point where having multiple files in a challenge will be useful.

Ethan-Arrowood commented 7 years ago

@vpavlenko

Why we want GitHub integration: We will have one FreeCodeCamp repl.it account. It will have a classroom essentially linked to the challenge directory in the GitHub master branch of the python-curriculum repo. When we submit new challenges or update existing ones via GitHub repo, Repl.it will automatically updated the appropriate challenge (or create a new one). This is why we will have 'ID's for each challenge so they can stay synced up.

I'm traveling today so I won't be available to answer questions until later this evening (approx. 8hrs from now). Quincy and William can also answer questions about this so feel free to reach out to them if you need a answer.

amasad commented 7 years ago

@vpavlenko

To expand on what @Ethan-Arrowood said: FreeCodeCamp is powered by volenteers and contributers that primarily use GitHub. If someone found a bug in one of the lessons fixing it should be as easy as sending a pull request. Furthermore forking should also be possible if folks want to use at as a basis for another language or their own course (although not necessary for the first milestone).

IMO two-way syncing is not needed (at least initially). When a classroom is imported from GitHub then the repo becomes the source of truth and ideally we would make it read-only from Repl.it. The only deviation from this might be model solutions since putting them in the repo makes cheating too easy (and I do think model solutions are important for learning).

FCC folks what is your stance on cheating? (At Repl.it we do some work to try to prevent or at least make it harder).

Ethan-Arrowood commented 7 years ago

FCC works on an honor system. Basically if a user wants to cheat, they can, but the only person they are hurting is themselves. Model solutions can be optional if that's makes things easier.

Ethan-Arrowood commented 7 years ago

@bgroveben @ginoskotheon @QuincyLarson @vpavlenko @amasad I made some important changes to the challenges directory as well as the lesson_settigns.json file and the challenges.json file. Please take a moment and read my PR descriptions #18 #19 so you know what has changed.

Tomorrow, I'll be cleaning up some file names and hopefully refining the challenge.json build method, but I've pushed a majority of the changes in #18 & #19

Please give me feedback and ask any questions you have; I'll do my best to clear up anything thats misunderstood πŸ˜„

vpavlenko commented 7 years ago

We're making good progress on this. I wanted to let you know that @turbio is taking this over from the @replit side.

turbio commented 7 years ago

Hey :wave: @Ethan-Arrowood @bgroveben, as @vpavlenko said I'll be taking over Repl.it's github classrooms from here on out. I'll keep you guys posted with our progress. Also, what is FCC's username on Repl.it, that way I can give you guys early access.

bgroveben commented 7 years ago

Greetings @Ethan-Arrowood , I'm ready to begin putting all of the lessons for the beginner/operators lessons up.
However, before I submit a PR, we need to include an Operators chapter in the challenges.json file (right at the beginning) or else the node generate-challenge-json.js command will throw an error.
I can tinker with the code myself, but you know it better than I do and I don't want to break anything you have written :scream:
Please advise and thank you for your help.

Ethan-Arrowood commented 7 years ago

@bgroveben go ahead and edit the chapter array in challenges.json as you see fit. That array is only being used to generate the map; not anything in the generate file (yet).

Welcome @turbio! Glad to have you on board. I'll reach out to @QuincyLarson for FCC's Repl.it username and get back to you asap πŸ‘

Ethan-Arrowood commented 7 years ago

@vladdoster & @bgroveben - just realized you guys are both working on the same challenges. Take a minute to review each others work. I'd recommend one of you opening a PR and discussing changes in that and editing your code accordingly. Let me know if you need any help!

Ethan-Arrowood commented 7 years ago

@turbio team@freecodecamp.com for the email address - username is probably freecodecamp πŸ‘

Ethan-Arrowood commented 7 years ago

@bgroveben how's the challenges coming along? Do you need any help?

bgroveben commented 7 years ago

@Ethan-Arrowood my beloved day job has eaten up most of my free time over the past few days, but I'll have a chance to update the chapter array and submit a PR for the operators challenges on (hopefully) Wednesday or (more likely) Thursday. Good looking out and thanks for offering your assistance!

Ethan-Arrowood commented 7 years ago

Great job @bgroveben πŸ‘

Ethan-Arrowood commented 7 years ago

I'm working on Chapter 2 now (Data Types)

@turbio how is it going over on Repl.It? Anything more you need from us?

turbio commented 7 years ago

@Ethan-Arrowood Everything's going smoothly on the Repl.It front, we'll hopefully have something you can try out by next week.

erictleung commented 7 years ago

@Ethan-Arrowood hey there! I can probably try to take up the machine learning parts of this. I'm trying to put together some notes on machine learning and I think using Python would be a great way to interact with those concepts.

I haven't read through this whole thread yet, so if you already have plans for the machine learning part, my apologies. I'll try to take a look at the thread and the rest of the project later today.

Ethan-Arrowood commented 7 years ago

@erictleung yes go for it! Not much (if any) of the advanced lessons have been started yet. Thank you!

amasad commented 7 years ago

@erictleung we support a lot of pypi module (including numpy and scipy) on Repl.it. But let me know if there is something you need that we don't support.