<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Two Seven</title>
	<atom:link href="http://twoseven.co.nz/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://twoseven.co.nz</link>
	<description>...is Dan Willis blogging about web design and development, usability, standards and pretty much anything!</description>
	<lastBuildDate>Sun, 20 May 2012 13:53:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-20339</generator>
	<item>
		<title>Comment on An update by Rabbit Vibrator</title>
		<link>http://twoseven.co.nz/2009/06/12/an-update/comment-page-1/#comment-86125</link>
		<dc:creator>Rabbit Vibrator</dc:creator>
		<pubDate>Sun, 20 May 2012 13:53:42 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=164#comment-86125</guid>
		<description>certainly like your web site however you have to take a look at the spelling on quite a few of your posts. Several of them are rife with spelling issues and I in finding it very bothersome to tell the truth on the other hand I will certainly come back again.</description>
		<content:encoded><![CDATA[<p>certainly like your web site however you have to take a look at the spelling on quite a few of your posts. Several of them are rife with spelling issues and I in finding it very bothersome to tell the truth on the other hand I will certainly come back again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript Decision Tree tool by Steve</title>
		<link>http://twoseven.co.nz/2011/02/18/javascript-decision-tree-tool/comment-page-1/#comment-71778</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 05 Apr 2011 11:59:37 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=199#comment-71778</guid>
		<description>Reading through your code has been very worthwhile to further by JS knowledge.  I have to take a different approach as I am using a tag buttons instead of radios so need a way of persisting what was chosen before. 

I can suggest adding comments in for each for loop as it is quite hard to grasp at first what is going on. 

You can also move the num_of_steps calculation up a level as it only needs to be calculated once and not on every click.</description>
		<content:encoded><![CDATA[<p>Reading through your code has been very worthwhile to further by JS knowledge.  I have to take a different approach as I am using a tag buttons instead of radios so need a way of persisting what was chosen before. </p>
<p>I can suggest adding comments in for each for loop as it is quite hard to grasp at first what is going on. </p>
<p>You can also move the num_of_steps calculation up a level as it only needs to be calculated once and not on every click.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Best of Swiss Web 2011 by Chregu</title>
		<link>http://twoseven.co.nz/2011/04/01/best-of-swiss-web-2011/comment-page-1/#comment-71774</link>
		<dc:creator>Chregu</dc:creator>
		<pubDate>Tue, 05 Apr 2011 09:39:20 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=217#comment-71774</guid>
		<description>Thanks for the congratulations from the other side of the world. Very much appreciated :)</description>
		<content:encoded><![CDATA[<p>Thanks for the congratulations from the other side of the world. Very much appreciated <img src='http://twoseven.co.nz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JavaScript Decision Tree tool by JP</title>
		<link>http://twoseven.co.nz/2011/02/18/javascript-decision-tree-tool/comment-page-1/#comment-70218</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Fri, 18 Feb 2011 08:30:21 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=199#comment-70218</guid>
		<description>js fiddle  .  . . sounds dodgy . . .</description>
		<content:encoded><![CDATA[<p>js fiddle  .  . . sounds dodgy . . .</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on An update by Bianca</title>
		<link>http://twoseven.co.nz/2009/06/12/an-update/comment-page-1/#comment-50628</link>
		<dc:creator>Bianca</dc:creator>
		<pubDate>Thu, 18 Mar 2010 02:48:50 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=164#comment-50628</guid>
		<description>Suggest anchovies pizza with super hot chili sauce. Follow up with dark beer and walahhh! Finally, gather around a table with some friends to play poker while watching Bay Watch reruns...and forget corporate web dev for the night!</description>
		<content:encoded><![CDATA[<p>Suggest anchovies pizza with super hot chili sauce. Follow up with dark beer and walahhh! Finally, gather around a table with some friends to play poker while watching Bay Watch reruns&#8230;and forget corporate web dev for the night!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting XML data into Symfony, automatically. by Dan</title>
		<link>http://twoseven.co.nz/2009/11/03/getting-xml-data-into-symfony-automatically/comment-page-1/#comment-42495</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Wed, 04 Nov 2009 21:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=177#comment-42495</guid>
		<description>Thanks Harry,

The inital dump is a 6MB XML file, so not very large at all. The incrementals will be much smaller.

I like the idea of creating individual databases of the dump and for staging the new stuff from the incremental, and then switching when ready.

This gives me a good bit to go on, so I&#039;ll get cracking and let you know how it turns out. Thanks heaps!</description>
		<content:encoded><![CDATA[<p>Thanks Harry,</p>
<p>The inital dump is a 6MB XML file, so not very large at all. The incrementals will be much smaller.</p>
<p>I like the idea of creating individual databases of the dump and for staging the new stuff from the incremental, and then switching when ready.</p>
<p>This gives me a good bit to go on, so I&#8217;ll get cracking and let you know how it turns out. Thanks heaps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting XML data into Symfony, automatically. by Dan</title>
		<link>http://twoseven.co.nz/2009/11/03/getting-xml-data-into-symfony-automatically/comment-page-1/#comment-42492</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Wed, 04 Nov 2009 19:45:57 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=177#comment-42492</guid>
		<description>Thanks for your help, Glen!

It looks like symfony has something similar - batch files and tasks that have access to the symfony application environment (see &lt;a href=&quot;http://www.symfony-project.org/book/1_2/16-Application-Management-Tools&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;).

Following your process above looks to be the way to go - I&#039;ll code it up and try it out :)

Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for your help, Glen!</p>
<p>It looks like symfony has something similar &#8211; batch files and tasks that have access to the symfony application environment (see <a href="http://www.symfony-project.org/book/1_2/16-Application-Management-Tools" rel="nofollow">here</a>).</p>
<p>Following your process above looks to be the way to go &#8211; I&#8217;ll code it up and try it out <img src='http://twoseven.co.nz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting XML data into Symfony, automatically. by Harry Fuecks</title>
		<link>http://twoseven.co.nz/2009/11/03/getting-xml-data-into-symfony-automatically/comment-page-1/#comment-42480</link>
		<dc:creator>Harry Fuecks</dc:creator>
		<pubDate>Tue, 03 Nov 2009 23:17:39 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=177#comment-42480</guid>
		<description>Ah if you&#039;d asked that question while working with local... ;) But you asked for it...

Symfony ( or Rails or web framework X ) are not your solution IMO. The general field is called ETL - http://en.wikipedia.org/wiki/Extract,_transform,_load although be warned - that can mean anything from hacking up a few Bash scripts &quot;enterprise solutions&quot; that push you into data warehousing. There&#039;s a ton of open source ETL frameworks and tools out there in pretty much any language ( except PHP in fact ). Couple of ones you _might_ want to look at would be http://activewarehouse.rubyforge.org/etl/ and http://kettle.pentaho.org/. But that&#039;s probably overkill - easier to hack something up yourself.

Here&#039;s how I&#039;d go about it...

First - assume stupidity at the far end, delivering you the data. Seriously. Assume they&#039;re the crappiest coders imaginable. This will help you get your end right and if you turn out to be wrong, you&#039;ll be happily surprised :)

Next the data volume - how big is that iniital dump? Anything up to ~1GB is probably probably easiest to handle with a single process / thread and something like Perl, Python, Ruby or PHP (on the command line); just keep is simple.

More than 1GB and you probably want to parallelize the processing in some way - Amazon&#039;s Elastic Map Reduce would be really smart here - see http://www.youtube.com/watch?v=iMOzC835H4I for example. Just remember - threads are evil...

I&#039;ll stick to the  then an incremental update every couple of weeks, with additions, deletions and updates.

What sucks about anything that involves incremental updates, especially deletions, is what happens when something gets lost, and it inevitably will ( remember how dumb they are at the far end ). What&#039;s the impact? Could be the data isn&#039;t that important, so who cares? But for small data volumes, the easiest is to get them to send everything every time and just process the whole lot. But lets assume the incremental updates are non-negotiable...

...then the strategy is about being able to keep the initial dump in some intermediate form and applying the updates to it then updating a database from there.

To do that, each update (the the original dump) is going to correspond to a single (SQLite) database file.

Using a stream-based XML parser (e.g. http://www.php.net/sax or http://www.php.net/xmlreader) that isn&#039;t going to put the whole file in memory, for the initial dump insert the all the new records into an SQLite DB.

Then, every time you receive an update, you make a copy of the last-updated SQLite database file then apply the changes to the new copy. This gives you a &quot;versioned&quot; history of updates plus allows you to continue reading from the old version while you&#039;re still updating the new version, then switch when you&#039;re ready ( using something like ln -s and mv so it&#039;s atomic ).

Finally you load that file into Symfony for display on the web. If you want to actually modify the data from within Symfony, you probably need to &quot;lock&quot; the DB for short periods while you do the updates i.e. once you&#039;ve made a copy, no more updates to the old version - make it read only until the new version is ready.

Finally those images - well that&#039;s what we did the &quot;binarypool&quot; for - http://github.com/localch/binarypool / http://www.viddler.com/explore/cocaman/videos/4/ although that only _really_ starts to make sense when you&#039;ve parallelized the processing of the data and / or have multiple data sources.</description>
		<content:encoded><![CDATA[<p>Ah if you&#8217;d asked that question while working with local&#8230; <img src='http://twoseven.co.nz/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  But you asked for it&#8230;</p>
<p>Symfony ( or Rails or web framework X ) are not your solution IMO. The general field is called ETL &#8211; <a href="http://en.wikipedia.org/wiki/Extract,_transform,_load" rel="nofollow">http://en.wikipedia.org/wiki/Extract,_transform,_load</a> although be warned &#8211; that can mean anything from hacking up a few Bash scripts &#8220;enterprise solutions&#8221; that push you into data warehousing. There&#8217;s a ton of open source ETL frameworks and tools out there in pretty much any language ( except PHP in fact ). Couple of ones you _might_ want to look at would be <a href="http://activewarehouse.rubyforge.org/etl/" rel="nofollow">http://activewarehouse.rubyforge.org/etl/</a> and <a href="http://kettle.pentaho.org/" rel="nofollow">http://kettle.pentaho.org/</a>. But that&#8217;s probably overkill &#8211; easier to hack something up yourself.</p>
<p>Here&#8217;s how I&#8217;d go about it&#8230;</p>
<p>First &#8211; assume stupidity at the far end, delivering you the data. Seriously. Assume they&#8217;re the crappiest coders imaginable. This will help you get your end right and if you turn out to be wrong, you&#8217;ll be happily surprised <img src='http://twoseven.co.nz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Next the data volume &#8211; how big is that iniital dump? Anything up to ~1GB is probably probably easiest to handle with a single process / thread and something like Perl, Python, Ruby or PHP (on the command line); just keep is simple.</p>
<p>More than 1GB and you probably want to parallelize the processing in some way &#8211; Amazon&#8217;s Elastic Map Reduce would be really smart here &#8211; see <a href="http://www.youtube.com/watch?v=iMOzC835H4I" rel="nofollow">http://www.youtube.com/watch?v=iMOzC835H4I</a> for example. Just remember &#8211; threads are evil&#8230;</p>
<p>I&#8217;ll stick to the  then an incremental update every couple of weeks, with additions, deletions and updates.</p>
<p>What sucks about anything that involves incremental updates, especially deletions, is what happens when something gets lost, and it inevitably will ( remember how dumb they are at the far end ). What&#8217;s the impact? Could be the data isn&#8217;t that important, so who cares? But for small data volumes, the easiest is to get them to send everything every time and just process the whole lot. But lets assume the incremental updates are non-negotiable&#8230;</p>
<p>&#8230;then the strategy is about being able to keep the initial dump in some intermediate form and applying the updates to it then updating a database from there.</p>
<p>To do that, each update (the the original dump) is going to correspond to a single (SQLite) database file.</p>
<p>Using a stream-based XML parser (e.g. <a href="http://www.php.net/sax" rel="nofollow">http://www.php.net/sax</a> or <a href="http://www.php.net/xmlreader" rel="nofollow">http://www.php.net/xmlreader</a>) that isn&#8217;t going to put the whole file in memory, for the initial dump insert the all the new records into an SQLite DB.</p>
<p>Then, every time you receive an update, you make a copy of the last-updated SQLite database file then apply the changes to the new copy. This gives you a &#8220;versioned&#8221; history of updates plus allows you to continue reading from the old version while you&#8217;re still updating the new version, then switch when you&#8217;re ready ( using something like ln -s and mv so it&#8217;s atomic ).</p>
<p>Finally you load that file into Symfony for display on the web. If you want to actually modify the data from within Symfony, you probably need to &#8220;lock&#8221; the DB for short periods while you do the updates i.e. once you&#8217;ve made a copy, no more updates to the old version &#8211; make it read only until the new version is ready.</p>
<p>Finally those images &#8211; well that&#8217;s what we did the &#8220;binarypool&#8221; for &#8211; <a href="http://github.com/localch/binarypool" rel="nofollow">http://github.com/localch/binarypool</a> / <a href="http://www.viddler.com/explore/cocaman/videos/4/" rel="nofollow">http://www.viddler.com/explore/cocaman/videos/4/</a> although that only _really_ starts to make sense when you&#8217;ve parallelized the processing of the data and / or have multiple data sources.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getting XML data into Symfony, automatically. by Glen Barnes</title>
		<link>http://twoseven.co.nz/2009/11/03/getting-xml-data-into-symfony-automatically/comment-page-1/#comment-42478</link>
		<dc:creator>Glen Barnes</dc:creator>
		<pubDate>Tue, 03 Nov 2009 22:00:50 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=177#comment-42478</guid>
		<description>So I don&#039;t use Symphony but do use Rails so there may be something similar (Pake?)....In Rails I would create a Rake task that did this. The Rake task:

- Loads the Rails environment (so gets access to all of the ORM goodness)
- Uses an xml library to read in the source xml file
- Loop through each record/whatever and look for updates/additions/deletions. 
- Use the ORM methods to update your data.
- Any new images can be pulled down using whatever http library that PHP supplies.</description>
		<content:encoded><![CDATA[<p>So I don&#8217;t use Symphony but do use Rails so there may be something similar (Pake?)&#8230;.In Rails I would create a Rake task that did this. The Rake task:</p>
<p>- Loads the Rails environment (so gets access to all of the ORM goodness)<br />
- Uses an xml library to read in the source xml file<br />
- Loop through each record/whatever and look for updates/additions/deletions.<br />
- Use the ORM methods to update your data.<br />
- Any new images can be pulled down using whatever http library that PHP supplies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Redesigning a corporate web environment by Lance</title>
		<link>http://twoseven.co.nz/2009/07/14/redesigning-a-corporate-web-environment/comment-page-1/#comment-37983</link>
		<dc:creator>Lance</dc:creator>
		<pubDate>Tue, 28 Jul 2009 02:10:51 +0000</pubDate>
		<guid isPermaLink="false">http://twoseven.co.nz/?p=169#comment-37983</guid>
		<description>I agree with Harry - the technology is the easy bit, and the corporate culture is the much harder piece for your friend to crack.

My advice to him would be to start small, and get one sweet website or application launched and quickly. You may need to get a small external shop to help you, or carve out a small team within your team.  Don&#039;t tell anyone you are doing it - but just get it done and present the result when all you need to do is hit the deploy button. Then do the next one.

Find someone in marketing that you trust, get stealthy support from other parts of the organisation - the twitterers, key operations folk and a heavy hitter or two to provide air cover.  Build a groundswell of support for a series of new sites - but most of all make sure he continues to deploy new stuff regularly. Your friend&#039;s customers are no doubt wildly frustrated with his company&#039;s antiquated crap of a website, and they can&#039;t wait to see any sort of change.</description>
		<content:encoded><![CDATA[<p>I agree with Harry &#8211; the technology is the easy bit, and the corporate culture is the much harder piece for your friend to crack.</p>
<p>My advice to him would be to start small, and get one sweet website or application launched and quickly. You may need to get a small external shop to help you, or carve out a small team within your team.  Don&#8217;t tell anyone you are doing it &#8211; but just get it done and present the result when all you need to do is hit the deploy button. Then do the next one.</p>
<p>Find someone in marketing that you trust, get stealthy support from other parts of the organisation &#8211; the twitterers, key operations folk and a heavy hitter or two to provide air cover.  Build a groundswell of support for a series of new sites &#8211; but most of all make sure he continues to deploy new stuff regularly. Your friend&#8217;s customers are no doubt wildly frustrated with his company&#8217;s antiquated crap of a website, and they can&#8217;t wait to see any sort of change.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

