Re: Short or long variable names?
From: "William A. Rowe, Jr." let me get ahold of my life first I see you doing so much, what life? More later Jeff
Re: Short or long variable names?
At 01:02 PM 11/22/2004, Jeff White wrote: >From: "William A. Rowe, Jr." > >>One (extreme) hassle is leaving the httpd code legible to httpd'ers >>and leaving .NET code legible to .NET'ers. >>I had chosen the conventions of using 'traditional' variable names for httpd >>datum, and 'wordy' variable names for the internals of >>Apache.Web. > >In Apache.Web all data is visible > >In Apache even the short rr and rv really do mean something but what? request_rec and (apr_status_t) return value, by convention. likewise, bb for bucket brigade, etc. >It wasn't a nice practice to start and now >one can see why. :) >In mod_aspdotnet and all assemblies >one should use reader readable variables. >Much easier for the old "httpd'ers" to read mod_aspdotnet with descriptive >variables, than for .NET user usage to say what I'd like to make clear the distinctions. What if we adopt a more long-hand, lowercase, _ seperated convention for httpd variables? e.g. this_bucket_brigade instead of bb, this_request_rec instead of rr. Note that httpd did blow it occasionally on namespace protection; request_rec is the structure declaration that should have been named something like ap_request_rec_t. >Mod_aspdotnet and the assemblies are only written once, but read over and >over again.. > >>There are quite a few cases where the variable name (e.g. static 'conf' >>structure in the mod_aspdotnet.cpp source) is horrid and >>needs to be cleaned up. >>I'm almost thinking, native_xx for variable names from apache >>and apr - would that improve legibility? > >I'm not sure one needs native_ but >definitely not rr, rv, abc, and so on >By the way is there an .NET enum >for loglevel? No - however that would be the sort of thing we would roll into the native Apache.Web interface classes :) Reminds me we really should get on that - let me get ahold of my life first and finish ushering mod_aspdotnet out the door, before we attack mod_net (or whatever it's called.) I actually have a week free, sans children, during the December holiday. Any suggestions on the native Apache.Web class and httpd module names? This is the 'close to the bone' module I've been kicking around, mod_perl-like. Bill
Re: Short or long variable names?
From: "William A. Rowe, Jr." One (extreme) hassle is leaving the httpd code legible to httpd'ers and leaving .NET code legible to .NET'ers. I had chosen the conventions of using 'traditional' variable names for httpd datum, and 'wordy' variable names for the internals of Apache.Web. In Apache.Web all data is visible In Apache even the short rr and rv really do mean something but what? It wasn't a nice practice to start and now one can see why. In mod_aspdotnet and all assemblies one should use reader readable variables. Much easier for the old "httpd'ers" to read mod_aspdotnet with descriptive variables, than for .NET user usage to say what Mod_aspdotnet and the assemblies are only written once, but read over and over again.. There are quite a few cases where the variable name (e.g. static 'conf' structure in the mod_aspdotnet.cpp source) is horrid and needs to be cleaned up. I'm almost thinking, native_xx for variable names from apache and apr - would that improve legibility? I'm not sure one needs native_ but definitely not rr, rv, abc, and so on Compare Parameter name = rv Type=System.Int32 Position=2 Optional=False to Parameter name = loglevel Type=System.Int32 Position=1 Optional=False By the way is there an .NET enum for loglevel? Jeff
Re: Short or long variable names?
One (extreme) hassle is leaving the httpd code legible to httpd'ers and leaving .NET code legible to .NET'ers. I had chosen the conventions of using 'traditional' variable names for httpd datum, and 'wordy' variable names for the internals of Apache.Web. There are quite a few cases where the variable name (e.g. static 'conf' structure in the mod_aspdotnet.cpp source) is horrid and needs to be cleaned up. I'm almost thinking, native_xx for variable names from apache and apr - would that improve legibility? Bill At 03:01 PM 11/18/2004, Jeff White wrote: >When looking at Apache.Web member's parameters: > >Parameter name = rr > Type=Apache.Native.request_rec* > Position=3 > Optional=False > >Here rr I assume means request_rec >which I assume means request_record (but just because of the type defined: >Type=Apache.Native.request_rec*). > >But for others: > >Parameter name = rv > Type=System.Int32 > Position=2 > Optional=False > >What does rv mean? > >ReturnValue, RequiredValue, >RequestedValue, RemovableVolume, >RottenVersion, RequiredValidation? > >So should _all_ Apache.Web variables be longer than "rr"? > >So the user can obtain from .NET what they mean like the below? > >Parameter name = msg > Type=System.String > Position=0 > Optional=False > >Message I assume, perhaps should be longer > >Parameter name = loglevel > Type=System.Int32 > Position=1 > Optional=False > >Some sort of Apache (or .NET) >log file level or value, I assume... > >At least, these two above examples give a user a chance to try to use them, >but rr and rv? > >Jeff
Short or long variable names?
When looking at Apache.Web member's parameters: Parameter name = rr Type=Apache.Native.request_rec* Position=3 Optional=False Here rr I assume means request_rec which I assume means request_record (but just because of the type defined: Type=Apache.Native.request_rec*). But for others: Parameter name = rv Type=System.Int32 Position=2 Optional=False What does rv mean? ReturnValue, RequiredValue, RequestedValue, RemovableVolume, RottenVersion, RequiredValidation? So should _all_ Apache.Web variables be longer than "rr"? So the user can obtain from .NET what they mean like the below? Parameter name = msg Type=System.String Position=0 Optional=False Message I assume, perhaps should be longer Parameter name = loglevel Type=System.Int32 Position=1 Optional=False Some sort of Apache (or .NET) log file level or value, I assume... At least, these two above examples give a user a chance to try to use them, but rr and rv? Jeff