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 content covering scopes topic #68

Merged
merged 26 commits into from
Mar 16, 2020
Merged

Add content covering scopes topic #68

merged 26 commits into from
Mar 16, 2020

Conversation

bonham000
Copy link
Contributor

@bonham000 bonham000 commented Mar 2, 2020

This PR:

  • Add Programming challenges covering the scopes topic.
  • Post message to Slack when a course purchase occurs.
  • Fix bug creating section blocks list to render sections with no challenges.
  • Update test starter code.

Notes/Observations:

  • I started linked to some external documentation/pages in these challenges (e.g. Wikipedia/MDN). Should we just do this, or should we define some policy/guidelines for how/when and under what circumstances we want to link to external resources? I think we want to get this to a minimum, but also provide it where it is handy. The fact is that quickly being able to search and find these resources is an important skill to learn. I know we have discussed the "glossary" feature idea previously which plays into this as well.
  • I think having some utility for the test code area of Codepress which can display which test helpers and global exist would be useful. Something which would display the different assertion statements that are available, and other globals like __user_code_string__.
  • The test code editor appears to not have all the TS features enabled. Is this intentional? For instance, I found this error in there: 'types' can only be used in a .ts file. and I could not assign types to values. I also find the theme colors in the test editor to be different than the main editor.

@bonham000 bonham000 added the 📚 content Adding or updating course content label Mar 2, 2020
@bonham000 bonham000 self-assigned this Mar 2, 2020
@bonham000 bonham000 changed the title [CONTENT]: Scopes Add content covering scopes topic Mar 9, 2020
@bonham000 bonham000 marked this pull request as ready for review March 15, 2020 12:33
@bonham000
Copy link
Contributor Author

bonham000 commented Mar 15, 2020

One other thing to note here is I sort of combined the ideas of global/local scope with "global" objects like Date and Math which exist in the global scope... I realized after getting into it this wasn't the best idea and perhaps there should be more clearly separated as topics... but just ran with it and here we are.

Always possible to revisit and change or expand the content so I just went with what I had already to keep moving forward.

I also touched on modules and libraries/dependencies in the end with a media challenge, since I think these are a bit of a conceptual extension of the idea of scope.

@iansinnott
Copy link
Member

  • I know we have discussed the "glossary" feature idea previously which plays into this as well.

Yeah, I think external linking is good at least for now. My thoughts longer term are that everything or nearly everything within challenges would link to the super concise glossary definition and then if they wanted more there would be a link in the glossary for the external sources. I think inverse to the courses almost every glossary entry would have at external links in the vein of citations

  • I think having some utility for the test code area of Codepress

100% agree. I've thought about this too on multiple occasions. @bonham000 do you know if/how we can add our own definitions to the editor? Maybe something like you did with JSX.

  • The test code editor appears to not have all the TS features enabled

Ah maybe it's accidentally JS. I don't remember at the time choosing against TS so this may have just been to get things up and running: f1a3b5a#diff-0b2bd454ff982feaebf5a10aece10317R45

README.md Show resolved Hide resolved
packages/client/src/js/browser-test-lib.js Show resolved Hide resolved
packages/client/src/tools/utils.ts Show resolved Hide resolved
@bonham000
Copy link
Contributor Author

Good point about the TestEditor language setting, I'll try switching it to typescript and see if that makes a difference.

On the sample test message string I may go ahead and merge this but we can always change that again if we need to.

@iansinnott
Copy link
Member

On the sample test message string I may go ahead and merge this but we can always change that again if we need to.

The only thing about the typescript test editor is that ideally we don't have to add types to anything. The challenge tests are meant to be written quickly and iterated on quickly, not necessarily be rock solid code since nothing else depends on it and we're check it's validity in the browser as we work on it. If typescript starts yelling about implicit any in the tests it will be a hit to our productivity without much gain IMO

@bonham000
Copy link
Contributor Author

I agree @iansinnott, but also, it would be convenient if we could somehow add types for the global test methods which are available in the test environment.

@bonham000 bonham000 merged commit 01d6802 into master Mar 16, 2020
@bonham000 bonham000 deleted the content/scopes branch March 16, 2020 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 content Adding or updating course content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants