SumOfMultiples: Add to Track - #179
Conversation
- This code is the solution for the un-implemented Sum of Multiple problem. - Includes Test File which checks each test case indicated here: https://github.com/exercism/x-common/blob/master/exercises/sum-of-multip les/canonical-data.json
-Solution to the Sum of Multiples problem. -Includes test cases mentioned here: https://github.com/exercism/x-common/blob/master/exercises/sum-of-multip les/canonical-data.json
Eliminated extra spaces
Eliminated Trailing Spaces
|
@ProgrammingFuad thanks for your contribution! I'd be happy to help you resolve the issues with this pull request. For starters, if you look at the output of the CI, line And yes, you're right to bring up the question of naming the tests-- we would like the tests to have names that indicate what is being tested, because these names provide guidance for the users when they're working on their solutions. To get this pull request ready for prime time, I would say we need to achieve the following:
Please feel free to hit me up with any questions! |
- Fixed my weird white spacing - Added a blank file for implementation - Added @ignore after First Test Case, I thought that would be good practice - Removed unused library util.Scanner from my first implementation - Removed print statement -Added Exercise to the config.json File
|
Alright I am ready for some help making a single Pull Request! I tried my own attempt at it and have obviously failed (Check above, you will notice I made a reference to my previous pull and posted here yet again). I have made all requested changed to the best of my ability. Please let me know if there is anything else I can correct! thank you for your input I appreciate it. |
|
OK Fuad, Nice work so far! I especially appreciate the fact that you've annotated all but the first test with I do think the new test names are an improvement, but I think there's one more change that should be made. It would be nice to have the factors mentioned when they are specified since they are not outputted by the test runner in a visible way, EG, from the Ecmascript suite: In Java this could be written as: Also note the formatting in the above test method. Try this site for an easy tool that will clean up your whitespace for you: http://codebeautify.org/javaviewer As far as getting everything into one commit: It looks to me like you've created a new branch with your changes. You can merge that branch back into this one, and then I can show you how to squash them in to one commit. First do this: The above commands will merge the changes from your latest branch If you could start by updating the test names as above, and merging your new branch back into this one, I can then show you how to combine everything into one commit. Cheers! |
-Fixed White space by copy pasting code and clicking Beautify on this site: http://codebeautify.org/javaviewer -Modified names for Test Cases as suggested—> now includes numbers being tested along with max number in method call.
|
Alright Mr. Mathew Im gonna let you know right now that I've learned a valuable lesson. On the bright side I somehow managed to merge my new branch "programFuad" with the changes you listed above. Im Sorry! How should we continue from here? |
|
Hi Fuad, No worries about the number of commits. They're cheap! We'll get this just right and consolidate the commits after that. Taking a closer look at your folder structure there are a few things still to be changed:
Please let me know if you have any difficulty or questions, and when this is done I'll take another look. Thanks! |
|
Alrighty. Im getting excited just thinking about asking this. Are we ready to commit??!?! P.S. All checks have finally passed. |
|
Nice job Fuad! 🎆 So, you've cleaned up the code, the test names, and your folder structure, and you're passing the CI journey test. The final step is to consolidate your commits to one commit. This is going to be a bit tricky because of the commit history on this PR, but here's how I suggest we proceed. By the way, if this is something you'd rather not take on, I'm happy to do this final step for you. First you need to remove a couple of commits that are not related to your PR: This will open an editor that should let you remove two lines: Check your git log, and you should see something like this: now you can do the final step, which is to consolidate all your comits to one: You should now have everything in one commit. My suggestion-- if you have any trouble with this, or feel uncomfortable doing it, just ask and I can do it for you. You might want to make a copy of your entire If you are successful, your git log should look like this: Of course, the top line will show a commit by YOU, not ME :) Once things are in the state where you have just one commit, you will need to force push the new commit to your branch: Please don't do the above step if you're not confident that you have correctly consolidated your commits. Just ask for help, I'm happy to do it! |
|
I've just been glazing over my Github Desktop Application trying to figure this out. Im sorry Mathew I dont want to make another mistake and cause more work haha! Thank you for your thorough explanation. Please consolidate the pull request for me. I'm definitely switching to the command Line version after this crash and burn Github experience. |
|
OK Fuad, I've consolidated the commits and merged them to master! The bad news is that it means I will need to close this PR since Github doesn't recognize that the change has been merged (because the commit history has been altered from the history on the PR.) The good news is that your commit shows up in the history for this track! Nice work, we appreciate your contribution! |
I have written a solution to the Sum of Multiples problem described here:
https://github.com/exercism/x-common/blob/master/exercises/sum-of-multiples/description.md
First Commit and I am super pumped!
I've tested extensively and used all tests cases listed here:
https://github.com/exercism/x-common/blob/master/exercises/sum-of-multiples/canonical-data.json
A few questions I have are:
1.What is the convention for naming test cases? This is my first time J-unit testing, so I want to make sure Im doing it "right". I couldn't figure out what to name my methods for the the test case besides test1, test2, test3, etc.. so is there a correct naming convention I should be using?
Is my file/folder structure correct? I've tested everything to the best of my ability and tried to mimic the file structure from the Hello-World exercise. I copy pasted the gradle doc as well, which I am feeling iffy about.
Continuous Integration is spitting on a message saying "All checks have failed". Whats going on?
Im super excited to hear your response!
Thanks.