<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Cold Hard Code, Purveyors of Fine Internet Properties</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/" />
    <link rel="self" type="application/atom+xml" href="http://www.coldhardcode.com/atom.xml" />
    <id>tag:www.coldhardcode.com,2008-08-14://2</id>
    <updated>2010-04-07T17:15:26Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.23-en</generator>

<entry>
    <title>My thoughts on the iPad</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2010/04/my-thoughts-on-the-ipad.html" />
    <id>tag:www.coldhardcode.com,2010://2.126</id>

    <published>2010-04-03T19:47:21Z</published>
    <updated>2010-04-07T17:15:26Z</updated>

    <summary>I&apos;ve been a dedicated Mac user for about 2 years. I purchased a MacBook Pro 3 years ago, and used it just for traveling. The turning point for me was struggling for about 20 minutes to connect to an Airport...</summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
    <category term="apple" label="apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="devices" label="devices" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gadgets" label="gadgets" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ipad" label="ipad" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone" label="iphone" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[<p>I've been a dedicated Mac user for about 2 years.  I purchased a MacBook Pro 3 years ago, and used it just for traveling. The turning point for me was struggling for about 20 minutes to connect to an Airport WiFi network, and while I was sitting there 3 different people with Macs sat down and immediately loaded webpages.  That made me envious.
</p><p>
The other part is that I saw how quickly the Apple laptops wake up (and sleep).  That also made me envious.  I've happily trusted Apple to make a device that I want to use to accomplish the task they built the device for.  This is an important distinguishing factor, because trying to use an Apple device for a use not intended is very frustrating.  This is why I still use Linux servers, and can't imagine ever switching.
</p><p>
With this all in mind, when I looked at the iPad there was a moment of confusion.  What is this device? What are the competitors? The UMPC segment isn't there, and the iPad <em>is</em> different than tablets.  I honestly don't think there are competitors on the market now (JooJoo doesn't count), but there certainly will be (the HP tablet, etc).
</p><p>
The iPad is the natural evolution of the iPod.  The very first generation iPod hit the market with an MSRP of $399.  Not very far off of the $499 for the iPad, released 9 years later.
</p><p>
The iPad is pushing the limits of current technology, much like the iPod did back then (for those people questioning this statement, I dare you to look at iPod competitors back then.)
</p><p>
With technology at the point it is now, the current crop of personal media devices is going to be the future. Apple did not do this abruptly, they have been slowly removing and testing the waters.  The AppleTV was the first device for media consumption, and it largely failed.  The iMac and Mini were full computer that was largely non-servicable by the end-user.  The MacBook Air was the closest shot, a closed device without a lot of ports.  This was the perfect litmus test to see if people in general were willing to start giving up on things they didn't use.
</p><p>
This is where we are at.  We have purpose-built devices that excel at what they're built at doing.  In the case of the iPad, it's exactly that: a pad. Much like a pad of paper, this is the new generation.  It isn't a computing device, nor should it ever attempt to be one. It will fail at that, just as much as the current "Tablets" fail at being competitors to the iPad.
</p><p>
You don't want background tasks on this.  It's a single-task type of device.  Push notifications and perhaps event loops are important, but on the iPad (or any other Pad device) you should be focusing on a single task.  This is the expectation the device has of its user.
</p><p>
The technology is to be able to quickly flip between tasks.  This is where Apple has a leg up on competitors and I am not sure if the competitors are going to truly understand that the quick-task switching is <em>the</em> killer feature.  One which Apple does well with, but I still think they could do better.
</p><p>
So after sitting with my iPad for a couple days, both using it as a productivity enhancer and just a media consumption device, I still think they have a hit.  it's exactly what it should be.  It isn't perfect, but none of the first generation of devices are.  I'll be buying the next generation when it comes out, and be very happy.
</p>
<h3 id="ipad-pros">Pros:</h3>
<ol>
 <li>Vivid screen. Very impressive, readable and perfect.</li>
 <li>Orientation Lock is fantastic.</li>
 <li>It works exactly as you would expect.</li>
</ol>
<h3 id="ipad-cons">Cons</h3>
<ol>
<li>It's heavy.  I'll build up forearm strength simply reading in bed (a pro?)</li>
<li>There is disparity between applications on which way is down.  The case should resolve this.  Certain applications have fixed orientation (usually games) and that "Down" direction may be counter to what is natural to you, and it doesn't rotate.  As an example, Harbor Master's "Down" is contrary to the case.</li>
<li>Apps are expensive.  More screen real estate does not automatically make something worth more.  The app itself needs to be more.  There isn't the "14 Day Free Trial" editions on the iPad, and because of that it precludes me from buying a lot of applications I'd like.</li>
<li>The App Store.  It has too many limitations.  No free trials, the iPad/iPhone split isn't clean enough.</li>
</ol>
<p>Now, each and every one of those cons is temporary and I'm certain will be resolved within the next couple of years.  I'll be on my 3rd iPad and probably my 5th iPhone by then, and enjoying every one.</p>]]>
        
    </content>
</entry>

