<?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>Internet Strategy Guide &#187; rants</title>
	<atom:link href="http://phpprotip.com/category/rants/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpprotip.com</link>
	<description>Together we can defeat the internet</description>
	<lastBuildDate>Tue, 08 Nov 2011 06:19:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dev Derby</title>
		<link>http://phpprotip.com/2010/07/dev-derby/</link>
		<comments>http://phpprotip.com/2010/07/dev-derby/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 20:37:22 +0000</pubDate>
		<dc:creator>chance</dc:creator>
				<category><![CDATA[announcement]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Bloomington Indiana]]></category>
		<category><![CDATA[dev derby]]></category>
		<category><![CDATA[devderby]]></category>
		<category><![CDATA[entrepreneur]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[the combine]]></category>
		<category><![CDATA[thecombine]]></category>
		<category><![CDATA[Web application]]></category>

		<guid isPermaLink="false">http://phpprotip.com/?p=374</guid>
		<description><![CDATA[This morning I accepted a postion as supreme overlord team leader for the PHP team in The Combine's Dev Derby. What is Dev Derby? The Combine (http://thecombine.org) is a tech event in Bloomington, IN going on from Sept. 9th-12th. On Sept. 11 there will be a "Dev Derby". This is a one-day programming event which [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I accepted a postion as <span style="text-decoration: line-through;">supreme overlord</span> team leader for the <a class=\"zem_slink freebase/en/php\" title=\"PHP\" rel=\"homepage\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5waHAubmV0Lw==">PHP</a> team in <a title=\"the combine tech event\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RoZWNvbWJpbmUub3Jn">The Combine</a>'s Dev Derby.</p>
<h2>What is Dev Derby?</h2>
<p><a title=\"the combine tech event\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RoZWNvbWJpbmUub3JnLw==">The Combine (http://thecombine.org)</a> is a tech event in <a class=\"zem_slink freebase/en/bloomington_indiana\" title=\"Bloomington, Indiana\" rel=\"geolocation\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21hcHMuZ29vZ2xlLmNvbS9tYXBzP2xsPTM5LjE2MjIyMjIyMjIsLTg2LjUyOTE2NjY2NjcmYW1wO3Nwbj0wLjEsMC4xJmFtcDtxPTM5LjE2MjIyMjIyMjIsLTg2LjUyOTE2NjY2NjclMjAlMjhCbG9vbWluZ3RvbiUyQyUyMEluZGlhbmElMjkmYW1wO3Q9aA==">Bloomington, IN</a> going on from Sept. 9th-12th. On Sept. 11 there will be a "Dev Derby". This is a one-day programming event which challenges teams, representing  different <a class=\"zem_slink freebase/en/programming_language\" title=\"Programming language\" rel=\"wikipedia\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Qcm9ncmFtbWluZ19sYW5ndWFnZQ==">programming languages</a>, to build a <a class=\"zem_slink freebase/en/web_application\" title=\"Web application\" rel=\"wikipedia\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9XZWJfYXBwbGljYXRpb24=">web-based application</a> for  use by <a class=\"zem_slink freebase/en/not-for-profit_corporation\" title=\"Non-profit organization\" rel=\"wikipedia\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Ob24tcHJvZml0X29yZ2FuaXphdGlvbg==">non-profits</a>. The <a class=\"zem_slink freebase/en/computer_programming\" title=\"Computer programming\" rel=\"wikipedia\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Db21wdXRlcl9wcm9ncmFtbWluZw==">code</a> will be released as <a class=\"zem_slink freebase/en/open_source\" title=\"Open Source\" rel=\"wikinvest\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53aWtpbnZlc3QuY29tL2NvbmNlcHQvT3Blbl9Tb3VyY2U=">open source</a>, giving it  life after the day has ended. There will be 5 teams competing. My suspicions say that there will be a Rails team and a CF team in addition to the PHP team.</p>
<p>I'm not sure how finalized some of the information I have on the details are but here is what I do know:</p>
<p><span id="more-374"></span></p>
<ul>
<li>Each team will be limited to 7 people (including myself). Depending on demand by Combine attendees, they may allow up to 3 additional "walk-ons".</li>
<li>The nature of the challenge won't be revealed until Sept. 8.</li>
<li>As team leader, I will be participating in the planning of this event, helping shape the challenge scope, defining the technical environment and determining the judging criteria.</li>
<li>From the sound of things, we will have some sort of requirements spec to work off of and plan the project from.</li>
<li>A designated team member or myself will be in a panel discussion sharing the team process and debating code with other team representatives.</li>
<li><a title=\"The Combine tech event\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3RoZWNvbWJpbmUub3Jn">The Combine</a> will have a recruiting campaign with a link to an application to collect names of interested developers. (If you're impatient and want to be part of the glorious PHP team, hit me up)</li>
<li>We will be provided with a food an d beverages that day. NOMS!</li>
<li>There will be prizes. Some just for participating.</li>
</ul>
<h2>Team PHP</h2>
<p>Until I start having to sift through applications for team members, I'm wondering who I'd need to hit up for some elePHPant T-Shirts for Team PHP to have. Also, we need a better pseudonym than "Team PHP" or at least some sort of awesome slogan to bring fear and envy into the hearts of our opponents. Join me<span style="text-decoration: line-through;"> and together we shall rule the galaxy</span> in the fun and help <span style="text-decoration: line-through;">crush our enemies, see them driven before us and hear the lamentation of their women</span> show the awesomeness that is PHP.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class=\"zemanta-pixie-a\" title=\"Enhanced by Zemanta\" href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy56ZW1hbnRhLmNvbS8="><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/zemified_c.png?x-id=8ca554c2-29f8-424f-964d-55cd0dd54817" alt="Enhanced by Zemanta" /></a><span class="zem-script more-related more-info pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
 <img src="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=374" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://phpprotip.com/2010/07/dev-derby/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP Team Development [announcement]</title>
		<link>http://phpprotip.com/2009/09/php-team-development-announcement/</link>
		<comments>http://phpprotip.com/2009/09/php-team-development-announcement/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 12:59:10 +0000</pubDate>
		<dc:creator>chance</dc:creator>
				<category><![CDATA[announcement]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://phpprotip.com/?p=168</guid>
		<description><![CDATA[Apparently my php-fu has become good enough that I've been asked to review books. So sometime in the future I will talk about Packt Publishing's book, "PHP Team Development". My complimentary copy is apparently in the mail, so hopefully I learn to read by then. Seriously though, I hope this book will help me tweak [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently my php-fu has become good enough that I've been asked to review books. So sometime in the future I will talk about <a href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5wYWNrdHB1Yi5jb20v">Packt Publishing</a>'s book, "<a href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5wYWNrdHB1Yi5jb20vcGhwLXRlYW0tZGV2ZWxvcG1lbnQvYm9vaw==">PHP Team Development</a>". My complimentary copy is apparently in the mail, so hopefully I learn to read by then. </p>
<p>Seriously though, I hope this book will help me tweak my current team practices. Guess I'll find out after it arrives.</p>
 <img src="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=168" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://phpprotip.com/2009/09/php-team-development-announcement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magic __call() vs. multiple setters</title>
		<link>http://phpprotip.com/2009/03/magic-__call-vs-multiple-setters/</link>
		<comments>http://phpprotip.com/2009/03/magic-__call-vs-multiple-setters/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 15:44:46 +0000</pubDate>
		<dc:creator>chance</dc:creator>
				<category><![CDATA[debatable]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[debate]]></category>
		<category><![CDATA[i'm doing it wrong]]></category>
		<category><![CDATA[magic __call]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[php noob]]></category>

		<guid isPermaLink="false">http://phpprotip.com/?p=121</guid>
		<description><![CDATA[I recently came across a situation where a few of my setProperty() methods where exactly the same. Since I've gotten into improving my coding, this bugged me because it was repetitious code. Example: public function setFoo($foo=null) { if (is_string($foo)&#124;&#124;is_numeric($foo)) { $this->foo=$foo; return $this; } throw new Custom_Example_Exception("Please provide a proper string or numeric",Custom_Example_Exception::INVALID_TYPE); } public [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a situation where a few of my setProperty() methods where exactly the same. Since I've gotten into improving my coding, this bugged me because it was repetitious code.<br />
Example:</p>
<pre>
public function setFoo($foo=null) {
	if (is_string($foo)||is_numeric($foo)) {
		$this->foo=$foo;
		return $this;
	}
	throw new Custom_Example_Exception("Please provide a proper string or numeric",Custom_Example_Exception::INVALID_TYPE);
}

public function setBar($bar=null) {
	if (is_string($bar)||is_numeric($bar)) {
		$this->bar=$bar;
		return $this;
	}
	throw new Custom_Example_Exception("Please provide a proper string or numeric",Custom_Example_Exception::INVALID_TYPE);
}
</pre>
<p>Notice a pattern there? Me too. If all my setters were like this, I could do </p>
<pre>
public function setProperty($property=null) {
	if (is_string($property)||is_numeric($property)) {
		$this->{$property}=$property;
		return $this;
	}
	throw new Custom_Example_Exception("Please provide a proper string or numeric",Custom_Example_Exception::INVALID_TYPE);
}
</pre>
<p>with appropriate traps in the __call() and maybe even __set() methods.</p>
<p>However, my situation is that not all the setters for my class follow this pattern so that solution means that I have to make __call() look for specific setters.</p>
<pre>
public function __call($method,$args) {
	$trapThese=array("Foo","Bar","Baz");
	preg_match('/set(*.?)/im',$method,$matches);
	if (!empty($matches)&&in_array($matches[1],$trapThese)) {
		if(is_string($args[0])||is_numeric($args[0])) {
		$propertyName=strtolower($matches[1]);
			$this->{$propertyName}=$args[0];
		}
		throw new Custom_Example_Exception("Please provide a proper string or numeric.\nException trapped in call to $method",Custom_Example_Exception::INVALID_TYPE);
	} else {
		$this->{$method}($args);
	}
}
</pre>
<p>And I'm pretty sure that this code snippet (<code>$this->{$method}($args);</code>) is the Wrong Way of Doing It. So I'll just have to settle for the redundant setFoo(),setBar,etc even though a part of me knows that there has to be a Better Way. Or maybe there is just No Way of Doing It Well.</p>
<p>I think it is probably only a matter of preference but in terms of testability, elegance, maintainability, whatever...what do you prefer, doing a magic __call() or making setFoo(),setBar(),setBaz,etc. </p>
 <img src="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=121" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://phpprotip.com/2009/03/magic-__call-vs-multiple-setters/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>wordle meme</title>
		<link>http://phpprotip.com/2008/12/wordle-meme/</link>
		<comments>http://phpprotip.com/2008/12/wordle-meme/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 14:14:01 +0000</pubDate>
		<dc:creator>chance</dc:creator>
				<category><![CDATA[meme]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wordle]]></category>

		<guid isPermaLink="false">http://phpprotip.com/?p=91</guid>
		<description><![CDATA[Joining the wordle meme late in the game because I just got ff java plugin to work.]]></description>
			<content:encoded><![CDATA[<p><a href="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53b3JkbGUubmV0L2dhbGxlcnkvd3JkbC8zOTg1NzYvcGhwcHJvdGlwLmNvbQ==" title=\"Wordle: phpprotip.com\"><img src="http://phpprotip.com/wp-content/uploads/2008/12/screenshot-wordle-phpprotipcom-mozilla-firefox-300x186.png" alt="" title="wordle meme" width="300" height="186" class="alignnone size-medium wp-image-90" /></a></p>
<p>Joining the wordle meme late in the game because I just got ff java plugin to work.</p>
 <img src="http://phpprotip.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=91" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://phpprotip.com/2008/12/wordle-meme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

