gmp26 / Apps1

An incubator for math ed apps based on AngularJS
http://nrich.maths.org/probabilityApps
MIT License
7 stars 2 forks source link

New questions needed #16

Closed gmp26 closed 11 years ago

gmp26 commented 11 years ago

@vrn20 is posting them in the CMEP-site repo. Copied here:

New Mathmo questions

It would be very nice if the following questions could be added to Mathmo. Perhaps they can be deleted from this list when they've been added.

I'm writing ... to mean something that the computer should generate at random; I hope that it will be clear what I have in mind.

alexwlchan commented 11 years ago

Question 1 was added in pull request #20, and questions 2-5 are in pull request #21.

gmp26 commented 11 years ago

Many thanks Alex, looking good. You are saving me so much time!

M

A couple of things to look at:

:040000 040000 1bc82fe150e867330df2c4784c717e376a4646ac 0212f222cba6e462cbfcd85e6136392b544797e4 M src

So my guess is that the dependency has to be added in the require config for the unmasked app.

Secondly - this one's mine - I notice that if the answer to a question is showing, and you press 'next' pr 'prev' then the answer to those questions shows too. I think it should revert to hidden when the question changes.

On 9 Jul 2013, at 14:21, Alex Chan wrote:

Question 1 was added in #20 , and questions 2-5 are in #21 .

— Reply to this email directly or view it on GitHub.

Mike Pearson +44 (0)1223 764244 +44 (0)7742 6418207 MMP, Centre for Mathematical Sciences, Cambridge CB3 0WA

alexwlchan commented 11 years ago

On 9 Jul 2013, at 14:56, Mike Pearson notifications@github.com wrote:

  • Latest merge broke the grunt unmask mode. […]

So my guess is that the dependency has to be added in the require config for the unmasked app.

Yep, I’d added it to the main config.ls but not to the version in pubs/mathmo. This should be fixed in commit 992c319, which I’ve just filed a pull request for.

Secondly - this one's mine - I notice that if the answer to a question is showing, and you press 'next' pr 'prev' then the answer to those questions shows too. I think it should revert to hidden when the question changes.

Probably a good suggestion. It’s useful to have the Q/A both showing when I’m debugging questions, but I can keep the change out of my working tree to keep my life easier.

gmp26 commented 11 years ago

Must be something else missing there. I'm now seeing a couple of js errors in Chrome.

Uncaught Error: Invalid require call

http://requirejs.org/docs/errors.html#requireargs require.js:1758 Uncaught Error: Load timeout for modules: pubs/mathmo/controllers/mathmoController,pubs/mathmo/directives/mathmoPlot,pubs/mathmo/services/config,libs/qa/problems,libs/qa/geometry

http://requirejs.org/docs/errors.html#timeout require.js:1758

M

On 9 Jul 2013, at 15:15, Alex Chan wrote:

On 9 Jul 2013, at 14:56, Mike Pearson notifications@github.com wrote:

  • Latest merge broke the grunt unmask mode. […]

So my guess is that the dependency has to be added in the require config for the unmasked app.

Yep, I’d added it to the main config.ls but not to the version in pubs/mathmo. This should be fixed in commit 992c319, which I’ve just filed a pull request for.

Secondly - this one's mine - I notice that if the answer to a question is showing, and you press 'next' pr 'prev' then the answer to those questions shows too. I think it should revert to hidden when the question changes.

Probably a good suggestion. It’s useful to have the Q/A both showing when I’m debugging questions, but I can keep the change out of my working tree to keep my life easier.

— Alex — Reply to this email directly or view it on GitHub.

Mike Pearson +44 (0)1223 764244 +44 (0)7742 6418207 MMP, Centre for Mathematical Sciences, Cambridge CB3 0WA

alexwlchan commented 11 years ago

On 9 Jul 2013, at 15:28, Mike Pearson notifications@github.com wrote:

Must be something else missing there. I'm now seeing a couple of js errors in Chrome.

Hmm. I didn’t catch anything when I tested it just now, but I’ll have another look.

I’m also halfway through the final question from Vicky.

alexwlchan commented 11 years ago

Okay, I found the error and I think I’ve fixed it.

I was only calling helpers as a dependency for geometry.js, but apparently it wants seedrandom as well. Fixed it in both copies of main.ls, and the error seems to have disappeared.

Pull request shortly.

alexwlchan commented 11 years ago

Brief notes after today’s work:

All but the final question on the original list have been written and are in the master branch. The final question still needs me to write the maths for the circle/circle case and implement appropriately, and I still need to find a good way to print the answers.

Specifically, I have numbers of the form (a+b root(c))/d for integers a,b,c,d, and I need a good way to print them neatly. My current bugbears are b=+/-1 (where I don’t want the 1 showing), and the cases a=0 or b=0. This will probably be useful elsewhere, so I may define an appropriate helper utility. Catching the cases where the answers are rational or (!) integer should then just be a bunch of messy if statements.

gmp26 commented 11 years ago

Thanks Alex, I was still finding a few problems with the latest pull as I left - some js errors showing in the chrome console - but I'm sure you'll get to them - may well be related to the WIP below as it was an undefined 'e' var if I remember rightly.

M

Mike Pearson +44 (0)1223 764244 +44 (0)7752 562977 Millennium Mathematics Project, Centre for Mathematical Sciences, University of Cambridge Cambridge CB3 0WA

On 9 Jul 2013, at 21:36, Alex Chan wrote:

Brief notes after today’s work:

All but the final question on the original list have been written and are in the master branch. The final question still needs me to write the maths for the circle/circle case and implement appropriately, and I still need to find a good way to print the answers.

Specifically, I have numbers of the form (a+b root(c))/d for integers a,b,c,d, and I need a good way to print them neatly. My current bugbears are b=+/-1 (where I don’t want the 1 showing), and the cases a=0 or b=0. This will probably be useful elsewhere, so I may define an appropriate helper utility.

— Reply to this email directly or view it on GitHub.

alexwlchan commented 11 years ago

On 9 Jul 2013, at 23:21, Mike Pearson notifications@github.com wrote:

Thanks Alex, I was still finding a few problems with the latest pull as I left - some js errors showing in the chrome console - but I'm sure you'll get to them - may well be related to the WIP below as it was an undefined 'e' var if I remember rightly.

An undefined “e” var sounds right. I had a bunch of them floating around yesterday, and I thought I’d caught them all. Perhaps not; I’ll check it tomorrow.

alexwlchan commented 11 years ago

This issue should be closed by pull request 24. I’ll leave it open until the pull request has been merged, and in case any other problems crop up, but if not I think this is done.

alexwlchan commented 11 years ago

Did we catch all of the bugs in this on Wednesday? If so, then I’ll close the issue.

gmp26 commented 11 years ago

I've not seen any new ones. I suppose we should really have extended our unit tests to include the cases that were managing to get round them, but go ahead and close. Vicky may have further input on them this morning.

Mike Pearson +44 (0)1223 764244 +44 (0)7752 562977 Millennium Mathematics Project, Centre for Mathematical Sciences, University of Cambridge Cambridge CB3 0WA

On 15 Jul 2013, at 09:17, Alex Chan notifications@github.com wrote:

Did we catch all of the bugs in this on Wednesday? If so, then I’ll close the issue.

— Reply to this email directly or view it on GitHub.

alexwlchan commented 11 years ago

It’s a nice-to-have which I’ll add to the laundry list, but I’ll close this issue as functionally finished.