Will Berkeley has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13498 )

Change subject: [java] Micro-improvements to DataGenerator
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/13498/2/java/kudu-client/src/main/java/org/apache/kudu/util/DataGenerator.java
File java/kudu-client/src/main/java/org/apache/kudu/util/DataGenerator.java:

http://gerrit.cloudera.org:8080/#/c/13498/2/java/kudu-client/src/main/java/org/apache/kudu/util/DataGenerator.java@85
PS2, Line 85:         continue;
> Really curious about the motivation for this.
The following two general principles of readable code:
1. Minimize the amount of indentation, because each level of indentation is 
usually another level of control flow to keep in mind.
2. Early return (or break or continue) is good because it allows the reader to 
eliminate cases from consideration in the rest of the function or block.

Also, I didn't actually mean to submit this patch. I just made this change to 
help me understand this code better, and then forgot to undo it when submitting 
the follow-up.



--
To view, visit http://gerrit.cloudera.org:8080/13498
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I78eca7c6a4d8e0f52fe646a4157774b9123c8a4a
Gerrit-Change-Number: 13498
Gerrit-PatchSet: 2
Gerrit-Owner: Will Berkeley <wdberke...@gmail.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Grant Henke <granthe...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com>
Gerrit-Comment-Date: Mon, 03 Jun 2019 16:44:17 +0000
Gerrit-HasComments: Yes

Reply via email to