Open danielnaumau opened 10 months ago
@danielnaumau I've tried to address all the points in your suggestions.
Why is that? In some cases (my comment about #7) I see that I should use exit. But I guess that it is only because my code was structured not in a proper way from the very beginning. Is it a bad practice to use exits and throws in general or is it just "not the Scala way" of writing code?
Not sure if I did this correctly. get(index)
does not seem to exist. I've refactored code for the custom decoders using lift(index)
and matched to only continue when there are valid values but I'm not sure how to handle the invalid cases. I've added some inline comments about this issue.
I've added some unit tests. I've added an additional check in the isPointInPolygon
method for the program to not crash when the polygon is empty. However i have some tests failing on edges and corners and also in the case of non conventional region (bowtie) at the intersection of two edges. I'm not sure how to address these issues. On the one hand it might be the issue with the ray casting algorithm or at least my implementation of it. On the other hand if the application is dealing with real world geographical regions and locations, in my opinion these edge cases would not be an issue because it would be highly unlikely for a location to appear exactly on an edge or a corner of a polygon.
I would appreciate a comment about how i restructured the code in main
, it seems a bit weird this way.
Thanks again for your original feedback!
Hey, sorry, I cannot give you detailed answers about that but I can write some hints
Hey, thanks a lot for taking your time and solving our task.
But we found some issues in your code which we would like you to fix: