<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-533580292462246679</atom:id><lastBuildDate>Sat, 17 Mar 2012 18:10:53 +0000</lastBuildDate><category>design</category><category>self</category><category>productivity</category><category>web</category><category>software</category><category>convenience</category><category>perl</category><title>cww.blog!</title><description></description><link>http://blogger.colinwetherbee.com/</link><managingEditor>noreply@blogger.com (cww)</managingEditor><generator>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-334571956544886760</guid><pubDate>Sat, 17 Jul 2010 07:53:00 +0000</pubDate><atom:updated>2010-07-17T03:03:21.530-05:00</atom:updated><title>Bandwidth Woes</title><description>I've been noticing some oddities with the Road Runner cable internet connection here in Dallas, and those oddities have somewhat manifested themselves in the results of the 48 tests I've run over the past few weeks at &lt;a href="http://www.speedtest.net/"&gt;SpeedTest.net&lt;/a&gt;.  They're quite literally all over the map.&lt;br /&gt;&lt;br /&gt;The best connection I've found is to a server in Newark, NJ.  The connection routes via Chicago over the Telia net and achieves a respectable 23.49 Mbps average download speed.&lt;br /&gt;&lt;br /&gt;Strangely, as the servers get closer to the Dallas area, the downstream bandwidth appears to minimize.  The download speed from Wichita, KS, is about 23.0 Mbps, and the average download speed from servers here in Dallas is in the 16-17 Mbps range.&lt;br /&gt;&lt;br /&gt;All across the US, the ping times are pretty reasonable, in the 40-100 ms range.&lt;br /&gt;&lt;br /&gt;At the horrible end of the test results is, unsurprisingly, Accra, Ghana.  Now, Ghana actually has pretty good internet connectivity in general, and they consistently beat the USA in average national broadband speed by a wide margin (2-3 Mbps in the USA vs. 7-8 Mbps in Ghana).  However, the SpeedTest host there can really only deliver about 0.71 Mbps.  It's amusing for amusement's sake, really, and not a reflection on Ghana as a whole.&lt;br /&gt;&lt;br /&gt;The really depressing thing about all these SpeedTest tests I've been performing is upload speed.  The cable connection here seems to have an upstream cap of about 0.5 Mbps.  Note that's even lower than the downstream speed from Accra.  It's pretty terrible, and it really limits my ability to do certain things on the internet, like use my work VPN at decent speeds.  At least I'm not serving up web pages locally anymore.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-334571956544886760?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2010/07/bandwidth-woes.html</link><author>noreply@blogger.com (cww)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-7790865426230853455</guid><pubDate>Sat, 10 Oct 2009 04:58:00 +0000</pubDate><atom:updated>2009-10-10T00:09:22.084-05:00</atom:updated><title>Catalyst/DBIx::Class and DBD::Mock</title><description>I was writing unit tests for a Catalyst-based Perl application today, and, this being my first big application using DBIx::Class, I had no idea how to mock the database layer.  I searched the web, to no avail, which leads me to this blog entry: here's how you mock your Catalyst model from a unit test script.&lt;br /&gt;&lt;br /&gt;First, you don't have a $c object when you're in a unit test, but it turns out you don't really need it.  You also don't need your DB class, which works out nicely.  You do, however, need DBD::Mock, as a replacement for your usual DBD package, and, of course, you need to have your result sets in your Perl include path.&lt;br /&gt;&lt;br /&gt;Let's say our application is called MyApp, following the convention of the Catalyst documentation.&lt;br /&gt;&lt;br /&gt;Now it's easy enough to get a schema object.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;my $schema = MyApp::Schema-&gt;connect('dbi:Mock:', q{}, q{});&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Before you perform any queries, you need to seed that mock DBD with some data.  Which means you need access to the DBI object.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;my $dbh = $schema-&gt;storage-&gt;dbh;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Easy, right?  Now, let's add some data to the underlying DBD.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;my @data =&lt;br /&gt;(&lt;br /&gt;    [ qw(column1 column2) ],&lt;br /&gt;    [ qw(foo bar) ],&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;$dbh-&gt;{mock_add_resultset} = \@data;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This gives the DBD a table with two columns, column1 and column2, and one row containing values "foo" and "bar", respectively.&lt;br /&gt;&lt;br /&gt;You're ready to go!  Use your schema and result sets as you usually would.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-7790865426230853455?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2009/10/catalystdbixclass-and-dbdmock.html</link><author>noreply@blogger.com (cww)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-5166031891660951690</guid><pubDate>Sun, 04 Oct 2009 06:14:00 +0000</pubDate><atom:updated>2009-10-04T01:25:06.066-05:00</atom:updated><title>Things I (Re)discovered Today</title><description>I'm in Texas with Helen right now, visiting her family and generally hanging out.  It's been a good trip so far, but I had an unusually great number of epiphanies today.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;I was given the chance to quantify my hatred of racism today, and I discovered that my hatred for it is well and truly deeper than I ever thought it could be.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;While eating at &lt;a href="http://www.loveandwarintexas.com/"&gt;Love and War in Texas&lt;/a&gt;, I was reminded of just how absolutely wonderful food in Texas is.  The antelope (antelope! weird!) fillet, venison sausage, and chili were fantastic, but I was also reminded of why I don't like quail too much: all those tiny little bones are very inconvenient.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;A storm system started pushing through the Dallas area today and will last for another few days.  Over many hours of listening to the patter-patter of light rain this evening, I remembered how lovely a rainy day can be.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I should get new batteries for my phone and my laptop because they're both lasting about half as long as they originally lasted.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Cats, even those that are not my own, seem to like me quite a lot.  Helen's mom has two cats, one who is generally stand-offish and another who pretty much just hates people, and they've both decided that I'm a really cool guy with whom they can hang out and purr and have a good time.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-5166031891660951690?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2009/10/things-i-rediscovered-today.html</link><author>noreply@blogger.com (cww)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-2995144574994916747</guid><pubDate>Wed, 03 Jun 2009 08:15:00 +0000</pubDate><atom:updated>2009-06-03T03:26:43.649-05:00</atom:updated><title>RSS on Twitter</title><description>I've been looking for some time for a web application that allows me to aggregate news feeds and other things I find interesting into a single page that I may use as my browser start page.  Some of these exist: &lt;a href="http://google.com/ig"&gt;iGoogle&lt;/a&gt;, &lt;a href="http://beta.bloglines.com/"&gt;BlogLines&lt;/a&gt;, and so forth, but they all lack certain features that I find to be absolutely critical to these sorts of services.  I used the New York Times aggregator (&lt;a href="http://my.nytimes.com/"&gt;My Times&lt;/a&gt;) for quite a while, and I really enjoyed it, but they decided to discontinue support for it at the end of last year.&lt;br /&gt;&lt;br /&gt;After many disappointments in my pursuit of a new browser start page, I found an unlikely candidate: Twitter.  On and off over the past couple weeks, I've been writing what ended up being a 500-line Perl script that retrieves RSS feeds, does some sanity checking on the posts contained therein based on age and whether the post has been processed previously, and then crafts a short summary of the article and tweets it, along with a TinyURL link back to the original post.  I just finished the script a little while ago, and so far, it's working brilliantly.&lt;br /&gt;&lt;br /&gt;The fruits of my labor may be viewed for a short while at the Twitter page for &lt;a href="http://twitter.com/cwetherbee_rss"&gt;cwetherbee_rss&lt;/a&gt;.  After some initial testing, I plan to make my RSS updates private, but if you're interested in following along, let me know, and I'll do whatever I need to do to let you follow the feed.&lt;br /&gt;&lt;br /&gt;Now that the script is finished, all that's left is to copy the script and the data cache over to my server in Paris and set up a quick cron job there to keep the Twitter feed updated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-2995144574994916747?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2009/06/rss-on-twitter.html</link><author>noreply@blogger.com (cww)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-2035813865789485442</guid><pubDate>Sun, 17 May 2009 19:06:00 +0000</pubDate><atom:updated>2009-05-17T14:07:41.171-05:00</atom:updated><title>Twitter</title><description>I'm on Twitter!  It's fun and much more convenient than writing lengthy, "real" blog entries.  Check it out at &lt;a href="http://twitter.com/cwetherbee"&gt;my twitter page&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-2035813865789485442?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2009/05/twitter.html</link><author>noreply@blogger.com (cww)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-2143080894571774598</guid><pubDate>Sun, 05 Apr 2009 04:19:00 +0000</pubDate><atom:updated>2009-04-04T23:23:46.879-05:00</atom:updated><title>Glasses</title><description>I've had glasses for about eight years, primarily because I have had quite a few 40-hour days and have needed to improve my vision a bit toward the end of them.  All told, I've probably worn my glasses for a total of about 40 hours over those eight years.&lt;br /&gt;&lt;br /&gt;Tonight, though, I was standing outside on the balcony while wearing my glasses, and I noticed the flickering yellow lights on the hillsides in the distance looked somewhat sharper than usual.  And, indeed, according to my eyes, they were: I took my glasses off, and the lights turned into slightly blurry objects, not difficult to see but also not focused.&lt;br /&gt;&lt;br /&gt;Sigh.&lt;br /&gt;&lt;br /&gt;I guess this means I need to see an ophthalmologist, get an updated prescription, and resign myself to wearing glasses more often.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-2143080894571774598?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2009/04/glasses.html</link><author>noreply@blogger.com (cww)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-6898086199517108735</guid><pubDate>Wed, 04 Mar 2009 05:06:00 +0000</pubDate><atom:updated>2009-03-03T23:16:01.975-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>convenience</category><category domain='http://www.blogger.com/atom/ns#'>software</category><title>Trac</title><description>Over the years, I've developed a number of software tools to make my life easier: little scripts here and there that start up my computers in exactly the way I want or remind me when bills are due or backup my email database.&lt;br /&gt;&lt;br /&gt;Recently, though, I've found the mother of all free, customizable project management tools, and it turns out to be, through the use of plug-ins, an exceptionally good way to manage and track household projects, bills, and so forth.&lt;br /&gt;&lt;br /&gt;The software is called &lt;a href="http://trac.edgewall.org/"&gt;Trac&lt;/a&gt;, and it's written in Python and supports SQLite and PostgreSQL back-ends.  It can run through Apache or under its own HTTP server.&lt;br /&gt;&lt;br /&gt;Trac comes stock with a wiki, a ticket tracking system, a &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; repository integration tools, and a bunch of other neat, little bits.  A long list of &lt;a href="http://trac.edgewall.org/wiki/PluginList"&gt;plugins&lt;/a&gt; is available, too, covering concepts ranging from code documentation to a guest-book.  Incidentally, it's also &lt;a href="http://trac.edgewall.org/wiki/TracInterfaceCustomization#SiteAppearance"&gt;totally painless&lt;/a&gt; to wrap Trac in custom CSS to give it your own, personal look-and-feel.&lt;br /&gt;&lt;br /&gt;If you're Linux-savvy and need something to help collect the bits of your life that seem to fall away once in a while, give Trac a shot.  Using the SQLite back-end, setup is only a matter of about 10 minutes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-6898086199517108735?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2009/03/trac.html</link><author>noreply@blogger.com (cww)</author><thr:total>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-8546538664922876816</guid><pubDate>Fri, 06 Feb 2009 05:51:00 +0000</pubDate><atom:updated>2009-02-05T23:52:03.590-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>self</category><category domain='http://www.blogger.com/atom/ns#'>perl</category><title>Hacking the Perl Symbol Table</title><description>At work today, I gave the inaugural "engineering minute" presentation at the bi-weekly "engineering all-hands" meeting.  In fact, the whole idea of the "engineering minute" came from some code my colleague Russ and I wrote a few weeks ago.  I had a simple problem, and we decided to solve it by hacking the Perl symbol table in a clever and fun but not quite opaque manner.&lt;br /&gt;&lt;br /&gt;For those of you not entirely in the loop, the symbol table is essentially a list of functions, variables, and other objects, that is used by the program to figure out where in the computer's memory to locate that particular object.&lt;br /&gt;&lt;br /&gt;In this case, I was using Perl's symbol table to rename functions and replace them with something else.  That "something else" was a wrapper function that would perform some checks on the arguments that were passed to the original function and then decide whether to go forward with executing the function or warn the user that something evil has happened.&lt;br /&gt;&lt;br /&gt;It turns out hacking the symbol table for this purpose is actually quite easy if you go about it the right way.  Since I'm not at liberty to share company code with the world, I'll instead show how I did it while writing the Tie::Hash::Expire module, which I plan on uploading to &lt;a href="http://www.cpan.org/"&gt;CPAN&lt;/a&gt; soon.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# Integrate cache expiry via the symbol table.&lt;br /&gt;for my $f (qw(FETCH EXISTS))&lt;br /&gt;{&lt;br /&gt;    eval qq&lt;br /&gt;    {&lt;br /&gt;        *Tie::Hash::Expire::_uncached_$f = *Tie::Hash::Expire::$f;&lt;br /&gt;        undef *Tie::Hash::Expire::$f;&lt;br /&gt;        *Tie::Hash::Expire::$f = sub&lt;br /&gt;        {&lt;br /&gt;            \$_[0]-&gt;_update_cache(\$_[1]);&lt;br /&gt;            &amp;_uncached_$f;&lt;br /&gt;        };&lt;br /&gt;    };&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Of course, this only wraps the &lt;pre style="display: inline;"&gt;FETCH&lt;/pre&gt; and &lt;pre style="display: inline;"&gt;EXISTS&lt;/pre&gt; hash access functions, but that's the point: you only wrap what you need to wrap, and in so doing, you avoid duplicating code and risking doing the right thing in one place and the wrong thing in another.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-8546538664922876816?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2009/02/hacking-perl-symbol-table.html</link><author>noreply@blogger.com (cww)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-7676471776339108974</guid><pubDate>Sat, 24 Jan 2009 23:01:00 +0000</pubDate><atom:updated>2009-01-24T17:06:48.457-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>productivity</category><category domain='http://www.blogger.com/atom/ns#'>design</category><category domain='http://www.blogger.com/atom/ns#'>web</category><title>Stylish for Firefox</title><description>I discovered an absolutely amazing tool, &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/2108"&gt;Stylish&lt;/a&gt;, for customizing Firefox today.  The idea behind this tool is that it modifies your personal Chrome settings to alter the &lt;a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets"&gt;CSS&lt;/a&gt; of any page, web site, or full domain, without having to go to all the hassle of messing with any of the actual Chrome files.&lt;br /&gt;&lt;br /&gt;The &lt;em&gt;24 Ways&lt;/em&gt; blog has an &lt;a href="http://24ways.org/2008/user-styling"&gt;excellent article&lt;/a&gt; on making this work.  If you've ever wanted to turn Wikipedia into a green-on-black site with fixed-width fonts, this is, by far, the easiest way to do it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-7676471776339108974?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2009/01/stylish-for-firefox.html</link><author>noreply@blogger.com (cww)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-533580292462246679.post-2223601561222418528</guid><pubDate>Thu, 15 Jan 2009 04:26:00 +0000</pubDate><atom:updated>2009-01-24T17:06:03.079-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>self</category><title>Here I Am</title><description>To be existential to such an extent that is, perhaps, inappropriate for a first post on a blog, here I am!&lt;br /&gt;&lt;br /&gt;After a too-great number of months spent pretending to be uninterested in participating in the blogosphere, I have decided I can remain languid no longer.&lt;br /&gt;&lt;br /&gt;Ultimately, I would like to use this reincarnation of my web presence as a conduit for relatively technical information.  I feel I have neglected my roots as a scientist and engineer for too long, having worked as a software programmer in Silicon Valley for the past eight months and been too distracted by that work to motivate myself toward further academic enlightenment.&lt;br /&gt;&lt;br /&gt;I appreciate your readership, and I look forward to providing an interesting forum for communication, argument, and dissemination of those things in which I occasionally find myself absorbed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/533580292462246679-2223601561222418528?l=blogger.colinwetherbee.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blogger.colinwetherbee.com/2009/01/here-i-am.html</link><author>noreply@blogger.com (cww)</author><thr:total>1</thr:total></item></channel></rss>
