Uh oh!
There was an error while loading. Please reload this page.
Add ListOps exercise - #605
Conversation
d811055 to
f1a49afComparemk-mxp
commented
Jan 30, 2024
Thanks for your contribution! I'm not a maintainer, but have opinions on some of your questions.
Let students figure that out to add to the difficulty. Or reduce difficulty by providing it. Both options are OK.
Please don't. They are synced to the problem specifications. If you would like to add PHP specific instructions (like the tasks you suggested), you can add
I suggest to generally suppress warnings by adding
I would recommend doing so. Or better: Reformat
I see it as hard. The track has no (I haven't seen any, yet) |
cee862e to
c0b5270Comparehomersimpsons
commented
Jan 30, 2024
Thank you for your feedback @mk-mxp !
Okay, I added it so it should be easier to learn things thanks to this exercise.
Okay, I did add a file to explain "callable". I don't intend on adding tasks for now at least.
I think you approach is right. I will let it for another Pull Request.
Okay, I put it at |
Just thinking @mk-mxp, maybe I can just remove the class thing and have the methods in the global scope, that would make the exercise way easier. Edit: I just removed the static. I saw that nealy all of the exercise have their functions embeded in a class. |
homersimpsons
commented
Feb 15, 2024
list-ops is the next week exercise, does anyone have time to review this ? I can merge it, but I would prefer a review before as this is the first time I contribute a full exercise. Once this is merged I will most likely address all the remaining exercises from 48in24 for the php track. |
mk-mxp
commented
Feb 15, 2024
@homersimpsons We will get that merged in time. I think I need too long to get #591 merged. Could you add I'll look at your code again this weekend. If I remember correctly there were no show stoppers in it. |
4b3f257 to
6768414Comparehomersimpsons
commented
Feb 15, 2024
done |
mk-mxp
left a comment
There was a problem hiding this comment.
If you do not want to change the exercise as suggested, I'm OK with merging it as is. Just tell me your choice.
Thanks for contributing!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| /** | ||
| * @testdox append entries to a list and return the new list -> empty lists |
There was a problem hiding this comment.
I love this! It looks even better with a capital letter at the beginning of the sentence. And I suggest adding the UUID of the test case, like here:
| * @testdox append entries to a list and return the newlist -> empty lists | |
| * @testdox Append entries to a list and return the newlist -> empty lists | |
| * uuid: 485b9452-bf94-40f7-a3db-c3cf4850066a |
There was a problem hiding this comment.
I just copy-pasted those from the JavaScipt track.
The @testdox matches the description in the tests.toml file, do you think I should still diverge from this description and use a capital letter ?
There was a problem hiding this comment.
The description in the problem spec is written to be used like sprintf('It %s', $description). We have no testing framework, that does so (like jest in JavaScript or TypeScript). That's why I think, we should adjust it to our needs. It looks a bit misplaced in the online editor when not Capitalised. Try it in Lucky Numbers vs. City Office, for example. Open the successful test result and see the difference.
There was a problem hiding this comment.
The description in the problem spec is written to be used like
sprintf('It %s', $description).
So maybe we should update this is the test runner instead ? So we can keep this consistent with the toml.
Or you prefer we do this on a test by test basis ?
We have no testing framework, that does so (like jest in JavaScript or TypeScript)
https://pestphp.com/ does this, but I personally prefer PHPUnit. (pest is using phpunit under the hood).
There was a problem hiding this comment.
I prefer having that in the test. Because this makes PHPUnit output the testdox nicely on the command line when working with the CLI.
I put some hope onto tomasnorre's test generator to take care of that. But for now, I would be happy if you do it. I will merge with or without capitals...
homersimpsons
commented
Feb 17, 2024
Note that the job "Configlet Generate / configlet-generate (pull_request)" is failing because it is trngi to pull the branch from this repository instead of from my fork ... |
mk-mxp
commented
Feb 17, 2024
I need to investigate, what |
This will ease the exercise a bit.
84f5f48 to
77e641bComparemk-mxp
commented
Feb 17, 2024
@homersimpsons So you have been faster than me typing...anyways, the problem was: Your local branch |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9bf93af to
69affc2Comparemk-mxp
commented
Feb 17, 2024
Thanks for contributing! Very nice work... |
This is the first time I add an exercise. I followed the walkthrough at https://exercism.org/docs/building/tracks/practice-exercises.
Do not hesitate to tell me if anything is wrong. I may try to implement other exercises so better be right from the beginning.
Some notes:
example.phpI tried to follow the instructions (not using std's functions), so maybe I could also put it as exemplar (with some added phpdoc)filter,map,foldlandfoldr? => Added to ease completion of the exercise@testdoxcomments, how should I go to fix them ? => I do not think it is relevant to fix them hereconfig.jsonshould I revert it to only add the relevant part forlist-ops? => I kept the diff as small as possible here@neenjaw I put you as a reviewer as it looks like you are the maintainer for the exercises.