[tor-bugs] #18733 [Metrics/CollecTor]: contributor's guide incl. coding guidelines for java projects

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed May 4 19:05:21 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 iwakeh):

 Replying to [comment:5 karsten]:
 > I think I agree with that ordering, but let me give an example and hear
 from you whether that's what you had in mind:
 >
 > {{{
 > class A {
 >   int a;
 >   int b;
 >   void m() {
 >     n();
 >     p();
 >   }
 >   void n() {
 >     o();
 >   }
 >   void o() {}
 >   void p() {}
 > }
 > }}}
 >
 > Your preference is to put `o()` above of `p()`, because `o()` is the
 lower-level function that gets called in `n()`?  Hmm, or would `p()` go
 first, because it's a lower-level function called in `m()`?
 >
 That is a tricky question :-)
 but the solution listed above looks ok.
 Imagine, we're reading source code (on a remote server using) `less` or
 similar:
  When reading `m()` and then trying to find out what `n()` does, it'll be
 good to have `o()` immediately below `n()`.
  Whereas, when we want to find out what `p()` is about we scroll down and
 read `p()`'s declaration.
  Even if `p()` would use `o()`, too, that's ok, b/c we scrolled by `o()`'s
 declaration already, or read it while finding out about `n()`.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18733#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list