<?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>Acumen Development &#187; Open Source</title>
	<atom:link href="http://www.acumendevelopment.net/category/open_source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acumendevelopment.net</link>
	<description>Software to inspire.</description>
	<lastBuildDate>Wed, 02 Jun 2010 16:39:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
		<item>
		<title>Wordpress and Subversion</title>
		<link>http://www.acumendevelopment.net/wordpress-and-subversion/</link>
		<comments>http://www.acumendevelopment.net/wordpress-and-subversion/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 12:00:57 +0000</pubDate>
		<dc:creator>Leo Brown</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.acumendevelopment.net/?p=556</guid>
		<description><![CDATA[If there&#8217;s two bits of software I love, Wordpress and Subversion would be right up there in terms of making my life simpler, and making publishing easier. While it&#8217;s tempting to counter statements like these with a long list of problems, I&#8217;ll leave that as it is &#8211; today I want to convey a few [...]]]></description>
			<content:encoded><![CDATA[<p>If there&#8217;s two bits of software I love, Wordpress and Subversion would be right up there in terms of making my life simpler, and making publishing easier. While it&#8217;s tempting to counter statements like these with a long list of problems, I&#8217;ll leave that as it is &#8211; today I want to convey a few things that helped me use the two pieces of software together.</p>
<p>First, the context of using Wordpress and Subversion jointly is typically in making sure that customer websites are fully versioned so that we can be accountable and transparent, and equally importantly so that we can roll back in a disaster scenario.</p>
<p>Second, some background on our approach. We believe that when using Open Source software for customers, it&#8217;s important to strike a balance between cutting edge features and stability. We typically accomplish this by starting the project at the head revision of the software we&#8217;re using &#8211; in this case, Wordpress.</p>
<pre class="brush: bash;">
svn co http://core.svn.wordpress.org/trunk www
</pre>
<p>Now we have a freshly checked out copy of Wordpress, and we&#8217;ll want to keep it this way. If you don&#8217;t feel comfortable with leaving a repository in a certain state there are a few options here &#8211; the most obvious would be for you to maintain your own copy of the Wordpress source tree (which can be useful in other ways too, for instance if WP&#8217;s subversion servers were to go down.) This can be accomplished easily using `svnsync`.</p>
<p>Assuming that you&#8217;re happy with your checked-out Wordpress, we now want to move all the User data to one place, so that we can version it separately to the Wordpress trunk. Typically, this is just the `wp-content` folder, but you may also want to version wp-config.php, .htaccess, and any other special files you&#8217;re using in the project webroot.</p>
<p>Your final decision on the path structure really depends on the scenario- you may want to separate out the theme directory from other &#8216;user content&#8217; directories if you&#8217;re planning to open source your theme or host it elsewhere. In this case, you&#8217;d have a subversion repository containing the folders within wp-content, with a `themes` folder which will load your versioned theme(s) as an svn:externals entry.</p>
<p>Now, a couple of tricks &#8211; first, your uploads folder may want to be versioned. If not, you&#8217;ll want to svn:ignore it. If you do version it, you&#8217;ll probably want to svn:ignore some of it. For instance, WP2.5 onwards supports image resizing, and it uses the uploads directory also as a cache store for these thumbnails. We can ignore these thumbnails by setting the svn:ignore property on the uploads directory as follows:</p>
<pre class="brush: bash;">
[root@www uploads]# svn -R  propset svn:ignore &quot;*[0-9]x[1-9]*&quot;; .
property 'svn:ignore' set (recursively) on '.'
</pre>
<p>Note that if your uploads folder is structured by date, these ignore settings will not persist in new directories, so I&#8217;d recommend you do not use a structured uploads folder if you are versioning it (the option titled &#8221; Organize my uploads into month- and year-based folders&#8221;).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acumendevelopment.net/wordpress-and-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Scraping</title>
		<link>http://www.acumendevelopment.net/basic-scraping/</link>
		<comments>http://www.acumendevelopment.net/basic-scraping/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 16:57:59 +0000</pubDate>
		<dc:creator>Leo Brown</dc:creator>
				<category><![CDATA[Development Processes]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[mashups]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scraping]]></category>

		<guid isPermaLink="false">http://www.acumendevelopment.net/?p=75</guid>
		<description><![CDATA[A short introduction to Web Page Scraping]]></description>
			<content:encoded><![CDATA[<p>While in production applications we all favour use of an API, there are a lot of situations, such as in &lsquo;<a href="http://en.wikipedia.org/wiki/Mashup_(web_application_hybrid)">Mashups</a>&rsquo; (I love how that term has been reappropriated from Jungle music) where you need to do some page scraping.</p>
<p>It&#8217;s occurred to me how these very easy techniques seem inaccessible to many people, so I thought I&#8217;d post a few bits and bobs about some basic scraping methods.</p>
<p>Here&#8217;s a bit of code I wrote to use PHP&#8217;s <a href="http://php.net/domdocument">DOMDocument class</a> to treat a HTML page as XML and fetch, in this case, the incredibly useful current world population&#8230; fantastic!</p>
<pre class="brush: php;">
&lt;?php
 // where to find population data...
 $location['url']='http://www.census.gov/ipc/www/popclockworld.html';
 $location['id']='worldnumber';

 // initialise a new document and prepare the data
 $d=new DOMDocument();
 $file = file_get_contents($location['url']);

 // get and print current world population
 $d-&gt;loadHTML($file);
 $e=$d-&gt;getElementById($location['id']);
 print $e-&gt;nodeValue;
?&gt;
</pre>
<p>Sample output: 6,738,610,278</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acumendevelopment.net/basic-scraping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP StopWatch Class</title>
		<link>http://www.acumendevelopment.net/php-stopwatch/</link>
		<comments>http://www.acumendevelopment.net/php-stopwatch/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 15:15:15 +0000</pubDate>
		<dc:creator>Paul Hayes</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[stopwatch]]></category>

		<guid isPermaLink="false">http://www.acumendevelopment.net/archives/59</guid>
		<description><![CDATA[Just a simple little class to play around with. I quickly threw it together because I got fed up of writing performance debugging code into perfectly clean classes, and then having to strip it out again later. The stop watch allows you to set callback methods to receive any calls to the stopwatches mark method, [...]]]></description>
			<content:encoded><![CDATA[<p>Just a simple little class to play around with. I quickly threw it together because I got fed up of writing performance debugging code into perfectly clean classes, and then having to strip it out again later. The stop watch allows you to set callback methods to receive any calls to the stopwatches mark method, which as it&#8217;s a singleton can be called just about anywhere. Additionally it uses sprintf() strings to format the message and time.</p>
<p>Additionally this shows how in two lines you can be notified of the scripts entire execution time using StopWatch.</p>
<pre class="brush: php;">
&lt;?php
include('StopWatch.class.php');
$stopWatch=StopWatch::getInstance();
$stopWatch-&amp;amp;amp;gt;setFinishMessage('script executed in %01.2f seconds');
sleep(2);
?&gt;
</pre>
<p>And here&#8217;s the source <a title="StopWatch PHP Class" href="http://www.acumendevelopment.net/wp-content/uploads/2008/04/stopwatch.zip">stopwatch.zip</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acumendevelopment.net/php-stopwatch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vector for php, surely not?</title>
		<link>http://www.acumendevelopment.net/vector-for-php-surely-not/</link>
		<comments>http://www.acumendevelopment.net/vector-for-php-surely-not/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 16:42:46 +0000</pubDate>
		<dc:creator>Paul Hayes</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://acumendevelopment.net.paul.proto1.acumensystems.net/?p=40</guid>
		<description><![CDATA[Ok before you try to hit me let me explain. This is not just a boring Object Orientated wrapper for storing PHP object in an array. It&#8217;s a multi-indexed,  self sufficient class.

Too many times I&#8217;ve seen my code swell with foreach loops, looking for elements with a certain property, or to call a function [...]]]></description>
			<content:encoded><![CDATA[<p>Ok before you try to hit me let me explain. This is not just a boring Object Orientated wrapper for storing PHP object in an array. It&#8217;s a multi-indexed,  self sufficient class.</p>
<p><span id="more-40"></span></p>
<p>Too many times I&#8217;ve seen my code swell with foreach loops, looking for elements with a certain property, or to call a function of each object in an array. Additionally making sure the keys of an array match one particular property and stay in sink with them. So to try and side step all these I&#8217;m started Vector, I&#8217;m sure others have done similar, but reinvention is one of the fun things about being a programmer (and one of the few things which make it similar to being an artist).</p>
<p>So here&#8217;s how you use Vector currently:</p>
<p><code>&lt;?php </code></p>
<p><code>require_once('Vector.class.php');<br />
require_once('User.example.class.php');</code></p>
<p><code><br />
<font color="#99cc00"> //initialize a Vector and add a index that uses the username field of each object entered into the array<br />
</font> $users=new Vector();<br />
$users-&gt;addIndex('username');</code></p>
<p><code><br />
<font color="#99cc00"> //add two objects of class User into the vector<br />
</font> $users-&gt;addObject($frank=new User('frank.n.stein','monster'));<br />
$users-&gt;addObject($vlad=new User('count.dracula','vampire'));</code></p>
<p><code><br />
<font color="#99cc00"> //call the checkpassword method of the object whose username is count.dracula<br />
</font> if($users-&gt;exists('username','count.dracula') &amp;&amp; $users-&gt;username['count.dracula']-&gt;checkPassword('vampire'))<br />
{<br />
echo 'password correct!';<br />
}<br />
else<br />
{<br />
echo 'password false';<br />
}<br />
?&gt;</code></p>
<p>I hope to include more features later. But it&#8217;s a start.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acumendevelopment.net/vector-for-php-surely-not/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using memcached

Served from: www.acumendevelopment.net @ 2010-09-10 02:15:45 -->