I recently asked how to query an Active Directory Group and an OU, and then list the common members: http://www.experts-exchange.com/Software/Server_Software/File_Servers/Active_Directory/Q_23863991.html
I got a great solution, and what I found really intriguing was that fact that the solution was turn key. I didn't have to edit the query to put in my domain or deal with the sytax. While reading the Scripting Guy articles they mentioned that some of the code, such as Creating a connection to Active Directory using the Active Directory ADO (ActiveX Data Objects) provider is pure boilerplate and could be used anywhere as well:
Set objConnection = CreateObject("ADODB.Connec
Set objCommand = CreateObject("ADODB.Comman
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
n = objConnection
That got me to thinking about the methods expert scripters use to save time such as a template that would have the most common lines of code already present. From there they could pull out what they didn't need, and add in everything else.
I've seen it in web page design with HTML, Body, Content Here, /Body, /HTML, etc. but I was really interested in something a little more extensive than just comment outlines. Suggestions?