hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Httpcomponents Wiki] Update of "CodingConventions" by TonyPoppleton
Date Fri, 15 Jan 2010 18:56:45 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpcomponents Wiki" for change notification.

The "CodingConventions" page has been changed by TonyPoppleton.
http://wiki.apache.org/HttpComponents/CodingConventions?action=diff&rev1=3&rev2=4

--------------------------------------------------

   * Prioritize readability of code over speed/cunning code - flag with comments when being
cunning, so others don't inadvertently break the code by not having spotted the subtlety.
"Java files are for humans, class files are for the JVM"
   * Use assert to check assumptions where appropriate, no need to assert the obvious though
as too many asserts impact readability
   * Override both hashCode() and equals() when your object will be used in a Set/Map, and
toString() is also useful
+  * TODO remove this one? The "final" keyword should be whenever a field/parameter/variable
does not change during its scope, to document the intent that it should remain unchanged,
and simply the lifecycle of the class/method for other readers of the code
   * Don't deprecate code unless there is an alternative method to use
   * Consistency, standardization and simplicity are useful rules of thumb...
  }}}

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message