<?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>lucasjosh.com &#187; Code</title>
	<atom:link href="http://lucasjosh.com/blog/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://lucasjosh.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 01 Mar 2010 14:15:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Testing with Redis</title>
		<link>http://lucasjosh.com/blog/2009/03/18/testing-with-redis/</link>
		<comments>http://lucasjosh.com/blog/2009/03/18/testing-with-redis/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 19:16:04 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/?p=265</guid>
		<description><![CDATA[Long time, no blog&#8230;  But enough about that.
On the side, I&#8217;ve been working on a new aggregator, Aggir, which allows me to test various things.  I started off using SQLite and Sequel for storage, put Solr behind the scenes for search and added a very simple Web UI using Sinatra and HAML.  [...]]]></description>
			<content:encoded><![CDATA[<p>Long time, no blog&#8230;  But enough about that.</p>
<p>On the side, I&#8217;ve been working on a new aggregator, <a href="http://github.com/lucasjosh/aggir/tree/master">Aggir</a>, which allows me to test various things.  I started off using SQLite and Sequel for storage, put Solr behind the scenes for search and added a very simple Web UI using Sinatra and HAML.  Yeah, I think I pretty much used all the necessary <i>hot</i> projects.  It was fun to build and it works pretty well right now.    </p>
<p>I have more to do on the Solr front since I&#8217;m just using the defaults for relevance searching.  I&#8217;d like to dig more into the Solr internals for additional query parsing and classification at index time.  It&#8217;s some of the stuff I&#8217;ve been doing at work but wanted to use a different type of data set.</p>
<p>Of course, now that I had things somewhat stable, I decided to blow it all up and try something new.  That something new is <a href="http://code.google.com/p/redis/">Redis</a> using <a href="http://github.com/ezmobius/redis-rb/tree/master">Ezra&#8217;s client library</a>.  </p>
<p>I started down the path of updating everything, ripping out the database storage to use Redis instead.  So far so good, I have <a href="http://github.com/lucasjosh/aggir/tree/redis-storage">the start of this on a branch</a>.  One issue I found though was testing my code.  It was <i>simple</i> with Sequel since I could create a different database without any worry of overwriting real data.  With Redis, I can easily delete keys in between tests but with the keys were the same that a real update would use so non-test data would be deleted. </p>
<p>I think I&#8217;ve come up with a solution that at least is working for me.  I&#8217;ve made each key combine a prefix with other data.  The prefixes are defined as class variables.  I only set them in the library code if they haven&#8217;t already been defined elsewhere.  In my test code, I set them with an additional test-specific prefix so that I can easily delete all of the testing keys by using the keys(&#8216;test_*&#8217;) method.  This will allow me to walk thru all of the test keys created during a test and delete them before running the next test.  This mirrors what is done with the database.</p>
<p>I&#8217;m now able to test on the same instance that I&#8217;ve loaded with posts from various blogs.  I have more to say about the mindset change from a relational db to key-value storage but I wanted to get this post out.</p>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2009/03/18/testing-with-redis/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bridges to the Future</title>
		<link>http://lucasjosh.com/blog/2008/12/31/bridges-to-the-future/</link>
		<comments>http://lucasjosh.com/blog/2008/12/31/bridges-to-the-future/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 18:56:13 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/2008/12/31/bridges-to-the-future/</guid>
		<description><![CDATA[Kevin Matheny has written a really excellent piece at BusinessWeek, extolling the virtues of agile software development.&#160; I think it can be one of the toughest battles within a large organization but if you win and are allowed to be flexible, the benefits are easily more than any struggles you&#8217;ll have.
What this means for managing [...]]]></description>
			<content:encoded><![CDATA[<p>Kevin Matheny <a href="http://www.businessweek.com/bwdaily/dnflash/content/dec2008/db20081228_586132.htm">has written a really excellent piece</a> at BusinessWeek, extolling the virtues of agile software development.&nbsp; I think it can be one of the toughest battles within a large organization but if you <i>win</i> and are allowed to be flexible, the benefits are easily more than any struggles you&#8217;ll have.</p>
<blockquote><p>What this means for managing projects—including any project that relies on the Internet to deliver its value proposition—is simple: The longer your project timeline, the greater the risk that what you deliver will not be what you or your customers need when you deliver it. Not only are longer-term projects more likely to fail due to changes in requirements or conditions during the project, they&#8217;re more expensive. This increases the cost of failure. And because we can only do a few of them in a year, the impact of any one failure is huge.</p></blockquote>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2008/12/31/bridges-to-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic DNS</title>
		<link>http://lucasjosh.com/blog/2008/12/30/dynamic-dns/</link>
		<comments>http://lucasjosh.com/blog/2008/12/30/dynamic-dns/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 18:06:12 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Me]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/?p=218</guid>
		<description><![CDATA[When I worked at CollabNet many moons ago, I used a laptop for my normal development but also used a desktop as a server for builds and testing things locally.  
Since I worked from home, both were behind a router but I didn&#8217;t want to pony up money for a static IP so you [...]]]></description>
			<content:encoded><![CDATA[<p>When I worked at <a href="http://www.collab.net">CollabNet</a> many moons ago, I used a laptop for my normal development but also used a desktop as a server for builds and testing things locally.  </p>
<p>Since I worked from home, both were behind a router but I didn&#8217;t want to pony up money for a static IP so you never knew quite was the IP was if things were reconnected.  Obviously this wasn&#8217;t a big deal when I was sitting at my desk home but became an issue when I was up at HQ in San Francisco.</p>
<p>My solution was to have a cron job run every hour on the server and compare its IP with the one it had an hour ago.  If it changed, it emailed me so I would know.  </p>
<p>I mention all of this because <a href="http://jeremy.zawodny.com/blog/archives/010835.html">Jeremy Zawodny has done the same thing</a> though he has made it much more Web 2.0-compliant by using <a href="http://www.twitter.com">Twitter</a>.</p>
<p>I imagine I would do exactly that as well if I needed to right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2008/12/30/dynamic-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your Weekend Reading</title>
		<link>http://lucasjosh.com/blog/2008/08/08/your-weekend-reading/</link>
		<comments>http://lucasjosh.com/blog/2008/08/08/your-weekend-reading/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 16:15:55 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/?p=114</guid>
		<description><![CDATA[Bill de hÓra puts together a great list of links looking at XMPP for distributed computing.
]]></description>
			<content:encoded><![CDATA[<p>Bill de hÓra puts together a great <a href="http://www.dehora.net/journal/2008/08/08/non-newtonian-reading/">list of links</a> looking at XMPP for distributed computing.</p>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2008/08/08/your-weekend-reading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloud Architectures</title>
		<link>http://lucasjosh.com/blog/2008/07/20/cloud-architectures/</link>
		<comments>http://lucasjosh.com/blog/2008/07/20/cloud-architectures/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 14:55:27 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/?p=88</guid>
		<description><![CDATA[The Amazon Web Services Blog points to a new white paper one of their engineers has written, dealing with Cloud Architectures.  It&#8217;s a really good overview of the cloud that Amazon offers and it gets into the architecture decisions when building something for the cloud.

Cloud Architectures address key difficulties surrounding large-scale data processing. In [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://aws.typepad.com">The Amazon Web Services Blog</a> points to a new white paper one of their engineers has written, dealing with <a href="http://aws.typepad.com/aws/2008/07/white-paper-on.html">Cloud Architectures</a>.  It&#8217;s a really good overview of the cloud that Amazon offers and it gets into the architecture decisions when building something for the cloud.</p>
<blockquote><p>
Cloud Architectures address key difficulties surrounding large-scale data processing. In traditional data processing it is difficult to get as many machines as an application needs. Second, it is difficult to get the machines when one needs them. Third, it is difficult to distribute and co-ordinate a large-scale job on different machines, run processes on them, and provision another machine to recover if one machine fails. Fourth, it is difficult to auto-scale up and down based on dynamic workloads. Fifth, it is difficult to get rid of all those machines when the job is done. Cloud Architectures solve such difficulties.</p>
<p>Applications built on Cloud Architectures run in-the-cloud where the physical location of the infrastructure is determined by the provider. They take advantage of simple APIs of Internet-accessible services that scale on-demand, that are industrial-strength, where the complex reliability and scalability logic of the underlying services remains implemented and hidden inside-the-cloud. The usage of resources in Cloud Architectures is as needed, sometimes ephemeral or seasonal, thereby providing the highest utilization and optimum bang for the buck.
</p></blockquote>
<p>Definitely check the tips for building cloud applications since they are very relevant no matter if you are deploying on Amazon or your own system.</p>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2008/07/20/cloud-architectures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter, Twitter, Twitter</title>
		<link>http://lucasjosh.com/blog/2008/04/22/twitter-twitter-twitter/</link>
		<comments>http://lucasjosh.com/blog/2008/04/22/twitter-twitter-twitter/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 06:35:31 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[LATimes]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/2008/04/22/twitter-twitter-twitter/</guid>
		<description><![CDATA[It seems that yesterday and today were filled with various bits of Twitter.  First, I added the Top of the Ticket blog to our various Twitter accounts at latimestot.  I&#8217;m thinking about releasing the code for how I do it if I get approval.  It&#8217;s pretty basic but could be useful for [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that yesterday and today were filled with various bits of <a href="http://www.twitter.com">Twitter</a>.  First, I added the <a href="http://latimesblogs.latimes.com/washington/">Top of the Ticket blog</a> to our various Twitter accounts at <a href="http://twitter.com/latimestot">latimestot</a>.  I&#8217;m thinking about releasing the code for how I do it if I get approval.  It&#8217;s pretty basic but could be useful for anyone needing to update multiple accounts.</p>
<p>Yesterday, <a href="http://www.horsepigcow.com">Tara Hunt</a> posted a great intro for <a href="http://www.horsepigcow.com/2008/04/21/tweeting-for-companies-101/">companies to use Twitter</a>.  It has great advice plus some good tools for keeping track of who is talking about you.  </p>
<p>One was <a href="http://tweetburner.com/">Tweetburner</a> which shortens URLs and keeps track of how many clicks you get.  The other is <a href="http://www.tweetscan.com">Tweetscan</a> which allows you to search thru all tweets for a keyword.</p>
<p>I&#8217;ve found some interesting ones which weren&#8217;t complimentary to <a href="http://www.latimes.com">the Times</a> but are a great look at people&#8217;s opinions.</p>
<ul>
<li><a href="http://twitter.com/kirkskodis/statuses/794637391">http://twitter.com/kirkskodis/statuses/794637391<a/></li>
<li><a href="http://twitter.com/rowast/statuses/787411161">http://twitter.com/rowast/statuses/787411161</a></li>
<li><a href="http://twitter.com/ctcrowell/statuses/780154897">http://twitter.com/ctcrowell/statuses/780154897</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2008/04/22/twitter-twitter-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kevin Burton on scaling MySQL</title>
		<link>http://lucasjosh.com/blog/2008/04/17/kevin-burton-on-scaling-mysql/</link>
		<comments>http://lucasjosh.com/blog/2008/04/17/kevin-burton-on-scaling-mysql/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 05:47:41 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/2008/04/17/kevin-burton-on-scaling-mysql/</guid>
		<description><![CDATA[Kevin Burton has posted his slides from the MySQL conference.  It&#8217;s based on his blog aggregator, Spinn3r which uses MySQL in write-heavy processes instead of the usual  read path.
]]></description>
			<content:encoded><![CDATA[<p>Kevin Burton <a href="http://feedblog.org/2008/04/17/slides-from-spinn3r-architecture-talk-at-2008-mysql-users-conference/">has posted his slides</a> from the MySQL conference.  It&#8217;s based on his blog aggregator, <a href="http://www.spinn3r.com">Spinn3r</a> which uses MySQL in write-heavy processes instead of the usual  read path.</p>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2008/04/17/kevin-burton-on-scaling-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Thoughts on the Google App Engine</title>
		<link>http://lucasjosh.com/blog/2008/04/09/some-thoughts-on-the-google-app-engine/</link>
		<comments>http://lucasjosh.com/blog/2008/04/09/some-thoughts-on-the-google-app-engine/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 15:43:06 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/2008/04/09/some-thoughts-on-the-google-app-engine/</guid>
		<description><![CDATA[Everyone talked about the App Engine yesterday and folks seem to go in either of the extremes of loving it or hating it.  I&#8217;ve seen conspiracy theories about giving Google access to your data but also how this could be the start of many simple applications that wouldn&#8217;t see the light of day without [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone talked about <a href="http://code.google.com/appengine/docs/gettingstarted/introduction.html">the App Engine yesterday</a> and folks seem to go in either of the extremes of loving it or hating it.  I&#8217;ve seen conspiracy theories about giving Google access to your data but also how this could be the start of many simple applications that wouldn&#8217;t see the light of day without something like this.</p>
<p>And there is the <a href="http://gilesbowkett.blogspot.com/2008/04/geek-politics-ftl.html">response from Giles</a>.  I work with Giles, respect him a ton but I think he&#8217;s wrong here or at least it&#8217;s too early to see if he is right or not.  </p>
<blockquote><p>
Google App Engine is a joke. You can&#8217;t create apps in Rails, Haskell, Erlang, Seaside, Perl, PHP, or Lisp. You can&#8217;t even leverage Unix. You get all the restrictive corporate BS you&#8217;d have to deal with if you worked at Google, but you don&#8217;t get the stock options, the salary, the free food, or even a parking space for your trouble. Packing Google with partisans who favored a particular language to unreasonable degrees resulted in a product which just isn&#8217;t even worth considering. This is why polyglot programming matters. The age of one dominant language is over, and Google&#8217;s attempt to make Python numero uno just means wasted time and wasted money.
</p></blockquote>
<p>I think the focus on Python-only is missing a couple of things that seem fairly obviously.  One, the main config app.yaml file has an option for saying which runtime is being used and states that other languages / runtimes may be supported in the future.  And yes, I do see that it isn&#8217;t for sure but come on, do you really think Google will give that kind of additional momentum to Amazon or any other competitors.  The second thing is that most developers know that getting something out the door is more important that trying to get all possible features included before launch.  Why should this be considered any different?  </p>
<p>We know that Google has the Python expertise, why is it shocking that Python is the first language supported?  Why would they want to offer a Rails environment and get slammed for it not being totally ready.  Why not get the bugs shaken out with now before opening it up to other languages?</p>
<p>Of course, I could totally be wrong and this is an end-game play by Google but it seems way too early for that.</p>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2008/04/09/some-thoughts-on-the-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance and Architecture Conferences</title>
		<link>http://lucasjosh.com/blog/2008/03/12/performance-and-architecture-conferences/</link>
		<comments>http://lucasjosh.com/blog/2008/03/12/performance-and-architecture-conferences/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 07:08:37 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/2008/03/12/performance-and-architecture-conferences/</guid>
		<description><![CDATA[Looks like an action-packed couple of days at the end of June up in the Bay.  First, there&#8217;s the O&#8217;Reilly Velocity conference and then on the 25th is Structure &#8216;08 conference.  I&#8217;m not sure if I can go to either of them but they should be interesting.
]]></description>
			<content:encoded><![CDATA[<p>Looks like an action-packed couple of days at the end of June up in the Bay.  First, there&#8217;s the <a href="http://en.oreilly.com/velocity2008/public/content/home">O&#8217;Reilly Velocity conference</a> and then on the 25th is <a href="http://gigaom.com/2008/03/12/structure08/">Structure &#8216;08</a> conference.  I&#8217;m not sure if I can go to either of them but they should be interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2008/03/12/performance-and-architecture-conferences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starling</title>
		<link>http://lucasjosh.com/blog/2008/01/16/starling/</link>
		<comments>http://lucasjosh.com/blog/2008/01/16/starling/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 14:50:06 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://lucasjosh.com/blog/2008/01/16/starling/</guid>
		<description><![CDATA[Blaine Cook from Twitter released Starling last week.  He describes it as:

Starling is a light-weight persistent queue server that speaks the MemCache protocol. It was built to drive Twitter&#8217;s backend, and is in production across Twitter&#8217;s cluster.

I&#8217;m always a sucker for new infrastructure code but the problem is trying to figure out how to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://romeda.org/">Blaine Cook</a> from <a href="http://www.twitter.com">Twitter</a> released <a href="http://rubyforge.org/projects/starling/">Starling</a> last week.  He describes it as:</p>
<blockquote><p>
Starling is a light-weight persistent queue server that speaks the MemCache protocol. It was built to drive Twitter&#8217;s backend, and is in production across Twitter&#8217;s cluster.
</p></blockquote>
<p>I&#8217;m always a sucker for new infrastructure code but the problem is trying to figure out how to see if it will fit within whatever current architecture is already in place.  I think though I might have found somewhere.  </p>
<p>We have an aggregator grabbing various RSS feeds both internally and externally.  Right now, during the parsing / adding to the database, we send off the information to our indexer for later searching.  This is basically how the <a href="http://topics.latimes.com">Topics pages</a> are built dynamically.</p>
<p>Instead of sending the data during run-time, maybe it would be better to just add it to a queue with Starling for later processing.  A job in the indexer could check the queue and index anything that&#8217;s there.  This also would allow other applications to add things ready for indexing.</p>
]]></content:encoded>
			<wfw:commentRss>http://lucasjosh.com/blog/2008/01/16/starling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
