“Snipfactory”
I can’t count how many different “code snippets” that I discovered I needed yet again for a program, but that I had already used in some other project or web page, or script file, but not sure where.
So I have to pull down menus (such as the project menu in UltraEdit) to jog my memory on where the heck I would have most likely used this code snippet.
For instance, it could be just a simple Javascript utility function that I always use, to pop up a new html window. The one I wrote allows you to give it just the window.open parameters that you want to control and defaults to the rest that you don’t care about, or always want the same.
I created a “snipfactory” folder under my Development folder (this folder name just simply gels with my brain, and it’s easy to remember, so that I instantly navigate to that folder when I need something from my library) , and some sub-branches under that, such as for Python, C#, PHP, etc..
I plan on adding some full-fledged code templates to that too, i.e., allowing me to just be able to copy a file from the snipfactory folder, that already has the core api calls to format some html around, say.. returned amazon web service data, for example. And then I add to the template once in it’s my current project directory. (For my next job, I will probably need to create this folder on the work computer, so that this neuro-connection works there too.)
So far I have not found a reliable “code snippet” utility that would allow me to build a library of snippets and be able to access them in an integrated GUI way.
For example, in Delphi 7.0, I lost soooo many snippets, when I overloaded the Delphi IDE snippet utility somehow, and they just all disappeared! From now on, it will be just straight text files in this snipfactory folder. And Visual C# Express Edition, though nice, looks a little too undernourished in robustness to handle my large “snippetorium”.
On December 13th, 2006 at 11:47 pm
Steve, this isn’t related to this entry, but could you tell me what books are in your header graphic? I can’t see some of them. Just curious. I think that Prag Programmer is my favorite though.
On December 14th, 2006 at 4:20 pm
Hey Anon,
The books are:
.NET Framework by Joe Duffy
.NET Components
Professional C# by a bunch of guys
CLR VIA C# by Richter
The Object Oriented Thought Process (quality material, but I’m going to mention in my next post, a great book on this from the “Head First” series )
Effective C++ by Meyers
Python Cookbook
Code Complete
Test-Driven Development by Example by Kent Beck
PHP in a Nutshell (php is such an easy tool to quickly whip up a functional page to do anything, so will probably always use)
The other books on the right side are easy to see, especially if you were able to see “Pragmatic Programmer”