Posted on: 5/27/2014 2:28:40 AM | Views : 385

Hi everybody,
in terms of coding I am a beginner. Most of the things I have written in computer language were some scripts based on VBscript and recently with Powershell.
I have a general question.
I have a function to handle a specific task. Within this function I have some more or less redudant operations. I am struggling if I should better put them into a new function and work with the return values in the function again. The redundant operations I am talking about are just a 2-3 lines of code.
 
Example:
Present code:
Function DoIt { get information for A, B, C get detailed information for A get detailed information for B get detailed information for C combine detailed information and draw conclusion return conclusion } Or should it be better:
Function DoIt { get information for A, B, C resultA = helpfunction-getd ...

Go to the complete details ...