@Peter:
Thank you for the clarification. I sometimes get very caught up on "best 
practices" and the nitty gritty of the semantics in order to help myself 
follow a routine when learning new tech; it's like focusing a laser. In one 
way, it's great, because once I have that mindset, I'm adhered to it; but 
in other ways it can be bad, in that if I expect a certain methodology and 
that is not seeing enough of the scope of the "big picture", then I lose a 
lot of the implied meaning from being too focused.  I will attempt to be 
more pragmatic and not to be as strict; there is value in simple coding 
practices that I should not overlook.

@zladuric:
1. KISS. Got it. I'll try not to overthink and look for the best, pragmatic 
and simple approach rather than the most convoluted. I don't want to build 
the octopus where one arm reaches to another to another to another. Check.
2. Use of closures. That makes sense in retrospect. I can have functions 
return functions which encapsulate their scope's state when they are 
defined and returned in order for them to have a defined scope of 
reference.Got it.

I like your structured approach. Bring in the function through modularity 
and the attach via creation of references. Kind of a lateral inclusion 
rather than multiple nesting.

I actually tried your approach, and it worked on the first shot. Closures 
were something that originally took me a moment to understand, but once I 
did, I realized how powerful they were; like miniature enclosed 
environments. I really appreciate you giving a second pair of eyes on the 
problem and offering this different approach; it has definitely gotten me 
out of this "code block". I need to sometimes step back and take a look at 
approaching the problem from another direction.

Much appreciated.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/34b03040-cae5-40bf-85e1-8f7283e80089%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to