[tor-bugs] #18733 [Metrics/CollecTor]: contributor's guide incl. coding guidelines for java projects
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri May 13 09:55:49 UTC 2016
#18733: contributor's guide incl. coding guidelines for java projects
-------------------------------+--------------------------
Reporter: iwakeh | Owner: iwakeh
Type: task | Status: assigned
Priority: Medium | Milestone:
Component: Metrics/CollecTor | Version:
Severity: Normal | Resolution:
Keywords: ctip | Actual Points:
Parent ID: #18730 | Points:
Reviewer: | Sponsor:
-------------------------------+--------------------------
Comment (by karsten):
Actually, if `p()` would use `o()`, then `o()` would be the lower-level
function and should go after `p()`.
But going back to the example where `p()` does not use `o()`, I think we
can both live with the suggested ordering. That would be "depth-first",
because we're first explaining `n()` in full detail and then heading over
to explain `p()`. Works for me.
Another thing that I mentioned above: "And also just to be sure,
attributes would go above all methods in this scheme, not above (or even
below) methods where they're first used?" I wonder if that was a smart
suggestion. In a long class there would be quite some distance between
delcaration and usage of an attribute. How about we do the opposite of my
earlier suggestion and move attributes immediately above methods where
they're first used? For members set in constructors that would be at the
top of the class, but for attributes used by certain methods only, that
would be closer to their usage.
By the way, should I attempt to reorder attributes and methods in
CollecTor's relay descs module? I expect that to produce huge diffs, so
you shouldn't have any unmerged branches while I'm working on those
changes. Is some time this weekend a good time, or is next week better?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18733#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list