<?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>Joe Crotty</title>
	<atom:link href="http://joecrotty.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://joecrotty.com</link>
	<description>Joe Crotty</description>
	<lastBuildDate>Wed, 10 Mar 2010 20:01:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>GoF Design Patterns</title>
		<link>http://joecrotty.com/2010/03/gof-design-patterns/</link>
		<comments>http://joecrotty.com/2010/03/gof-design-patterns/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 19:56:21 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Featured Content]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=618</guid>
		<description><![CDATA[As a programmer and all around nerd dating back to my teen years I have covered a fair bit of computing terrain. However, at a recent job interview requiring Java skills I completely floundered when asked, "Talk to us about design patterns and illustrate some instances where you have applied them?"]]></description>
			<content:encoded><![CDATA[<p>As a programmer and all around nerd dating back to my teen years I have covered a fair bit of computing terrain. However, at a recent job interview requiring Java skills I completely floundered when asked, &#8220;Talk to us about design patterns and illustrate some instances where you have applied them?&#8221;  Baffled and not one to beat around the bush I admitted my naivety immediatley. In a gesture of kindness the interview panel threw a few classic design patterns at me like singleton and abstract factory both of which I was aware of, but only had a vague grasp of. One guy on the panel suggested I read up on a famous engineering design pattern book by a group referred to as the Gang of Four. I took him up on that offer a few days later and ordered a used copy of <a title="Design Patterns Wiki" href="http://en.wikipedia.org/wiki/Design_Patterns"><em>Design Patterns: Elements of Reusable Object-Oriented Software</em></a> from <a title="Buy Design Patterns at Amazon" href="http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612">Amazon</a>.</p>
<p><span id="more-618"></span></p>
<div id="attachment_623" class="wp-caption alignnone" style="width: 500px"><img class="size-large wp-image-623" title="Design Patterns Front Cover" src="http://joecrotty.com/wp-content/uploads/2010/03/design_patterns_bookfc-490x490.jpg" alt="" width="490" height="490" /><p class="wp-caption-text">Design Patterns Front Cover</p></div>
<p>The book arrived two days ago and I have been busy poring over it in my spare time. I am using a <a title="GoF/Gamma Patterns" href="http://mahemoff.com/paper/software/learningGoFPatterns/">study guide</a> that groups the patterns by difficulty ranging from easy to advanced. Can&#8217;t wait to finish reading and possibly start applying these new nuggets of knowledge to my current AJAX charting application project.</p>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2010/03/gof-design-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Math Combinations, RDBMS and Perl</title>
		<link>http://joecrotty.com/2010/03/math-combinations-rdbms-and-perl/</link>
		<comments>http://joecrotty.com/2010/03/math-combinations-rdbms-and-perl/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 15:00:46 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=507</guid>
		<description><![CDATA[Recently, while developing a web charting application I ran into a problem involving combinations and permutations. The application mimics an existing paper charting method with it&#8217;s own meta language to describe certain visual biological markers.  One subset of the meta language defines eight shorthand notation character codes:

B = Brown (or Black) Bleeding
C = Cloudy (white)
C/K [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, while developing a web charting application I ran into a problem involving <a title="Combinations and Permutations Mathfun" href="http://www.mathsisfun.com/combinatorics/combinations-permutations.html">combinations and permutations</a>. The application mimics an existing paper charting method with it&#8217;s own meta language to describe certain visual biological markers.  One subset of the meta language defines eight shorthand notation character codes:</p>
<ul>
<li>B = Brown (or Black) Bleeding</li>
<li>C = Cloudy (white)</li>
<li>C/K = Cloudy/Clear</li>
<li>G = Gummy (gluey)</li>
<li>K = Clear</li>
<li>L = Lubricative</li>
<li>P = Pasty (creamy)</li>
<li>Y = Yellow (even pale yellow)</li>
</ul>
<p>Each code can be selected once with any other combination of codes.  Some examples of possible code string combinations with dash separator(s):</p>
<p><span id="more-507"></span></p>
<ol>
<li>B &#8211; C</li>
<li>C/K &#8211; K &#8211; P &#8211; Y</li>
<li>K &#8211; P &#8211; Y &#8211; C/K</li>
<li>L &#8211; L &#8211; Y Note, not valid due to duplicate L code</li>
</ol>
<p>Eventually, these code strings are stored in a <a title="RDBMS Wiki" href="http://en.wikipedia.org/wiki/Relational_database_management_system">RDBMS</a>.  The question is how to store them efficiently? We could store them as a string datatype (e.g.,  VARCHAR), but this would be inefficient because on average a code string would take up more bytes then a number datatype (e.g., INT) used to represent the code string.  This implies a look up table of code strings with related numbers and a <a title="Foreign Key Wiki" href="http://en.wikipedia.org/wiki/Foreign_key">foreign key</a> on the main storage table(s) <a title="Referential Integrity Wiki" href="http://en.wikipedia.org/wiki/Referential_integrity">referentially constrained</a> to the look up table.</p>
<div id="attachment_611" class="wp-caption alignnone" style="width: 392px"><img class="size-full wp-image-611 " title="Entity Relationship Diagram" src="http://joecrotty.com/wp-content/uploads/2010/03/er_codes.png" alt="" width="382" height="114" /><p class="wp-caption-text">Entity Relationship Diagram</p></div>
<p>Further, consider the third string code example above. Semantically it&#8217;s the same as example two, but is ordered differently (AKA permutation). To properly <a title="RDBMS Data Normilization Wiki" href="http://en.wikipedia.org/wiki/Database_normalization">normalize</a> the data we should alphabetically arrange the permutations so that order does not matter which will vastly reduce the number of possible string code combinations.</p>
<p>Now that we know how the data should be modeled we must populate the string code look up table. The first obvious question is how many combinations are possible when order doesn&#8217;t matter? Use the formula below where <em><strong>n</strong></em> is the number of things to choose from, and you  choose <em><strong>r</strong></em> of them (No repetition, order doesn&#8217;t  matter). ! means <a title="Factorial Wiki" href="http://en.wikipedia.org/wiki/Factorial">factorial</a>.</p>
<p><img class="alignnone size-full wp-image-537 noborder" title="Formula Combinations No Repeat" src="http://joecrotty.com/wp-content/uploads/2010/03/combinations-no-repeat.png" alt="" width="150" height="53" /></p>
<p>For example, for the eight possible codes if we select four then there are 70 possible code combinations where order doesn&#8217;t matter.  However, we need to know the number of non repeating combinations possible for our set of eight codes given we can select between one to eight codes. I&#8217;ll leave that simple exercise as reader homework, but excluding the possibility of selecting no codes the answer is 255.</p>
<p>Now the crux of the matter. Insert the 255 non repeating combinations, alphabetically arranged, with a unique number for each into the RDBMS lookup table. Assuming you managed the math part and have made it this far you can now go and gently beat your head against a wall for a few minutes &#8211; then return, please.  <a title="The Perl Programming Language" href="http://www.perl.org/">Perl</a> to the rescue! With it&#8217;s ease of extensions via <a title="Comprehensive Perl Archive Network" href="http://www.cpan.org/">CPAN</a> modules and high level programming abstractions it is the ideal glue language to tackle what looks to be a formidable problem.</p>
<p>Our first order is to google CPAN and see what, if any, perl modules are available to deal with math combinations.  Ah, the <a title="Math Combinatorics Module" href="http://search.cpan.org/~allenday/Math-Combinatorics-0.09/lib/Math/Combinatorics.pm">Math::Combinatorics</a> module should fit the bill nicely. Second, we need to install the Math::Combinatorics module locally. While we are at we also need to install <a title="DBI CPAN" href="http://search.cpan.org/~TIMB/DBI/DBI.pm">DBI</a> and <a title="DBD::mysql CPAN" href="http://search.cpan.org/~capttofu/DBD-mysql-4.013/lib/DBD/mysql.pm">DBD::mysql</a> modules to enable perl access to our <a title="MySQL" href="http://www.mysql.com/">MySQL</a> RDBMS so we can insert the combinations into our look up table. Most default perl installs come with a handy tool called <a title="Cpan for CPAN" href="http://search.cpan.org/~andk/CPAN-1.9402/lib/CPAN.pm">cpan</a> which gives command line access to the CPAN online module repository to ease searching and installing locally.</p>
<pre class="brush: bash; toolbar: true;">
joecrotty@macpro:~ $ sudo cpan
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.

cpan[1]&gt; install Math::Combinatorics
...

cpan[2]&gt; q
Terminal does not support GetHistory.
Lockfile removed.
</pre>
<p>With the modules in place our finished perl script is below. Note, the actual database inserts are commented out on lines 29 and 30. String_codes.code_id is an <a title="MySQL auto_increment" href="http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html">AUTO_INCREMENT</a> column.</p>
<pre class="brush: perl; toolbar: true;">
#!/opt/local/bin/perl

use strict;
use warnings;

use Math::Combinatorics;
use DBI;

$| = 1; # disable buffering
my @codes = ('B', 'C', 'C/K', 'G',
             'K', 'L', 'P', 'Y');

# Connect to the database.
my $dbh = DBI-&gt;connect(&quot;DBI:mysql:database=DB;host=HOST&quot;,
                       &quot;USER&quot;, &quot;PASSWD&quot;,
                      {'RaiseError' =&gt; 1});
my $sql = 'INSERT INTO string_codes (codes)
           VALUES (?)';
my $sth = $dbh-&gt;prepare($sql);

for ( 1 .. 8 ) {
    my $combinat = Math::Combinatorics-&gt;new(count =&gt; $_,
                                             data =&gt; [@codes]);

    while(my @combo = $combinat-&gt;next_combination){
        @combo = sort @combo;
        my $combi = join('-', @combo);
        print $combi, &quot;\n&quot;;
        #$sth-&gt;bind_param(1, $combi);
        #$sth-&gt;execute;
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2010/03/math-combinations-rdbms-and-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back Injury Re-Diagnosed</title>
		<link>http://joecrotty.com/2010/03/back-injury-re-diagnosed/</link>
		<comments>http://joecrotty.com/2010/03/back-injury-re-diagnosed/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 02:56:41 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Fire]]></category>
		<category><![CDATA[Featured Content]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=477</guid>
		<description><![CDATA[It has been just over six weeks since injuring what I thought was my Latissimus Dorsi. After four weeks of total rest from all sports I was nearly pain free except in the late evening when the wear and tear of the day would lead to some aches.]]></description>
			<content:encoded><![CDATA[<div id="attachment_491" class="wp-caption alignleft" style="width: 260px"><a title="Infraspinatus Muscle" href="http://upload.wikimedia.org/wikipedia/commons/d/d5/Infraspinatus.PNG" target="_blank"><img class="size-full wp-image-491  " title="Infraspinatus Muscle" src="http://joecrotty.com/wp-content/uploads/2010/03/250px-Infraspinatus.png" alt="" width="250" height="394" /></a><p class="wp-caption-text">Infraspinatus Muscle</p></div>
<p>It has been just over six weeks since injuring what <a title="Latissimus Dorsi Climbing Injury" href="/2010/01/latissimus-dorsi-climbing-injury/">I thought was my Latissimus Dorsi</a>. After four weeks of total rest from all sports I was nearly pain free except in the late evening when the wear and tear of the day would lead to some aches.  So, I took two more weeks off and decided that at six weeks I would see a PT specialist to help direct my recovery. My main concern was discerning what exercises to use and when so I could return to full sports ASAP &#8211; especially climbing.</p>
<p>As luck would have it one of my fellow parishioners at <a title="Holy Trinity Catholic Church" href="http://www.htcatholic.org/">Holy Trinity Catholic Church</a>, Daneen Luna, is a back specialist with many years under her belt at the Veterans Affairs facility here in Denver, CO. Daneen has a cozy PT facility setup at her house in north Denver and after catching up on life for a half hour we settled down in the examination room. After 15 minutes of background discussion she began probing, pulling and testing ruling out <a title="Latissimus dorsi Wiki" href="http://en.wikipedia.org/wiki/Latissimus_dorsi_muscle">lat</a>, <a title="Teres major Wiki" href="http://en.wikipedia.org/wiki/Teres_major_muscle">teres major</a>, and <a title="Teres minor Wiki" href="http://en.wikipedia.org/wiki/Teres_minor_muscle">teres minor</a> muscle injuries. More then likely she was sure I had an <a title="Infraspinatus Muscle Wiki" href="http://en.wikipedia.org/wiki/Infraspinatus_muscle">infraspinatus muscle</a> injury that was for the most part healed. Further, she noted that my caved in chest and over development of certain muscles had left my upper back susceptible to injures. Of course her assessment was spot on as I have had many shoulder injuries the last five years: <a title="Trapezius muscle Wiki" href="http://en.wikipedia.org/wiki/Trapezius_muscle">trapezius muscle</a> both right and left, left <a title="SLAP Wiki" href="http://en.wikipedia.org/wiki/SLAP_tear">SLAP</a> tear +/- (i.e., barely), left <a title="Rotator Cuff Wiki" href="http://en.wikipedia.org/wiki/Rotator_cuff_tear">rotator cuff</a> strain three times, and some deep muscle injures between the lumbar and cervical regions affecting breathing (i.e., mostly resurfacing injuries from snow boarding/skiing accidents).</p>
<p><span id="more-477"></span>Now with the correct diagnosis in hand and a better understanding of the basis of all these recent upper back injuries Daneen laid out a game plan to re-balance my skeletal shoulder alignment. I&#8217;ll be doing a routine of six exercises three to five times per week two sets each for ten repetitions. I was cleared to start lifting weights again except for overhead movements while erect. So psyched to be back in the gym &#8211; much more non-activity sedation and I was going to go stir crazy.</p>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2010/03/back-injury-re-diagnosed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design tweaks</title>
		<link>http://joecrotty.com/2010/03/design-tweaks/</link>
		<comments>http://joecrotty.com/2010/03/design-tweaks/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 02:06:10 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=468</guid>
		<description><![CDATA[About a month ago I revised the website look.  Today I fixed a few subtle things:

&#8216;Featured Posts&#8217; widget images in the sidebar now link directly to the post.
Padding between all the sidebar widgets (e.g., &#8216;Featured Posts&#8217;, &#8216;Recent Posts&#8217;, etc.) is now even.
&#8216;Archives&#8217; sidebar widget is now collapsible. Note, there is a bug in IE6-8 and [...]]]></description>
			<content:encoded><![CDATA[<p>About a month ago I <a title="Website Redesign" href="/2010/01/design-reload/">revised</a> the website look.  Today I fixed a few subtle things:</p>
<ol>
<li>&#8216;Featured Posts&#8217; widget images in the sidebar now link directly to the post.</li>
<li>Padding between all the sidebar widgets (e.g., &#8216;Featured Posts&#8217;, &#8216;Recent Posts&#8217;, etc.) is now even.</li>
<li>&#8216;Archives&#8217; sidebar widget is now collapsible. Note, there is a bug in IE6-8 and I am not sure when I&#8217;ll have time to fix it. My recommendation is to switch your browser to <a title="FireFox" href="http://www.mozilla.com/en-US/firefox/personal.html">Firefox</a>, <a title="Chrome" href="http://www.google.com/chrome">Chrome</a>, or <a title="Safari" href="http://www.apple.com/safari/">Safari</a>.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2010/03/design-tweaks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Latissimus Dorsi Climbing Injury</title>
		<link>http://joecrotty.com/2010/01/latissimus-dorsi-climbing-injury/</link>
		<comments>http://joecrotty.com/2010/01/latissimus-dorsi-climbing-injury/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 20:56:30 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Fire]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=439</guid>
		<description><![CDATA[Monday January 18, 2010 I hiked into the remote Diamond Head crag in Eldorado Canyon State Park with a few friends to try some obscure climbs that I had long dreamed about. Just as we arrived at the base of the climb the wind picked up and a fresh bank of clouds rolled in plummeting [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 500px"><img class=" " title="Cameron's Corner" src="http://www.mountainproject.com/images/38/2/106653802_large_d2ad54.jpg" alt="" width="490" height="653" /><p class="wp-caption-text">Just before the move that partially tore my latissimus dorsi.  Note the upper body rotation.</p></div>
<p>Monday January 18, 2010 I hiked into the remote <a title="Mountain Project Diamond Head" href="http://www.mountainproject.com/v/colorado/boulder/eldorado_canyon_sp/105745735">Diamond Head</a> crag in <a title="Mountain Project Eldorado SP" href="http://www.mountainproject.com/v/colorado/boulder/eldorado_canyon_sp/105744246">Eldorado Canyon State Park</a> with a few friends to try some obscure climbs that I had long dreamed about. Just as we arrived at the base of the climb the wind picked up and a fresh bank of clouds rolled in plummeting the temperature 20 degrees. I donned my heavy winter down coat, but my under garments were all wet from the nearly two hour hike and I remained rather chilly. Due to our location at the crag and a lack of any easily accessible warm up climbs we opted to get on <a title="Mountain Project Cameron's Corner" href="http://www.mountainproject.com/v/colorado/boulder/eldorado_canyon_sp/105755482">Cameron&#8217;s Corner </a>. I did a set of 30 jumping jacks before my lead. This was only my second day of climbing since my wife and I took a <a title="Wiki Cruise Vacation" href="http://joecrotty.com/2010/01/cruising/">two week vacation</a> and my body felt great having just recovered from a minor upper back injury to the middle of my right <a title="Wiki Trapezius" href="http://en.wikipedia.org/wiki/Trapezius_muscle">trapezius</a>. 40&#8242; above the ground you climb past a large ledge into the crux corner (.11b) which consist of making a rotating reach with your left hand for a great ledge while holding a chest high right hand crimper. The foot work mostly freezes your hips and the rotation and extension come primarily from the upper back. As I pulled into the move I felt a transverse shooting pain along my right middle back which nearly caused me to fall off. However, I wanted the onsight badly and reset my foot slightly to get a bit more left hip rotation and fought my way through the back pain successfully. Some ten minutes later lounging at the belay I was uncertain of what I had injured or the extent.</p>
<p><span id="more-439"></span>My partner and I were unsure of what to do next, but long story short I ended up trying to climb a 15&#8242; thin head wall with a crux pseudo mantle that was probably around .10+.  On the third attempt I aggravated the newly acquired back injury. After abandoning the head wall I talked my partner into leading the last pitch of <a title="Mountain Project Shibumi" href="http://www.mountainproject.com/v/colorado/boulder/eldorado_canyon_sp/106653506">Shibumi</a> and confined myself to following the rest of the day.</p>
<p>Once at home the symptoms set in immediatley as follows:</p>
<ul>
<li>Sharp pains at two or three points horizontally across my back from near the spine to my arm pit about one to two inches below my shoulder blade. Near my arm pit was a nasty pain that felt like a small knife. The pain begins as soon as I get up from bed and only subsides when laying down. When sitting if I slouch by moving my butt forward about 6-8&#8243; it&#8217;s almost totally relived.</li>
<li>A deep dull ache in the trapezius extending from about C3 to C10.</li>
<li>Later in the day I get dull throbbing sensations across the lower transverse aspect of my pectoral extending up into my arm pit.</li>
<li>Dull ache in both my right tricep and lower forearm. Probably due to a pinched nerve that accompanied the injury.</li>
</ul>
<p>The initial self diagnosis was <a title="Climbing Injures Rotater Cuff" href="http://www.climbinginjuries.com/page/shoulders#rotator">rotater cuff strain/tear</a>, but notably I was able to sleep comfortably and the pain was in a lower position then when I previously had posterior shoulder impingement injuries (AKA rotater cuff). After digging through a sports injury manual I temporarily settled on <a title="Wiki Frozen Shoulder" href="http://en.wikipedia.org/wiki/Adhesive_capsulitis_of_shoulder">frozen shoulder</a>, but given my lack of any recent long term inactivity with my left shoulder it made little sense.  It had been five days since my injury and I still had no idea what was injured mostly due to the multiple pain locations.  I had been icing it and taking <a title="Wiki NSAIDS" href="http://en.wikipedia.org/wiki/Ibuprofen">NSAIDS</a> daily, but the pain persisted which told me I had a major injury to deal with that desperately needed diagnosis.</p>
<p>Finally, my brain reached deep into it&#8217;s recesses and pulled a rabbit from the mental hat &#8211; <a title="Wiki Latissimus Dorsi" href="http://en.wikipedia.org/wiki/Latissimus_dorsi_muscle">latissimus dorsi</a>. An hour of googling and I had it nailed down.  To definitively determine if I injured my latissimus doris and/or teres major would require an MRI which I will probably forgo. Sadly, middling latissimus dorsi injuries are &#8220;uncommon&#8221; which means the literature about diagnosis, treatment and prognosis is virtually non existent. I found one <a title="Latissimus Dorsi Abstract of Study" href="http://cat.inist.fr/?aModele=afficheN&amp;cpsidt=22020572">abstract  of a study</a> of 11 major league baseball players who had either  latissimus dorsi or teres major injuries (e.g., one with both the lat  and teres major).  All were treated nonoperatively and returned to full  pitching form in 3 months.</p>
<p>My treatment plan for now is more ice (i.e., 3X daily) and ibuprofen.  Once the swelling and accompanying pain are under control I will begin heat therapy.  My guess is this will be a 2-3 month battle to regain full use with probably the first two months being non weight bearing. Queue the <a title="YouTube Really Sad Music Video" href="http://www.youtube.com/watch?v=5-41tg_CS7s">sad music</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2010/01/latissimus-dorsi-climbing-injury/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design Reload</title>
		<link>http://joecrotty.com/2010/01/design-reload/</link>
		<comments>http://joecrotty.com/2010/01/design-reload/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 18:05:24 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=428</guid>
		<description><![CDATA[This is probably the third site re-design in the last six months or so, but for the first time I can honestly say this one just might stick. First, let&#8217;s give due credit to WooThemes design team for this fabulous free Bueno theme. In the future I&#8217;ll be using almost exclusively free and premium  [...]]]></description>
			<content:encoded><![CDATA[<p>This is probably the third site re-design in the last six months or so, but for the first time I can honestly say this one just might stick. First, let&#8217;s give due credit to <a title="WooThemes" href="http://www.woothemes.com/">WooThemes</a> design team for this fabulous free <a title="Bueno Theme" href="http://www.woothemes.com/2009/11/bueno/">Bueno</a> theme. In the future I&#8217;ll be using almost exclusively free and premium  themes from ad hoc design shops like WooThemes due to the time saved and my lack of design skills.</p>
<p>Bueno is a simple modern theme that puts the focus squarely on structure and typography that fits well with my general post style. The only theme switch  hassle was resizing all of the larger images which is typical. The only old design element lost was the roll up archives which I&#8217;ll make an effort to reinstate at a later date when I tidy up this new theme.  For now we are ready to roll!</p>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2010/01/design-reload/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cruising</title>
		<link>http://joecrotty.com/2010/01/cruising/</link>
		<comments>http://joecrotty.com/2010/01/cruising/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 19:17:02 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Retire]]></category>
		<category><![CDATA[Featured Content]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=381</guid>
		<description><![CDATA[Two months ago in early November 2009 Heather, my wife, and I attended our Church's  annual school auction to support Holy Trinity School.  The auction concluded with a hat drawing for the grand prize - an all expense paid cruise to the Bahamas.]]></description>
			<content:encoded><![CDATA[<p><a href="http://joecrotty.com/?attachment_id=408"><img class="alignnone size-large wp-image-408" title="Cruise Ships Port Nassau" src="http://joecrotty.com/wp-content/uploads/2010/01/IMG_2066-490x367.jpg" alt="Cruise Ships Port Nassau" width="490" height="367" /></a></p>
<p>Two months ago in early November 2009 Heather, my wife, and I attended our <a title="Holy Trinity Catholic Church" href="http://www.htcatholic.org/">Church&#8217;s</a> annual school auction to support Holy Trinity School.  The auction concluded with a hat drawing for the grand prize &#8211; an all expense paid cruise to the <a title="Google Maps Bahamas" href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=The+Bahamas&amp;sll=26.212127,-77.423401&amp;sspn=2.358028,4.22699&amp;ie=UTF8&amp;hq=&amp;hnear=The+Bahamas&amp;z=7">Bahamas</a>. To our utter amazement we won!  After a few talks with the travel agency we decided to go on our four day cruise January 10-14. Our only expenses would be round trip plane tickets to Orlando, a rental car and a few nights in hotels.  Our grand plan was to fly to Orlando January 7, 2010 rent a car and spend one night in Orlando.  Then drive up the coast to <a title="Google Maps St. Augustine" href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=st+augustine&amp;sll=25.03428,-77.39628&amp;sspn=9.517104,16.907959&amp;ie=UTF8&amp;hq=&amp;hnear=St.+Augustine,+St.+Johns,+Florida&amp;ll=29.453948,-82.699585&amp;spn=4.576566,8.453979&amp;z=8">St. Augustine</a> and visit with my wife&#8217;s uncle Phil for two days and tour America&#8217;s oldest city and by most accounts settlement.  Then drive to Port Canaveral and board the ship for the four day cruise and take a shuttle back to the airport for the return flight to Denver, CO.</p>
<p><span id="more-381"></span><a title="Slide Show of our vacation" href="http://s168.photobucket.com/albums/u196/joecrotty/2010%20Bahamas%20Cruise/?albumview=slideshow">The plan</a> came off without any major hitches and we both returned refreshed despite a ten day spell of record low temperatures in Florida during the entirety of the vacation. However, I can&#8217;t help but comment on one aspect of this trip &#8211; the cruise.  Upfront I have to say I am not a fan. The setting of a boat destined for two ports of call spread out over three and a half days at sea and the concurrent corporal confinement accompanied was only part of the problem.  In short, as I see things:</p>
<ol>
<li>Port of call dilemma.</li>
<li>Eating habits.</li>
<li>Magnification of worldly ways.</li>
</ol>
<p>Ports of call present the cruiser with three options.  First, stay on the ship. Second, buy a prepackaged excursion and eat the exorbitant cost (e.g., swim with Dolphins $350).  The advantage of prepackaged is it&#8217;s all thought out for you.  Lastly, do it yourself and enter the shark infested waters ashore unabated.  At both ports of call, <a title="Google Maps Grand Bahama Freeport" href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=freeport,+bahamas&amp;sll=29.453948,-82.699585&amp;sspn=4.576566,8.453979&amp;ie=UTF8&amp;hq=&amp;hnear=Freeport,+City+of+Freeport,+The+Bahamas&amp;ll=26.672005,-77.706299&amp;spn=4.696485,8.453979&amp;z=8">Freeport</a> and <a title="Google Maps New Providence Nassau" href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=bahamas,+nassau&amp;sll=40.657602,-73.583183&amp;sspn=0.062313,0.132093&amp;g=freeport,+nassau&amp;ie=UTF8&amp;hq=&amp;hnear=Nassau,+The+Bahamas&amp;ll=25.368846,-77.069092&amp;spn=4.748869,8.453979&amp;z=8">Nassau</a>, we opted for DIY. At Freeport once we had battled the mass of taxi drivers and caught a ride to the Lucayan Beach area we did some window shopping for about an hour. Wanting more adventure we rented a moped and vainly tried to reach <a title="Lucayan National Park" href="http://www.geographia.com/grandbahama/lucayan.htm">Lucayan National Park</a> only to get lost a few times, almost run out of gas, and nearly miss disembarkation. Emboldened by the first DIY experience at Freeport we repeated it at Nassau and spent the day at a public beach being incessantly solicited all manner of beach trinkets and sea scoter rides.  Additionally, on my second ocean swim I received a minor jelly fish sting. The private beaches were all either pay (i.e., $30+/person) or totally exclusive.</p>
<p>The ship offers two options for meals.  A nearly 24/7 buffet with many varieties of general junk food; soft serve ice cream, small boxed cereals, seemingly unlimited supply and variety of grocery store type cakes, etc.  Second, there was a formal dinning hall that served breakfast and lunch.  Breakfast was superb and those looking to eat healthy spartan meals were equally treated.  However, dinner was over the top eating every night.  Decent appetizers, medium to large rich entrees and the usual &#8220;it&#8217;s so rich I&#8217;ll puke&#8221; deserts.  I know what your thinking, &#8220;what&#8217;s the harm in a few decent meals and some rich food &#8211; heck I only get one vacation a year and I want to live it up!&#8221; I saw enough half eaten dinners, acts of random gluttony and trashed food to probably feed an entire large city&#8217;s worth of poor for month.  And at that they would be well feed. Clearly, America is an over weight society and the ship magnifies our problems clearly.</p>
<p>Lastly, all of the worlds ways were on display.  I won&#8217;t bore you with a blow by blow account but just one shinning example. Every night there was a &#8220;show&#8221; put on in the <a title="Carnival Sensation Grand Atrium" href="http://www.carnival.com/Deck_Plan.aspx?shipCode=SE&amp;icid=CC_Carnival%20Sensation_151">Grand Atrium</a>.  Most nights Heather and I were in bed by show time.  The third night I wanted to see the juggling show, but sleep won out.  Finally, on the last night we went to see what was billed as a &#8220;Dance Ensemble&#8221;.  The curtain lifted and a Las Vegas style burlesque dance show ensued with barely dressed humans posing in sexual copulations amid a light show that surely pleased the devil.  Who knows what the rest of it was like as my wife and I made a b-line for the exit in under thirty seconds.</p>
<p>The one saving grace was the kind and humble house keeping and dinning crew on the ship who worked tirelessly.  They did their best daily to bear the cross of Christ.</p>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2010/01/cruising/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bolting 201</title>
		<link>http://joecrotty.com/2009/11/bolting-201/</link>
		<comments>http://joecrotty.com/2009/11/bolting-201/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 02:53:13 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Fire]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=370</guid>
		<description><![CDATA[It all started a few years ago when I became obsessed with a new line in Eldorado Canyon.  Eventually, things culminated and I began to set out to figure out how to bolt the new climb.  With a borrowed drill, charged batteries and good selection of drill bits I drove to a semi secluded overpass [...]]]></description>
			<content:encoded><![CDATA[<p>It all started a few years ago when I became obsessed with a new line in Eldorado Canyon.  Eventually, things culminated and I began to set out to figure out <a title="Bolting 101" href="http://joecrotty.com/2009/10/bolting-101/">how to bolt the new climb</a>.  With a borrowed drill, charged batteries and good selection of drill bits I drove to a semi secluded overpass in North Denver and walked down to a secluded creek bed next to a biking trail and located some suitcase size granite boulders to drill a few practice holes.  Right away I slapped on a 3/8&#8243; bit and went to work.  The action of the hammer drill produces a lot of rock chips flying about as you start the hole and the noise level is significant.  It&#8217;s not jack hammer loud, but much louder then your typical hand held home handyman drill.  The hole start is critical.  You have to get the angle correct in the first half inch or less because the rock is totally unforgiving any deeper.  After the 3/8&#8243; hole was down to about 3&#8243; depth I started a new hole with 1/2&#8243; bit which seemed about twice the work.  After about an inch I quit and then just for kicks tried out another 1/2&#8243; bit that looked fairly dull.  This was a total nightmare as the dull bit refused to gain any purchase no matter how hard I pushed.  Keep in mind this is standing on both feet using my full body weight.  I could only imagine what it would be like hanging from a rope on an overhanging cliff side with a dull drill bit.  Feeling confident in my foray I packed up and went home.</p>
<p><span id="more-370"></span>Rob Woolf, a good friend from the climbing gym and sometimes outdoors climbing partner, agreed to join me October 11, 2009 to bolt the line.  Rob has bolted numerous routes most notably <a title="MP.com Rainbow Wall" href="http://www.mountainproject.com/v/nevada/red_rock/juniper_canyon/105732183">Rainbow Wall</a> in Red Rocks Nevada in the early 90&#8217;s long before it become the sought after modern test piece it is today.  I had all my equipment in order and made sure both Ni-Cad batteries were fully charged the night before.  I even went so far as to buy a $10 dead blow hammer at the local hardware store reasoning that it would be better to use it to drive in the bolts and save the expensive powder coating on the bolt heads.  Early that morning we scrambled up the back side of Lower Peanuts wall and dropped a static line down the route from a solid tree.  The first order of business was to get the anchor established.  Rob went down to the base of the route and jumared back up while I feed him data on the route, proposed bolts and how the rope would move from point to point.  Based on the last clip and taking into consideration top roping and climbers coming down the ridge who might want to use the rappel we moved the anchor location about 4&#8242; right of the originally proposed location.</p>
<p>Rob came up and I went down a few feet and set up to drill.  Things went smoothly with Rob as a second set of eyeballs to help align things we had a great hole.  Out came a fresh bolt and hanger combo.  The first thing I noticed was the bolt didn&#8217;t fit into the hole like I thought it would.  I had the feeling once I gave it a few good whacks with the hammer it would go in.  I asked Rob to hand me the dead blow hammer and he sort of looked at me like I was crazy.  &#8220;What do you plan to do with that Joe?&#8221;  I responded, &#8220;We&#8217;ll I am going to hit the bolt and drive it in&#8221;.  He handed me the hammer with a grin on his face.  It hit the bolt and nothing happened.  Then again and again.  Finally, I swung as hard as I could without taking a chance of missing and wrecking the hand holding the bolt.  Nothing.  Rob looked me straight in the eye and said, &#8220;That dead blow will never stack enough to get that bolt moving&#8221; and traded me the big wall hammer for the dead blow hammer.  Three or four solid blows with the 16oz. big wall hammer and the bolt was moving, but just barely.  All told I probably hit the bolt 40 times, often very hard, to get it fully driven.  It dawned on me at about 20 hammer strokes that this bolt was better then any piton I had ever placed.  Finally, I pulled out the ratchet and socket.  I spent ten years during my late teens and early twenties working at a go-kart track so &#8220;wrenching&#8221; came pretty natural.  The bolt was tight enough, but not so tight a monkey could not loosen it. I fitted the hanger with a 3/8&#8243; quick link and attached a 1&#8242; length of stainless steel chain to the quick link.</p>
<p>The second, and bottom, hole of this vertically aligned anchor was much more complicated then the first because it had to be equalized with the already placed bolt and chain.  To accurately accomplish this I carefully hand aligned the hanger placement and marked the rock with a small scratch from a drill bit tip in the center of the hanger.  After carefully re-checking the scratch mark three more times I drilled a 1/4&#8243; pre-hole.  The 1/4&#8243; bit is much easier to control and gives a greater probability of starting and keeping the hole on the targeted scratch mark.  Ten minutes later the 1/2&#8243; hole was fully drilled out, the bolt was hammered in, tightened and we were ready to put on the quick links and be done.  Rob handed me a 3/8&#8243; Rapide Million powder coated quick link and much to my dismay it did not fit onto the chain on the higher anchor bolt.  I thought I had fit all the parts together at my apartment but after some more fiddling it was clear I had bought the wrong size quick link for the chain.  Rob and I talked over our options and we decided he would take the chain with him and hike back to the vehicle pronto and go to Boulder, CO and try to buy two new matching stainless steel quick links that fit the chain. I would stay and continue bolting.</p>
<p>In Rob&#8217;s absence I managed to place one more bolt and then half way through drilling the fourth hole the battery died.  These holes were much harder to drill as the rock was overhanging requiring a great deal of effort to get the drill moving into the rock.  Typically, I drilled 30-60 seconds and then rested 2-3 minutes before beginning again panting hard between bursts of drilling. However, of important note, it would have been impossible to drill from above.  Very over hanging rock often necessitates drilling top down with previous bolts being the only means to drill.</p>
<p>After jugging to the anchor Rob and I outfitted it with the new 8mm stainless steel quick links he bought at REI.  Rob then rappelled with a new battery to finish up bolt four and jugged backed to turn things back over to me.  I rappelled and in about twenty minutes finished bolt five, but just as I finished drilling it the second battery died.  So, we managed to get 3.5 holes out of one battery and 1.5 out of the other.  Officially out of drilling juice we packed our gear and called it a day.</p>
<p>Two days later, on Tuesday, I returned armed with the better of the two batteries fully charged intent on finishing the bolting.  I rapped in and dispatched bolt number six which was the hardest on the route to drill due to it being in an awkward spot and very over hanging.  Only the lowest bolt on the route remained which was on a slab of lower angle rock.  This will be gravy I thought. Just after starting the hole I realized the drill bit was not getting good bite and the rock I had chosen to drill was darker then surrounding rock and bullet hard.  It took about 20 minutes to get an inch in depth and of course in the process I killed the battery. The other battery was uncharged and more importantly sitting back at my apartment in Denver.  With a slight hesitation, but total conviction once drawn up I executed the following plan: rappell, drive back to Denver, charge both batteries while eating lunch, and return to rap in again this time to finish it off for good.</p>
<p>I realized when starting to drill again on the last hole that the bit was getting dull and that was part of the problem of why I was not getting good results with my progress on this hole. I switched to another newer bit and sure enough it went right through that harder rock like butter.  However, this new bit was not long enough to finish the job so once I was at about 3.5&#8243; deep I switched to the old bit for the last two inches.  Fortunately, I was now back into some softer rock and the old bit was doing an OK job.  Just as I was finishing up the hole the carbide tip on the drill broke.  Thankfully done drilling I hammered in the bolt, but realized the hanger was not totally flush with the rock because the angle of the hole was not perfect. Mentally I was stunned temporarily.  Here I was minutes away from successfully completing my first bolted route and I had botched my last hole by five degrees and was scrambling to figure a way out.  Then it dawned on me &#8211; brute force.  I would simply hammer on the bolt hard enough to bend the hanger ever so slightly.  My plan worked to perfection.  Ten or so heavy hammer blows bent the hanger sufficiently to force it flush with the rock.  To the trained eye the flaw was evident, but the uninitiated would blissfully clip for decades to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2009/11/bolting-201/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Redesign</title>
		<link>http://joecrotty.com/2009/11/website-redesign/</link>
		<comments>http://joecrotty.com/2009/11/website-redesign/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 23:15:16 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=363</guid>
		<description><![CDATA[It&#8217; pretty obvious thing have changed.  The old is out and in it&#8217;s place a new bright blue look is born based on the WordPress Stripey theme.  Really, there are only a few key changes with the new look:

Header logo and binary code which adds a cleaner more professional feel.  I plan to add [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217; pretty obvious thing have changed.  The old is out and in it&#8217;s place a new bright blue look is born based on the WordPress <a title="WP Stripey theme" href="http://www.free-wptheme.com/free-wordpress-themes/page1/stripey-v1.6">Stripey</a> theme.  Really, there are only a few key changes with the new look:</p>
<ol>
<li>Header logo and binary code which adds a cleaner more professional feel.  I plan to add a maltese cross, but ran out of time on this effort.</li>
<li>Better search box.</li>
<li>Subtle post header meta data changes.</li>
<li>Archive posts in the right sidebar are rolled up by year and counts listed for each month.</li>
</ol>
<p>Shot me an email or drop a comment if you find any bugs or simply can&#8217;t stand it!</p>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2009/11/website-redesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimizing WordPress Websites</title>
		<link>http://joecrotty.com/2009/10/optimizing-websites/</link>
		<comments>http://joecrotty.com/2009/10/optimizing-websites/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 02:13:24 +0000</pubDate>
		<dc:creator>Joseph Crotty</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://joecrotty.com/?p=318</guid>
		<description><![CDATA[Recently a web client asked me if I could figure out why their page was loading so slowly. Simple enough question on the surface. Like any sensible web engineer I immediately opened Firefox enabled the Firebug plug-in and went to Net Panel. It was clearly evident after poking around for a few minutes that the [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 250px"><img title="Website Speed" src="http://i168.photobucket.com/albums/u196/joecrotty/joecrottycom/timer-icon.png" alt="Website Speed" width="240" height="240" /><p class="wp-caption-text">Website Speed</p></div>
<p>Recently a web client asked me if I could figure out why their page was loading so slowly. Simple enough question on the surface. Like any sensible web engineer I immediately opened <a title="FireFox" href="http://www.mozilla.com/en-US/firefox/personal.html">Firefox</a> enabled the <a title="Firebug" href="http://getfirebug.com/">Firebug</a> plug-in and went to <a title="Firebug Net Panel" href="http://getfirebug.com/net.html">Net Panel</a>. It was clearly evident after poking around for a few minutes that the <a title="WordPress" href="http://wordpress.org/">WordPress</a> site in question, which I built but didn&#8217;t do the design and image work for, was sized at just over a megabyte of which ~50% was images. In the scramble to get the site up and running I just took the images the designer handed me and plugged them in without any further thought then &#8220;Hey, those do look very good!&#8221; I informed the client that the images were hogging up a good bit of bandwidth and they should have a graphics expert put the  images on a diet via <a title="Adobe Products" href="http://www.adobe.com/">PhotoShop</a>.  However, that other 50% of overall slowness that was not related to the images nagged at me.</p>
<p>Within the hour I had mentally resolved to figure out why the rest of the site was slow and apply anything learned to improving current and future site builds. My basic game plan after googling for a few hours and discovering <a title="YSlow" href="http://developer.yahoo.com/yslow/">YSlow</a> was as follows:</p>
<ol>
<li>Serve the HTML gzip&#8217;ed and cached</li>
<li>Serve the CSS/JS gzip&#8217;ed and cached</li>
<li>Reduce the number of overall requests by combining CSS/JS files where possible</li>
<li>Add Expires Headers</li>
<li>Move as many images as possible externally</li>
</ol>
<p><span id="more-318"></span></p>
<p>I know YSlow has some other recommendations, but the above are the really low fruit. With WordPress <a title="WP SuperCache" href="http://wordpress.org/extend/plugins/wp-super-cache/">SuperCache</a> enabled the first one is a no brainer.</p>
<p>The second one also seems like a no brainer &#8211; just enable <a title="Apache" href="http://www.apache.org/">apache&#8217;s</a> <a title="Apache 2.2 mod_deflate" href="http://httpd.apache.org/docs/2.2/mod/mod_deflate.html">mod_deflate</a> and be done with it.  Ah, but wait a minute.  What if your host doesn&#8217;t have mod_deflate enabled?  Even if they do have mod_deflate enabled you could just be pushing your servers CPU and memory to the limit by gziping everything on every request.  <a title="PHP Gziping" href="http://www.fiftyfoureleven.com/weblog/web-development/css/the-definitive-css-gzip-method">Some argue</a> to use a PHP script in conjunction with .htaccess to gzip on the fly.  Again, your just straining the server needlessly all the time. The solution I settled on is to <a title="Minify" href="http://en.wikipedia.org/wiki/Minification_%28programming%29">minify</a> and gzip the CSS/JS files on the webserver into psuedo .gz extensions (e.g., *.css = *.css.cgz and *.js = *.js.jgz) with the following script:</p>
<pre class="brush: bash;">
#!/bin/sh

# minify and gzip css and js files, Apache .htaccess
# will deliver them to the client encoded

# WP core css files are not minified. All WP core css files and theme files
# are minified and then gziped.  WP core js files are all already minified.  Some of
# the theme files are also minified, but a few are not.  Experiments show that
# minifying theme files caused rendering problems and gave very little
# optimization, so we don't bother to minify them.

yuicomp='yuicompressor-2.4.2'

# gzip all css files
for i in `find . -type f -name &quot;*.css&quot;`; do
echo &quot;minifying and gziping $i&quot;
java -jar $HOME/java/${yuicomp}/build/${yuicomp}.jar --nomunge $i &gt; ${i%.*}.min.css
gzip -c ${i%.*}.min.css &gt; ${i}.cgz
rm -f ${i%.*}.min.css
done

# gzip all js files
for i in `find . -type f -name &quot;*.js&quot;`; do
echo &quot;gziping $i&quot;
gzip -c $i &gt; ${i}.jgz
done
</pre>
<p>Note, WordPress core JS files are already minified so you only need to gzip.  Further, be careful minifying JS files as there are sometimes unintended consequences.  Given the performance and headache trade-off I only gzip JS and don&#8217;t bother to minify.</p>
<p>Then add the following to .htaccess file:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteCond</span> %{HTTP:Accept-Encoding} gzip
&nbsp;
<span style="color: #adadad; font-style: italic;"># serve gzipped css</span>
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME}.cgz -f
<span style="color: #00007f;">RewriteRule</span> (.*)\.css$ $<span style="color: #ff0000;">1</span>\.css.cgz [L]
<span style="color: #00007f;">AddType</span> <span style="color: #7f007f;">&quot;text/css&quot;</span> .css.cgz
<span style="color: #00007f;">AddEncoding</span> gzip .cgz
&nbsp;
<span style="color: #adadad; font-style: italic;"># serve gzipped js</span>
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME}.jgz -f
<span style="color: #00007f;">RewriteRule</span> (.*)\.js$ $<span style="color: #ff0000;">1</span>\.js.jgz [L]
<span style="color: #00007f;">AddType</span> <span style="color: #7f007f;">&quot;text/javascript&quot;</span> .js.jgz
<span style="color: #00007f;">AddEncoding</span> gzip .jgz</pre></div></div>

<p>Third item turns out to be a real hassle in WordPress.  WordPress is a great CMS that offers a great environment for themes and a diverse selection of plugins. But the price is an architecture where components are spread about a large file tree in a fashion that makes it nearly impossible to combine CSS/JS files without threatening to break when WordPress core, plugin, and theme upgrades roll in which is frequently. I didn&#8217;t bother as it just seemed too dangerous to even think about touching with the proverbial ten foot pole.</p>
<p>Number four is another apache related issue.  Either you have, or can have via your host, <a title="Apache 2.2 mod_expire" href="http://httpd.apache.org/docs/2.2/mod/mod_expires.html">mod_expire</a> enabled or you don&#8217;t.  If you do then it&#8217;s just as easy as the following .htaccess line to get the ball rolling:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">ExpiresActive</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">ExpiresDefault</span> <span style="color: #7f007f;">&quot;access plus 1 week&quot;</span></pre></div></div>

<p>Remember, though, this assumes your server controls the request.  If you have a large image file on your site that loads frequently and you moved it to <a title="Amazon S3" href="http://aws.amazon.com/s3/">Amazon S3</a> to reduce you load time and bandwidth (IMHO &#8211; probably a good move most of time) chances are the external host will not expire the image at all.</p>
<p>Lastly, try to move your big images to an external host like <a title="PhotoBucket" href="http://photobucket.com/">PhotoBucket</a>. Let PhotoBucket deal with the overhead and if you need to pay them for a Pro account. It&#8217;s worth a mislay $20/year so that your loyal online readers don&#8217;t have to suffer through frequent slow page loads.</p>
<p>Speaking of loyal readers I have applied the lessons from this post to the site and it&#8217;s definitively faster!</p>
]]></content:encoded>
			<wfw:commentRss>http://joecrotty.com/2009/10/optimizing-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.571 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-10 15:35:43 -->
<!-- Compression = gzip -->