5 ms·
Snippet library is called code duplication which isn't nice.
by solomatov 12y ago
Snippet library is called code duplication which isn't nice.
- davismwfl 12y agoIn addition/clarification to my other point, sometimes snippets are as simple as an AJAX post with proper error handling already coded, but in which the details of the specific call still have to be filled out. This just saves time, and means I get to stay focused on solving real issues and not recalling the details of an AJAX post error handling issue that has been solved prior.
- davismwfl 12y agoI do and don't agree with that. I keep a snippet library for things which I can reuse between projects. I agree, if used wrong (like intra-project) it can be bad, but that is no different than most anything. Use any tool wrong and you will get bad results. I have worked a lot in consulting, and either we create and share a common library with clients (which some refuse) or we use a snippet library to stop us from writing the same common code components. Better a snippet library than having a good memory which means you might miss things and have to repeat mistakes which costs you time.