<?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>In a mirror, dimly &#187; Tech</title>
	<atom:link href="http://paul.caffeinatedbliss.com/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://paul.caffeinatedbliss.com</link>
	<description>A blog at the intersection of geek, faith and creative writing.</description>
	<lastBuildDate>Sun, 05 Dec 2010 13:23:36 +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>A square meal</title>
		<link>http://paul.caffeinatedbliss.com/2010/12/a-square-meal/</link>
		<comments>http://paul.caffeinatedbliss.com/2010/12/a-square-meal/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 20:25:52 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Square]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/?p=1082</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img src="http://paul.caffeinatedbliss.com/images/funny/a-square-meal.jpg" alt="A square meal" width="640" height="427" /></p>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2010/12/a-square-meal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Android Emulator Lies!</title>
		<link>http://paul.caffeinatedbliss.com/2010/10/android-emulator-lies/</link>
		<comments>http://paul.caffeinatedbliss.com/2010/10/android-emulator-lies/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 01:02:11 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Square]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/?p=1071</guid>
		<description><![CDATA[Working on an Android application and aiming to support a variety of different hardware is an interesting challenge, not least of which being that the Android emulator lies to you about its capabilities. I created a new AVD (android virtual device) and specifically set the parameter (which the documentation says defaults to &#8220;no&#8221; anyhow) so [...]]]></description>
			<content:encoded><![CDATA[<p>Working on an Android application and aiming to support a variety of different hardware is an interesting challenge, not least of which being that the Android emulator lies to you about its capabilities.</p>
<p>I created a new AVD (android virtual device) and specifically set the parameter (which the documentation says defaults to &#8220;no&#8221; anyhow) so that there would be no camera:</p>
<p><img src="http://paul.caffeinatedbliss.com/images/android-emulator/avd-details.png" alt="AVD details" /></p>
<p>Later on, just to check what my code was doing I added a log statement after I queried what the package manager thought would be the capability:</p>
<pre>
    boolean hasCamera = packageManager.hasSystemFeature(
        PackageManager.FEATURE_CAMERA);
    Log.e("DeviceSettings", "Package manager said about camera: "+hasCamera);
</pre>
<p>And the output?</p>
<p><img src="http://paul.caffeinatedbliss.com/images/android-emulator/ddms-output.png" alt="DDMS Log" /></p>
<p>The emulator lies!  How am I meant to do my job?  *sigh*</p>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2010/10/android-emulator-lies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Strangeloop v1.0</title>
		<link>http://paul.caffeinatedbliss.com/2010/10/strangeloop-v1-0/</link>
		<comments>http://paul.caffeinatedbliss.com/2010/10/strangeloop-v1-0/#comments</comments>
		<pubDate>Thu, 14 Oct 2010 16:36:24 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Agile Development]]></category>
		<category><![CDATA[Square]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/2010/10/strangeloop-v1-0/</guid>
		<description><![CDATA[Going to the Strangeloop conference today and need some way to capture my notes and practice typing on my iPad. Guess it&#8217;s time for &#8216;live blogging&#8217; or something. I am not a touch typist for sure but this on-screen keyboard isn&#8217;t too bad. Just strange the way that it is lagging so horribly behind my [...]]]></description>
			<content:encoded><![CDATA[<p>Going to the Strangeloop conference today and need some way to capture my notes and practice typing on my iPad.  Guess it&#8217;s time for &#8216;live blogging&#8217; or something.</p>
<p>I am not a touch typist for sure but this on-screen keyboard isn&#8217;t too bad.  Just strange the way that it is lagging so horribly behind my paltry typing speed.  This simply won&#8217;t do!  I have fifty thousand words to write in November, how will I manage that with this level of lag?</p>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2010/10/strangeloop-v1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP-on-Tomcat (Part II)</title>
		<link>http://paul.caffeinatedbliss.com/2009/12/php-on-tomcat-part-ii/</link>
		<comments>http://paul.caffeinatedbliss.com/2009/12/php-on-tomcat-part-ii/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 23:07:12 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/?p=990</guid>
		<description><![CDATA[The original goal of being able to run PHP on top of Tomcat was to allow simple development of PHP based applications like WordPress and/or bbPress. To get these working I needed a database. The wildly popular mySQL database has a nice installer for OS X. Mine installed to /usr/local. I did the install ages [...]]]></description>
			<content:encoded><![CDATA[<p>The original goal of being able to run PHP on top of Tomcat was to allow simple development of PHP based applications like <a href="http://www.wordpress.org">WordPress</a> and/or <a href="http://www.bbpress.org/">bbPress</a>.  To get these working I needed a database.</p>
<p>The wildly popular <em>mySQL</em> database has a nice installer for OS X.  Mine installed to <code>/usr/local</code>.  I did the install <em>ages</em> ago and forgot what the &#8220;root&#8221; database user password was.  Ooops!  No matter, there are some great <a href="http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html">resources online</a> talking about how to go about resetting permissions.  I opted for the incredibly easy, but utterly insecure method (from inside the terminal) :</p>
<ol>
<li>Stop the existing server</li>
<li>Restart telling it to turn off permissions: <code>mysqld_safe --skip-grant-tables --user=_mysql &#038;</code></li>
<li>Jump into the mysql shell application: <code>mysql -u root mysql</code></li>
<li>Change the &#8220;root&#8221; password: <code>UPDATE mysql.user SET Password=PASSWORD('#########') where user='root';</code></li>
<li>Persist privilages: <code>FLUSH PRIVILEGES;</code></li>
</ol>
<p>Next on the list was exposing my <em>mySQL</em> database to the Tomcat hosted PHP code.  Step 1 was making sure I have mySQL JDBC drivers installed, Step 2 was creating a JNDI datasource in the context, and step 3 was getting the PHP to use it.</p>
<p>The officially supported <a href="http://dev.mysql.com/downloads/connector/j/5.1.html">mySQL Connector/J</a> was a quick download.  The JAR file for it was dropped into the <code>$CATALINA_HOME/lib</code> directly.  Good to go.  The context file was more of a challenge, under the <code>$CATALINA_HOME/conf/Catalina/localhost</code> I created an XML config file that matched the name of my <em>webapp</em> &#8211; <code>php.xml</code> &#8211; where I declared the JNDI datasource.  It took some tweaking and reading around but finally ended up coming together:</p>
<pre>
&lt;Context reloadable="true"&gt;
    &lt;Resource
        name="jdbc/mydata"
        auth="Container"
        type="javax.sql.DataSource"
        username="root"
        password="#########"
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost:3306/test"
    /&gt;
&lt;/Context&gt;
</pre>
<p>The documentation for <em>Quercus</em> states </p>
<blockquote><p>
Scripts can use the jndi name directly:</p>
<pre>
&lt;?php

  // standard PHP
  //mysql_connect($host, $username, $password, $dbname);

  // using JNDI lookup
  mysql_connect("java:comp/env/jdbc/myDatabaseName");

?&gt;
</pre>
</blockquote>
<p>But that doesnt help me to run <a href="http://www.wordpress.org/">WordPress</a> as I&#8217;m not about to go modifying their code.  Never fear, there&#8217;s another option.  The documentation for <em>Quercus</em> also says that you can put an entry into the <code>WEB-INF/web.xml</code> file that forces all database connections to go through the same underlying JNDI datasource:</p>
<blockquote><pre>
.
.
.
    &lt;!--
      Tells Quercus to use the following JDBC database and to ignore the
      arguments of mysql_connect().
    --&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;database&lt;/param-name&gt;
      &lt;param-value&gt;jdbc/test&lt;/param-value&gt;
    &lt;/init-param&gt;
.
.
.
</pre>
</blockquote>
<p>So, a quick update to point at my own datasource and wall was ready to go.  I downloaded and unzipped wordpress into the PHP webapp directory, pointed a browser at <code>http://localhost:8080/php/wordpress</code> and found myself stepping through the famous 5 minute install.  Less than 5 minutes later I was looking at the main page of a fully-functioning WordPress install.</p>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2009/12/php-on-tomcat-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP-on-Tomcat</title>
		<link>http://paul.caffeinatedbliss.com/2009/12/php-on-tomcat/</link>
		<comments>http://paul.caffeinatedbliss.com/2009/12/php-on-tomcat/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 17:05:14 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/?p=986</guid>
		<description><![CDATA[I am generally a Java programmer (if my day-job is to be believed) and hacking my way through Apache configuration isnt my idea of a fun evening. For some odd reason my trusty old black MacBook hasnt had the best of times when I try to enable &#8220;web sharing&#8221; and then try executing PHP scripts [...]]]></description>
			<content:encoded><![CDATA[<p>I am generally a Java programmer (if my day-job is to be believed) and hacking my way through Apache configuration isnt my idea of a fun evening.  For some odd reason my trusty old black MacBook hasnt had the best of times when I try to enable &#8220;web sharing&#8221; and then try executing PHP scripts &#8211; all I get is a dump of the source.  Time for a creative solution to the problem!</p>
<p>The folks that created the <a href="http://www.caucho.com/">Resin App Server</a> have a 100% Java implementation of PHP 5 released under the Open Source GPL license, known as <a href="http://quercus.caucho.com/">Quercus</a>.  So step 1 was to download the latest release that will run on non-Resin app servers: <a href="http://www.caucho.com/download/quercus-4.0.1.war">quercus-4.0.1.war</a>.</p>
<p>This was the point where I also realized that I dont have an up-to-date install of Apache Tomcat on my system either.  Step 2 was to go download <a href="http://tomcat.apache.org/download-60.cgi">Tomcat 6.0.20</a> and install it.</p>
<p>Many applications need to know where Tomcat lives, and that means setting the <code>CATALINA_HOME</code> environment variable to point to the install.  In a terminal I edited the global startup file for the terminal: <code>sudo vi /etc/bashrc</code> to add the line:</p>
<pre>
CATALINA_HOME=/Users/paul/Documents/Devt/3rd-party/apache-tomcat-6.0.20
</pre>
<p>Step 3 was to <code>$CATALINA_HOME/bin/startup.sh</code> to start tomcat and then point a browser at <code>http://localhost:8080/quercus-4.0.1/</code> where I saw confirmation that all was well:</p>
<blockquote><p>
Testing for Quercus&#8482;&#8230;<br/><br/><br />
Congratulations! Quercus™ Open Source 4.0.1 is interpreting PHP pages. Have fun!
</p></blockquote>
<p>I didnt like the URL though, but that&#8217;s easily changed.  I simply nuked the <code>quercus-4.0.1</code> directory under <code>$CATALINA_HOME/webapps</code> and renamed the Quercus WAR file &#8220;php.war&#8221;.  I bounced Tomcat and bingo &#8211; a &#8220;php&#8221; directory I could drop files into.  As a final test, I created <code>info.php</code></p>
<pre>
&lt;?php

    phpinfo();

?&gt;
</pre>
<p>and hit it on the pretty URL: <code>http://localhost:8080/php/info.php</code>.  All displayed correctly.  I was off and rolling running PHP on top of Apache Tomcat!  Stay tuned for <em>Part II</em> &#8211; getting <a href="http://www.wordpress.org">WordPress</a> running on top of PHP running on Tomcat!</p>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2009/12/php-on-tomcat/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Let me count the ways</title>
		<link>http://paul.caffeinatedbliss.com/2009/11/let-me-count-the-ways/</link>
		<comments>http://paul.caffeinatedbliss.com/2009/11/let-me-count-the-ways/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 14:49:39 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/?p=961</guid>
		<description><![CDATA[Eclipse IDE How do I loathe thee? Let me count the ways. I hate thee to the depth and breadth and height My soul can reach, when feeling out of sight For the ends of Being and ideal Grace. I loathe thee to the level of everyday&#8217;s Most quiet need, by sun and candle-light. I [...]]]></description>
			<content:encoded><![CDATA[<h3>Eclipse IDE</h3>
<p>How do I loathe thee? Let me count the ways.<br />
I hate thee to the depth and breadth and height<br />
My soul can reach, when feeling out of sight<br />
For the ends of Being and ideal Grace.<br />
I loathe thee to the level of everyday&#8217;s<br />
Most quiet need, by sun and candle-light.<br />
I despise thee freely, as men strive for Right;<br />
I loathe thee purely, as they turn from Praise.<br />
I loathe thee with the passion put to use<br />
In my old griefs, and with my childhood&#8217;s faith.<br />
I loathe thee with a hatred I seemed to lose<br />
With my lost saints,—I loathe thee with the breath,<br />
Smiles, tears, of all my life!—and, if God choose,<br />
I shall but loathe thee better after death. </p>
<p><i>With apologies to the original author.  How is it possible for a simple piece of computer software to draw out such ire?  Grrr.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2009/11/let-me-count-the-ways/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blogging</title>
		<link>http://paul.caffeinatedbliss.com/2008/12/blogging/</link>
		<comments>http://paul.caffeinatedbliss.com/2008/12/blogging/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 15:36:58 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/?p=866</guid>
		<description><![CDATA[Never before have so many people &#160;&#160;&#160;with so little to say &#160;&#160;&#160;&#160;&#160;&#160;said so much &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;to so few.]]></description>
			<content:encoded><![CDATA[<p><img src="http://paul.caffeinatedbliss.com/images/despair/blogging-despair-poster.jpg" alt="Blogging : Never before have so many people with so little to say said so much to so few" width="402" height="320" /></p>
<table align="center">
<tr>
<td>Never before have so many people<br />
&nbsp;&nbsp;&nbsp;with so little to say<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;said so much<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to so few.</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2008/12/blogging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>And the score: IBM 0 / MacBook 2</title>
		<link>http://paul.caffeinatedbliss.com/2008/10/and-the-score-ibm-0-macbook-2/</link>
		<comments>http://paul.caffeinatedbliss.com/2008/10/and-the-score-ibm-0-macbook-2/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 12:25:21 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/?p=851</guid>
		<description><![CDATA[What an amazingly frustrating weekend. &#60;sigh /&#62; The annoying IBM Thinkpad refused to connect &#8230; neither wired, or wireless (on any one of three different wireless networks, no less). On the other hand my trusty MacBook hopped online in every given scenario. Oh, and before this turns into a Windows vs. Apple cage match, the [...]]]></description>
			<content:encoded><![CDATA[<p>What an amazingly frustrating weekend.  &lt;sigh /&gt;</p>
<p>The annoying IBM Thinkpad refused to connect &#8230; neither wired, or wireless (on any one of <em>three</em> different wireless networks, no less).  On the other hand my trusty MacBook hopped online in every given scenario.  Oh, and before this turns into a Windows vs. Apple cage match, the Dell Inspiron laptop <em>also</em> connected flawlessly in every case.</p>
<p>Can I have those hours of my life back, maybe trade them in against 5 minutes of something more productive &#8230; like fly-fishing in an empty pond or something?</p>
<p>Oh, and running the build-tool (&#8220;maven&#8221;) offline proved to be interesting &#8211; looks like when I get back to the corporate network the central code repository has been &#8220;blacklisted&#8221; by the tool because it was unreachable in multiple builds.  Just perfect!</p>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2008/10/and-the-score-ibm-0-macbook-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SCRUM in the news</title>
		<link>http://paul.caffeinatedbliss.com/2008/09/scrum-in-the-news/</link>
		<comments>http://paul.caffeinatedbliss.com/2008/09/scrum-in-the-news/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 15:48:23 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Agile Development]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/?p=842</guid>
		<description><![CDATA[The gaming site Gamasutra recently posted an article about EA building &#8220;Battlefield Heroes&#8221;, and how their use of an agile SCRUM-based development methodology allowed them to release in the aggressive timescales that the executives asked for. Very cool!]]></description>
			<content:encoded><![CDATA[<p>The gaming site Gamasutra recently <a href="http://gamasutra.com/php-bin/news_index.php?story=20295">posted an article</a> about EA building &#8220;Battlefield Heroes&#8221;, and how their use of an agile SCRUM-based development methodology allowed them to release in the aggressive timescales that the executives asked for.  Very cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2008/09/scrum-in-the-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WrimoRadio</title>
		<link>http://paul.caffeinatedbliss.com/2008/09/wrimoradio/</link>
		<comments>http://paul.caffeinatedbliss.com/2008/09/wrimoradio/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 18:45:18 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://paul.caffeinatedbliss.com/?p=833</guid>
		<description><![CDATA[Every year during the National Novel Writing Month they publish a weekly podcast called &#8220;WrimoRadio&#8220;. I have been consistently impressed with the quality and have thought to send in a small editorial piece to them but was too busy with other things (like writing a 50,000 word novel in a month). I am very tempted [...]]]></description>
			<content:encoded><![CDATA[<p>Every year during the <a href="http://www.nanowrimo.org/">National Novel Writing Month</a> they publish a weekly podcast called &#8220;<a href="http://www.nanowrimo.org/taxonomy/term/111">WrimoRadio</a>&#8220;.  I have been consistently impressed with the quality and have thought to send in a small editorial piece to them but was too busy with other things (like writing a 50,000 word novel in a month).  I am <i>very</i> tempted to send in the &#8220;plot bunnies&#8221; piece this year though.</p>
<p>I was on <a href="http://www.facebook.com/">Facebook</a> and noticed Chris Baty (founder of the <a href="http://www.nanowrimo.org/">National Novel Writing Month</a>) changed his status to &#8220;<b>Chris Baty</b> needs a WrimoRadio producer so he doesn&#8217;t die in November.&#8221;</p>
<p>Podcast production is something I enjoy, I have the hardware investment and the previous experience.  Should I ping him and offer?  With everything else I am doing that would be one more reason I might not make 50,000 words.  On the other hand I could put it on my resume &#8211; &#8220;podcast production for the <a href="http://www.nanowrimo.org/">National Novel Writing Month</a>&#8221; &#8211; so it has its benefits too.  Maybe I am oversimplifying what it would take &#8230; it wouldn&#8217;t be the first (or the last) time I&#8217;d done that!</p>
]]></content:encoded>
			<wfw:commentRss>http://paul.caffeinatedbliss.com/2008/09/wrimoradio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

