[size=24]AdornToReduceErrors[/size]
[size=16]Context:[/size]
[size=13]You need to use named elements correctly.[/size]
[size=16]Issue(s):[/size]
[size=13]Various factors often contribute to errors in writing code. Often these are picked up by the language processor, but often they aren't. Some of these are:
- Scoping (coding block)
- Visibility (Public ... Private)
- Datatype (Integer, String, Real, Boolean...)
- Volatility (Constant, variable, WORM)
- Nature (atomic element versus structure)
[/font][/size][/color]
[size=16]Force(s):[/size]
[size=13]- limited range of mechanisms to indicate these issues
[/font][/size][/color]
[size=16]Therefore:[/size]
[size=13]Adorn the basic name to reduce errors[/size]
[size=16]Example(s):[/size]
[size=13]gsSECTION_NAME (global string constant Section Name)
moAncestorClassifier (private member object reference to Ancestor Classifier)
IsEmpty (public boolean property indicating the instance is empty)
validateSubTypeCluster (private method to validate a subtype cluster)
SetLogicalOnlyInferenceOnEntity (public method)
s_camel_cased_logical_table_persistence_caption (local string WORM variable containing the camel cased caption to be used for this logical table)
[/size]
[size=16]Discussion:[/size]
[size=13]My experience has been that with the kinds of adornments I use, I actually reduce the number of errors I make in coding. The form of the name tells you a lot about where it can be used (LV versus RV), where it came from, what it looks like or how it can be cast. Also, the adornments allow the same conceptual thing, rendered differently to have the same semantic name, but be differently adorned. I find this capability to be most useful.
Finally, language processors often can't process hardcopy very well... ;)[/size]
[size=0]©2006 Paolo Cantoni, -Semantica-[/size]