i think one question i've been thinking about for quite awhile but somehow never materialised in my head to ask is - how long are your procedures?
this seems to be a big party question again! woo hoo!! and EVERYONE is welcome!! (we'll keep this open so that anyone delayed by sun spot activity, extraterrestrial aberrations and wardrobe malfunctions won't miss out ok? haha = ))) !!! )
for me, cause i'm using vbWatchDog and it basically has try catch finally blocks AND MOST IMPORTANTLY!!! --> it has an unwind - which lets me get out of any procedure stack with 1 line of code (exits the stack by running the Finally block of the stack's top procedure then popping it off and going to the one below it until there are none left),
i love to use really short procedures. like maybe 20 lines? 40 lines? something like that - but my main concept is:
each procedure is a sentence.
then there are the paragraph procedures which are just all the sentence procedures in order.
then section procedures which are just all the paragraph procedures in order.
so as you can see i have a leaning tower of pisa haha - JUST THAT! hopefuly it doesn't lean cause i've got vbWatchDog already!! --> ok let's just assume it doesn't lean for this discussion ok? so far in all my crazy haphazard but hopefully still with very strict strcuture development, it HASN'T leaned yet! kudos to Wayne Phillips for that! = ))
so as you can see as well, i do a LOT of refactoring. not just for reuseability sake, but simply for me to read my code better. i admitted do have superbly long procedures as well - BUT that's only because i don't have the time to chop chop chop it into sliced pork chop!! haha = )) (caveat some procedures belong all together so i leave them together = )) )
so for me refactoring is done for two things:
and i DO use comments for really stupid / silly things like even 1 liner codes - why? cause firstly, the green colour coding switches my mind into a different planar mode - ok i'm just reading the green things now. secondly it's in human language so i'm only using my human language compiler not my VBA semantics compiler = ) BUT --> then again at best i only have 1/16th the intellectual power yall have SO! this suits me haha = PP
do yall use long procedures guys? = ))