<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Girlie Code Blog</title>
	<atom:link href="http://www.mikitracey.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikitracey.com</link>
	<description>Lace, Ribbons... and MVC</description>
	<lastBuildDate>Wed, 12 Jan 2011 03:03:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Solr.  An exercise in relearning Search in ColdFusion</title>
		<link>http://www.mikitracey.com/2010/11/solr-an-exercise-in-relearning-search-in-coldfusion/</link>
		<comments>http://www.mikitracey.com/2010/11/solr-an-exercise-in-relearning-search-in-coldfusion/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 21:34:41 +0000</pubDate>
		<dc:creator>mikitracey</dc:creator>
				<category><![CDATA[Beginners]]></category>
		<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.mikitracey.com/?p=123</guid>
		<description><![CDATA[I haven&#8217;t used ColdFusion to search websites since something like 2001 back when verity could output WDDX and could index current PDFs. Searching with CF lost favor, and i mostly deployed sites that were supported by a search engine outside of my scope, or which did not require one. So, i&#8217;m rebuilding the skillset as [...]]]></description>
				<content:encoded><![CDATA[<p>I haven&#8217;t used ColdFusion to search websites since something like 2001 back when verity could output WDDX and could index current PDFs.  Searching with CF lost favor, and i mostly deployed sites that were supported by a search engine outside of my scope, or which did not require one.  So, i&#8217;m rebuilding the skillset as well.</p>
<p>According to the CF9 release notes, Solr is a step up from verity (how can it not be, the version of verity in CF is ancient)  in the following ways:</p>
<blockquote>
<ul>
<li><em>XML/HTTP Interfaces</em></li>
<li><em>Loose schema to define types and fields</em></li>
<li><em>Web Administration Interface</em></li>
<li><em>Extensive Caching</em></li>
<li><em>Index Replication</em></li>
<li><em>Extensible Open Architecture</em></li>
<li><em>Written in Java5, deployable as a WAR</em></li>
<li><em>Support for stemming</em></li>
<li><em>Support for MS Office 2007 file formats</em></li>
</ul>
<p><em>Solr is a full-text search engine, based on Lucene, that contains the following features:</em><em>The ColdFusion installer automatically creates the ColdFusion 9 Solr service, which contains the Solr web application. For UNIX and Linux, you need to start and stop the Solr shell script.<br />
</em></p></blockquote>
<p>Now, I personally need better pdf support.  Since it wasn&#8217;t listed above i decided to try it out.  Just to see.</p>
<p><strong>Creating and Searching Solr collections in ColdFusion</strong></p>
<p>This section is review.  It focuses on how to create search indexes (called collections in CF) using both the CF Adminsitrator and using line code (cfcollection, cfindex, cfsearch)</p>
<p><em><strong>Creating and indexing Solr Collections in ColdFusion Administrator</strong></em></p>
<ol>
<li>Log in to CF administrator on your CF9 server.</li>
<li>Under Data and Services, select &#8220;ColdFusion Collections&#8221;</li>
<li>At the top of the page, begin creating your collection.
<ol>
<li>type a name for your collection, and</li>
<li>a path where the data files should be stored (i use c:\coldfusion9\collections&#8211;this file does not need to be inside of your web space, though it can be).</li>
<li>At the bottom of the form, before the list of collections, choose &#8220;Solr Collection&#8221; (for now we will skip the language and category, we&#8217;ll come back to this in a later post)</li>
<li>Click &#8220;Create Collection&#8221;.</li>
</ol>
</li>
<li>Moving down this CF Admin page, note the four icons beside your new collection in the collections list.  They are in order: index, optimize, purge and delete.</li>
</ol>
<p>Your collection is created. Of course it&#8217;s empty and useless right now, but we have a framework into which we put our indexed collection.<br />
<strong><em> </em></strong></p>
<p><strong><em>Indexing a Collection using CF Administrator</em></strong></p>
<p>Assuming you are still logged in to the CF Administrator and have just created the collection.  If you aren&#8217;t, you can catch up using step 1 and 2 above.</p>
<ol>
<li>In the collections list, find your collection.  Click on the first icon on the left, &#8220;index&#8221;. This is where the magic gets done.</li>
<li>The page you reach is called the &#8220;manage collection&#8221; page and it offers three forms.  one for indexing collections, one for aliasing them (a more advanced topic if i ever saw one) and one for renaming collections.  Our focus is the topmost form.
<ol>
<li>Enter the filetypes to be indexed.  CF indicates that the possibilities are endless and provides some catch-all filetypes like *. (files with no extension) and .* (all files). Since my site has a lot of xml files and such that i don&#8217;t want to index, i chose the following &#8220;.htm, .html, .cfm, .cfml, .pdf, .doc, .odt, .docx, .xls, .xlsx&#8221;  but you should review your file types and try what you think will work.</li>
<li>Enter or choose a path.  This is the path that contains the files you want indexed, not the storage path.</li>
<li>If all your files are NOT in the same directory and you chose a parent directory, click &#8220;Recurseively index subdirectories&#8221; otherwise, ignore the rest of the form.</li>
<li>Click &#8220;Submit&#8221;</li>
</ol>
</li>
<li> Wait.  Note to those who develop on a local machine.  This can be a massive request and a time out could occur.  It&#8217;s not likely to happen on production, but i&#8217;ve seen it on large collections on test and staging servers also.  If it does, well you&#8217;re playing around.  Make your search smaller either by limiting the directories or limiting the filetypes.</li>
</ol>
<p>Boom.  Indexed collection you can search to your heart&#8217;s desire.  Just remember, it only indexed the filetypes and directories you submitted.</p>
<p><strong><em>Searching your indexed collection</em></strong></p>
<p>Once you have created and indexed your collection you are ready to search.  This is handled with  a coldfusion tag called cfsearch in a standard cfm file.  For simplicity sake, and because we all know how to make a form and pass variables, i&#8217;m just going to stick my search criteria in my sample code:</p>
<pre><div class="codesnip-container" >&lt;cfsearch name="search_results" collection="miki_test" criteria="grim" maxrows="300"></div></pre>
<p>The cfsearch is the easy part.  i use name just like cfquery, i tell it what collection to search, and i put my criteria in. As i&#8217;m searching digital fiction, grim seemed a good search term.  It is recommended that you set a maxrows on these searches lest you return zillions of results</p>
<p>This creates a recordset much like any query with the following columns:<br />
Key, Rank, RecordsSearched, Score, Size, Summary, Title, URL</p>
<p>in addition, if we did all that was described above, we will have the following columns in the recordset, but they will be empty:</p>
<p>Author, Category, CategoryTree, Context, Custom1, Custom2, Custom3, Custom4 (these columns become relevant with more advanced searches, but for our basic search, they are empty).</p>
<p>a sample record follows (i searched a collection containing digital books in html, txt and pdf formats)<br />
Key: C:\ColdFusion9\wwwroot\folklore_stuffies\folklore\Northern_mythologyv2.txt<br />
Rank:1<br />
RecordsSearched: 64<br />
Rank: 3.9678988<br />
Size: 590469<br />
Summary: Google This is a digital copy of a book that was preserved for generations on library shelves before it was carefully scanned by Google as part of a project to make the world&#8217;s books discoverable online. It has survived long enough for the copyright to expire and the book to enter th<br />
Title: Northern_mythologyv2.txt<br />
Type: text/plain<br />
URL: /Northern_mythologyv2.txt </p>
<p>As far as search results go, i&#8217;m not particularly keen on it.  For one thing, the summary does not focus on the places where my search terms were found, it&#8217;s just the first x lines of the text document.  The type is fine for text documents, but everything from a .otc to a .pdf is given a &#8220;type&#8221; of application/octet-stream.  Since i want to let folks know what kind of document they&#8217;re looking at this is useless information; and lastly, the url is a absolute url from the base of my search&#8230;in order to actually direct folks to my page, i have to strip the url.  </p>
<p>Here is how i handled it.</p>
<pre><div class="codesnip-container" >&lt;cfsearch name="search_results" collection="miki_test" criteria="grim" maxrows="300">

&lt;h2>Results&lt;/h2>
&lt;table>
   &lt;tr>
	&lt;th scope="col">Rank&lt;/th>&lt;th>FileSize&lt;/th>&lt;th scope="col">Link&lt;/th>&lt;th scope="col">Text&lt;/th>
   &lt;/tr>
   &lt;cfoutput query="search_results">
	&lt;tr>
	   &lt;td>#rank#&lt;/td>
	   &lt;td>
	   &lt;img 
        src="images/#replacenocase(right(title,4),'.','','ALL')#_tiny.gif" 
        alt="#replacenocase(right(title,4),'.','','ALL')# file">
	&lt;cfif size/1024 lt 1000>#evaluate(int(size/1024))#K
	&lt;cfelse>#evaluate(int(size/1024/1024))#M&lt;/cfif>
	&lt;/td>
	&lt;td>&lt;cfset my_url = replacenocase(url,'/','','ONE')>
	   &lt;cfset my_title = rereplacenocase(title,".[pdf|doc|txt|docx]","","ALL")>
	   &lt;a href="#my_url#"
	   >#my_title#&lt;/a>
	   &lt;/td>
	   &lt;td>#summary#&lt;/td>
	   &lt;/tr>
   &lt;/cfoutput>
&lt;/table></div></pre>
<p>What i&#8217;ve done here is taken what seems the most relevant of the columns and tried to build a search results page.  I&#8217;ve used the file extension to guess the file type and called that straight into an image tag.  This will work if you are sure that you have an image for every filetype that comes out, alternately you can use a cfswitch with an default case that points to unknown_tiny.gif.  (an icon of a page with a question mark on it).  Next to the filetype is the filesize. The results come back in bytes, so in order to get KB and MB you have to calculate them.  The if condition on line 13 displays kilobytes if the calcuated KB is less than 1000, and if it is not, then it displays in MB.  the int function just rounds the value to the nearest integer.  I did this because i had rediculously long sizes being calculated.<br />
I calculate the url to put in the anchor by replacing the leading / and this works for my needs.  Your mileage may vary.  I take the title field and ditch the file extension using a regular expression and link using the calculated url, finally i display the summary.</p>
<p>This gives me something useful, until i can actually gather and search using more metadata than i have available to me straight from the file.</p>
<p><strong><em>Creating and indexing your collection using ColdFusion Tags</em></strong></p>
<p>Since i promised a full write up, here is how to create and index your collection using cf tags.</p>
<p><em>Creating</em></p>
<pre><div class="codesnip-container" >&lt;cfcollection action="create" collection="miki_test" engine="solr" path="c:\coldfusion9\collections"></div></pre>
<p>These are equivalent to the fields i had you enter above.<br />
action is pretty self explanatory except that create may only be used once. you must delete before creating if you intend to use the cfcollection tag multiple times or create different collections.<br />
collection is the same as the name you entered in the CF Admin<br />
engine is how you specify whether to use solr or verity<br />
path is, again, the path where you want the collection stored.  Does not have to be inside web root.</p>
<p><em>Indexing</em><br />
In theory, the following should work (not that i have been able to make it work, (it currently loads a blank page, but does not appear to index anything: it should do so:</p>
<pre><div class="codesnip-container" >&lt;cfindex action="update" collection="miki_test" type="path" key="c:\coldfusion9\wwwroot\folklore_stuffies\folklore"></div></pre>
<p>Oh and by the way, this little exercise did answer my question: Solr handles modern pdfs particularly well, even if the search results do leave something to be desired.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikitracey.com/2010/11/solr-an-exercise-in-relearning-search-in-coldfusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s New in CF9</title>
		<link>http://www.mikitracey.com/2010/10/whats-new-in-cf9/</link>
		<comments>http://www.mikitracey.com/2010/10/whats-new-in-cf9/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 14:11:36 +0000</pubDate>
		<dc:creator>mikitracey</dc:creator>
				<category><![CDATA[Beginners]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Intermediate]]></category>

		<guid isPermaLink="false">http://www.mikitracey.com/?p=110</guid>
		<description><![CDATA[ORM Support Object Relational Mapping is key to RAD (you find it in Ruby, CFWheels, etc) Hibernate: the number one ORM tool is included with CF9 (requires additional tool on development side –CFBuilder or others) Requires use of application.cfc (will not work in application.cfm) At the very least, use of hibernate with a tool like [...]]]></description>
				<content:encoded><![CDATA[<p><b>ORM Support</b></p>
<ul>
<li>Object Relational Mapping is key to RAD (you find it in Ruby, CFWheels, etc)<br />
Hibernate: the number one ORM tool is included with CF9 (requires additional tool on development side –CFBuilder or others)</li>
<li>Requires use of application.cfc (will not work in application.cfm)</li>
<li>At the very least, use of hibernate with a tool like cfbuilder will write 2/3 of your database queries for you.  Frequently more than that.</li>
</ul>
<p><b>FLEX and AIR Support</b></p>
<ul>
<li> More Flash Remote commands available without purchasing Flex. (Great for Flash users)</li>
<li>Now integrated with Adobe Air allowing you to use your ColdFusion to power your Air apps.</li>
</ul>
<p><b>Language Enhancements</b></p>
<ul>
<li>More commands available within CFScript (You can now write most of your app within cfscript):
<ul>
<li> Basic language constructs: throw, writedump, writelog, location and trace</li>
<li>Script functions: query, mail, http, storedprod, pdf and ftp</li>
<li>Keywords: abort, exit, include, param, property, rethrow, throw<br />
Operations: import and new</li>
</ul>
</li>
<li>New onServerStart() method to run only when server starts.  Useful for configuring logging, instantiating applications, and setting up scheduler.</li>
<li>Nested CFTRANSACTIONS</li>
<li>Udf/cfc name conflict resolution</li>
<li>Local scope/Var scope (helps with name conflicts between application and function) – also can use var anywhere within a cfc and not just at the top.</li>
<li>Local is now a reserved word!</li>
<li>Implicit getters and setters for cfproperty!</li>
</ul>
<p><b>Product Integration</b></p>
<ul>
<li> Ajax Controls – extJS 3 now embedded (was extJS 2.x), google maps now embedded,.</li>
<li> SharePoint integration: can use sharepoint signon in cf, can load sharepoint actions in CF application, can create web parts for sharepoint.</li>
<li> MS Office interoperability &#8211; now can use cfspreadsheet and cfpresentation rather than cfcontent. Can convert word and powerpoint to pdf with cfdocument.</li>
<li> OpenOffice support: if installed and the proper attribute is used, cfdocument will use openoffice engine to create pdf rather than cf engine.</li>
<li> Search using Apache Solr rather than Verity!!</li>
</ul>
<p><b>Performance Enhancements</b></p>
<ul>
<li> Improved clustering: supports serialization of query, array and datetime types in a cfc.</li>
<li> Granular control over cacheing (can cache fragments of page, can cache in memory, can cache specific objects, etc)</li>
<li> In-memory files: simplify execution of dynamic code.</li>
<li> Other: Faster cfcs, faster java method invocation</li>
</ul>
<p><b>Database Enhancements</b></p>
<ul>
<li> Now uses DataDirect 4.0 sp 1
<ul>
<li> Support MySQL(enterprise and commercial), Oracle 11g, Informix 11, SQL Server 2008</li>
<li> Support IPv6 (Internet Protocol).</li>
<li> Set default query timeout value.</li>
</ul>
</li>
<li> Datasource attribute is now optional for cfquery, cfinsert, cfupdate, and cfdbinfo.</li>
</ul>
<p><b>Code Analyzer</b></p>
<ul>
<li>Helps migrate from CF7 and 8 to CF9</li>
</ul>
<p><b>Service Features<br />
</b></p>
<ul>
<li>More CF can be exposed as web service: cfpdf, cfimage, cfdocument, cfmail, cfpop, cfchart</li>
</ul>
<p><b>Other Enhancements</b></p>
<ul>
<li> Server Manager – desktop version of CF Admin (runs on Adobe Air) with limited availability</li>
<li> Built-in support for portlet standards: supports JSR-168, JSR-286, WSRP to help build cf powered portal content.</li>
<li> PDF functionality: can support FDF, PDF Package, size optimization, headers and footers (in cfpdf), RGB/ARGB and cfimage support in cfpdf, improved thumbnails, image extraction from pdfs.</li>
<li> IMAP support – can query imap servers for email, can run imap items like delete mail/folder, mark multiple as read, and manage folders.</li>
<li> JRE specifications – JRE 6 update 14 for all platforms except solaris which uses JRE 6 update 12.</li>
</ul>
<p><b>New and Updated Functions</b></p>
<ul>
<li> Visit <a title="livedocs" href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS890819DC-DE4D-4b24-A237-6E3483E9D6A1.html">livedocs </a>for the full list</li>
<li> Most notable: spreadsheet functions and isIPV6().</li>
</ul>
<p><b>New Tags<br />
</b></p>
<ul>
<li> Visit <a title="livedocs" href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0dd03b2c1223a399518-8000.html">livedocs </a>for the full list</li>
<li> Most notable: CFFINALLY: brings try/catch up to date with Java allowing a portion of code to run regardless of an error being caught.</li>
</ul>
<p><b>Notes</b></p>
<ul>
<li> With the exception of extJS 3 from extJS 2, existing apps are unlikely to require many changes to continue to function.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.mikitracey.com/2010/10/whats-new-in-cf9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version control that doesn&#8217;t suck</title>
		<link>http://www.mikitracey.com/2010/09/version-control-that-doesnt-suck/</link>
		<comments>http://www.mikitracey.com/2010/09/version-control-that-doesnt-suck/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 01:01:55 +0000</pubDate>
		<dc:creator>mikitracey</dc:creator>
				<category><![CDATA[Development Tools]]></category>

		<guid isPermaLink="false">http://www.mikitracey.com/?p=74</guid>
		<description><![CDATA[Once upon a time, an egotistical git named Linus had a dream of a version control system that didn&#8217;t suck. No really, just ask him. Really, though, Git is amazing. It&#8217;s fast, distributed, toolkit based, incorruptible and it merges like you&#8217;ve always dreamed of a merge. What follows is a quick writeup on Git and [...]]]></description>
				<content:encoded><![CDATA[<p>Once upon a time, an egotistical git named Linus had a dream of a version control system that didn&#8217;t suck.  No really, <a href="http://www.youtube.com/watch?v=4XpnKHJAok8">just ask him</a>.</p>
<p>Really, though, Git is amazing.  It&#8217;s fast, distributed, toolkit based, incorruptible and it merges like you&#8217;ve always dreamed of a merge.  What follows is a quick writeup on Git and why you might want to use it for your project.</p>
<p>In short, git is distributed, incorruptible, compatible, fast, it merges like dreams I&#8217;ve had of merges.  It doesn&#8217;t require connectivity, it doesn&#8217;t require a central repository, it doesn&#8217;t even require that you NOT be using some other source control system above it.</p>
<p><strong>Git is distributed</strong></p>
<p>Lets focus first on the term &#8220;distributed&#8221;.  Distributed effectively means there is no central repository, however the reality of most projects means that Linus&#8217; dream of distributed systems is not usually met.  The image that follows explains my point.</p>
<p><img src="http://mikitracey.org/images/distributed.png" alt="images that describe distributed, central and multicentric systems" /></p>
<p>The left image defines a central repository based system like CVS or VSS.  Systems like this require both a central repository (sometimes with either large computing capacity or large storage capacity) and connectivity in order to be used.  This is one thing that isn&#8217;t required with git.</p>
<p>In the center is Linus&#8217; vision.  It&#8217;s generally Linus&#8217; practicality as well. As deployed for both creation of linux and creation of git, Linus keeps a short list of developers whose work he trusts and when he receives an update from one of them (or when they push them to his local repository), he merges it into his own personal branch of the software himself.  In addition, users of the tools can choose the branch they wish to use as well even though a particular branch may be designated as final.  Generally, though, software projects don&#8217;t operate well this way.</p>
<p>Generally, projects do require a central repository of some sort; however git is still a great product for these kind of projects because git allows connection to a central repository by a local repository.  This means that developers do NOT need to be connected to the central repository in order to check in files, they just keep a local copy of the central repository branch, called a &#8220;head&#8221; and check in files there while not connected, then when they do connect, they push the files to the central repository.</p>
<p>Another reason this multi centric approach is good for a project is that, for instance, developers frequently do not check in files until the code is complete. They do it because if they check in unfinished code to the central branch, the entire branch can become unusable. Checking into a local branch, and sharing that, can solve a lot of problems for systems that use a large shared development branch.</p>
<p><strong>Git is compatible.</strong></p>
<p>Another point for git is its compatibility.  There is no one protocol required for git.  Git supports http, ftp, ssh, rsync, git+ssh or git protocol.  At the outer range of this compatibilty description, git can be used to push code to non repositories (including shared drives and live websites) [restate] At the inner range, it can be used on sites with limited protocol support or firewall protocol blocking</p>
<p><!-- Another point related to compatibility is..oops forgot. --></p>
<p><strong>Git is incorruptible</strong></p>
<p>Now that is a strong statement.  It is fundamentally incorrect, since NOTHING is truly incorruptible, however git checks files at both check in and check out using hashes so strong they are considered &#8216;cryptographic grade&#8217;.  For all intents and purposes, git files are not going to be corrupted.  Now compare that to your cvs or vss repository.  One thing i remember from VSS is that the repository got corrupted monthly.  I&#8217;ve less experience with CVS repositories, but i&#8217;m aware of at least one repository restore in the past few years on my projects.  So, i&#8217;m going to stick with incorruptible.</p>
<p><strong>Git is fast/efficient</strong></p>
<p>Both <a href="https://git.wiki.kernel.org/index.php/GitBenchmarks">internal</a> and <a href="http://weblogs.mozillazine.org/jst/archives/2006/11/vcs_performance.html">independent</a> time trials have shown that for diffs git is significantly (like 100% or more) faster than the control systems &#8220;Bazaar and Mercurial&#8221;  Of course, as of yet, I haven&#8217;t found any comparisons directly between git and cvs/svn, however mercurial is the closest tool to git so it is not the worst thing to compare with.</p>
<p><strong>Git merges like a dream</strong></p>
<p>I have dreamed of merges that are so smart that i never have to review the diff.  Wherein I never have to look at a synchronize report that dares to say that every single line in my file has been changed, even though i happen to know that I&#8217;ve changed the spelling of one word. I have dreamed of the sort of merges that git provides.</p>
<p>I have worked on a system in CVS wherein we branch files for each defect.  merge to test for testing, fix defects in the code and merge again.  Of course in between that time, another person has fixed an easier defect in the same code.  So when i merge a second time, the system tells me the files don&#8217;t match, but won&#8217;t tell me where.  It does this because it doesn&#8217;t know.  When merge in CVS compares files, it compares what the file looked like when it was first branched, to what the file looks like now.  If something has changed about the file in between, CVS will indicate it cannot find the change.</p>
<p>Now personally, i have worked in very few git systems, but i have always had perfect merges.  The files have just been merged for me. I actually had to do diffs to compare files before merging.  This is not definitive, but what is definitive is that other people seem to agree with me, and it&#8217;s a selling point for git.  You may not have, but I have dreamed of merges like this.</p>
<p><strong><em>Drawbacks</em></strong></p>
<p>As much as i am git&#8217;s newest cheerleader, it does have issues. Linus would say that most of those issues are between the keyboard and the brain(meaning, user problems not actual problems).</p>
<p>The first issue i noticed is that if I am running from a central repository and working in a local repository, I&#8217;m soon going to end up with multiple branches with the same name.  If you have trouble just tracking dev, test and production, having two copies of dev, test and production is just going to be harder.  As i mentioned, i used to work on a system where every defect got a branch, so i do not have this problem.  If you are not quite the version control user that i am, well, proper training and tracking (or checklists) can mitigate this issue.</p>
<p>For those who are used to a version control system with a central repository, checking in code does not do the same thing.  People need to perform an extra step after checking in locally (even local copies of remote branches) in order to commit the code to the central repository.  Again, training and a certain amount of vigilance and/or checklists can help.</p>
<p>Another problem with moving from a different system to git is that git has it&#8217;s own vocabulary.  CVS users will have trouble as nearly all of the CVS vocabulary has been re-purposed to mean something different.  This is another problem that can be mitigated with proper training and vigilance.</p>
<p>One of the benefits of git is also a slight drawback.  In order to make git small, it was decided to store only the diffs in the repository.  This means that in order to use a repository locally, the files must remain in the filespace.  interruptions such as disk corruption or failure, are just as dangerous as the same failure on a modified but un-checked in file in another version control system.  This problem, however, can be mitigated by using a remote repository.  All repositories have a file base, therefore disk corruption or failure can be replaced from a remote repository quickly and easily.  Only local repositories without backups would be subject to such a drawback.</p>
<p><strong>How do I get git?</strong></p>
<p>Are you a unix type who believes in purity?  <a href="http://git-scm.com">get the source</a>.<br />
Are you on windows? try <a href="http://git-scm.com/download">Cygwin</a>, <a href="http://code.google.com/p/msysgit/">MSYSgit</a> or <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a> (Note TortoiseGit can interfere with some java software including some cisco vpns)<br />
Are you a Macintosh type? <a href="http://gitx.frim.nl/">GitX</a><br />
A toolkit or eclipse type?  <a href="http://www.eclipse.org/egit/download/">eGit</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikitracey.com/2010/09/version-control-that-doesnt-suck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful Regular Expressions in CF</title>
		<link>http://www.mikitracey.com/2010/08/regular-expressions-in-cf/</link>
		<comments>http://www.mikitracey.com/2010/08/regular-expressions-in-cf/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 15:59:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Intermediate]]></category>

		<guid isPermaLink="false">http://www.mikitracey.com/?p=35</guid>
		<description><![CDATA[Have you ever said &#8220;Sure, i can take out all that stuff that MSWord puts in when you paste from word&#8221; Or &#8220;I&#8217;m sure I can just find the bits that i don&#8217;t need and get rid of them before saving.&#8221; If you did, did you regret it immediately? Or did you wait till you [...]]]></description>
				<content:encoded><![CDATA[<p>Have you ever said &#8220;Sure, i can take out all that stuff that MSWord puts in when you paste from word&#8221;  Or &#8220;I&#8217;m sure I can just find the bits that i don&#8217;t need and get rid of them before saving.&#8221; If you did, did you regret it immediately?</p>
<p>Or did you wait till you hit the search engines and found the perfect regular expression only when you pasted it to your &#8220;ReReplace()&#8221; it turned out to be formatted incorrectly for CF?</p>
<p>First things first, there are regular expressions, and there are CF regular expressions.  Most systems, from unix shell to Ruby on Rails have a means of using regular expressions, but not all of them look the same.</p>
<p>for instance, in powerGREP you say:</p>
<pre><div class="codesnip-container" >\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b</div></pre>
<p>in order to find an email address, but in cold fusion, a number of elements have different uses, so you then have to write the following.</p>
<pre><div class="codesnip-container" >ReFind("[^['_a-z0-9-]+(\.['_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z]{2,4})");</div></pre>
<p>In addition, there is a great deal covered on taking HTML out, including these two, which i&#8217;ve used frequently:</p>
<p>The First:</p>
<pre><div class="codesnip-container" >function stripHTML(str) {
  new_str = REReplaceNoCase(str,"<!--.if.*endif.-->","","ALL");
  return REReplaceNoCase(new_str,"&lt;[^&gt;]*&gt;","","ALL");
}</div>
</pre>
<p>Now this one focuses directly on Microsoft, which likes to put some conditional code in that runs depending on your browser, and inside of which are styles as well as html.  In addition it fills up standard html tags with a number of attributes that are really just for Microsoft.</p>
<p>The first REReplace looks for those &lt;!&#8211;.if blocks with any text between them and the end if.  Replaces all of them with nothing.</p>
<p>the second REReplace then finds EVERY set of text and whatnot between a &lt; and a &gt; and takes it right out.  Note that this will remove EVERY tag, including ones that it might be relatively wise to keep.</p>
<p>In testing, this took the HTML version of a Word document and removed as many as 84% of the characters, thus shrinking it down to something more usable in a &#8216;text&#8217; field.</p>
<p>Of course, most of us actually want rich text, we provide rich text editors for that purpose.  So we probably don&#8217;t want to completely remove everything.</p>
<p>The Second:</p>
<pre><div class="codesnip-container" ><cfscript>
function stripHTML2(str) { 
  new_str = REReplaceNoCase(str,"<!-- .if.*endif.-->","","ALL"); 
  return REReplaceNoCase(new_str,"&lt;(?!\/?(br|b|table|tr|td|i|em|strong|p))[^&gt;]*&gt;",
      "","ALL"); 
}
</cfscript></div></pre>
<p> <br />
So ; all these | serve as &#8220;or&#8221; and so you&#8217;re effectively only removing those tags that do NOT contain br, b, table, tr, td, i, em, strong, or p.</p>
<p>As written, this function will do exactly that, but it does leave in attributes added by Microsoft to support much of what you removed already.</p>
<p>So you could take the above regular expression, and modify it to search out these styles and whatnot that would be added between the &lt; and &gt;.</p>
<p>Of course, most of this, you could probably get elsewhere, and in fact, there&#8217;s a function i was able to get at <a href="http://www.cflib.org/udf.cfm/safetext">CFLib.org</a> that will do even more than that, and make your data safe.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikitracey.com/2010/08/regular-expressions-in-cf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS vs CFDOCUMENT</title>
		<link>http://www.mikitracey.com/2010/04/css-vs-cfdocument/</link>
		<comments>http://www.mikitracey.com/2010/04/css-vs-cfdocument/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 19:01:27 +0000</pubDate>
		<dc:creator>mikitracey</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[XHTML/CSS]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://www.mikitracey.com/?p=3</guid>
		<description><![CDATA[In this corner!  weighing 133 lbs, the challenger, Cascading Style Sheets.  In this corner! weighing 896 lbs, the Vanilla Gorilla, CFDOCUMENT. That&#8217;s right ladies and gentlemen, the fight to end all fights, cfdocument, with different implementations of html handling between cf7 and cf8, will take on css, which displays certain formatting properties differently between html [...]]]></description>
				<content:encoded><![CDATA[<p><em>In this corner!  weighing 133 lbs, the challenger, Cascading Style Sheets.  In this corner! weighing 896 lbs, the Vanilla Gorilla, CFDOCUMENT.</em></p>
<p><em>That&#8217;s right ladies and gentlemen, the fight to end all fights, cfdocument, with different implementations of html handling between cf7 and cf8, will take on css, which displays certain formatting properties differently between html 4 and xhtml 1.</em><em style="font-style:italics;"></em></p>
<p><em style="font-style:italics;"></em></p>
<p>It was quite a showdown. Especially when we extracted the html from the code in order to create html that actually floats AND overlaps a column of text.  Then cfdocument it.</p>
<p>First we got it to work in both Mozilla and MSIE.  Easy-peasy. Then we gave all that VALIDATED html to cfdocument and it failed to render as either browser presented it.</p>
<p>So we scratch our heads for a little while, search the web for info and page through some old CF books.  In a CFCert book for mx7 we find a note that cfdocument doesn&#8217;t support xhtml1 and check our doctype.  WHAM its declared as xhtml 1 strict.</p>
<p>Odd, we think, since we are running cf8, and all the stuff we are finding online says &#8220;valid xhtml1&#8243;. But then it occurs to us that one of the servers, test, is running cf7&#8230;so, we might as well create code that renders on test too.</p>
<p>So I change the doctype and feed it to cf8.  Wham, it works in CF8. Well ok, we think, and are very proud of ourselves, now it will work on test too.  We zip it up and push it out and does it work on test&#8230; NOOOO.</p>
<p>We give up and tell the testers to test pdf&#8217;s on staging.</p>
<p>We is mostly me, here, but also includes  an HTML expert  and my boss.</p>
<p>So, that&#8217;s the story, but what is behind it?  Well  Some of it i can&#8217;t explain and some of it i&#8217;m just guessing but i think it probably has to do with one or more of the following:</p>
<ul>
<li>Support for HTML in CFDOCUMENT</li>
<li>Support for CSS in CFDOCUMENT</li>
<li>The dreaded &#8220;Quirks Mode&#8221; wherein browsers attempt to handle invalid or untyped xhtml.</li>
<li>CFDOCUMENT in CF7 and CF8</li>
<li>Using HTML tables for formatting.</li>
<li>Attempting to generate valid HTML from a series of regular expressions.</li>
<li>The cocky attempt to display 2 columns of text in a dynamically generated pdf</li>
<li>The cocky attempt to then float an image over one column.</li>
</ul>
<p>Regardless, we won the war with a couple of improper uses of HTML  and copius use of HTML Doctypes.</p>
<p>Here is the final code (sans database and other code stuff)</p>
<p>Commentary: This mixes inline styles and embedded styles.  The original stuff is inline.  The floating image and whatnot is embedded.  Long story about applying styles in cfdocumentsections skipped for now.  However suffice it to say that cfdocumentsection resets all styles, so i put as many as i could inline.</p>
<p>Commentary: tables for formatting were used because we couldn&#8217;t make css do the job, possibly because we were designating xhtml1.</p>
<p>Commentary: if you grab this code, change the doctype to xhtml1 strict and take a look at the difference in how the floating image is handled between the two.  It will make you smile.</p>
<pre>
<code>&lt;cfsilent&gt;
&lt;!---
This file displays the standard PDF sheet
REVISION TRACKING:
MT - 1/30/08 - Create file 
---&gt;
&lt;/cfsilent&gt;
&lt;cfdocument format="PDF" marginleft=".6" marginright=".6" marginbottom=".8" margintop=".6"&gt;
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;title goes here&lt;/title&gt;
    &lt;meta http-equiv="Content-Style-Type" content="text/css" /&gt;
&lt;style type="text/css"&gt;
img.floatbak
{
top:-15;
float:right;
margin-top: 0;
margin-left:5;
margin-bottom:0
}


img.float
{
position:absolute;
right:0px;
top:40px;
z-index:1
}
&lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;
    &lt;div id="container" style="width:100%;"&gt;
        &lt;div id="nonfloat" style="width:100%;"&gt;
	    &lt;table&gt;
		&lt;tr&gt;
	 	    &lt;td&gt;&lt;img src="images/logo_image.gif" alt="Company Logo" /&gt;&lt;/td&gt;
		    &lt;td&gt;&lt;p style="font-family:arial black,arial,helvetica,sans-serif;font-size:16pt;"&gt;
 	                  Company Information Sheet &lt;br/&gt;
	                  &lt;em style="font-family: Arial, Helvetica, sans-serif;font-size:14pt;font-style: italic;font-weight:bold;"&gt;
		             Company Name
       	                  &lt;/em&gt;
	            &lt;/p&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;/table&gt;
&lt;/div&gt;
&lt;div id="nonfloat2" style="width:100%;"&gt;
&lt;table cellpadding="5" cellspacing="1" width="100%"&gt;
	&lt;tr&gt; 
		&lt;td valign="top" width="50%"&gt;&lt;p style="font-family:Arial Black, Arial, Helvetica, sans-serif; font-size:12pt;font-weight:bold;"&gt; big data left side &lt;/p&gt;
			&lt;p style="font-family: Times New Roman, serif;font-size:11pt"&gt;
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt 
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco 
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in 
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat 
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
			&lt;/p&gt;
			&lt;p style="font-family: Times New Roman, serif;font-size:11pt"&gt;
				At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis 
praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi 
sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia 
animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. 
Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id 
quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. 
Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut 
et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur 
a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis 
doloribus asperiores repellat.
			&lt;/p&gt;
			&lt;/td&gt;
			 &lt;td width="50%"&gt;
				&lt;table border="1" cellpadding="0" cellspacing="0"&gt;
					&lt;tr&gt;
					&lt;td&gt; 
					&lt;img class="float" src="images/folating_image.jpg" alt="secondary logo" &gt;
					&lt;div style="position:relative;z-index:0;margin-left:10px;margin-top:10px;margin-bottom:10px"&gt;
					&lt;p style="font-family:Arial Black, Arial, Helvetica, sans-serif; font-size:12pt;font-weight:bold;"&gt;Big data right side&lt;/p&gt;
					&lt;p style="font-family: Arial, Helvetica, sans-serif; font-size:11pt;font-weight:bold; font-style:italic;"&gt;italicized numerical values&lt;br&gt;second value&lt;/p&gt;
			&lt;p style="font-family: Times New Roman, serif;font-size:11pt"&gt; Sed ut perspiciatis 
unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, 
totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae 
dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, 
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro 
quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non 
numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. 
Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut 
aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate 
velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla 
pariatur?
		&lt;/p&gt;
	&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;  
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt; 
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;/cfdocument&gt; </code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mikitracey.com/2010/04/css-vs-cfdocument/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why your comments don&#8217;t appear on my site.</title>
		<link>http://www.mikitracey.com/2009/12/why-your-comments-dont-appear-on-my-site/</link>
		<comments>http://www.mikitracey.com/2009/12/why-your-comments-dont-appear-on-my-site/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 17:33:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikitracey.com/?p=121</guid>
		<description><![CDATA[Hello readers, I have found that i cannot actually tell a real comment from spam, therefore I&#8217;ve randomly decided on a rule. If you want your comment approved to appear on my site it should contain no urls. Not even where the comment asks you for a url. this is a permanent top post&#8230;it will [...]]]></description>
				<content:encoded><![CDATA[<p>Hello readers,<br />
I have found that i cannot actually tell a real comment from spam, therefore I&#8217;ve randomly decided on a rule.</p>
<p>If you want your comment approved to appear on my site it should contain no urls.  Not even where the comment asks you for a url.</p>
<p>this is a permanent top post&#8230;it will always be the first thing you read if you load mikitracey.org or mikitracey.com.</p>
<p>Also, i&#8217;m told opera does not work well with this site.  Sadly it&#8217;s WordPress, and i didn&#8217;t create the html.  I will surf around for a new layout that works in opera, but not soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikitracey.com/2009/12/why-your-comments-dont-appear-on-my-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
