<?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>Alan Blaine Whitney &#187; Uncategorized</title>
	<atom:link href="http://www.alanblainewhitney.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alanblainewhitney.com</link>
	<description>Web Development</description>
	<lastBuildDate>Thu, 06 May 2010 18:06:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP Oddity</title>
		<link>http://www.alanblainewhitney.com/2010/03/18/php-oddity/</link>
		<comments>http://www.alanblainewhitney.com/2010/03/18/php-oddity/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 14:58:06 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=149</guid>
		<description><![CDATA[This was tested on PHP 5.2.6 and 5.2.10, you mileage may actually vary.

 &#60;?php
$number = 20864.01;
$num = $number * 100;
echo intval&#40;$num&#41;;
?&#62;

If such a piece of code was ran, but would one expect, 2086401 maybe. I would, but you actually get 2086400.  Strange.

&#60;?php
$number = 20864.01;
$num = $number * 100;
echo intval&#40;round&#40;$num&#41;&#41;;
?&#62;

That will give you 2086401.
UPDATE: I [...]]]></description>
			<content:encoded><![CDATA[<p>This was tested on PHP 5.2.6 and 5.2.10, you mileage may actually vary.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color:#800080;">20864.01</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$num</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$number</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$num</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>If such a piece of code was ran, but would one expect, 2086401 maybe. I would, but you actually get 2086400.  Strange.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$number</span> <span style="color: #339933;">=</span> <span style="color:#800080;">20864.01</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$num</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$number</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$num</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>That will give you 2086401.</p>
<p>UPDATE: I guess this problem is not a PHP per se but a glibc issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2010/03/18/php-oddity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Debian Etch to Lenny Migration</title>
		<link>http://www.alanblainewhitney.com/2010/02/16/debian-etch-to-lenny-migration/</link>
		<comments>http://www.alanblainewhitney.com/2010/02/16/debian-etch-to-lenny-migration/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 15:14:04 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=138</guid>
		<description><![CDATA[At my place of employment, sephone internet solutions, we just finished our debian upgrades.  Overall I have huge respect for debian and the apt package tool.  Overall the migration from etch to lenny across several servers was easy, except for one back.
One server required the bnx2 firmware for a Broadcom NetXtreme II NIC. [...]]]></description>
			<content:encoded><![CDATA[<p>At my place of employment, <a href="http://www.sephone.com">sephone internet solutions</a>, we just finished our debian upgrades.  Overall I have huge respect for debian and the apt package tool.  Overall the migration from etch to lenny across several servers was easy, except for one back.</p>
<p>One server required the bnx2 firmware for a Broadcom NetXtreme II NIC.  For one reason or another, the bnx2 driver was not found after doing a standard debian upgrade.  This was quite a problem.  After apt finished with what looked like a flawless upgraded, I rebooted the box and it had <strong>no network interfaces</strong>.</p>
<p>After messing with udev and dmesgs for a while, I was able to find this in a log file</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Feb <span style="color: #000000;">15</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">29</span>:<span style="color: #000000;">34</span> sentry kernel: <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1856.770927</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Broadcom NetXtreme II Gigabit Ethernet Driver bnx2 v1.7.5 <span style="color: #7a0874; font-weight: bold;">&#40;</span>April <span style="color: #000000;">29</span>, <span style="color: #000000;">2008</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
Feb <span style="color: #000000;">15</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">29</span>:<span style="color: #000000;">35</span> sentry kernel: <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1857.257121</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> firmware: requesting bnx2-06-4.0.5.fw
Feb <span style="color: #000000;">15</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">29</span>:<span style="color: #000000;">35</span> sentry kernel: <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1857.450033</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> bnx2: Cant load firmware <span style="color: #c20cb9; font-weight: bold;">file</span> bnx2-06-4.0.5.fw
Feb <span style="color: #000000;">15</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">29</span>:<span style="color: #000000;">35</span> sentry kernel: <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1857.450033</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> bnx2: probe of 0000:05:<span style="color: #000000;">00.0</span> failed with error <span style="color: #660033;">-2</span>
Feb <span style="color: #000000;">15</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">29</span>:<span style="color: #000000;">35</span> sentry kernel: <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1857.833817</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> firmware: requesting bnx2-06-4.0.5.fw
Feb <span style="color: #000000;">15</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">29</span>:<span style="color: #000000;">35</span> sentry kernel: <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1858.185818</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> bnx2: Cant load firmware <span style="color: #c20cb9; font-weight: bold;">file</span> bnx2-06-4.0.5.fw
Feb <span style="color: #000000;">15</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">29</span>:<span style="color: #000000;">35</span> sentry kernel: <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1858.185818</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> bnx2: probe of 0000:09:<span style="color: #000000;">00.0</span> failed with error <span style="color: #660033;">-2</span></pre></div></div>

<p>After finding that, I asked a <a href="http://www.justinrussell.com">co-worker</a> to manual download the package through a browser on a different machine, put it on a CD, and manually place the file as <em>/lib/firmware/bnx2-06-4.0.5.fw</em>.</p>
<p>With the file now there I needed to try to reload that module</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">modprobe <span style="color: #660033;">-r</span> bnx2
modprobe bnx2
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>networking restart</pre></div></div>

<p>Lo and behold, I now had network.  With the network working, I wanted to install the proper debian package: firmware-bnx2, which is found in non-free, which I already had in /etc/apt/sources.list, but first, I needed to get rid of the file I put in there, in case it messed anything</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>firmware<span style="color: #000000; font-weight: bold;">/</span>bnx2-06-4.0.5.fw
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> firmware-bnx2</pre></div></div>

<p>I rebooted to make sure that it was going to work.  Later it came to me that there was a much simpler solution to this problem, reboot, and in the grub menu, pick the etch kernel, it should boot with network, install firmware-bnx2 and reboot to the new kernel.  I had not thought of that until later though. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2010/02/16/debian-etch-to-lenny-migration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cakephp Caching</title>
		<link>http://www.alanblainewhitney.com/2009/03/30/cakephp-caching/</link>
		<comments>http://www.alanblainewhitney.com/2009/03/30/cakephp-caching/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 19:26:41 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=99</guid>
		<description><![CDATA[Recently I was working on an application that needed to have many instances.  That is, one code base in one place that served several sites.  These sites have seperate dbs, seperate configs, seperate views, seperate caches per domain.
So I needed these seperate configs for various sites.  I found this article on the bakery, that seemed [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on an application that needed to <a href="http://www.broadcasternow.com/2009/03/30/version-17/">have many instances</a>.  That is, one code base in one place that served several sites.  These sites have seperate dbs, seperate configs, seperate views, seperate caches per domain.</p>
<p>So I needed these seperate configs for various sites.  I found this <a href="http://bakery.cakephp.org/articles/view/one-core-one-app-multiple-domains">article on the bakery</a>, that seemed to be a good start for me.  That got me so that I had a seperate config file (including db) for my different sites.</p>
<p>While I had seperate configs for each domain, I took the chance to set up <a href="http://book.cakephp.org/view/488/Themes">cake themes</a>.  So in my config this in my domain config</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Configure<span style="color: #339933;">::</span><span style="color: #004000;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'theme'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'client'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>and then I set that in my app_controller in beforeFilter</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$theme</span> <span style="color: #339933;">=</span> Configure<span style="color: #339933;">::</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'theme'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$theme</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$theme</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">view</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'theme'</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">theme</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$theme</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This will get my app so I have separate views inside of app/views/themed/client/layouts/default.ctp and so on.</p>
<p>This worked pretty good, but there was a problem, view caching and db caching was shared across the various sites.  Well, cake puts all of it&#8217;s writable stuff in /app/tmp and what I wanted to do was move all of that stuff into per domain directories.  I decided on my systems tmp directory, which on Linux is /tmp, so I made several directories within that one.</p>
<pre>/tmp/broadcaster
/tmp/broadcaster/&lt;client-name&gt;
/tmp/broadcaster/&lt;client-name&gt;/cache
/tmp/broadcaster/&lt;client-name&gt;/cache/views
/tmp/broadcaster/&lt;client-name&gt;/cache/persistent
/tmp/broadcaster/&lt;client-name&gt;/cache/models
/tmp/broadcaster/&lt;client-name&gt;/logs
/tmp/broadcaster/&lt;client-name&gt;/sessions
/tmp/broadcaster/&lt;client-name&gt;/tests</pre>
<p>So more of less, what I have here is a copy of of app/tmp for every domain.  Now we need to tell cake to use these directories.</p>
<p>Here is my chances in app/webroot/index.php,  right after app_dir.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'TMP'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/tmp/broadcaster/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_NAME'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Here is the bottom of my app/config/core.php</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Cache<span style="color: #339933;">::</span><span style="color: #004000;">config</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'default'</span><span style="color: #339933;">,</span>
  <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'engine'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'File'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'prefix'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'cake_'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'path'</span> <span style="color: #339933;">=&gt;</span> TMP <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/cache/'</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>So that&#8217;s a rough over view of per domain stuff in cake.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2009/03/30/cakephp-caching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cake 1.2RC3 to Final</title>
		<link>http://www.alanblainewhitney.com/2008/12/30/cake-12rc3-to-final/</link>
		<comments>http://www.alanblainewhitney.com/2008/12/30/cake-12rc3-to-final/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 15:49:16 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Tech Stuff]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[getting it done]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=85</guid>
		<description><![CDATA[Recently the cake 1.2 has been released.  On several of my applications I have upgrading all along the 1.2 release cycle.  Here are my tweaks that I needed to do from RC3 to 1.2 Final.
To start the upgrade, I simply swapped out my cake directory for the new one.  Dropped the tmp dir with this [...]]]></description>
			<content:encoded><![CDATA[<p>Recently the <a href="http://debuggable.com/posts/extra-hot-cakephp-1.2-stable-is-finally-released!:4954151c-f87c-434b-abbd-4e404834cda3">cake 1.2 has been released</a>.  On several of my applications I have upgrading all along the 1.2 release cycle.  Here are my tweaks that I needed to do from RC3 to 1.2 Final.</p>
<p>To start the upgrade, I simply swapped out my cake directory for the new one.  Dropped the tmp dir with this command.</p>
<blockquote><p>find app/tmp/ -name &#8216;cake*&#8217; | xargs rm</p></blockquote>
<p>For the most part it worked right off the back.  The only problem I had was to switch some things in my &#8220;app/app_controller.php&#8221;.  In RC3, if it was an ajax request, it automatically switched to an ajax layout.  It stopped doing that in RC4 and final.  So I when to put functionality back in.</p>
<p>To start I added the request handler component and use beforeFilter().</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$components</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'RequestHandler'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> beforeFilter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RequestHandler</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isAjax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'ajax'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>I actually had several things happening in my &#8216;app/app_controller.php&#8217; already, here is my actual file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$components</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Auth'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Email'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'RequestHandler'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> beforeFilter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fields</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'username'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'username'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">loginAction</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'controller'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'action'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'login'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">allow</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'navPoint'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'admin'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'admin'</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">deny</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">// Lets set the sort order</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Session</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">check</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sort'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Session</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sort'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Application.date_created DESC'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RequestHandler</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isAjax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'ajax'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/12/30/cake-12rc3-to-final/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on the process of Web Development</title>
		<link>http://www.alanblainewhitney.com/2008/11/07/notes-on-the-process-of-web-development/</link>
		<comments>http://www.alanblainewhitney.com/2008/11/07/notes-on-the-process-of-web-development/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 14:11:27 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=83</guid>
		<description><![CDATA[This post is mostly for me, since I have don&#8217;t anywhere convenient to put these notes.
Features
Every feature that gets implemented has to have solid answers to these questions

Why are we doing this
What problem does this solve
Is it useful
Are we adding value
Will this change user behavior
Is there an easier way

Time Limits
Every phase/version/release of a project needs [...]]]></description>
			<content:encoded><![CDATA[<p>This post is mostly for me, since I have don&#8217;t anywhere convenient to put these notes.</p>
<p><strong>Features</strong></p>
<p>Every feature that gets implemented has to have solid answers to these questions</p>
<ol>
<li>Why are we doing this</li>
<li>What problem does this solve</li>
<li>Is it useful</li>
<li>Are we adding value</li>
<li>Will this change user behavior</li>
<li>Is there an easier way</li>
</ol>
<p><strong>Time Limits</strong></p>
<p>Every phase/version/release of a project needs a time limit, say like two weeks.  The question would be, in two weeks will I have something to show for this.  If the answer is no, split your release/version/feature in half and ask yourself again.</p>
<p><strong>Stop Words</strong></p>
<p>Words like need, can&#8217;t, quick, easy, everyone, nobody, simple, little, and big don&#8217;t need to used.</p>
<p><strong>Focus</strong></p>
<p>The focus sometimes needs to change.  Don&#8217;t spend so much time focusing on the hard stuff, but more time on polishing the easy stuff.  Trends are cool, but become too trendy to lose focus on unchanging things.  Optimize for today, tomorrow has enough worries of it&#8217;s own.  You can always do it different later.</p>
<p><strong>Interruptions are the mortal enemy</strong></p>
<p>Avoid interruptions at all cost.  A focused man can do more in an hour, than an unfocused man in four.  Use more passive collaboration tools, like wiki&#8217;s, project management web tools, internal blogs, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/11/07/notes-on-the-process-of-web-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add subversion revision into cake template</title>
		<link>http://www.alanblainewhitney.com/2008/10/16/how-to-add-subversion-revision-into-cake-template/</link>
		<comments>http://www.alanblainewhitney.com/2008/10/16/how-to-add-subversion-revision-into-cake-template/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 13:07:49 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=78</guid>
		<description><![CDATA[This post is a quick explaination on how to add a subversion revision number into a cakephp template.  First off you need to tell subversion to place the version into the file.
svn propset svn:keywords &#8220;Revision&#8221; app/views/layouts/admin.ctp
In this case I am going to add to my admin layout.  Now to edit the admin layout.  I [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a quick explaination on how to add a subversion revision number into a cakephp template.  First off you need to tell subversion to place the version into the file.</p>
<blockquote><p>svn propset svn:keywords &#8220;Revision&#8221; app/views/layouts/admin.ctp</p></blockquote>
<p>In this case I am going to add to my admin layout.  Now to edit the admin layout.  I am going to add the following line text.</p>
<blockquote><p>$Revision: $</p></blockquote>
<p>This will get replaced at every commit/update with </p>
<blockquote><p>$Revision: 357 $</p></blockquote>
<p>with the current revision number.</p>
<p>To pull it all together to show the version number.  Here is piece of admin.ctp</p>
<blockquote><p>
&lt;?php<br />
$svn = &#8216;$Revision: $&#8217;;<br />
$revision = substr($svn, 11);<br />
 $version = intval(substr($revision, 0, strlen($revision) &#8211; 2))<br />
?&gt;<br />
(Revision &lt;?=$version?&gt;)
</p></blockquote>
<p>Which will display the current version number.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/10/16/how-to-add-subversion-revision-into-cake-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cake 1.2RC2 to 1.2RC3</title>
		<link>http://www.alanblainewhitney.com/2008/10/14/cake-12rc2-to-12rc3/</link>
		<comments>http://www.alanblainewhitney.com/2008/10/14/cake-12rc2-to-12rc3/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 16:53:19 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=76</guid>
		<description><![CDATA[I recently updated a web app from RC2 to RC3.  I replaced the cake dir and replace app/webroot/index.php and app/webroot/test.php.  Deleted my cache files.  Everything went super.  Not one hitch.
]]></description>
			<content:encoded><![CDATA[<p>I recently updated a web app from RC2 to RC3.  I replaced the cake dir and replace app/webroot/index.php and app/webroot/test.php.  Deleted my cache files.  Everything went super.  Not one hitch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/10/14/cake-12rc2-to-12rc3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UUID&#8217;s</title>
		<link>http://www.alanblainewhitney.com/2008/09/12/uuids/</link>
		<comments>http://www.alanblainewhitney.com/2008/09/12/uuids/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 18:18:12 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=74</guid>
		<description><![CDATA[I read a good post over at debuggable just now, about UUIDs.  One of the things about the article that struck me that I didn&#8217;t know, is that if you have a char(36) field, cake will just start to use them, auto-magically.
This means that in real world application effort wise, auto incrementing ints, or UUIDs [...]]]></description>
			<content:encoded><![CDATA[<p>I read a <a href="http://debuggable.com/posts/why-uuids:48c906cc-7a6c-4f22-9e20-6ffd4834cda3">good post</a> over at <a href="http://debuggable.com">debuggable</a> just now, about <a href="http://en.wikipedia.org/wiki/UUID">UUIDs</a>.  One of the things about the article that struck me that I didn&#8217;t know, is that if you have a char(36) field, cake will just start to use them, auto-magically.</p>
<p>This means that in real world application effort wise, auto incrementing ints, or UUIDs are both super easy to use in cake.  Nearly no difference other than your table creation.</p>
<p>This got me thinking about which one is better.  Well, the url&#8217;s look better as ints, say &#8216;/applications/view/147&#8242; versus &#8216;/applications/view/48c907b0-f088-44ae-8be5-4e811030b5da&#8217;.  One is way shorter as well.</p>
<p>Some people quote SEO has being a disadvantage to UUIDs.  I don&#8217;t know about that.  It would seem to be that they could be about equal, if both given the same treatment, like putting title in the address.  I would assume that they are equal, but I am not quite sure about this.</p>
<p>The main advantage of UUIDs is uniqueness.  I can see why true uniqueness would be cool.  No centralized system, but yet you have a unique Id.   Merging tables because easy, makes url hacks harder.</p>
<p>So for me the equation is uniqueness versus easier urls.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/09/12/uuids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I am not a fan of Email</title>
		<link>http://www.alanblainewhitney.com/2008/09/11/i-am-not-a-fan-of-email/</link>
		<comments>http://www.alanblainewhitney.com/2008/09/11/i-am-not-a-fan-of-email/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 18:37:31 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=72</guid>
		<description><![CDATA[
I will try to not let my bias not persuade me too much, but I don’t really like email much.  It is so slow to digest the information contained, so many emails don’t have good content, or are spam, or are forwards, yucky.
Yet, email was once a breakthrough in silent, speedy, low-cost communication technology that [...]]]></description>
			<content:encoded><![CDATA[<div class="entry">
<p>I will try to not let my bias not persuade me too much, but I don’t really like email much.  It is so slow to digest the information contained, so many emails don’t have good content, or are spam, or are forwards, yucky.</p>
<p>Yet, email was once a breakthrough in silent, speedy, low-cost communication technology that so seamlessly fits into the information worker’s day.  Today other technologies are better at the silent, speedy, seamlessly, low-cost information exchange, like Atom, wiki, social bookmarking and RSS. Consequently many experts are saying email cost the economy about <a href="http://blogs.eweek.com/careers/content001/email_distraction_costing_650m_a_year.html">650 billion</a> in lost time, actually some say <a href="http://www.managingio.com/2008/02/17/the-real-cost-of-information-overload/">quiet more</a> than that.</p>
<p>A <a href="http://news.cnet.com/Driven-to-distraction-by-technology/2100-1022_3-5797028.html">cnet article</a> quoting Carl Honore research, concluded that the average office worker is interrupted every three minutes (email, IM, phone, other office distractions) and that it takes eight minutes to recover.  So that means very little is being done in the untied states, especially when compared to nations like Japan, India, and a host of others.  The cnet article also concluded that companies are coming up with simple ways, custom software, unique project management and sometimes non-technical ways to tackle the information management issues of this phase of the information age.</p>
<p>Furthormore, PC World publish a comical, but serious <a href="http://www.pcworld.com/article/150928/email_addiction_five_signs_you_need_help.html">article</a> about having email addiction and steps to help defend and wart off addiction.  Appearly some 11 million people, doctors have labeled as having some type of health recking email habits.</p>
<p>Way am I writing this post, other than because I don’t like email.  Well largely it’s due to one factor in my life, which is, I now realize time is constantly working against me, time is not my ally.  Here at Sephone, always working to try to squeak out more,  also I’m writing an application with a friend outside of work, teaching a class that requires hours of study a week, and I am always looking for more time to spend with my wife.  Just seems like time is a continuous opponent, that needs to be properly rendered, or it because evil.</p>
<p>Okay, I think I am really going to make a point, I am working my way to it.  My point is this, time is precious, both at work and elsewhere.  Things like email are great tools, just make sure that you have control over the tools, and your tools don’t have control over you.  If you instance have read an email as soon as you get it, you are a slave to your inbox.  If you often purposely look at your email while you are in the middle of something else, you are a slave to your inbox.  Just encouraging everybody to think outside of the inbox.  By just checking your email every so often then closing your email program, it might surprise you how much time you have in the day.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/09/11/i-am-not-a-fan-of-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pay for Content</title>
		<link>http://www.alanblainewhitney.com/2008/08/28/pay-for-content/</link>
		<comments>http://www.alanblainewhitney.com/2008/08/28/pay-for-content/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 17:03:47 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=70</guid>
		<description><![CDATA[Their are some really good web applications out there, but in my life their still are some paper publishications that I have that no web app comes close to replacing.  Some of these are the AMC River Guide and the Delorme A&#38;G.  The amount of detail, both in map data and text is far better [...]]]></description>
			<content:encoded><![CDATA[<p>Their are some really good web applications out there, but in my life their still are some paper publishications that I have that no web app comes close to replacing.  Some of these are the <a href="http://www.amazon.com/River-Guide-Maine-4th-AMC/dp/1934028150/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1219942004&amp;sr=8-1">AMC River Guide</a> and the <a href="http://www.amazon.com/Maine-Atlas-Gazetteer-David-Delorme/dp/089933282X/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1219942030&amp;sr=8-1">Delorme A&amp;G</a>.  The amount of detail, both in map data and text is far better than those found online.  With the case of the AMC River Guide, the trips that are detailed were actually taken by the authors.</p>
<p>This got me thinking about a larger scale issue.  In this era of &#8220;web 2.0&#8243; and wiki&#8217;s and blogs, what will happen to detailed research.  Anyone who has ever done any large research knows that wikipedia may be looked at, but is not a great source of in-depth information.  Any information that may actually be there, is really a citation from something else anyway.</p>
<p>I just wonder what will happen to high quanlity content, that needs to be funded.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/08/28/pay-for-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
