directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ole Ersoy (JIRA)" <directory-...@incubator.apache.org>
Subject [jira] Created: (DIR-209) Convention for Naming Constants
Date Sat, 14 Apr 2007 23:36:15 GMT
Convention for Naming Constants
-------------------------------

                 Key: DIR-209
                 URL: https://issues.apache.org/jira/browse/DIR-209
             Project: Directory
          Issue Type: Task
          Components: miscellaneous
            Reporter: Ole Ersoy
         Assigned To: Ole Ersoy
            Priority: Minor


Our code would be much easier to read if we agree to use a set of conventions for naming constants.

Here's an example:

String TOP_ATTRIBUTE_TYPE_NAME = "top";
String CN_ATTRIBUTE_TYPE_NAME = "cn";

As a general convention we should always spell out
fully what something is (With a few exceptions for things like DIT,
etc. that are really well defined within their Conceptual Domain, and
would make the constant string really long.

Right now we have things like:
M_OID_AT
MR_OID
etc.

And I can guess what these mean fairly easily, but as we
add more and more, this just adds to the cognitive load
of understanding the code base, and ultimately slows development,
especially for newcomers.

Cheers,
- Ole



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message