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

refactor: restructure episode 3 #625

Closed

Conversation

yld-weng
Copy link

@yld-weng yld-weng commented Apr 6, 2023

Move sections Types control what operations (or methods) can be performed on a given value and Must convert numbers to strings or vice versa when operating on them. together as they are both focus on operations between different types.

Close #600.

@alee
Copy link
Member

alee commented Apr 7, 2023

Thank you for the PR! Though I'm sorry to say that after taking a closer look at the episode with the rearranged key points / sections I'm not convinced this is actually an improvement, despite encouraging people to take a closer look in #600

For clarity, this PR and changeset makes the sections and corresponding key points go follow this thread:

  • Every value has a type.
  • Use the built-in function type to find the type of a value.
  • Strings can be added and multiplied.
  • Strings have a length (but numbers don’t).
  • Can mix integers and floats freely in operations.
  • Variables only change value when something is assigned to them.
  • Types control what operations can be done on values.
  • Must convert numbers to strings or vice versa when operating on them.

The original:

  • Every value has a type.
  • Use the built-in function type to find the type of a value.
  • Types control what operations can be done on values. then we follow up with the kinds of operations types enable
  • Strings can be added and multiplied.
  • Strings have a length (but numbers don’t).
  • Must convert numbers to strings or vice versa when operating on them. start to delve into type coercion
  • Can mix integers and floats freely in operations. continue type coercion
  • Variables only change value when something is assigned to them. this does seem a bit out of the blue and starts to scratch the surface of references, mutation, and variable assignment semantics but also seems an important concept to convey to learners

I feel like the original's ordering works fine but am open to thoughts from others who have taken the course or taught the course. Thoughts?

@yld-weng
Copy link
Author

Thanks for the review, I'll close this PR for now

@yld-weng yld-weng closed this Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restructure the episode 3 - Data Types and Type Conversion
2 participants