<entry>
    <title>An early project migration, from MogileFS to MongoDB</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2010/03/an-early-project-migration-fro.html" />
    <id>tag:www.coldhardcode.com,2010://2.125</id>

    <published>2010-03-24T14:36:19Z</published>
    <updated>2010-03-24T23:02:54Z</updated>

    <summary><![CDATA[As vaguely announced, a few days ago we launched a new project called CodePeek. &nbsp;While we have our own reasons for this particular project, it was really just a very quickly done project that, by default, was built using the...]]></summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Codepeek" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="codepeek" label="codepeek" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="development" label="development" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mongodb" label="mongodb" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[<p>As vaguely announced, a few days ago we launched a new project called <a href="http://codepeek.com">CodePeek</a>. &nbsp;While we have our own reasons for this particular project, it was really just a very quickly done project that, by default, was built using the tools that we had available to us and experience with. &nbsp;One of those tools we picked simply because of familiarity was MogileFS.
</p><p>
MogileFS has always been my default choice whenever I needed to store a lot of data <em>somewhere</em>, without any relational context to that data. &nbsp;It handles replication, and for the most part just works. &nbsp;For things like pastes, with the support for images and other media types, it was a reasonable choice.
</p><p>
Except it is just a bit fragile and lacks certain features that we really wanted to have available to us. &nbsp;I don't want this to be interpreted as being critical of MogileFS because I think it's good software. &nbsp;However, I do think that it is software that requires more attention than what we wanted to give it and also is not an exact fit for our purposes.
</p><p>
This discussion was happening while we are also exploring various document-based storage engines (commonly referred to as "<a href="http://en.wikipedia.org/wiki/NoSQL">NoSQL</a>"). &nbsp;This movement has produced CouchDB and, of course, MongoDB (as well as many others). &nbsp;For us, MongoDB looked like the obvious solution because it supports replication, has an incredibly easy API and was very fast in our tests.
</p><p>
After about an hour of hacking and debugging last night, I had everything working. &nbsp;I spent 20 minutes this morning writing a migration script and everything has just simply worked.
</p><p>With a total investment of about 2 hours &mdash; including setup, "apt-get install mongodb" wasn't much trouble &mdash; we have replicated MongoDB storage (across 2 Linodes), and new storage code. &nbsp;I'm pretty impressed with the agility in which we can move to replace a storage backend, and believe it is a testament to the quality inherently available when using superior tools, like <a href="http://moose.perl.org/">Moose</a>, <a href="http://www.catalystframework.org/">Catalyst</a> and <a href="http://search.cpan.org/dist/DBIx-Class/">DBIx::Class</a>.
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Designing Codepeek: The Logo</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2010/03/designing-codepeek-the-logo.html" />
    <id>tag:www.coldhardcode.com,2010://2.119</id>

    <published>2010-03-20T13:10:43Z</published>
    <updated>2010-03-20T14:41:47Z</updated>

    <summary><![CDATA[Much of my work to date with Cold Hard Code has been for relatively large applications. &nbsp;These big, complex applications can quickly overwhelm so a lot of time is spent keeping things simple. &nbsp;Our most recent project, Codepeek, gave me...]]></summary>
    <author>
        <name>gphat</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Codepeek" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="design" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="designlogocodepeek" label="design logo codepeek" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[<p>Much of my work to date with Cold Hard Code has been for relatively large applications. &nbsp;These big, complex applications can quickly overwhelm so a lot of time is spent keeping things simple. &nbsp;Our most recent project, <a href="http://codepeek.com" class="">Codepeek</a>, gave me a chance to make something less intense.
</p><p>
The logo came together very fast. &nbsp;Hoefler &amp; Frere-Jone's <a href="http://www.typography.com/fonts/font_overview.php?productLineID=100035" class="">Tungsten</a> is CHC's corporate font so it's use was predetermined. &nbsp;I had it in my head to create something playful, classy and more pop than my usual work.
</p><p>
From jump I knew that I wanted to set the text on an arc. After a few attempts I finally found what I wanted with a negative leading. This gave it a presence that reminded me of an announcer crowing to the crowd: Codepeek has arrived!
</p><p>
The two-tone effect is intentional, providing some clarification for the words. &nbsp;The name is inspired by the concept of "peeking at code". &nbsp;My original idea was "peekcode" but the k and c felt like a linguistic train wreck that refused to roll off the tongue. &nbsp;Codepeek worked much better but was backward from my original concept. &nbsp;Placing "peek" front and center in bright white balanced the message I was trying to send. &nbsp;Careful not to forget the "code" I added a strong gradient and some subtle dots that are intended to look like bubbles rising in the code. &nbsp;Those embellishments can be easily removed and the logo reduced to <a href="http://codepeek.com/paste/muliedfsqkmwcao" class="">two colors</a> very easily, fulfilling one of the rules of logo design.
</p><p>
The small leaves set behind the name are decorative fleurons that provide some distinction for an otherwise wordy logo. &nbsp;It's a purely subjective decoration that I have an odd affinity for.
</p><p>
<a href="http://codepeek.com" class="">Codepeek</a> was a great project that Jay and I took from concept to production in just over a week. &nbsp;It gave me an opportunity to create a light, playful identity that I'm very proud of.</p>]]>
        
    </content>
</entry>

<entry>
    <title>CPAN Improvements, Take 2</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2010/02/cpan-improvements-take-2.html" />
    <id>tag:www.coldhardcode.com,2010://2.117</id>

    <published>2010-02-02T13:54:32Z</published>
    <updated>2010-02-02T16:13:11Z</updated>

    <summary><![CDATA[I'm now revisiting my CPAN post from before. &nbsp;The illustrious charsbar commented about CPAN options that certainly do a good job hiding the things you don't need to see, except for when you need to see them.I thought I'd give...]]></summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="cpan" label="cpan" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="development" label="development" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="software" label="software" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="softwaredevelopment" label="software development" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[I'm now revisiting my CPAN post from before. &nbsp;The illustrious charsbar commented about CPAN options that certainly do a good job hiding the things you don't need to see, except for when you need to see them.<br><br>I thought I'd give some examples to show how these options are not good enough, and not really what I'm after.<br><br>First, imagine the case of local::lib being setup. &nbsp;Then you run CPAN (1.9402) after local::lib aliases are setup; As expected, right after 'cpan', you are met with a configuration prompt. &nbsp;It tells you that you have no access to write to /root/.cpan. &nbsp;Of course, because we're good developers and use local::lib. &nbsp;This works well, the user configuration is created but then there is a problem:<br>
<code><pre>nolock_cpan[1]&gt; o conf halt_on_failure yes                             
 halt_on_failure [yes]
Catching error: "/etc/perl/CPAN/Config.pm is not writable at /usr/local/share/perl/5.10.0/CPAN/HandleConfig.pm line 286\cJ\cICPAN::HandleConfig::commit('CPAN::HandleConfig') called at /usr/local/share/perl/5.10.0/CPAN/HandleConfig.pm line 213\cJ\cICPAN::HandleConfig::edit('CPAN::HandleConfig', 'halt_on_failure', 'yes') called at /usr/local/share/perl/5.10.0/CPAN/Shell.pm line 393\cJ\cICPAN::Shell::o('CPAN::Shell', 'conf', 'halt_on_failure', 'yes') called at /usr/local/share/perl/5.10.0/CPAN.pm line 375\cJ\cIeval {...} called at /usr/local/share/perl/5.10.0/CPAN.pm line 372\cJ\cICPAN::shell() called at /usr/local/bin/cpan line 198\cJ" at /usr/local/share/perl/5.10.0/CPAN.pm line 391
	CPAN::shell() called at /usr/local/bin/cpan line 198
</pre></code>
That wasn't what we wanted, right? &nbsp;Here's another point, and an easy bug. &nbsp;If CPAN knows it created a user configuration, automatically reload it. &nbsp;Minor nit. &nbsp;CPAN.pm has a plethora of open bugs, it's daunting to just file a bug because you don't want to file a dupe. &nbsp;After I write this post, I'll see about that.<br><br>So, you exit cpan and restart, it says the other process isn't responding. &nbsp;Overwrite it? &nbsp;Sure! &nbsp;Now we're in business. &nbsp;This is not a good user experience. &nbsp;So far it looks like everything is broken, and there isn't anything shown to the user that CPAN is ready to do what it is supposed to do.<br><br>Now that we're here, setting the various options charsbar pointed out works. As expected, now just the "perl Makefile.PL" is loud and the installation prompts fill the backlog. &nbsp;It is much improved, as the more important details are present. &nbsp;The screen is still filled with all sorts of information that I don't need, or even want. &nbsp;Test passes, etc. &nbsp;The verbosity options merely affect CPAN.pm operations, and not the actual building. &nbsp;I want a very nice filter. &nbsp;<br><br>When things fail, the situation is no different regardless of the CPAN options. &nbsp;I have pages and pages of text to deal with, the only benefit is that now I aborted on a failure. &nbsp;I have no way to jump in and attempt to resume after fixing this error.<br><br>Here's the output of the first test failure (namespace::clean) that just stops the install in its tracks:<br><code><pre>t/07-debugger.t .......... 
Loading DB routines from perl5db.pl version 1.32
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(t/07-debugger.t:26):	    package Foo;
Unknown error
Compilation failed in require at /home/ems/perl5/lib/perl5/Term/ReadLine/Perl.pm line 63.
 at /home/ems/perl5/lib/perl5/Term/ReadLine/Perl.pm line 63
	Term::ReadLine::Perl::new('Term::ReadLine', 'perldb', 'GLOB(0x8465e28)', 'GLOB(0x83ba9e8)') called at /usr/share/perl/5.10/perl5db.pl line 6073
	DB::setterm called at /usr/share/perl/5.10/perl5db.pl line 2237
	DB::DB called at t/07-debugger.t line 26
Test::Builder::CODE(0x8429fc8)(/home/ems/perl5/lib/perl5/Test/Builder.pm:2426):
2426:	    $Test-&gt;_ending if defined $Test;
Attempt to reload Term/ReadLine/readline.pm aborted.
Compilation failed in require at /home/ems/perl5/lib/perl5/Term/ReadLine/Perl.pm line 63.
END failed--call queue aborted at t/07-debugger.t line 63.
 at t/07-debugger.t line 63
Attempt to reload Term/ReadLine/readline.pm aborted.
Compilation failed in require at /home/ems/perl5/lib/perl5/Term/ReadLine/Perl.pm line 63.
END failed--call queue aborted at t/07-debugger.t line 63.
 at t/07-debugger.t line 63
Test::Builder::DESTROY(/home/ems/perl5/lib/perl5/Test/Builder.pm:317):
317:	    my $self = shift;
t/07-debugger.t .......... Dubious, test returned 9 (wstat 2304, 0x900)
No subtests run 
t/08-const-sub.t ......... ok   

Test Summary Report
-------------------
t/07-debugger.t        (Wstat: 2304 Tests: 0 Failed: 0)
  Non-zero exit status: 9
  Parse errors: No plan found in TAP output
Files=9, Tests=73,  0 wallclock secs ( 0.02 usr  0.03 sys +  0.42 cusr  0.07 csys =  0.54 CPU)
Result: FAIL
Failed 1/9 test programs. 0/73 subtests failed.
make: *** [test_dynamic] Error 255
  FLORA/namespace-clean-0.13.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports FLORA/namespace-clean-0.13.tar.gz
Running make install
  make test had returned bad status, won't install without force
Stopping: 'install' failed for 'F/FL/FLORA/namespace-clean-0.13.tar.gz'.
Failed during this command:
 FLORA/namespace-clean-0.13.tar.gz            : make_test NO

</pre></code>We're still not in any position to help the user. &nbsp;What do to from here? &nbsp;Well, the only thing is to see cpan-testers results. &nbsp;This doesn't help anybody succeed.<br><br>So, even with the verbosity options set to the quietest setting, it does nothing for the output of the various Makefile.PL/Build.PL outputs. &nbsp;There isn't any assistance offered, or even help for the user to plug into a google search.<br><br>If these modules are on the CPAN, it is reasonable to assume a standard of behavior. &nbsp;Such that my desired output is feasible:<br><br><code><pre> * Fetching {module name}...  ok
 * Unpacking {module name}...  ok
 * Following dependencies...  ok
 * Testing {module name}...   ok
</pre></code><br>The other thing would be to have a full dependency list calculated at the start, so it can be determined what packages need to be installed and in what order, just to suppress the enter-mashing problem.<br><br>I suppose that a lot of this could simply be an output processor for the make/install loop, and then other CPAN loops.<br><br>If the Perl community wants to tout "the CPAN" as the killer feature, then CPAN.pm needs to be a killer feature.<br><br>I'm hoping the next version of a CPAN shell keeps this in mind, and it ultimately boils down to these priorities:<ol><li>Don't inundate the screen with useless messages on success.<br></li><li>Don't be terse and not include messages on failure.<br></li><li>Help the user.<br></li></ol><div>On a related note, I came across an article titled&nbsp;<a></a><a>Marketing the Entire Box (including the wrapper)</a> while writing this. &nbsp;It's a good read which I highly recommend.<br><br>Developers may find marketing to be slimey and sleazy, but understand that having a tool that insults and frustrates the user is just as much marketing as having a beautiful website with quality typography and information architecture.</div><div><a></a></div><div><a></a></div><div><a></a></div><div><br>I'll get off my soapbox now.</div>]]>
        
    </content>
</entry>

<entry>
    <title>Improving CPAN, make money and help Perl</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2010/01/improving-cpan-make-money-and.html" />
    <id>tag:www.coldhardcode.com,2010://2.116</id>

    <published>2010-01-22T17:46:28Z</published>
    <updated>2010-01-22T19:55:14Z</updated>

    <summary><![CDATA[I have a new server to setup, which will be a staging and development environment. &nbsp;This means I'll be installing much more than is typical, and I figured it is a good chance to test the legs of Task::Kensho.The first...]]></summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="better" label="better" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cpan" label="cpan" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="improvingcpan" label="improving cpan" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="improvingperl" label="improving perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[I have a new server to setup, which will be a staging and development environment. &nbsp;This means I'll be installing much more than is typical, and I figured it is a good chance to test the legs of Task::Kensho.<br><br>The first line summary is that I'm slightly disappointed, because there were failures in mid-stream and while it continued, it wasn't exactly intuitive as to the failure. &nbsp;One of my biggest complaints about working in any programming language is when you get ambiguous failure messages. &nbsp;Failures with messages "Can't locate namespace/clean.pm in..." followed by a tremendous deluge of test failure messages counts there. &nbsp;Especially when namespace::clean should have been installed.<br><br><i><b>Update:</b></i> The bounty and details are at the bottom, but <a>sartak</a> is also throwing in $100.&nbsp; $200 to make a CPAN client that doesn't scare people.&nbsp; Lets do it, people.<br><br>And here is the long version. &nbsp;I setup a Linode 360, deployed Debian 5.0 on it. &nbsp;After it booted, I added my user account and setup sudo. &nbsp;Then proceeded down the path of having a working development environment:<blockquote><code>sudo apt-get install perl mysql-server libdbd-mysql-perl lib-dbd-sqlite3-perl build-essential unzip</code></blockquote><br>If you don't install unzip, CPAN can't find it and will error when it encounters a package that is zipped. &nbsp;Why people upload packages to the CPAN as a zip I'll never know, but that's their (silly) choice.<br><br>After this, (as root) I install local::lib<blockquote><code>sudo su -<br>cpan local::lib</code></blockquote><br>On Debian 5.0, CPAN has the capability of automatically configuring itself. &nbsp;This is nice, and just works. &nbsp;So far so good.<br><br>Now, under my user account:<br><br><blockquote><code>perl -Mlocal::lib &gt;&gt; .profile<br>. .profile<br></code></blockquote><br>At this point, I can use CPAN as my user and install into my perl lib directory and not deal with anything on the system level. &nbsp;No more sudoing, so enter <a title="" target="" href="http://search.cpan.org/dist/Task-Kensho/lib/Task/Kensho.pm">Task::Kensho</a>.<blockquote><code>cpan Task::Kensho</code></blockquote><br>Here you have a lot choices, but fortunately they are easy to understand. &nbsp;Since I'm working with DBIC and Catalyst, with lots of Moose, those were the choices I made - as well as selecting the various command-line options and other utilities for developing.<br><br>Unfortunately, the Moose section failed. &nbsp;Sub::Identity failed to download, thus blocking namespace::clean from installing, subsequently failing MooseX::Types and then I had a little storm of failure. &nbsp;This is quite frustrating, but I just ran "cpan namespace::clean" in another session and was able to install it properly the second time.<br><br>Now to be safe I installed MooseX::Types and MooseX::Types::Path::Class, since that was the point that it failed.<br><br>Here's an important bit. &nbsp;If I wasn't paying attention I would have no idea what failed, or why it failed. &nbsp;CPAN silently continued on to the next module and I had to scroll up to see the failures and only my experience with Perl and CPAN was able to allow me to continue.<br><br>Also, there is a lot of enter pushing. &nbsp;There are options to automatically follow, but because of failures like above I didn't set that. &nbsp;Good thing, or I wouldn't have everything installed.<br><br>I had the same issues with several other modules, mostly in the Task::Moose bundle. &nbsp;Each one, while installing separately, was successful; only when part of Task::Kensho did these fail. I don't mean this as a criticism of Task::Kensho, instead it is about the CPAN client.<br><br>It has messages that are quite specific:<br><div class="yui-wk-div"><blockquote><code>Warning: Prerequisite 'Parse::Method::Signatures =&gt; 1.003012' for 'A/AS/ASH/TryCatch-1.002000.tar.gz' failed when processing 'F/FL/FLORA/Parse-Method-Signatures-1.003013.tar.gz' with 'make_test =&gt; NO'. Continuing, but chances to succeed are limited.</code></blockquote><div class="yui-wk-div"><br>Too specific, CPAN knows it is going to fail and instead of stopping to ask the user for help or doing something that will be useful, it continues on and buries the failures amidst dozens of lines of meaningless test failures.<br><br>It's not a terrible experience, but it is extremely verbose and the most important messages are hidden. &nbsp;You have to either decide between hitting enter constantly at each dependency step, and catching when things fail, or simply hope that things will succeed. &nbsp;In my experience, they won't succeed and as such I'm forced to press enter a lot and keep another session open so that I may install modules that fail by hand.<br><br>This is not an experience that a user who is new to Perl should endure.<br><br>In an effort to be constructive, here is how I envision a much better process.<br><br>CPAN has a default output mode that is not so verbose. &nbsp;I don't need to see the result of unpacking a module, the prerequisites that aren't found and the requirement list. &nbsp;I should instead see something like this:<br><br><blockquote><code>&nbsp;* Fetching {module name}... ok<br>&nbsp;* Unpacking {module name}... ok<br>&nbsp;* Following dependencies...</code></blockquote><br>In the case of a failure, or an attempt to fetch a dependency that has failed to install, CPAN should immediately pause and ask the user what to do. &nbsp;The reasonable choices are: Attempt to refetch/install, Show Details or Abort. &nbsp;If you show details, it should show the entire log from the Unpack to the Failure.<br><br>I'm not familiar with CPAN internals, and don't really care to be. &nbsp;So, here's my offer to solve this problem.<br><br>$100 in cash, check or paypal, to anybody who gets a mode of CPAN working as described. &nbsp;The money is just a token, and I have no idea how long it will take to do this. &nbsp;It doesn't seem complex to simply reduce output and change that "Prerequisite failed when processing" message I listed above to something helpful. &nbsp;Maybe $100 is too little, but the point is you're helping the Perl community by making our most valuable tool more functional. &nbsp;Comments welcome to flesh this out, maybe other people are interested in matching additional funds to whoever can make CPAN not so daunting to new users.<br><br>I will test it in the same fashion as above, starting with a fresh debian 5.0 install and local::lib and whatever CPAN modules need to be installed for this to work. &nbsp;I will then fire off installing Task::Kensho.<br><br><br></div></div>]]>
        
    </content>
</entry>

<entry>
    <title>Using lazy_build for maximum effect</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2010/01/using-lazy-build-for-maximum-e.html" />
    <id>tag:www.coldhardcode.com,2010://2.115</id>

    <published>2010-01-01T22:11:43Z</published>
    <updated>2010-01-01T22:19:30Z</updated>

    <summary>Rather abruptly I just came to a conclusion that I could remove a swath of code if I just had called a clearer method, and used a lazy_build to populate an accessor.I have a list of items that is persistent,...</summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="lessismore" label="less is more" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="moose" label="Moose" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[Rather abruptly I just came to a conclusion that I could remove a swath of code if I just had called a clearer method, and used a lazy_build to populate an accessor.<br><br>I have a list of items that is persistent, but I perform various calculations that are costly and prefer to only do them on demand. &nbsp;In other words, lazily. &nbsp;To avoid any unnecessary recalculation I also want to preserve the returned value. &nbsp;The conditions that cause the result to be stale are very well defined.<br><br>So, the simple solution was to rename my calculation method to _build_expensive_thing, create an attribute with lazy_build and in my method that invalidates, clear all those.<br><br>In simpler and more exact terms, this:<br><script src="http://gist.github.com/267283.js?file=lazybuildftw.pl"></script><br>]]>
        
    </content>
</entry>

<entry>
    <title>My favorite feeds</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2009/12/my-favorite-feeds.html" />
    <id>tag:www.coldhardcode.com,2009://2.114</id>

    <published>2009-12-09T20:14:04Z</published>
    <updated>2009-12-11T02:26:04Z</updated>

    <summary><![CDATA[Continuing my entry from yesterday, I'd like to just list some of my favorite feeds at the moment. &nbsp;These are just the various blogs that I'm particularly enjoying at the moment, and I decided to limit it to only 3....]]></summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="blogs" label="blogs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="circlejerk" label="circlejerk" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="software" label="software" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="softwaredevelopment" label="software development" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[Continuing my entry from yesterday, I'd like to just list some of my favorite feeds at the moment. &nbsp;These are just the various blogs that I'm particularly enjoying at the moment, and I decided to limit it to only 3.<br><br>
<dl>
<dt><a href="http://blog.woobling.org" class="">nothingmuch's blog at http://blog.woobling.org/</a></dt>
<dd>It's hard to find someone who knows so many languages and can communicate the knowledge in such a thorough and easy to understand way.&nbsp; His blog is simply a glimpse into his capabilities, but mostly he provides recipes for simply doing things better. &nbsp;He has a knack for simplifying common tasks (with the usual side effect of added robustness).</dd>
<dt><a href="http://mt.endeworks.jp/d-6/" class="">lestrrat (Daisuke Maki) at http://mt.endeworks.jp/d-6/</a></dt>
<dd>I like Maki-san for a variety of reasons. &nbsp;He's probably one of the most entertaining Perl hackers to be around at a conference. He has a really phenomenal view of Perl and programming in general, because he's making a living running a consultancy in Shibuya (Tokyo) and also running the Japanese Perl Association. &nbsp;When he writes it's interesting to read his perspective, since I think he offers a fairly unique perspective.<br>The downside of his blog is that many entries are in Japanese.</dd>
<dt><a href="http://stevan-little.blogspot.com" class="">Stevan Little at http://stevan-little.blogspot.com/</a></dt>
<dd>Stevan is the attentive care giver of Moose (founder, guider?) and all around encyclopedia of programming knowledge. &nbsp;He offers a perspective that is fairly unique, because of his very deep understanding of what seems to be all programming languages. &nbsp;Oh, and of his crazy involvement in Moose. &nbsp;It's pretty amazing what he manages to accomplish.</dd>
</dl>
<p>There are many more blogs I read, but lately these have been the most interesting.  As my interests or the content shifts, I'll post updates to my favorites (and try to limit to just 3 people in each post).</p>]]>
        
    </content>
</entry>

<entry>
    <title>Being in Open Source</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2009/12/being-in-open-source.html" />
    <id>tag:www.coldhardcode.com,2009://2.113</id>

    <published>2009-12-09T20:06:00Z</published>
    <updated>2009-12-09T20:11:49Z</updated>

    <summary>My wife and I have been together for over 7 years. In that time, she has watched me go from a developer to an Open Source contributor. The latter transformation is largely due to the Catalyst framework, and in particular...</summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Software Design" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="code" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="community" label="community" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="contribute" label="contribute" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="foss" label="foss" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="opensource" label="open source" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="softwaredevelopment" label="software development" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[<p>My wife and I have been together for over 7 years. In that time, she has watched me go from a developer to an Open Source contributor.  The latter transformation is largely due to the <a href="http://www.catalystframework.org">Catalyst framework</a>, and in particular mst encouraging me to actually contribute.</p>

<p>I don't think she understands why, and I'm not sure if I did either.  To be very clear, I'm not a contributor in the truly giving sense of a word.  To be fully honest, I contribute in a way that benefits myself.  I have learned more from the core hackers than in any job, course or conference.  This is my ultimate motivator to stay involved in the community.</p>

<p>The main take away from participating in the Perl community is my own personal and professional development.  I learn.  I learn quickly and discover many great things I wouldn't discover on my own.  There is an additional benefit of finding a way to work on some <a href="http://plackperl.org">very fun things</a>.</p>

<p>It saves me time and troubles doing what pays me, so my job gets easier and better as time goes on.</p>

<p>I try to make a difference, but I know that my contributions are nothing remarkable.  Anything that I've done that was remarkable was simply because I happened to arrive at a point first.</p>

<p>Even though my contributions are functionally marginal, I feel incredibly gifted and thankful to be accepted in a community as great as the <a href="http://www.enlightenedperl.org">modern Perl hackers</a>.</p>

<p>These inventors of great things spontaneously evolve an idea into a functional product in amazingly short time. To witness these moments is something you cannot get in any office, Internship or academic setting.</p>

<p>I'm involved in Open Source because I've never found a more efficient and thorough vessel of learning.  The skills I've developed while simply <em>being around</em> these giants are, at least for me, unattainable anywhere else.</p>

<p>Out of the various Open Source projects I've participated in, none have been as influential as the Perl community.  In particular, the <a href="http://moose.perl.org">Moose</a> and Catalyst sub-communities.</p>

<p>Thank you all who have made this community what it is.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Plack and the Perl WSGI (PSGI)</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2009/12/plack-and-the-perl-wsgi-psgi.html" />
    <id>tag:www.coldhardcode.com,2009://2.112</id>

    <published>2009-12-08T16:13:12Z</published>
    <updated>2009-12-08T16:25:06Z</updated>

    <summary>For those not familiar in what&apos;s happened since Rails has taken off, and Django has become a very robust and popular framework, there has been a movement towards something coined WSGI, Web Server Gateway Interface. This is a specification that...</summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="catalyst" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="code" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="catalyst" label="catalyst" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="frameworks" label="frameworks" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="plack" label="plack" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="psgi" label="psgi" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[<p>For those not familiar in what's happened since Rails has taken off, and Django has become a very robust and popular framework, there has been a movement towards something coined <a class="" href="http://wsgi.org">WSGI</a>, Web Server Gateway Interface.  This is a specification that is very prevalent in the Python community, and is generally accepted as a Good Idea. In a nutshell, it tries to normalize and enhance communication from an application to the frontend webserver (so that lighttpd, apache and nginx differences are nullfied)</p>

<p>Ruby has a reference implementation called <a class="" href="http://rack.rubyforge.org/">Rack</a>, which takes and shares many ideas of WSGI, but makes it Ruby-ish.</p>

<p>Perl now has <a class="" href="http://plackperl.org">Plack</a>, an astounding effort by <a class="" href="http://bulknews.typepad.com">Tatsuhiko Miyagawa</a>.  Plack has been awarded the "<a class="" title="" target="" href="http://bulknews.typepad.com/blog/2009/12/plack---lpw-2009.html">Module of the Year</a>" award at London Perl Workshop, and in my opinion is very well deserved.</p>

<p>Within Plack, you can write very lightweight applications just using what Plack offers.  You can also use Plack to handle deployment of several other frameworks, including <a class="" href="http://www.catalystframework.org">Catalyst</a> (via <a class="" href="http://search.cpan.org/dist/Catalyst-Engine-PSGI/">Catalyst::Engine::PSGI</a>).</p>

<p>As an example of what can be done, I first saw Tatsumaki.  Tatsumaki is an event-driven HTTP server that handles streaming (as well as long-poll comet services).</p>

<p>I built an application using <a class="" href="http://github.com/miyagawa/Tatsumaki">Tatsumaki</a> to handle streaming live race results to people who couldn't make it to the track.</p>

<p>It worked out very well, except for a small memory leak (that has been fixed).  I had, at peak, 615 concurrent clients with an average of about 380 concurrent clients.</p>

<p>I was using the Plack server directly (Tatsumaki::Server), and having clients connect directly to it. I had a peak throughput of 10Mbps, with an average of 1.6Mbps of data going through Tatsumaki.</p>

<p>I call that a fantastic success, and thank Miyagawa-san for his hard work in getting this software to where it is.  Without Tatsumaki, and Plack, I would have been doing a hacky long-poll solution that would have been much slower and less featured.</p>

<p>I also built a YUI3 based Multipart XmlHttpRequest library so that I can stream using YUI3 (I prefer this over jQuery) but IE failed to work, so I had to fall back to long-poll clients which worked more similarly across all browsers.</p>

]]>
        
    </content>
</entry>

<entry>
    <title>Advent Season is upon us.</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2009/12/advent-season-is-upon-us.html" />
    <id>tag:www.coldhardcode.com,2009://2.111</id>

    <published>2009-12-07T18:00:36Z</published>
    <updated>2009-12-07T18:02:15Z</updated>

    <summary>There&apos;s a lot of Perl Advent articles around this year. It&apos;s very neat to see this, and rather than add yet another article, I&apos;ll instead reference the articles I find to be very useful and stand out. How Catalyst Happens...</summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="advent" label="advent" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="articles" label="articles" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="calendar" label="calendar" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[<p>There's a lot of Perl Advent articles around this year.  It's very neat to see this, and rather than add yet another article, I'll instead reference the articles I find to be very useful and stand out.</p>

<dl>
 <dt><a href="http://www.catalystframework.org/calendar/2009/1">How Catalyst Happens</a></dt>
 <dd><a href="http://www.shadowcat.co.uk/blog/matt-s-trout/">mst</a>'s great writeup on how Catalyst evolves, works with contributors and collaborators. If you're curious how large open source projects handle a large number of contributors, this is a good read (275 contributors at the time of writing)</dd>
 <dt><a href="http://advent.rjbs.manxome.org/2009-12-01.html">RJBS writes about Sub::Exporter</a></dt>
 <dd>One thing I think has turned a lot of people away from Perl is the exporting and namespace handling (partially due to the out-of-the-box weakness of Perl's OOP).  <a href="http://rjbs.manxome.org">RJBS</a> thankfully wrote Sub::Exporter, and it cleans up this into a very sane API.</dd>
 <dt><a href="http://advent.plackperl.org/2009/12/day-6-convert-cgi-apps-to-psgi.html">Convert CGI apps to Plack</a></dt>
 <dd>If you haven't heard of <a href="http://plackperl.org">Plack</a>, you're missing out.  <a href="http://bulknews.typepad.com/">Miyagawa</a>'s awesome new reference implementation of PSGI (Perl's WSGI) is simplifying a lot of lives, mine included.  This little recipe shows how you can convert your old school CGI apps to a managed and sane Plack-handled set of scripts.  Of course, there is a lot more to Plack <a href="http://www.slideshare.net/miyagawa/plack-lpw-2009">you should read about</a>.
 <dt><a href="http://perladvent.pm.org/2009/3/">Using local::lib</a></dt>
 <dd>I love local::lib, and this article by Stephen Scaffidi is a good writeup on setting it up.  The big thing to remember with local::lib is to upgrade Module::Install and Module::Build to make sure everything runs as smoothly as possible</dd>
</dl>

<p>That's it for now, I'll post more of my favorite advent articles as we get closer to Christmas.</p>]]>
        
    </content>
</entry>

<entry>
    <title>How to test custom Moose types</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2009/11/how-to-test-custom-moose-types.html" />
    <id>tag:www.coldhardcode.com,2009://2.110</id>

    <published>2009-12-01T00:29:16Z</published>
    <updated>2009-12-01T00:34:40Z</updated>

    <summary>I recently had a task where I could either trust my brilliant and prodigious programming skills, or I could write a unit test. It was really quite easy, and I&apos;m very happy with how easy MooseX::Types makes this. First, you...</summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="customtypes" label="custom types" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="moose" label="moose" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="programming" label="programming" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="types" label="types" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[<p>I recently had a task where I could either trust my brilliant and prodigious programming skills, or I could write a unit test.</p>

<p>It was really quite easy, and I'm very happy with how easy <a href="http://search.cpan.org/dist/MooseX-Types/">MooseX::Types</a> makes this.</p>

<p>First, you have to have your types defined, something like this:</p>

<script src="http://gist.github.com/245919.js?file=Types.pm"></script>

<p>Very simple, it just validates the date is after today.  Nothing magic.  Now, to write a unit test, you have to be able to check this assertion.  This is made very easy because MooseX::Types provides an exportable "is_$type" method.  However, that doesn't make for easy unit test construction.</p>

<p>Behold, my recipe:</p>
<script type="text/javascript" src="http://gist.github.com/245926.js"></script>

<p>A few things to note that are important:
<ul>
 <li>This loudly complains about unimplemented tests</li>
 <li>This uses some idiomatic Perl, mostly in terms of <code>$code_ref-&gt;()</code> &mdash;  Don't be scared of that.</li>
 <li><code>__PACKAGE__->&gt;can("foo")</code> returns an executable code reference, and this recipe shows why that's so useful.</li>
</ul>
</p>

<p>Enjoy.</p>]]>
        
    </content>
</entry>

<entry>
    <title>The Design Behind The Redesign</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2009/10/the-design-behind-the-redesign.html" />
    <id>tag:www.coldhardcode.com,2009://2.108</id>

    <published>2009-10-14T23:06:36Z</published>
    <updated>2009-11-07T14:54:43Z</updated>

    <summary>The Cold Hard Code name has always evoked feelings of metal. I&apos;ve generally opted for stark expanses livened up by small dashes of bright color. This has worked well but I decided that CHC needed a change. This design used...</summary>
    <author>
        <name>gphat</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="code" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="design" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[<p>The Cold Hard Code name has always evoked feelings of metal.  I've generally opted for stark expanses livened up by small dashes of bright color.  This has worked well but I decided that CHC needed a change.  This design used a bright, eye-catching background with a dark header, creamy body and dark text.</p>

<h2>The Page</h2>

<p>The first step was to fire up a grid.  One of the fundamentals of using any template or one-size-fits-all methodology is realizing that it's a guide, not a law.   I began by using a 60px column width to frame up the page.  The first layer of the orange (which I call the wrapper) is 60 pixels wide.  The second layer (the liner) is also 60px.  This two-tone look breaks up the large, boring field of orange that would be there otherwise and frames the text.  My original had an outer size of 60 and inner of 120.  This looked great at high resolution but cramped the text unnecessarily when shrunk down to 1024x760.</p>

<p>The header gives me a place to show one of my signature design memes: organic patterns. I love to add swirls, paisleys and other curves into squares.  Subtly peeking from our header is a complex pattern. It doesn't overpower the header but adds an underpinning of style. The inset type is set in Hoefler <abbr title="and">&</abbr> Frere-Jones new <a href="http://www.typography.com/fonts/font_overview.php?productLineID=100035">Tungsten</a> family.  Recently released, I knew at first glance it was a great fit for the CHC brand.  The inset effect &#8212; which is very trendy at the moment &#8212; gives it that stamped feel that anchors most CHC designs.  A bit of a spotlight is added to the left to draw some attention to our logo.</p>

<h2>The Body</h2>

<p>The color was chosen to contrast well with the orange background but will also be discussed in the text section.  The sides discussed earlier are fixed, so our center is fluid.  Since I didn't expect there to be any grid needed for our body, this is a reasonable choice.  Were we mixing in a lot of images or other content I would probably reverse my grid and let the sidebars be fluid.</p>

<h2>Text</h2>

<p>Since the state of web fonts is currently in flux, I chose to use our signature font (the aforementioned Tungsten) only in the header.  The titling and body fonts are chosen from the palette of standard fonts that users should have installed.  The titling sans-serif progresses as: Helvetica Neue, Arial, Helvetica, sans-serif.  The body serif progresses as: Palatino, Palatino Linotype, Georgia, Times, Times New Roman, serif.  We move from least-to-most in terms of expected availability. Most modern users should have these fonts and if they don't then we gracefully degrade to other fonts with comparable qualities.</p>

<p>The base font size is 14px with an 18px line-height (14/18). Since the content is expected to be somewhat technical, I chose to keep the text open with plenty of room to breath.  If it were going to be less tech-heavy I would probably drop down to 13px for the font height.</p>

<p>The sizes of the various header tags are arranged using the golden ratio: 34, 26, 21 and 16.  The line-height of each is adjusted to be a multiple of 18 to retain vertical rhythm.  All block text elements are padded 18px at the bottom, again, to keep vertical rhythm.</p>

<p>Not happy with boring ol' black for text, I chose a very dark brown that works well with the header.  Choosing a background and foreground color for your page is very important.  It's vital that there is adequate contrast between the colors so that people with various forms of color-blindedness (or people with shitty monitors) will have a good experience.  You can use <a href="http://snook.ca/technical/colour_contrast/colour.html">Jonathan Snook's Color Contrast Check</a> to verify that you are meeting established guidelines for contrast.  In our case the foreground (#312A24) and background (#EFEDC9) have a brightness difference of 190 and a color difference of 550.  Well beyond recommendations.  This gives us excellent contrast and a nice feel, as the brown-on-brown looks high end.</p>

<h2>Code</h2>

<p>The markup is all HTML 5 with some features from CSS3.  Since our market is people that aren't running old IE browsers we can leverage these modern features without alienating potential users or customers.  The overall weight of the page is light, with only 5 images making up the base design.  The YUI reset stylesheets are used to give us a clean slate to work from.  There are some major problems with IE8 at the moment, but we're O.K. with that for now.</p>

<h2>Summary</h2>

<p>I'm quite happy with the overall design.  The bold earth tones and the solid underlying principles yield a look and feel that is both modern and stable.  A header swap will allow us to some simple updates in the future.    The fluid center is causing some problems when scaled up to large widths, but that's par for the course.  I'm also very excited about the recent support that <a href="http://typegirl.tumblr.com/post/142912558/most-of-the-important-foundries-are-supporting-webfont">WebOTF is getting</a>.  I assure you that I'll be closely following it's developments and constantly tuning this site over the coming weeks.</p>]]>
        
    </content>
</entry>

<entry>
    <title>How to get YUI&apos;s Rich Text Editor to preserve script tags</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2009/10/yui3-is-gold-and-this-is-why-i.html" />
    <id>tag:our.coldhardcode.com,2009:/jshirley//2.91</id>

    <published>2009-10-02T22:02:01Z</published>
    <updated>2009-10-04T17:16:53Z</updated>

    <summary><![CDATA[I really like YUI, and the YUI RTE.&nbsp; I think that for most typical editing scenarios, it works far better than other options.&nbsp; It's easily extensible, and has a great default feature set.&nbsp; The one thing that was really frustrating...]]></summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="JavaScript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Software Design" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="bugs" label="bugs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="editor" label="editor" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="falsesecurity" label="false security" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rte" label="rte" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="yui" label="yui" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[<p>I really like YUI, and the YUI RTE.&nbsp; I think that for most typical editing scenarios, it works far better than other options.&nbsp; It's easily extensible, and has a great default feature set.&nbsp; The one thing that was really frustrating is that it kept eating my embedded gist tags.<br><br>The gist embed tags are very simple, and look simply like this:,</p>
<blockquote><code>&lt;script type="text/javascript" src="http://gist.github.com/1234.js"&gt;&lt;/script&gt;</code></blockquote>
<p>Outside of the very real risks of allowing XSS and other dangerous things, this is useful to be <em>able to do</em>.&nbsp; However, the RTE doesn't allow it, and if the editor slurps in a textarea with a script tag, the editor silently eats all the script tags. Nom nom nom.</p>
<p>The only way to enable this behavior is extending the editor class, and doing some very hacky changes.  Please note that this widget <strong>interpolates script tags</strong> even when they are escaped (meaning if you type in &lt;script&gt; in the editor, it turns into a live script tag).  This is, for the most part, behavior that <em>I</em> want.  Leave comments if this is oppositional to your uses, and I'll figure out a better API.
</p>
<p>You can see my <a href="http://our.coldhardcode.com/jshirley/examples/clean_override.html">trusting editor in action, allowing script tags to preserve</a>, and the complete code, displayed here:</p>
<script src="http://gist.github.com/200773.js"></script>
<p>The <strong>&#8220;official&#8221; version</strong> I will maintain will be at <a href="http://gist.github.com/200773">http://gist.github.com/200773</a>.  If it gets to be frequent, I'll setup a project for it.</p>

<p>In conclusion, I'd like to talk about my personal view of this solution.  I don't want this to go on my permanent record without defending myself and this code.  I think this solution is <strong>bad</strong>.  Relying on a non-contractual API, and an internal method of the Editor (_cleanIncomingHTML), is generally asking for trouble.  I don't have faith that this behavior won't change, and as such, this change cannot be guaranteed for future versions of YUI.</p>

<p>I would, very much so, like to see <a href="http://github.com/jshirley/yui2/commit/e0ea9a9a488fc8c9c36a6a07791c2e61c4d2f5c9">this change</a> go into YUI Core, as it provides an option that trusts the programmer.  It won't be included because of security concerns.  Requiring the above type of extending to get non-destructive behavior really scares me, though.  It just reeks of codesmell, and I'm sad that there isn't an option to trust the engineer.</p>

<p>I will maintain the gist to make sure it works with the latest released version of YUI (currently 2.8.0).  If you notice a bug, please leave a comment and I will get it fixed up.  I will also submit a patch to the Movable Type plugin that allows &lt;script&gt; tag embedding.</p>]]>
        
    </content>
</entry>

<entry>
    <title>A Moose role to add application &quot;awareness&quot;</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2009/10/a-moose-role-to-add-applicatio.html" />
    <id>tag:our.coldhardcode.com,2009:/jshirley//2.90</id>

    <published>2009-10-02T17:14:23Z</published>
    <updated>2009-10-02T18:54:27Z</updated>

    <summary><![CDATA[A common problem i was encountering is the mess of applications knowing where they exist, their root path, etc.&nbsp; Catalyst solves this relatively well with the Catalyst::Plugin::ConfigLoader plugin.&nbsp; You get the $c-&gt;path_to("some/file") method that makes everything very convenient.It also doesn't...]]></summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="applications" label="applications" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="environment" label="environment" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="moose" label="moose" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[A common problem i was encountering is the mess of applications knowing where they exist, their root path, etc.&nbsp; Catalyst solves this relatively well with the <a class="" href="http://search.cpan.org/dist/Catalyst-Plugin-ConfigLoader/">Catalyst::Plugin::ConfigLoader</a> plugin.&nbsp; You get the <code>$c-&gt;path_to("some/file")</code> method that makes everything very convenient.<br><br>It also doesn't exist outside of Catalyst, and that makes me sad.&nbsp; I started working in a role that incrementally grew and grew and now is fairly full featured.&nbsp; I don't really want to release it to the CPAN, because things like <a class="" href="http://search.cpan.org/dist/Bread-Board/">Bread::Board</a> are much better.&nbsp; This is also a really half-baked solution, and I don't want to pollute the elegant world of MooseX:: with my sub-par contributions.<br><br>I can, however, blog about them.<br><br>
It's a rather long read for <a class="" title="Gist for my MooseX::Role::Environment code" href="http://gist.github.com/198143">the full code</a>, but the general idea is that it gets you the familiar MyApp-&gt;new_with_config construction, with an configurable configuration file.&nbsp; You get the configuration substitutes (giving you $instance-&gt;path_to and MyApp-&gt;path_to both, but this is ultra hacky).&nbsp; The usage, with coercion, is pretty simple:<br>&nbsp;&nbsp;&nbsp; <br>
<blockquote class="gist"><script src="http://gist.github.com/199990.js"></script></blockquote>
<br>
I will probably not release this to CPAN. I've heard some rumblings about a MooseX::Build which is probably a better solution but for now this is my happy cargo-cult version. It has flaws, needs to use MooseX::YAML and several other fixes (look at the get_app_root method, how terrible is that?).<br><br>]]>
        
    </content>
</entry>

<entry>
    <title>Building software that doesn&apos;t suck</title>
    <link rel="alternate" type="text/html" href="http://www.coldhardcode.com/2009/09/building-software-that-doesnt.html" />
    <id>tag:our.coldhardcode.com,2009:/jshirley//2.89</id>

    <published>2009-09-08T04:04:45Z</published>
    <updated>2009-11-07T14:57:43Z</updated>

    <summary><![CDATA[I'm a big fan of quality customer service. &nbsp;I think companies that understand this are simply better, even if their products aren't. &nbsp;This is one of the reasons why I buy Apple products. &nbsp;I can, without fuss, go to an...]]></summary>
    <author>
        <name>J. Shirley</name>
        <uri>http://www.coldhardcode.com/</uri>
    </author>
    
        <category term="Software Design" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="customerservice" label="customer service" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="errors" label="errors" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="puppet" label="puppet" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="software" label="software" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.coldhardcode.com/">
        <![CDATA[I'm a big fan of quality customer service. &nbsp;I think companies that understand this are simply better, even if their products aren't. &nbsp;This is one of the reasons why I buy Apple products. &nbsp;I can, without fuss, go to an Apple store and talk to a customer service agent. &nbsp;They're not geniuses, sales people or college students. &nbsp;They are, first and foremost, customer service agents.<br><br><span>Software companies tend to not get the idea of customer service, and it is really tragic. Though I don't really have any expectations for the free-service (eg, Facebook) businesses -- although I hope their actual customers, the advertisers, do have very good support. &nbsp;I mean the companies that either sell their product, or services directly attached to their product. &nbsp;Specifically, making money directly from their software and not relying on advertisers or other sponsorship arrangements.<br><br>My inspiration for this post came about as I was struggling with setting up a somewhat complicated Puppet recipe for managing webserver deployments. &nbsp;I've looked at puppet a few times in the past, and gave it a quick 5 minute grasp and then went and did something more productive. &nbsp;Today, I decided to give it a more in depth look and actually get one server managed via puppet. &nbsp;This was simply because I had approximately 3 hours while I was waiting for a script to run, and didn't want to get involved in other tasks.<br><br>This is my evaluation period to determine if I'm going to actually make use of puppet. &nbsp;3 hours. &nbsp;I don't think this is abnormal for an evaluation period.<br><br>Puppet itself was rather easy to work with and get going, except I received this obnoxious "Can't convert nil to String" message that took me far too long to solve. &nbsp;The problem? &nbsp;<i>I had my templates in the wrong place</i>. &nbsp;I released my minor frustrations with a specific complaint, specifically tagged #puppet,&nbsp;</span><span class="yui-non">posted to twitter</span><span>.<br><br><span class="yui-non">The response came 7 hours later, which is impressive considering it is a US holiday. &nbsp;However, it was remarkably disappointing:<br><blockquote>@jshirley Feel free to log a ticket requesting more user friendly errors - http://projects.reductivelabs.com/ #puppet<br></blockquote><span class="yui-non">I want to be very clear about what I'm complaining about. &nbsp;I've posted a tweet that could be copy and pasted into a bug tracker. &nbsp;They don't know the context of my use, whether I'm evaluating it or not, but to just assume that I'm a dedicated enough user to submit a ticket is wrong.<br><br>I'm a fan of open source, but I'm also a fan of not abusing my time. &nbsp;I believe that if I open a ticket, I should be responsible enough to see it through. &nbsp;If I decide to scrap puppet, I won't do that. &nbsp;I also don't know how annoying their bug tracking system is. &nbsp;Many bug trackers are notoriously annoying just to post a simple bug.<br>So, what's the right solution here? &nbsp;Simple, the responding tweet should have instead read:<br><br><blockquote>@jshirley Thanks for the feedback, I opened a ticket at [url]. &nbsp;You can CC yourself if you want to track it.<br></blockquote></span></span></span><div class="yui-wk-div"><span><span class="yui-non"><span class="yui-non">That would have scored points for the puppet community. Instead, I'm thinking that I won't use puppet because it seems every error message I've encountered has the same level of absurd ambiguity. &nbsp;If I have to request error messages that make sense (via a ticket system, no less) tells me the developers have other issues that are more important to tackle. &nbsp;I may be completely wrong, but that's a big red flag for me when looking at software and judging its quality.<br><span class="yui-non">&nbsp;</span><br><span class="yui-non">So far my impression is that Puppet is a great idea, but if it can only deliver enigmatic error messages it is better left in the oven. &nbsp;It's half-baked, but has promise.</span></span></span><br><br><span class="yui-non">Maybe I'm wrong, if so, someone can log a ticket requesting me to take another look.</span><br><span class="yui-non">&nbsp;</span><br></span></div>]]>
        
    </content>
</entry>

</feed>
