You are viewing a single comment's thread from:

RE: Minecolonies & The Sifter

in #utopian-io6 years ago

Thank you for your contribution. Nice work and the code looks clean in general.

  1. In here I don't see NumberFormatException should be thrown? Can you handle the exception instead without catch? the `catch in for loop in general has a performance hit.
  2. In here have you considered the case when indexOf returns -1?
  3. Can you move this outside the loop?
  4. Could the probablySum be accumulated to be more than 1?
  5. I understand in here you are parsing the string for probability, but may be better to re-structured this as a key value pair to speed up the performance.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Sort:  

Thanks for reviewing my code.
1: Integer.parseInt here will throw it.
2 and 3: I think either chrome plays with me or the two links are the same as 1.
4: Yes when someone sets the config values wrong.
5: I wanted to take one which has the guaranteed indexes since I need to retrieve the mesh by index.

Thank you for your review, @justyy! Keep up the good work!