Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
@ytorn I agree with you. From where I'm standing, there are only 3 few possible options:
@jsalinasf, I have faced exactly the same thing, and this is the main question - how to fixed something that is not visible. No errors, no timeout, nothing. Just half of tests is correct, another half is not and you can't discover what's wrong
Thank you all for taking the time to answer my question. @ytorn is correct, I can't use console.log() because of large size data. Just to clarify, I'm not receiving a timeout, the tests complete on time but the array Im returning is not equal to the expected one. I tried to login games, Rank, Team, For, etc but the only thing Im receiving is "expected [ Array(#) ] to deeply equal [ Array(#) ]". That's why I was wondering if maybe some good sould have a large dataset to test my code :)
Thanks for clarification!
Do you get a timeout? Then you may need to optimize your code. Otherwise I tried to debug my code by printing the table with
Rank, Team, For, Against, GD, Points
like in the description. Maybe this could be helpful.The output should be an array of ranks for each team, not an array of teams for each rank. So the array
[4, 4, 6, 3, 1, 2]
means that the rank of Team 0 is 4, the rank of Team 1 is also 4, ..., the rank of Team 5 is 2.A team, which has not played yet, got 0 points, 0 goals scored and 0 goals conceded. But with these stats the team can still be ranked.
You cant debug with console.log() because of large size of data. I can't see neither input data (games), it looks like "... 422534 more items ]", nor output "expected [ Array(978) ] to deeply equal [ Array(978) ]". Any thoughts how to solve this if you even don't know where the problem is hidden? As it was said above, all smaller tests are passed successfully.
What the error message of the failed test? Btw, when 'big' tests are failing, I try to debug the code with console.log() for example. I hope this can help you to investigate the issue in your code.
My code has passed all of the sample tests but it is failing for the bigger ones. Could you please provide me any suggestions on what to look for? what kinda situations may not be present on the tests cases that are being tested on the bigger cases? By any chance, would you have any big test case that you could share with us? Thank you!
It will never stop amazing me how far I am of thinking about all of the many possibilities that Test Cases evaluate... It took me a while to figure this one out
@Blind4Basics I lost like 4 to 6 points (not exactly sure). Maybe I was downvoted somewhere as @GiacomoSorbi told me. I'll be paying attention to my honor metric and if somethig weird happens again I'll certanily open a report on the github repo. Thank you everyone!
doesn't seem to be the case, tho.
@jsalinasf: how much did you loose? if it's one or 2 points, might be a satisfaction vote (after you completed a kata) that has been removed accidentally (sometimes, when you click at the wong place in the page, that can remove your vote). If more, might be worth of reporting on the github repo.
I believe you get more info only as a paying user; being downvoted is the most likely source of negative honour.
build your own tests to screen through all small numbers (like from 0 to 10000) and search for the faulty cases comparing your result with usual arithmetic. Unless you hardcoded somehting (like carryies not handled so that it can propagate on long "distance"), you should spot the edge case not matter what it is.
Note: I hope you didn't use any conversion string->numbers...? because for big numbers, the conversion in JS will be subject to loss of precision (since even integers are actually floats, in JS...)
My solution is working for about 80% of the test cases but fails for some of the "bigger boys" test cases. After analyzing a little bit further, it seems that my solution fails when it comes to strings with more than 150 characters which makes debugging extremly loooong! I usually use VS Code debugging with a NodeJS environment, and then Ill add variables to the watch section, breakpoints and stepping into the code parts Im interested in reviewing - Sadly this approach is not feasible for the test cases I'm failing.
Could you please provide me some tips on could I speed up the debugging a little bit? Maybe another approach?
Loading more items...