-
Notifications
You must be signed in to change notification settings - Fork 275
Better sum-product factoring steps #163
Comments
Hey person reading this issue! If you're new to
|
Assuming this is still open, I'd like to work on it! 🙋 |
Ooo hi @alainakafkes thanks so much for wanting to work on this! Right now we've put a hold on changes to mathsteps because we're doing a big refactor, but Anthony ( @aliang8 ) who's heading this up can help you find a task related to the refactor to work on, if you're interested! (he's working on mathsteps as his full time job right now!) Sorry for the deceiving open issues heh, but very excited that you want to work on mathsteps! Let us know if you have any questions and hopefully we can find something else part of the refactor that you'd like to work on :) |
@alainakafkes would you like to work on the website ? |
(to give more details) The website is a demo site that will let people try out |
@evykassirer Sure, I'd be interested in that. 😄 I'm pretty new to open source – I've worked on only beginner issues in the past – so I'd definitely be down to try something more challenging! You can mention me in an issue when the codebase is ready. |
Perfect! I think there will be some less challenging things too (we'll know next week what exactly is going on, because we might cut some scope to get the refactor done sooner) and one thing we especially care about is that with all these changes we want to make sure the codebase makes sense to new people, so having you taking a look at things would be suuuper helpful! Will keep you posted ^_^ |
Hey @alainakafkes, super excited for you to join! As @evykassirer said, I am working on some refactoring tasks for the current |
Hi @alainakafkes ! Feel free to work on this change now - Socratic has decided to postpone the refactor. Are you still interested? Let me know if you need help with anything! Happy to answer any questions |
Hi @evykassirer! I'd be happy to work on this – please assign me. 😸 I'll start reviewing the code and issue more carefully and let you know what questions I have. Does Socratic do most of its open source contributor communications on GitHub or is there a Slack I should join? |
I just looked at the code. Based on my understanding, what I should do is the following:
Is this correct? |
I can't assign non-collaborators :( which annoys me, but I labeled it assigned for you!
Yes! we talk here but we also talk on gitter https://gitter.im/mathsteps-chat/Lobby you should come chat with us there :D |
You don't necessarily have to break it out into helper functions, but it feels cleaner that'd be better I think! If you do, you should make sure you return a NodeStatus object with the old and new nodes (i.e. before and after that substep - I don't think there's code yet to create the nodes for
so you'll want to build those intermediate step nodes
^ this is exactly it. Let me know if you have any questions about what those things are doing! One thing you didn't mention but that you'll want to do is pass the substeps list into the final You're definitely on the right track!! 🎉 Thanks for checking in Let me know if you have any questions about anything or if you think anything could use more documentation :) |
Hi @evykassirer! I started to write some code and wanted to check in to make sure what I'm doing is okay. Is this the right idea?
If what I'm doing makes sense, how can I update newNode? I saw this code (below) in addConstantFractions.js. I assume it's updating newNode, but I don't understand how. 😢
Also, is there any way for me to run this locally so I can see what mathsteps looks like when I make these changes? I don't want to test yet, I just want to check if what I'm doing is correct. |
yeah I think that makes sense! for getting p and q When Ahmed wrote this before, he put the comment That code from fractions makes the new node by generating a new node where the numerators were added together. Each fraction is mapped to it's numerator (fraction.args[0] is the first arg which is the numerator, fraction.args[1] would be the denominator) evaluated ( Let me know if that doesn't make sense either, it can be hard explaining these things. Excited that you're making progress!! For running it locally, I think if you made a new test that called that function and console.log'd stuff as you went, you could just let it error (if it's not ready yet) and print out what you have so far. At least, that's how I'd do it - there could be a better way |
oh another thing - you'll probably want to make new |
Ok I think I successfully created 3 substeps! 🎉 I'm trying to test them with the node 2x^2 + x - 3:
And I get this error:
Can you help me figure out what this means? Thank you in advance. ❤️ My latest commit can be found here: alainakafkes@2496462. |
oh! that's cause nodes don't have statuses :) you just wanna do yay progress 🎉 |
also linking to your code was super helpful :o thanks!! |
Yay thank you @evykassirer ! This should (lol fingers crossed) work now. I'll submit a PR and see if what I did passes all the tests. |
* Creates three substeps for factorSumProductRule * Fixes casing for all Node.Status.nodeChanged() * Removes unused const b * Adds substeps 2, 3A, and 3B in factorQuadratic * Fixes substep comments & moves BREAK_UP_TERM to factoring changegroups * Adds tests for factorSumProductRule substeps * Fixes unary minus edge case for factorSumProductRule tests * Adds optional substep for unary minus edge cases in factorSumProductRule * clarify comment such a tiny nit I didn't want to ask you to do it :p * oops line length
done with #210 thanksss @alainakafkes :D |
The function
factorSumProductRule
currently returns one step with no substeps, but it should have substeps. The substeps are outlined in the code, but just need to be formalized, given a change type etc.This should make it easier to understand for students to understand the process for what can be a complicated set of steps.
The text was updated successfully, but these errors were encountered: