summaryrefslogtreecommitdiff
path: root/source3/CodingSuggestions
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-11-24 14:16:41 +0000
committerAndrew Tridgell <tridge@samba.org>2001-11-24 14:16:41 +0000
commitad2974cd05b4d08c8b92f505bf95aa8e8533235f (patch)
tree68ed4b1c3c99a13154fb768ba9f4bfcc1a3e7ce9 /source3/CodingSuggestions
parent0ebb29e032f2cdbfdb55184c0b97fd1f71b84609 (diff)
downloadsamba-ad2974cd05b4d08c8b92f505bf95aa8e8533235f.tar.gz
samba-ad2974cd05b4d08c8b92f505bf95aa8e8533235f.tar.bz2
samba-ad2974cd05b4d08c8b92f505bf95aa8e8533235f.zip
added "net join" command
this completes the first stage of the smbd ADS support (This used to be commit 058a5aee901e6609969ef7e1d482a720a84a4a12)
Diffstat (limited to 'source3/CodingSuggestions')
-rw-r--r--source3/CodingSuggestions17
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/CodingSuggestions b/source3/CodingSuggestions
index 60a358919a..48c51281f5 100644
--- a/source3/CodingSuggestions
+++ b/source3/CodingSuggestions
@@ -115,6 +115,23 @@ Here are some other suggestions:
comment start / ** so that they can be picked up by Doxygen, as in
this file.
+23) Keep the scope narrow. This means making functions/variables
+ static whenever possible. We don't want our namespace
+ polluted. Each module should have a minimal number of externally
+ visible functions or variables.
+
+24) Use function pointers to keep knowledge about particular pieces of
+ code isolated in one place. We don't want a particular piece of
+ functionality to be spread out across lots of places - that makes
+ for fragile, hand to maintain code. Instead, design an interface
+ and use tables containing function pointers to implement specific
+ functionality. This is particularly important for command
+ interpreters.
+
+25) Think carefully about what it will be like for someone else to add
+ to and maintain your code. If it would be hard for someone else to
+ maintain then do it another way.
+
The suggestions above are simply that, suggestions, but the information may
help in reducing the routine rework done on new code. The preceeding list
is expected to change routinely as new support routines and macros are