<?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>Ramblings of a Geek - Jeremy Johnstone &#187; Blog</title>
	<atom:link href="http://www.jeremyjohnstone.com/category/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jeremyjohnstone.com</link>
	<description>Ramblings of a Geek</description>
	<lastBuildDate>Thu, 11 Mar 2010 18:33:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Solving exponential distribution probability using Calculus</title>
		<link>http://www.jeremyjohnstone.com/blog/2010-02-01-solving-exponential-distribution-probability-using-calculus.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2010-02-01-solving-exponential-distribution-probability-using-calculus.html#comments</comments>
		<pubDate>Mon, 01 Feb 2010 07:28:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[calculus]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[cumulative distribution function]]></category>
		<category><![CDATA[exponential]]></category>
		<category><![CDATA[exponential distribution]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[fundamental theorem]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[lambda]]></category>
		<category><![CDATA[lifespan]]></category>
		<category><![CDATA[light bulbs]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[probability]]></category>
		<category><![CDATA[probability density function]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/?p=1542</guid>
		<description><![CDATA[Today I was challenged with the following advanced statistics problem:
Two variables are exponentially distributed with rate parameters lambda 1 (&#160;&#955;1&#160;) and lambda 2 (&#160;&#955;2&#160;). What is the probability (&#160;p&#160;) that variable 1 (&#160;X1&#160;) is less than variable 2 (&#160;X2&#160;) in terms of lambdas?
Being one who is usually up to a good challenge, this sounded like [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was challenged with the following advanced statistics problem:</p>
<blockquote><p>Two variables are exponentially distributed with rate parameters lambda 1 (&nbsp;&#955;<sub>1</sub>&nbsp;) and lambda 2 (&nbsp;&#955;<sub>2</sub>&nbsp;). What is the probability (&nbsp;p&nbsp;) that variable 1 (&nbsp;X<sub>1</sub>&nbsp;) is less than variable 2 (&nbsp;X<sub>2</sub>&nbsp;) in terms of lambdas?</p></blockquote>
<p>Being one who is usually up to a good challenge, this sounded like a fun Sunday task, especially as there are many practical applications of this knowledge (see end of post for one example). It sadly took me much longer than I anticipated, but I learned a lot along the way. </p>
<p>Let&#8217;s start off with some definitions. First off, we need to brush up a little bit on <a href="http://en.wikipedia.org/wiki/Exponential_distribution">exponential distribution</a> and we then can see that to get the probability that X<sub>1</sub>&nbsp;&lt;&nbsp;X<sub>2</sub> for all possible legal values from zero to infinity, we use the following problem definition:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/definition.png" alt="p = \int^\infty_0 P(X_2=x)P(X_1<x) dx" /></center></p>
<p>What it&#8217;s essentially saying is that the probability that X<sub>1</sub>&nbsp;&lt;&nbsp;X<sub>2</sub> is the combined probability that X<sub>2</sub>&nbsp;=&nbsp;x AND X<sub>1</sub>&nbsp;&lt;&nbsp;x. From there, we can do some simple replacements. To find the probability that X<sub>2</sub>&nbsp;=&nbsp;x we use the <a href="http://en.wikipedia.org/wiki/Probability_density_function">Probability density function</a> (PDF). Then to find the probability that X<sub>1</sub>&nbsp;&lt;&nbsp;x we use the <a href="http://en.wikipedia.org/wiki/Cumulative_distribution_function">Cumulative distribution function</a> (CDF). Based on the definition that P(A and B) is the same as P(A)P(B), we end up with:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step1.png" title="p = \int^\infty_0 PDF_{X_2}(x) CDF_{X_1}(x) dx" alt="p = \int^\infty_0 PDF_{X_2}(x) CDF_{X_1}(x) dx"/></center></p>
<p>Next up, we need to do some substitutions for PDF and CDF respectively. According to Wikipedia, PDF is defined as:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/PDF.png" alt="definition of probability density function (PDF)" title="definition of probability density function (PDF)" /></center></p>
<p>And CDF is defined as:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/CDF.png" alt="definition of cumulative distribution function (CDF)" title="definition of cumulative distribution function (CDF)"/></center></p>
<p>So with that in mind, we now arrive at this:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step2.png" alt="p = \int^\infty_0 \lambda_2 e^{-\lambda_2 x}(1-e^{-\lambda_1 x}) dx" title="p = \int^\infty_0 \lambda_2 e^{-\lambda_2 x}(1-e^{-\lambda_1 x}) dx" /></center></p>
<p>Before solving the integral, we will do some simplification. First up, using the distributive property of subtraction, we can simplify the above into this:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step3.png" alt="p = \int^\infty_0 \lambda_2 e^{-\lambda_2 x} dx - \lambda_2 e^{-\lambda_2 x} \lambda_2 e^{-\lambda_1 x} dx" title="p = \int^\infty_0 \lambda_2 e^{-\lambda_2 x} dx - \lambda_2 e^{-\lambda_2 x} \lambda_2 e^{-\lambda_1 x} dx" /></center></p>
<p>After that, we will use exponential identities to refactor the problem down a bit further to this:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step4.png" alt="p = \int^\infty_0 \lambda_2  e^{-\lambda_2 x} dx - \lambda_2 e^{-\lambda_2 x - \lambda_1 x} dx" title="p = \int^\infty_0 \lambda_2  e^{-\lambda_2 x} dx - \lambda_2 e^{-\lambda_2 x - \lambda_1 x} dx" /></center></p>
<p>At this point, we can now proceed to solve the integral and using the definition that the integration of e^x&nbsp;=&nbsp;e^x and subsequently e^-x&nbsp;=&nbsp;-e^-x we end up with the following:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step5.png" alt="p = (-\frac{\lambda_2 e^{-\lambda_2 x}}{\lambda_2} + \frac{\lambda_2 e^{-\lambda_2 x - \lambda_1 x}}{\lambda_2 + \lambda_1})\Big |^\infty_0" title="p = (-\frac{\lambda_2 e^{-\lambda_2 x}}{\lambda_2} + \frac{\lambda_2 e^{-\lambda_2 x - \lambda_1 x}}{\lambda_2 + \lambda_1})\Big |^\infty_0" /></center></p>
<p>After then doing some basic simplification of the fractions, we now end up with this:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step6.png" alt="p = (-e^{-\lambda_2 x} + \frac{\lambda_2 e^{-\lambda_2 x - \lambda_1 x}}{\lambda_2 + \lambda_1})\Big |^\infty_0" title="p =(-e^{-\lambda_2 x} + \frac{\lambda_2 e^{-\lambda_2 x - \lambda_1 x}}{\lambda_2 + \lambda_1})\Big |^\infty_0" /></center></p>
<p>Next up, we need to apply the closed interval to the function using the <a href="http://">fundamental theorem of calculus</a>. The fundamental theorem states that when integrating f(x) over the interval [a,b] the result is F(b) &#8211; F(a) as seen here in this definition:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/fundamental_calc_theorem.png" alt="integrating f(x) over the interval [a,b] the result is F(b) - F(a)" title="integrating f(x) over the interval [a,b] the result is F(b) - F(a)" /></center></p>
<p>When we apply the fundamental theorem to our equation it gives us this result:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step7.png" alt="p = (-\displaystyle\lim_{c\to{-\infty}}e^{\lambda_2 c} + \frac{\displaystyle\lim_{c\to{-\infty}} \lambda_2 e^{\lambda_2 c + \lambda_1 c}}{\lambda_2 + \lambda_1}) - (-e^0 + \frac{\lambda_2 e^0}{\lambda_2 + \lambda_1})" title="p  = (-\displaystyle\lim_{c\to{-\infty}}e^{\lambda_2 c} + \frac{\displaystyle\lim_{c\to{-\infty}} \lambda_2 e^{\lambda_2 c + \lambda_1 c}}{\lambda_2 + \lambda_1}) - (-e^0 + \frac{\lambda_2 e^0}{\lambda_2 + \lambda_1})" /></center></p>
<p>Next up, we now need to calculate the results of the <a href="http://en.wikipedia.org/wiki/Exponential_function">exponential functions</a>. By definition, with e raised to the power of c as c approaches negative infinity, the result becomes zero. Also by definition, e raised to the zeroth power is one, which when both definitions are applied leaves us with this:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step8.png" alt="p = (-0 + \frac{0}{\lambda_2 + \lambda_1}) - (-1 + \frac{\lambda_2}{\lambda_2 + \lambda_1})" title="p = (-0 + \frac{0}{\lambda_2 + \lambda_1}) - (-1 + \frac{\lambda_2}{\lambda_2 + \lambda_1})" /></center></p>
<p>Then with some basic mathematical simplification here:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step9.png" alt="p = 0 - (-1 + \frac{\lambda_2}{\lambda_2 + \lambda_1})" title="p = (0 - (-1 + \frac{\lambda_2}{\lambda_2 + \lambda_1})" /></center></p>
<p>We then end up with our solution of p&nbsp;=&nbsp;1&nbsp;-&nbsp;&#955;<sub>2</sub>&nbsp;/&nbsp;(&#955;<sub>2</sub>&nbsp;+&nbsp;&#955;<sub>1</sub>):</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/step10.png" alt="p = 1 - \frac{\lambda_2}{\lambda_2 + \lambda_1}." title="p = 1 - \frac{\lambda_2}{\lambda_2 + \lambda_1}." /></center></p>
<p>Putting it all together, we get the following:</p>
<p><center><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2010/01/final_solution.png" alt="complete solution to statistical calculus problem" title="complete solution to statistical calculus problem" /></center></p>
<p>Now that we worked through that, you might be wondering what&#8217;s the practical application of this knowledge? Well, one example where you could use it would be in determining the lifespan of two different light bulbs. Given that one light bulb has a rating of 750 hours and the other has a rating of 1500 hours, what is the probability that the one with 1500 hours will last a less amount of time than the one with the 750 hour rating? I&#8217;ll leave the answer up to you to solve now that I have explained the steps above, but it must be said, the result is rather surprising.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2010-02-01-solving-exponential-distribution-probability-using-calculus.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using git-svn with non-standard subversion repository layouts</title>
		<link>http://www.jeremyjohnstone.com/blog/2010-01-14-using-git-svn-with-non-standard-subversion-repository-layouts.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2010-01-14-using-git-svn-with-non-standard-subversion-repository-layouts.html#comments</comments>
		<pubDate>Thu, 14 Jan 2010 07:01:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-svn]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[stdlayout]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/?p=1508</guid>
		<description><![CDATA[Today while working with a 3rd party&#8217;s codebase, I ran into a situation which git-svn could not directly handle without pulling in massive amounts of unnecessary repository history. Turns out the solution was much simpler than I anticipated, so I&#8217;m sharing here in case it&#8217;s useful for somebody else. The repository was as follows:

http://svn.domain.org/svn/trunk/&#60;project_name&#62; -- [...]]]></description>
			<content:encoded><![CDATA[<p>Today while working with a 3rd party&#8217;s codebase, I ran into a situation which git-svn could not directly handle without pulling in massive amounts of unnecessary repository history. Turns out the solution was much simpler than I anticipated, so I&#8217;m sharing here in case it&#8217;s useful for somebody else. The repository was as follows:</p>
<pre>
http://svn.domain.org/svn/trunk/&lt;project_name&gt; -- Production branch
http://svn.domain.org/svn/branches/&lt;project_name&gt; -- Development branch
</pre>
<p><br/></p>
<p>I tried a number of approaches. First off, using the normal &#8211;stdlayout option with http://svn.domain.org/svn repository root to git-svn clone would have pulled in thousands of changesets from the repository which had nothing to do with the project I was working on.</p>
<p>Next I tried to use &#8211;trunk=trunk/&lt;project_name&gt; and &#8211;branches=branches/&lt;project_name&gt; and unfortunately this method tried to create a new branch for every child directory of branches/&lt;project_name&gt;. Obviously this wasn&#8217;t what I wanted either.</p>
<p>After doing a bit of searching on the web, I stumbled across another solution via <a title="Multiple branches using git-svn" href="http://www.dmo.ca/blog/20070608113513/" target="_blank">this blog</a>. Basically what it suggests doing is to use a separate svn-remote for the alternative path. This conveniently works around the issue quite nicely without any side-effects I&#8217;ve run into so far. Here&#8217;s the steps I followed:</p>
<ol>
<li>git svn clone http://svn.domain.org/svn/ &#8211;trunk=trunk/&lt;project_name&gt; &lt;project_name&gt;</li>
<li>cd &lt;project_name&gt;</li>
<li>vim .git/config</li>
<li>Add an additional remote as follows:<br/>
<pre>[svn-remote "svndev"]<br/>url = http://svn.domain.org/svn/<br/>fetch = branches/&lt;project_name&gt;:refs/remotes/dev</pre>
</li>
<li>git svn fetch svndev</li>
<li>git checkout -b dev remotes/dev</li>
</ol>
<p>After following those steps, you now have a new remote &#8216;remotes/dev&#8217; which is a copy of the dev environment branch from the repository and a new local branch called &#8220;dev&#8221;. You should now be able to proceed like normal using your usual git-svn workflow.</p>
<p>Of course the obvious answer would be to use standard repository layouts or to not use Subversion and/or git-svn, but sometimes that&#8217;s not always an option. I hope this helps someone stuck in a similar situation. Also, please be sure and sound off in the comments if you find an alternative solution!</p>
<p>Update:<br />
Here are a <a href="http://kerneltrap.org/mailarchive/git/2008/6/26/2241084" target="_blank" title="git mailing list">couple</a> <a href="http://kerneltrap.org/mailarchive/git/2008/6/26/2241154" target="_blank" title="git mailing list">additional</a> <a href="http://kerneltrap.org/mailarchive/git/2008/6/27/2243984" target="_blank" title="git mailing list">links</a> which might prove useful depending on your desired workflow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2010-01-14-using-git-svn-with-non-standard-subversion-repository-layouts.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wind Chill Calculator &#8212; In Javascript, Ruby, and PHP</title>
		<link>http://www.jeremyjohnstone.com/blog/2010-01-12-wind-chill-calculator-in-javascript-ruby-and-php.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2010-01-12-wind-chill-calculator-in-javascript-ruby-and-php.html#comments</comments>
		<pubDate>Tue, 12 Jan 2010 09:28:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[calculator]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[wind chill]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/?p=1494</guid>
		<description><![CDATA[Since I spent the time to dig up the method of calculating the wind chill given a specific temperature and wind speed, I figured I would go ahead and share it in case someone else finds it useful. Here&#8217;s three functions for calculating the wind chill, one each for Javascript, PHP, and Ruby.

// Javascript version
// [...]]]></description>
			<content:encoded><![CDATA[<p>Since I spent the time to dig up the method of calculating the wind chill given a specific temperature and wind speed, I figured I would go ahead and share it in case someone else finds it useful. Here&#8217;s three functions for calculating the wind chill, one each for Javascript, PHP, and Ruby.</p>
<pre class="brush: js">
// Javascript version
// wind = wind speed in knots
// temp = temperature in Celsius
function getWindChill(wind, temp) {
   wind = wind * 1.852;
   var wind2 = Math.pow(wind, 0.16);
   var wind_chill = (13.12 + 0.6215 * temp - 11.37 * wind2 + 0.3965 * temp * wind2);
   wind_chill = parseFloat(wind_chill.toFixed(2));
   wind_chill = (wind <= 4.8) ? temp : wind_chill;
   wind_chill = (temp > 10) ? temp : wind_chill;
   return wind_chill;
}
</pre>
<pre class="brush: php">
// PHP version
// wind = wind speed in knots
// temp = temperature in Celsius
function getWindChill($wind, $temp) {
   $wind = $wind * 1.852;
   $wind2 = pow($wind, 0.16);
   $wind_chill = (13.12 + 0.6215 * $temp - 11.37 * $wind2 + 0.3965 * $temp * $wind2);
   $wind_chill = round($wind_chill, 2);
   $wind_chill = ($wind <= 4.8) ? $temp : $wind_chill;
   $wind_chill = ($temp > 10) ? $temp : $wind_chill;
   return $wind_chill;
}
</pre>
<pre class="brush: ruby">
# Ruby version
# wind = wind speed in knots
# temp = temperature in Celsius
def getWindChill(wind, temp)
   wind = (wind * 1.852)
   wind2 = wind**0.16
   wind_chill = (13.12 + 0.6215 * temp - 11.37 * wind2 + 0.3965 * temp * wind2)
   (temp > 10) ? temp : (wind <= 4.8) ? temp : (wind_chill * 100).round.to_f / 100
end
</pre>
<p>As you can see, pretty simple, but hopefully one will prove useful to someone someday.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2010-01-12-wind-chill-calculator-in-javascript-ruby-and-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Friend&#8217;s new blog</title>
		<link>http://www.jeremyjohnstone.com/blog/2010-01-06-friends-new-blog.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2010-01-06-friends-new-blog.html#comments</comments>
		<pubDate>Wed, 06 Jan 2010 07:28:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/?p=1479</guid>
		<description><![CDATA[A good friend of mine started a new blog on Math and Programming related topics. She has an interest in Ruby development, especially with an abstract algebra / math focus, so if you&#8217;re interested in either Ruby or Mathematics, I&#8217;m sure there will be posts there which you will find useful. Already she&#8217;s off to [...]]]></description>
			<content:encoded><![CDATA[<p>A good friend of mine started a new <a title="Math and Programming blog" href="http://mathandprogramming.blogspot.com/" target="_blank">blog on Math and Programming related topics</a>. She has an interest in Ruby development, especially with an abstract algebra / math focus, so if you&#8217;re interested in either Ruby or Mathematics, I&#8217;m sure there will be posts there which you will find useful. Already she&#8217;s off to a great start with a handful of informative Ruby related posts.</p>
<p>Here&#8217;s a sampling of a few to get you started:</p>
<ul>
<li><a title="Math &amp; Programming Blog: Ruby testing of private methods" href="http://mathandprogramming.blogspot.com/2010/01/ruby-testing-private-methods.html" target="_blank">Testing of private class methods in Ruby</a></li>
<li><a title="Math &amp; Programming Blog: Optimal Control Gem for Conway's Game of Life" href="http://mathandprogramming.blogspot.com/2010/01/ruby-gem-for-optimal-control-for.html" target="_blank">Ruby Gem of a library for finding an optimal control strategy for Conway&#8217;s Game of Life</a></li>
<li><a title="Math &amp; Programming Blog: Using Slime.vim to provide irb support to VIM" href="http://mathandprogramming.blogspot.com/2010/01/vim-for-irb.html" target="_blank">Vim for irb</a></li>
<li><a title="Math &amp; Programming Blog: Using obj.send in Ruby 1.9" href="http://mathandprogramming.blogspot.com/2010/01/objectsend-in-ruby-19.html" target="_blank">obj.send available in Ruby 1.9 despite reports</a></li>
</ul>
<p>She&#8217;s also got a post on getting <a title="Math &amp; Programming Blog: Syntax highlighting for blogger" href="http://mathandprogramming.blogspot.com/2010/01/syntax-highlighting-on-blogger.html" target="_blank">syntax highlighting up and running on Blogger</a> as well as a quick <a title="Math &amp; Programming Blog: Git alias tips" href="http://mathandprogramming.blogspot.com/2010/01/git-pushing-to-multiple-repositories.html" target="_blank">Git alias tip</a>.</p>
<p>All this in less than a week? Will be interesting to see if she keeps up this pace.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2010-01-06-friends-new-blog.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First drawing using Brushes.app on the iPhone</title>
		<link>http://www.jeremyjohnstone.com/blog/2009-05-25-first-drawing-using-brushesapp-on-the-iphone.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2009-05-25-first-drawing-using-brushesapp-on-the-iphone.html#comments</comments>
		<pubDate>Tue, 26 May 2009 03:37:56 +0000</pubDate>
		<dc:creator>flickr</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[brushes.app]]></category>
		<category><![CDATA[coke zero]]></category>
		<category><![CDATA[drawing]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[sketching]]></category>
		<category><![CDATA[trouser mac]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/2009-05-25-first-drawing-using-brushesapp-on-the-iphone.html</guid>
		<description><![CDATA[


First drawing using Brushes, originally uploaded by Jeremy Johnstone.



Today I spent most of the day catching up on my blog reading and I stumbled across an article about a guy using an iPhone app named Brushes to design this month&#8217;s cover of The New Yorker. Highly impressed by the output and the video of it [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/jeremyjohnstone/3564935176/" title="photo sharing"><img src="http://farm4.static.flickr.com/3398/3564935176_5ebb97e93c.jpg" style="border: solid 2px #000000;" alt=""  class="aligncenter"/></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/jeremyjohnstone/3564935176/">First drawing using Brushes</a>, originally uploaded by <a href="http://www.flickr.com/people/jeremyjohnstone/">Jeremy Johnstone</a>.</span>
</div>
<p><br/></p>
<p>
Today I spent most of the day catching up on my blog reading and I stumbled across an <a href="http://www.newyorker.com/online/blogs/tny/2009/05/jorge-colombo-iphone-cover.html">article</a> about a guy using an iPhone app named <a href="http://brushesapp.com/">Brushes</a> to design this month&#8217;s cover of <a href="http://www.newyorker.com/">The New Yorker</a>. Highly impressed by the output and the video of it being created, I decided to give it a shot.</p>
<p>Realizing of course that I am definitely not an artist and that using just a finger on the iPhone screen isn&#8217;t the most precise way to dry, I don&#8217;t think my first work is too bad considering. I&#8217;ve done a lot of sketches in the past with various pen tablets and while the experience wasn&#8217;t anywhere near as easy as with them, it was pretty fun and rewarding that such a feat could be accomplished on my iPhone. A company named <a href="http://www.tenonedesign.com/">Ten One Design</a> seems to make a stylus for the iPhone for a very reasonable price ($14.95) and I think I might pick one up not just for this purpose.</p>
<p>I think what impressed me the most is that all this was possible using a $199 &#8220;smartphone&#8221;. Times are changing and when we step back and think about what was possible with a cell phone not even 10 years ago, it simply is amazing, IMHO.</p>
<p>The above image was modified after creation in Brushes to add in the frame and thought bubble. The additional elements were added using Photogene and then the image was uploaded to Flickr via Mobile Foto (both also iPhone apps). See below for a time-lapse video of the creation of the coke zero image created using the Brushes Viewer desktop companion app.</p>
<p><object type="application/x-shockwave-flash" width="267" height="400" data="http://www.flickr.com/apps/video/stewart.swf?v=71377" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  class="aligncenter"><param name="flashvars" value="intl_lang=en-us&#038;photo_secret=d297acfdaa&#038;photo_id=3564482213"></param><param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=71377" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&#038;photo_secret=d297acfdaa&#038;photo_id=3564482213" height="400" width="267"  class="aligncenter"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2009-05-25-first-drawing-using-brushesapp-on-the-iphone.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Odd high pitched whistling noise from my Accord</title>
		<link>http://www.jeremyjohnstone.com/blog/2009-05-22-odd-high-pitched-whistling-noise-from-my-accord.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2009-05-22-odd-high-pitched-whistling-noise-from-my-accord.html#comments</comments>
		<pubDate>Sat, 23 May 2009 04:43:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[2006]]></category>
		<category><![CDATA[airbag]]></category>
		<category><![CDATA[coupe]]></category>
		<category><![CDATA[honda accord]]></category>
		<category><![CDATA[noise]]></category>
		<category><![CDATA[odd]]></category>
		<category><![CDATA[side curtain]]></category>
		<category><![CDATA[V6]]></category>
		<category><![CDATA[weird]]></category>
		<category><![CDATA[whistling]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/?p=933</guid>
		<description><![CDATA[Over the past week or so, I&#8217;ve been hearing a faint but very high pitched (>12k hz) whistling like sound coming from my 2006 Honda Accord V6 Coupe. It&#8217;s kind of a cross between an air leak type sound and the sound of a metal ball bearing spinning at high speed inside a metallic dish. [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past week or so, I&#8217;ve been hearing a faint but very high pitched (>12k hz) whistling like sound coming from my 2006 Honda Accord V6 Coupe. It&#8217;s kind of a cross between an air leak type sound and the sound of a metal ball bearing spinning at high speed inside a metallic dish. It usually only happens at night and happens for about the first 3-5 minutes I am driving. Bumps seem to trigger an increase in intensity or at least to make it start producing the sound. Slowing down with the brakes, even very lightly, seems to stop it instantly and dropping below about 20 miles per hour coasting causes it to stop too, so it&#8217;s been hard to pin point exactly where the sound is coming from.</p>
<p>Thankfully this evening I had a coworker in the car and we were able to isolate the sound to the compartment above the rear driver side seat belt. There is a side curtain airbag also inside that compartment, so obvious guess is something to do with that. I have no idiot lights illuminated on my dash of any kind, so a little stumped if that&#8217;s the real issue. </p>
<p>I will obviously take it by a mechanic to have it checked out, but am posting this for two. If anyone happens to have seen or heard of this before, I am all ears and please comment! The second reason of course is to add a post into the search engines as I can&#8217;t seem to find anyone with similar symptoms from their car and I&#8217;m sure my car can&#8217;t be the only one ever to have done this.</p>
<p>Hope it&#8217;s not the airbag as that will be an expensive thing to fix, especially since it just went out of warranty. Figures right!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2009-05-22-odd-high-pitched-whistling-noise-from-my-accord.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Wolfram&#124;Alpha lives up to it&#8217;s &#8220;alpha&#8221; naming</title>
		<link>http://www.jeremyjohnstone.com/blog/2009-05-19-wolframalpha-lives-up-to-its-alpha-naming.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2009-05-19-wolframalpha-lives-up-to-its-alpha-naming.html#comments</comments>
		<pubDate>Tue, 19 May 2009 07:30:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[speed of light]]></category>
		<category><![CDATA[wolfram]]></category>
		<category><![CDATA[wolfram|alpha]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/?p=911</guid>
		<description><![CDATA[Today over lunch coworkers were talking about Wolfram&#124;Alpha and it sparked my interest again now that it&#8217;s finally open to the public. Tonight I decided to give it a whirl and unlike two of my friends, decided to throw it a softball initially with a very easy question:
what is the speed of light in free [...]]]></description>
			<content:encoded><![CDATA[<p>Today over lunch coworkers were talking about Wolfram|Alpha and it sparked my interest again now that it&#8217;s finally open to the public. Tonight I decided to give it a whirl and unlike two of my friends, decided to throw it a softball initially with a very easy question:</p>
<blockquote><p>what is the speed of light in free space?</p></blockquote>
<p>Pretty much any geek worth his/her salt should know the answer to that question without batting an eyelash. Browny points to those who know it down to a couple decimal places in meters per second. Obviously since most of the examples on the homepage of the site are technical / mathematical related, it should get the answer right off, yes?</p>
<p>Well, that logical conclusion is apparently flawed as it failed. See the screenshot here:</p>
<p><a href="http://www45.wolframalpha.com/input/?i=what+is+the+speed+of+light+in+free+space"><img class="aligncenter size-medium wp-image-912" title="wolfram_alpha" src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2009/05/wolfram_alpha-300x104.png" alt="wolfram_alpha" width="300" height="104" /></a></p>
<p>Even Google (which has been lacking lately in search result quality, IMHO) did a better job than that as seen here:</p>
<p><a href="http://www.google.com/search?hl=en&#038;q=what+is+the+speed+of+light+in+free+space&#038;btnG=Google+Search&#038;aq=f&#038;oq="><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2009/05/google-300x82.png" alt="google" title="google" width="300" height="82" class="aligncenter size-medium wp-image-913" /></a></p>
<p>They obviously don&#8217;t provide the answer, but the first result gives one enough confidence that it&#8217;s a no brainer to click on it. Now for the best overall of the three, Yahoo!, does one better than Google by not only including the same result, but also gives me the exact answer I am looking for right there in the result excerpt (which Google conveniently truncated with ellipses) as seen here:</p>
<p><a href="http://search.yahoo.com/search?p=what+is+the+speed+of+light+in+free+space"><img src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2009/05/yahoo-300x100.png" alt="yahoo" title="yahoo" width="300" height="100" class="aligncenter size-medium wp-image-914" /></a></p>
<p>At the end of the day, the score stands at:</p>
<ul>
<li>Wolfram|Alpha = 0</li>
<li>Google = 1</li>
<li>Yahoo! = 1.5</li>
</ul>
<p>With the bonus points for Yahoo! in saving me an extra click. </p>
<p>Glad to see our search still stands proud. Wolfram|Alpha definitely has a <strong>lot</strong> of promise and potential, but it&#8217;s still yet to be seen whether it will live up to that lofty goal.</p>
<p><i>Update:</i> Interestingly, if you wanted to know what the <a href="http://www49.wolframalpha.com/input/?i=speed+of+light+in+parsecs+per+millennium">speed of light in parsecs per millennium</a> was, it could definitely provide that answer to you. <img src='http://www.jeremyjohnstone.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Also if you think it failed simply because I said &#8220;what is the&#8221; at the beginning of the query, you would be wrong. For it to provide a result I would have to drop my query down to just &#8220;speed of light&#8221;, which wouldn&#8217;t necessarily be what I am looking for because the speed of light is variable where as the &#8220;speed of light in free space&#8221; is a constant value.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2009-05-19-wolframalpha-lives-up-to-its-alpha-naming.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Out with the old, in with the new</title>
		<link>http://www.jeremyjohnstone.com/blog/2009-05-17-out-with-the-old-in-with-the-new.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2009-05-17-out-with-the-old-in-with-the-new.html#comments</comments>
		<pubDate>Sun, 17 May 2009 16:09:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/?p=900</guid>
		<description><![CDATA[This weekend I finally got around to updating my website design again after a year since the last visual update. It seems it&#8217;s more or less become a once a year type deal. The old design just wasn&#8217;t doing it for me so I took the opportunity to scrap everything and start over.
With the new [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I finally got around to updating my website design again after a year <a href="http://www.jeremyjohnstone.com/blog/2008-04-13-finally-updated-my-website.html">since the last visual update</a>. It seems it&#8217;s more or less become a once a year type deal. The old design just wasn&#8217;t doing it for me so I took the opportunity to scrap everything and start over.</p>
<p>With the new design I scrapped the dual Wordpress installation, one being for blog posts and other being for tweets, and instead have a single Wordpress install driving virtually the entire site. I also added a much heavier focus on code highlighting and image viewing, since that is the two biggest things I post about on this site.</p>
<p>I also decided to go with a more clean and polished template, which I purchased from <a href="http://themeforest.net/">Theme Forest</a> instead of designing myself like I did last time. The price was very reasonable and the output, while not unique, looks very good in my opinion. Curious to see what others will say about it so shout off in the comments.</p>
<p>There still are a few areas needing polish, like general pingback appearance and comment / post CSS tweaks, but overall I am very happy for the little amount of work I put into it. In the process of putting the new design online, I also moved primary hosting of my blog from BlueHost to Aptana cloud. I&#8217;ll be posting a more in depth review of my experience with it in the near future.</p>
<p>In closing, here&#8217;s a screenshot of the old homepage for posterity:</p>
<p style="text-align: center;">Above the fold:</p>
<p><img class="aligncenter size-medium wp-image-902" title="old_homepage_top" src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2009/05/home_top-300x225.png" alt="old_homepage_top" width="300" height="225" /></p>
<p style="text-align: center;">Below the fold (slightly different scale, the boxes did match up before):</p>
<p><img class="aligncenter size-medium wp-image-901" title="old_homepage_bottom" src="http://www.jeremyjohnstone.com/wordpress/wp-content/uploads/2009/05/bottom-300x129.png" alt="old_homepage_bottom" width="300" height="129" /></p>
<p>Be sure and let me know your comments / criticism / suggestions!</p>
<p>Thanks!</p>
<p>-Jeremy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2009-05-17-out-with-the-old-in-with-the-new.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP parser for OS X plist XML files</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html#comments</comments>
		<pubDate>Mon, 27 Oct 2008 03:42:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[iTunes Library]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php_class_lib]]></category>
		<category><![CDATA[plist]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384</guid>
		<description><![CDATA[Digging around today for a PHP parser for OSX plist files, I was surprised to find no good pre-existing solutions. Even Apple&#8217;s own site gives a relatively poor solution to the problem (see here). Normally SimpleXML is enough to handle most XML parsing needs, but the plist XML format is just broken enough to make [...]]]></description>
			<content:encoded><![CDATA[<p>Digging around today for a PHP parser for OSX plist files, I was surprised to find no good pre-existing solutions. Even Apple&#8217;s own site gives a relatively poor solution to the problem (<a href="http://developer.apple.com/internet/opensource/php.html">see here</a>). Normally SimpleXML is enough to handle most XML parsing needs, but the plist XML format is just broken enough to make parsing it with SimpleXML virtually impossible. Since I hadn&#8217;t played with XMLReader much, I thought it would be a good chance to give it a spin. For the anxious types, the code is available on <a href="http://github.com/jsjohnst/php_class_lib/tree/master">github in my php_class_lib project</a>, so dig right in. Read on for a simple example (included in the repos).</p>
<p>The original intent of the parser for me was to parse my iTunes&#8217; library in PHP, so <a href="http://github.com/jsjohnst/php_class_lib/tree/master/classes/parsers/plist/example.php">this example</a> will show doing just that:</p>
<pre class="brush: php">&lt;?php

include("PlistParser.inc");

$parser = new plistParser();
$plist = $parser-&gt;parse(dirname(__FILE__) . "/iTunes.xml");
var_dump($plist);
</pre>
<p>And from that, the output is as follows:</p>
<pre class="brush: php">array(8) {
  ["Major Version"]=&gt;
  int(1)
  ["Minor Version"]=&gt;
  int(1)
  ["Application Version"]=&gt;
  string(5) "8.0.1"
  ["Features"]=&gt;
  int(5)
  ["Show Content Ratings"]=&gt;
  bool(true)
  ["Music Folder"]=&gt;
  string(60) "file://localhost/Users/testUser/Music/iTunes/iTunes%20Music/"
  ["Library Persistent ID"]=&gt;
  string(15) "C39203948AF3D3E"
  ["Tracks"]=&gt;
  array(1) {
    [1]=&gt;
    array(25) {
      ["Track ID"]=&gt;
      int(1)
      ["Name"]=&gt;
      string(8) "My Track"
      ["Artist"]=&gt;
      string(9) "My Artist"
      ["Album"]=&gt;
      string(8) "My Album"
      ["Genre"]=&gt;
      string(8) "My Genre"
      ["Kind"]=&gt;
      string(15) "MPEG audio file"
      ["Size"]=&gt;
      int(123456)
      ["Total Time"]=&gt;
      int(123456)
      ["Track Number"]=&gt;
      int(1)
      ["Year"]=&gt;
      int(2008)
      ["Date Modified"]=&gt;
      string(20) "2008-03-03T03:33:33Z"
      ["Date Added"]=&gt;
      string(20) "2008-03-03T03:33:33Z"
      ["Bit Rate"]=&gt;
      int(128)
      ["Sample Rate"]=&gt;
      int(44100)
      ["Comments"]=&gt;
      string(20) "All Rights Reserved."
      ["Release Date"]=&gt;
      string(20) "2007-03-12T04:01:37Z"
      ["Persistent ID"]=&gt;
      string(14) "C3E339393939E3"
      ["Track Type"]=&gt;
      string(4) "File"
      ["Podcast"]=&gt;
      bool(false)
      ["Unplayed"]=&gt;
      bool(true)
      ["File Type"]=&gt;
      int(123456)
      ["File Creator"]=&gt;
      int(123456)
      ["Location"]=&gt;
      string(66) "file://localhost/Users/testUser/Music/iTunes/iTunes%20Music/my.mp3"
      ["File Folder Count"]=&gt;
      int(4)
      ["Library Folder Count"]=&gt;
      int(1)
    }
  }
}</pre>
<p>As you can see, the PHP parser made short order of that task. From here you now have full access to all the metadata in your iTunes library. Feel free to use the class in your own projects and be sure to let me know what you build with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Enums in PHP</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-05-enums-in-php.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-10-05-enums-in-php.html#comments</comments>
		<pubDate>Sun, 05 Oct 2008 12:11:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[enum]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[iterator]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPClassLib]]></category>
		<category><![CDATA[userland]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=383</guid>
		<description><![CDATA[I&#8217;m not sure what lead me to it, but I stumbled across a blog post on how to implement Enums in PHP via userland code written by Jonathan Hohle. I liked the concept he had, but the implementation was a bit unappealing because it used eval() among other more minor issues. You shouldn&#8217;t need to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure what lead me to it, but I stumbled across a blog post on <a href="http://it.toolbox.com/blogs/macsploitation/enums-in-php-a-native-implementation-25228">how to implement Enums in PHP via userland code</a> written by Jonathan Hohle. I liked the concept he had, but the implementation was a bit unappealing because it used eval() among other more minor issues. You shouldn&#8217;t need to generate Enums at runtime, so I took that as a challenge to find a way to do it at compile time, thus making the code much more efficient. Like Jonathan, I also wanted to maintain support for PHP&#8217;s type hinting and it should obviously support the semantics one expects from an enum if feasible. I wasn&#8217;t sure of the real value to having the Enums iterable as well like he did, but I figured if possible I should keep support for that too.</p>
<p>First off, we need the Enum base class as follows:</p>
<pre class="brush: php">
abstract class Enum {
	final public function __toString() {
		return get_class($this);
	}
}
</pre>
<p>From that miniscule amount of code we have the beginnings of Enum support simply by extending that class as follows:</p>
<pre class="brush: php">
abstract class DNSRecordType extends Enum {}

class A extends DNSRecordType {}
class CNAME extends DNSRecordType {}
class MX extends DNSRecordType {}

function printDnsRecord(DNSRecordType $type, ...) {
       // We can now be sure $type is a DNSRecordType
}
</pre>
<p>There are of course a few issues, one of the biggest being that <code>(new A) !== (new A)</code> in the above example code. Here we modify the Enum base class to add support for fixing the equality comparison:</p>
<pre class="brush: php">
abstract class Enum {
	protected static $instances = array();

	final private function __construct() {}

	final public function __toString() {
		return get_class($this);
	}

	final public static function get($name) {
		if(is_subclass_of($name, "Enum")) {
			if(array_key_exists($name, self::$instances)) {
				return self::$instances[$name];
			} else {
				return self::$instances[$name] = new $name();
			}
		} else {
			throw Exception();
		}
	}

	final public static function __callStatic($name, $args) {
		return self::get($name);
	}
}
</pre>
<p>Now if we want to use an enum, instead of instantiating the CNAME class directly, we use <code>DNSRecordType::get("CNAME");</code> on versions of PHP older than 5.3 and in PHP 5.3 we can save a few keystrokes and instead use <code>DNSRecordType::CNAME()</code> to get a CNAME. Obviously in the case of older versions of PHP we are adding a few extra keystrokes, but unfortunately that is required to avoid having to define custom methods for each Enum type due to the lack of the __callStatic() magic method before PHP 5.3.</p>
<p>Ok, so what&#8217;s next? Well, I guess our next issue would be that Enums, in the case of languages based on C style semantics, by default don&#8217;t have the value of a member as the the name of the member, but rather an integer which increments from zero for each member. Furthermore, in C style enums you can set the value too if you like to any integer of your choice and then each member after that which doesn&#8217;t have a specified value will be incremented one higher from it consecutively. To support this style behavior, it forces us partly out of being able to do this at compile time (thus a performance hit). Because of the performance hit, I decided you have to enable this mode before using it, otherwise you get the previous behavior we defined above.</p>
<p>The now updated code is as follows:</p>
<pre class="brush: php">
abstract class Enum {
	protected static $instances = array();
	protected $value = null;

	protected static $pureMode = false;
	protected static $classesWalked = false;
	protected static $typeCounters = array();
	protected static $classIntValues = array();

	final private function __construct() {}

	final public static function enablePureMode() {
		self::$pureMode = true;
	}

	final protected static function walkClasses() {
		if(self::$pureMode &#038;&#038; !self::$classesWalked) {
			foreach(get_declared_classes() as $class) {
				if(is_subclass_of($class, "Enum") &#038;&#038; $class !== "Enum") {
					$parent = get_parent_class($class);
					if($parent == "Enum") continue;
					if(!array_key_exists($parent, self::$typeCounters)) {
						self::$typeCounters[$parent] = 0;
					}
					$obj = new $class;
					$objval = $obj->value;
					if(!is_null($objval)) {
						if(!is_numeric($objval)) {
							$nextval = ord($objval) + 1;
						} else {
							$nextval = $objval + 1;
						}
						if($nextval <= self::$typeCounters[$parent]) {
							throw new Exception("Specified enum member value is impossible");
						}
						self::$classIntValues[$class] = $objval;
						self::$typeCounters[$parent] = $nextval;
					} else {
						self::$classIntValues[$class] = self::$typeCounters[$parent]++;
					}
				}
			}
			self::$classesWalked = true;
		}
	}

	final public function __toString() {
		if(self::$pureMode) {
			// delay the performance hit until we actually need the value of one of the enums
			self::walkClasses();
			return (string) self::$classIntValues[get_class($this)];
		} else {
			return get_class($this);
		}
	}

	final public static function get($name) {
		if(is_subclass_of($name, "Enum")) {
			if(array_key_exists($name, self::$instances)) {
				return self::$instances[$name];
			} else {
				return self::$instances[$name] = new $name();
			}
		} else {
			throw new Exception();
		}
	}

	final public static function __callStatic($name, $args) {
		return self::get($name);
	}
}
</pre>
<p>With the above change, we can now have an enums for months with January's value being 1 for example, like the following:</p>
<pre class="brush: php">
Enum::enablePureMode();
abstract class Month extends Enum {}
class JAN extends Month { var $value = 1; }
class FEB extends Month {}
class MAR extends Month {}
... etc
</pre>
<p>We can also do things like the following too:</p>
<pre class="brush: php">
Enum::enablePureMode();
abstract class Whitespace extends Enum {}
class Newline extends Whitespace { var $value = "\n"; }
class Space extends Whitespace { var $value = " "; }
class Tab extends Whitespace { var $value = "\t"; }
... etc
</pre>
<p>Pretty nifty eh? Please do note, once you enablePureMode it's enabled for all instances of any Enum because you have already incurred the performance loss. Also, due to the nature of how enablePureMode works, you need to make sure you always have all your Enums defined before you try to use one of their values. This shouldn't be an issue in most cases, but just something to keep in mind. Doing quick tests showed the performance hit from having enablePureMode turned on was pretty trivial (less than a millisecond in some cases), but since you might not need the behavior, no point in taking the performance hit if you don't need to.</p>
<p>The last thing left is to make an iterator of all the members of an Enum. This part is really quick and easy and requires us to add the following method to our Enum class:</p>
<pre class="brush: php">
final public static function iterator($enum_type) {
	return new EnumIterator($enum_type);
}
</pre>
<p>As well as also define the following additional class:</p>
<pre class="brush: php">
class EnumIterator implements Iterator {
	protected $classes = array();
	protected $enum_type;

	public function __construct($enum_type) {
		if(!class_exists($enum_type) || !is_subclass_of($enum_type, "Enum")) throw new Exception("Specified Enum type doesn't exist or is not an Enum!");
		$this->enum_type = $enum_type;
		foreach(get_declared_classes() as $class) {
			if(is_subclass_of($class, $this->enum_type)) {
				$this->classes[] = $class;
			}
		}
	}

	public function current() {
		return current($this->classes);
	}

	public function key() {
		return key($this->classes);
	}

	public function next() {
		next($this->classes);
		return $this->current();
	}

	public function rewind() {
		return reset($this->classes);
	}

	public function valid() {
		return (bool) $this->current();
	}
}
</pre>
<p>An example of using the iterator is as follows:</p>
<pre class="brush: php">
echo "DNSRecordType:\n";
foreach(Enum::iterator("DNSRecordType") as $type) {
	echo "\t" . $type . " has value " . (Enum::get($type)) . "\n";
}
</pre>
<p>To get a copy of the code including several example usage demonstrations, please visit the following URL: <a href="http://github.com/jsjohnst/php_class_lib/tree/master/classes/types/enum">http://github.com/jsjohnst/php_class_lib/tree/master/classes/types/enum</a></p>
<p>If you find this useful, please let me know!</p>
<p>-Jeremy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-10-05-enums-in-php.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bailouts: Ever think of it this way??</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-01-bailouts-ever-think-of-it-this-way.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-10-01-bailouts-ever-think-of-it-this-way.html#comments</comments>
		<pubDate>Wed, 01 Oct 2008 06:06:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[$85 billion]]></category>
		<category><![CDATA[AIG]]></category>
		<category><![CDATA[alternative plan]]></category>
		<category><![CDATA[bailout]]></category>
		<category><![CDATA[citizens]]></category>
		<category><![CDATA[economic crisis]]></category>
		<category><![CDATA[uncle sam]]></category>
		<category><![CDATA[we deserve it dividend]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=382</guid>
		<description><![CDATA[Got an interesting email forward from my father. I haven&#8217;t verified the math and statistical figures, but it looks right on a cursory glance (Update: It&#8217;s bad math, but still sounds like a good plan, no?). Very interesting idea to say the least.

Dear American Citizens,

I&#8217;m against the $85 BILLION bailout of AIG. Instead, I&#8217;m in [...]]]></description>
			<content:encoded><![CDATA[<p>Got an interesting email forward from my father. I haven&#8217;t verified the math and statistical figures, but it looks right on a cursory glance <strong>(Update: It&#8217;s bad math, but still sounds like a good plan, no?)</strong>. Very interesting idea to say the least.</p>
<blockquote><p>
Dear American Citizens,</p>
<p><br/></p>
<p>I&#8217;m against the $85 BILLION bailout of AIG. Instead, I&#8217;m in favor of giving $85,000,000,000 to America in a &#8220;We Deserve It&#8221; dividend. To make the math simple, let&#8217;s assume there are 200,000,000 bona fide U.S. citizens, aged 18+.</p>
<p><br/></p>
<p>Our population is about 301 million counting every man, woman and child. So, 200,000,000 might be a fair stab at adults 18 and up. Now, divide 200 million, 18+ adults into $85 billion &#8211; that equals $425,000.00 each! Yes, my plan is to give that $425,000 to every adult as a &#8220;We Deserve It&#8221; dividend.</p>
<p><br/></p>
<p>Of course, it would NOT be tax free.  So, let&#8217;s assume a tax rate of 30%. Everyone would pay $127,500.00 in taxes. That sends $25.5 billion right back to Uncle Sam! It also means that every adult 18+ has $297,500.00 in their pocket. A husband and wife would have $595,000.00!</p>
<p><br/></p>
<p>What could you do with $297,500.00 to $595,000.00?</p>
<ul>
<li>Pay off your mortgage – housing crisis solved.</li>
<li>Repay college loans – what a great boost to new grads</li>
<li>Put away money for college – it&#8217;ll really be there.</li>
<li>Save in a bank – create money to loan to entrepreneurs.</li>
<li>Buy a new car – create jobs.</li>
<li>Invest in the market – capital drives growth.</li>
<li>Pay for your parent&#8217;s medical insurance – health care improves.</li>
<li>Enable deadbeat parents to come clean – or else.</li>
</ul>
<p>Remember this is for every adult U.S. citizen, 18 and older (including the folks who lost their jobs at Lehmann Brothers and every other company that is cutting back) and of course, for those serving in our Armed Forces.</p>
<p><br/></p>
<p>If we&#8217;re going to re-distribute wealth let&#8217;s really do it! Instead of trickling out a puny $1,000.00  &#8220;economic incentive&#8221;. If we&#8217;re going to do an $85 billion bailout, let&#8217;s bail out every adult U.S. citizen!</p>
<p><br/></p>
<p>As for AIG – liquidate it.</p>
<ul>
<li>Sell off its parts.</li>
<li>Let American General go back to being American General.</li>
<li>Sell off the real estate.</li>
<li>Let the private sector bargain hunters cut it up and clean it up.</li>
</ul>
<p>We deserve the money and AIG doesn&#8217;t.</p>
<p><br/></p>
<p>How do you spell Economic Boom? W-e  D-e-s-e-r-v-e  I-t  d-I-v-I-d-e-n-d!  I trust my fellow adult Americans to know how to use the $85 Billion &#8220;We Deserve It&#8221; dividend more than do the &#8216;geniuses&#8217; at AIG or in Washington, D.C.</p>
<p><br/></p>
<p>And remember, my plan only really costs $59.5 billion because $25.5 billion is returned instantly in taxes to Uncle Sam.  Good idea?  I think so.</p>
<p><br/></p>
<p><strong><em>OK&#8230; let&#8217;s look at that 700 billion bailout now!</em></strong><br />
<br/><br />
-Unknown Source</p>
</blockquote>
<p>What do you think of the idea? Sound off in the comments below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-10-01-bailouts-ever-think-of-it-this-way.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Where does all the time go? No, really!</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-09-03-where-does-all-the-time-go-no-really.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-09-03-where-does-all-the-time-go-no-really.html#comments</comments>
		<pubDate>Thu, 04 Sep 2008 04:36:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[activities]]></category>
		<category><![CDATA[interests]]></category>
		<category><![CDATA[my life]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=381</guid>
		<description><![CDATA[I&#8217;m constantly feeling like I am running 90mph to keep up with everything going on. I&#8217;m not complaining per say, but felt it would be prudent for me to figure out all the things I am involved in and then make a decision on if they are the most important usage of my time. I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m constantly feeling like I am running 90mph to keep up with everything going on. I&#8217;m not complaining per say, but felt it would be prudent for me to figure out all the things I am involved in and then make a decision on if they are the most important usage of my time. I decided to break them down into two categories, work related and strictly personal stuff. The work stuff ended up being specific projects / tasks I work on while it seemed the personal stuff leaned more towards concepts and activities. Probably just the nature of what I am doing. So without further ado, here&#8217;s the list for the world to see:</p>
<p><strong>Work Related</strong></p>
<ul>
<li>ConnectedTV team. This is my day job and rightfully consumes the most of my waking hours of probably anything else. I love my job and what I do, so the time spent here goes by without noticing sometimes.</li>
<li>Photography. This is the second most time consuming thing I do. &#8220;Snapping&#8221; photos doesn&#8217;t take much time one would think, but when you combine sorting, post processing, setup/teardown etc. it easily consumes much more time. I&#8217;ve done like 50-60 exec headshots, 40-50 non-exec headshots, countless corp events, and a ton more in the past year alone so this definitely does consume a lot of my time. I&#8217;ve been slowly scaling back on this, but might decide to scale back more aggressively still.</li>
<li>Evangelism. This is something I do in many forms, ranging from leading up an internal employee evangelism team to attending conference and other tech events. I&#8217;ve been to four major conferences this year alone (Mac World, SWSX, Web 2.0, IDF) with more coming. </li>
<li>Point of contact. I am the point of contact on a lot of different things at Yahoo!, ranging from DHS/FEMA in disaster related things, to handling our Apple EPP relationship for North America, to the League of Women&#8217;s Voters since I maintain hosting for <a title="Vote411.org" href="http://www.vote411.org" target="_blank">vote411.org</a>. </li>
<li>Working groups / committees. These vary from time to time, but I am usually involved in a couple at any given moment either inside Yahoo! or outside but Yahoo! related somehow. These range from stuff like the Green Coding Initiative, to our YEF Grants committee, to outside stuff like being on DHS&#8217;s NetGuard working group. </li>
<li>Side projects / hacks. I&#8217;m always looking for new ways to optimize some process or fill a niche need of mine or others so I am constantly building up small side projects that I am working on or want to do someday.</li>
</ul>
<p><strong>Personal</strong></p>
<ul>
<li>Reading. Probably the single biggest consumer of my time outside work. I love reading and am constantly chewing through books. I think I have like ten I am flipping back and forth between on my Kindle now with over 100 more waiting to be started either on the Kindle or in printed book form.</li>
<li>Photography. Not just something I do for work, but also something I do for fun. It&#8217;s challenging and allows me to try and develop an artistic side.</li>
<li>Yoga. Except for the past two weeks (been injured from my last hike) I&#8217;ve been doing Yoga three times a week for the last two months. This is something I hope to resume very soon once my chest feels up to it.</li>
<li>Traveling. I LOVE to travel to new places. In the past year the new places I&#8217;ve been to are Cayman Islands, England, and Bonaire. I&#8217;m scheduled to go to India sometime in November for the first time and will be spending two weeks in Malaysia, Singapore, Kuala Lumpor, and Sipadan Water Village in March of next year. I&#8217;ve also done a lot of domestic traveling over the past year and will likely do more before the year is out.</li>
<li>Outdoor activities. Predominantly this involves scuba diving and hiking lately, but I also enjoy stuff like sky diving, water skiing, etc too, just not found the time recently.</li>
<li>Programming for fun. I always have some project or another I am working on for fun. This could range from working on my personal website, to building some twitter client, or coding for some platform I am passionate about (like OSX/iPhone).</li>
</ul>
<p>As you can see from the above list, there isn&#8217;t a lot of activities (in the personal category at least) strictly related to just socializing or meeting new people. Maybe that&#8217;s why I am almost 30 and still single. Hmm, something else to think about.</p>
<p>I&#8217;m sure the above list isn&#8217;t all inclusive by any means either, it&#8217;s just what came to mind when I thought about it. So, now that you know where my time is spent, what consumes your time? Feel free to share in the comments or postback from your own blog.</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-09-03-where-does-all-the-time-go-no-really.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Trouble With Email</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-07-29-the-trouble-with-email.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-07-29-the-trouble-with-email.html#comments</comments>
		<pubDate>Wed, 30 Jul 2008 05:29:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[courier]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[mail.app]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=380</guid>
		<description><![CDATA[Ok, so I have a problem. One which keeps me up at night and annoys me greatly, but I can&#8217;t seem to find a solution to fix. So what is this problem? Email SUCKS, that&#8217;s the problem! Ok Ok, I am sure you are thinking &#8220;great, and?&#8221; as it&#8217;s a common rant. Here&#8217;s my needs:

 [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so I have a problem. One which <span class="afterthought" title="really">keeps me up at night</span> and annoys me greatly, but I can&#8217;t seem to find a solution to fix. So what is this problem? Email SUCKS, that&#8217;s the problem! Ok Ok, I am sure you are thinking &#8220;great, and?&#8221; as it&#8217;s a common rant. Here&#8217;s my needs:</p>
<ol>
<li> I want my email everywhere at every time, with or without network access, on a range of devices. Sitting at my desk with my main desktop? Sitting in a meeting with my laptop? Sipping a coffee with my iPhone in my hand? On a plane flight to some far away place? All of those should be no challenge to doing something as simple as reading an email, right?</li>
<li>I like to organize my email, especially mailing lists which I subscribe to hundreds of at last count. Some lists are important, others less so and should be organized accordingly. As having things &#8220;in view&#8221; can be distracting when I don&#8217;t need to see them, I need the ability to have a <span class="afterthought" title="aka subfolders">nesting system</span> or some other way to have multiple views into my mail. These &#8220;views&#8221; should be synchronized across all devices and possibly have the ability to be <span class="afterthought" title="maybe I don't want some things to show on the iPhone for example">device specific</span>.</li>
<li>When someone sends me an email, it should show up instantly in every client, not five minutes later, not an hour later, certainly not forcing me to <span class="afterthought" title="yeah, I am talking about you damn Mail.app">restart the app just to see the email</span>. The system should also support some type of push system as constantly &#8220;polling&#8221; puts excessive load on the server and sucks up precious power reserves in the case of mobile devices.</li>
<li>I need the ability to find old stuff quickly and painlessly, again on any device. We can have Yahoo! search teh net in under 100ms for anything I could dream up for a search term but even my quad core Xeon can&#8217;t accomplish a similar search across an infinitely smaller dataset in under five minutes? Huh? You&#8217;re kidding right? Guess I won&#8217;t even try it on my iPhone then as I know my battery will then run dead before the search finishes in that case.</li>
</ol>
<p>Seems like fairly modest needs right? Should be doable? Well, I am amazed to say it seems to be about as simple as sending a man in a balloon to the moon.</p>
<p>Currently I am running my own Courier IMAP server, using Procmail and all it&#8217;s powerful mojo to sort my mail, and using Mail.app as the actual MUA. The problems I run into are as follows, in no special order and certainly not all inclusive:</p>
<ol>
<li>My mail server is constantly thrashing the disk. Despite being on a dual G5 w/ plenty of memory and decently fast I/O, it seems the combination of commands Mail.app sends to Courier seems to give it fits. Have two clients hitting it at once and the machine drops to a snail crawl. Heaven forbid you add that third client and the <span class="afterthought" title="I shit you not, true story">machine starts sparking and flames shoot out the back</span>. Of course running it on another OS would probably help as OSX doesn&#8217;t have the best kernel support for things like this, but that&#8217;s not the point. I&#8217;ve also thought about moving over to another IMAP server implementation, but as yet I haven&#8217;t found one which I feel confident will be better performing without enough negative aspects to scare me away.</li>
<li>Mail.app seems to not like to pull subfolders with consistency. It&#8217;s extremely common for me to restart the app and suddenly have hundreds of unread emails suddenly appear across folders. This definitely is a problem no matter how you look at it. Of course there are multiple possible causes to blame, but that&#8217;s irrelevant. I don&#8217;t care if the IMAP spec is brain dead in how it specifies IDLE support, that&#8217;s not my problem. Having a mail client which shows new mail without fail should be one of it&#8217;s developer&#8217;s top priorities.</li>
<li>Procmail while very powerful is extremely error prone. I&#8217;ve had several occasions where things backfired. My dream would be to someday have something which said &#8220;hey, you moved this email into this place, would you like me to move emails like it in the future for you?&#8221;, but then I snap back to reality and realize that&#8217;s a geek&#8217;s wet dream and not anything which will really work as you would expect any time soon.</li>
<li>Keeping multiple devices and offline copies of emails in sync seems to be error prone at best. Isn&#8217;t this exactly the problem IMAP is supposed to solve? Tell me again why there is not a single IMAP client which handles this painlessly? Oh, right, that&#8217;s because the IMAP spec is crap. Please fix, ok? KTHXBAI!
</li>
</ol>
<p>So my question is, is there something I have missed? If you have a solution I am more than ready to apply my hand to my forehead and yell &#8220;Do&#8217;t&#8221; with enthusiasm. Sound off in the comments with what works for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-07-29-the-trouble-with-email.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Photoshop: 1 + 2 = 3</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-05-26-photoshop-1-2-3.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-05-26-photoshop-1-2-3.html#comments</comments>
		<pubDate>Mon, 26 May 2008 09:22:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=379</guid>
		<description><![CDATA[Having a bit of free time this evening, I decided to do a bit of photo editing work. In this example, I took one slightly underexposed image + one highly overexposed image of a statue in London, England and combined them into one HDR image. Here you can see the three images, click one each [...]]]></description>
			<content:encoded><![CDATA[<p>Having a bit of free time this evening, I decided to do a bit of photo editing work. In this example, I took one slightly underexposed image + one highly overexposed image of a statue in London, England and combined them into one HDR image. Here you can see the three images, click one each to see a higher resolution version.</p>
<p><center></p>
<h3>Underexposed Image:</h3>
<p><a href="http://farm4.static.flickr.com/3120/2523212913_51553c91cc_o.jpg" target="_blank"><img src="http://farm3.static.flickr.com/2217/2524036888_fe06e5a184_o.jpg" width="400" height="266" alt="Statue 1-sized" /></a></p>
<h3>Overexposed Image:</h3>
<p><a href="http://farm3.static.flickr.com/2289/2523212927_91542b1795_o.jpg" target="_blank"><img src="http://farm3.static.flickr.com/2304/2524036866_0a2ae941aa_o.jpg" width="400" height="266" alt="Statue 2-sized" /></a></p>
<h3>Final HDR Image:</h3>
<p><a href="http://farm4.static.flickr.com/3265/2524036786_078607b75d_o.jpg" target="_blank"><img src="http://farm4.static.flickr.com/3049/2524036902_d1bd5525d2_o.jpg" width="400" height="267" alt="Statue 3-sized" /></a></p>
<p></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-05-26-photoshop-1-2-3.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>EcoBalls &#8212; Are they for real?</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-05-11-ecoballs-are-they-for-real.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-05-11-ecoballs-are-they-for-real.html#comments</comments>
		<pubDate>Sun, 11 May 2008 20:48:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[alternative]]></category>
		<category><![CDATA[cleaning products]]></category>
		<category><![CDATA[detergent]]></category>
		<category><![CDATA[ecoballs]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[green]]></category>
		<category><![CDATA[laundry]]></category>
		<category><![CDATA[Product Plugs]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=378</guid>
		<description><![CDATA[While in London last weekend I stumbled across an interesting laundry detergent alternative called EcoBalls. They are these green UFOish shaped balls with pellets inside. Not hearing of them before and being skeptical, I decided to hold off buying them, especially at £35.
Doing a bit of research online, I&#8217;ve found mixed information. The majority of the skeptics [...]]]></description>
			<content:encoded><![CDATA[<p>While in London last weekend I stumbled across an interesting laundry detergent alternative called EcoBalls. They are these green UFOish shaped balls with pellets inside. Not hearing of them before and being skeptical, I decided to hold off buying them, especially at £35.</p>
<p>Doing a bit of research online, I&#8217;ve found mixed information. The majority of the skeptics I have seen arguing against them seem to focus on the gimicky nature of the product description and/or inaccurately point to debunk stories on &#8220;similar&#8221; products. I use the term &#8220;similar&#8221; like I do because I really feel that after researching it, EcoBalls are a bit different than many of the products out there like it.<span id="more-378"></span></p>
<p><center><a href="http://www.flickr.com/photos/jeremyjohnstone/2484355666/"><img src="http://farm3.static.flickr.com/2186/2484355666_373bdb9a4b_o.jpg" width="500" height="332" /></a></center></p>
<p>The one thing I found most interesting about all of the information I read online attempting to debunk them is that none of them paid any attention to the components of the pellets inside the balls. Reading that they had a limit on the number of wash cycles (albeit high one), I knew the pellets had to break down in some way. Digging a bit more, I found out the ingredients of the pellets are as follows:</p>
<table width="100%">
<tr>
<td>
<ul>
<li>higher alkyl sulfate</li>
<li>non-ionic surfacant</li>
<li>sodium metasilicate</li>
<li>calcium carbonate</li>
<li>sodium carbonate</li>
</ul>
</td>
<td><a href="http://www.flickr.com/photos/jeremyjohnstone/2483540553/"><img src="http://farm4.static.flickr.com/3221/2483540553_1e95fac7b9_o.jpg" height="157" width="235" /></a></td>
</tr>
</table>
<p>For something claiming to be chemical free, that ingredient list definitely seems to point otherwise. Looking at the ingredient list more, I started to recognize some of them as stuff I had heard of before, interestingly enough from cleaning products. Let&#8217;s go through each one, one by one.</p>
<p>First we have &#8220;higher alkyl sulfate&#8221;. This is listed as an &#8220;adjuvant&#8221; which basically means it&#8217;s an inactive ingredient which serves the purpose of assisting the dispersion of the active ingredients. It can be likened to an emulsifier and I&#8217;ve found several references to it being used in cleaning products online.</p>
<p>Next we have &#8220;non-ionic surfacant&#8221;. This one is a wetting agent which assists in lowering the surface tension of water. This allows the cleaning solutions to have better ability to break up stains and soils. Again, a common ingredient in cleaning products.</p>
<p>Then we have &#8220;sodium metasilicate&#8221;. This is one is used to assist the surfacant above by reducing the hardness of the water. Interestingly, this one is both poisonous and reacts fairly violently to acids. For something claiming to be so safe, this ingredient doesn&#8217;t support that claim. It could be a small ingredient, though, reducing the potential for issues. Still something you want to make sure small children don&#8217;t ingest in any event.</p>
<p>The second to last ingredient is &#8220;calcium carbonate&#8221;. This one just about anyone should recognize and thus doesn&#8217;t need much explanation. It&#8217;s a common ingredient in many cleaning products it seems, especially &#8220;green&#8221; ones, so it&#8217;s presence comes as no surprise.</p>
<p>The final ingredient is &#8220;sodium carbonate&#8221;. This is better known to many as &#8220;Washing Soda&#8221;. It&#8217;s a water softener sold in most grocery stores which prevents calcium and magnesium ions from bonding to the detergent. It&#8217;s effective at removing oil, grease, and alcohol stains. Again, it&#8217;s presence comes as no surprise.</p>
<p>So, basically what we have here is moderately large plastic balls which contain a very mild detergent. It&#8217;s thus no surprise that they do a little better than doing laundry with just plain water alone. The large size of the balls would work well at mashing the clothes, sorta akin to a washing board, and the combination of the mild detergent should prove to be effective. It might not brighten your whites as much as the store bought detergent, but otherwise should clean just as well based on what I can gather without actually using the product. Also, since it doesn&#8217;t contain the fragrances which most have gotten used to in laundry detergents, the clothes won&#8217;t have that &#8220;fresh clean&#8221; smell. At about $70 US + shipping, not sure I am going to try them, but I wanted to post this so others doing research on the topic could form a more educated opinion.<br />
 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-05-11-ecoballs-are-they-for-real.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>JetBlue&#8217;s Twitter reply to me shows up in a video interview w/ Twitter founders</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-04-19-jetblues-twitter-reply-to-me-shows-up-in-a-video-interview-w-twitter-founders.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-04-19-jetblues-twitter-reply-to-me-shows-up-in-a-video-interview-w-twitter-founders.html#comments</comments>
		<pubDate>Sat, 19 Apr 2008 22:06:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[betablue]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[jeremy johnstone]]></category>
		<category><![CDATA[jetblue]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Product Plugs]]></category>
		<category><![CDATA[project aero]]></category>
		<category><![CDATA[Tweets]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[Yahoo]]></category>
		<category><![CDATA[Yahoo! Messenger]]></category>
		<category><![CDATA[Yahoo! Messenger for the Sky]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=377</guid>
		<description><![CDATA[Like certain friends of mine, I love seeing my name online on the web, when used in a positive way of course, and love hearing my name mentioned in conversation when people think I am not listening. Because of this, it&#8217;s no surprise when a good friend of mine sent me the following IM this morning, [...]]]></description>
			<content:encoded><![CDATA[<p>Like <a href="http://terrychay.com/blog/article/i-just-like-hearing-my-name.shtml">certain friends of mine</a>, I love seeing my name online on the web, when used in a positive way of course, and love hearing my name mentioned in conversation when people think I am not listening. Because of this, it&#8217;s no surprise when a <a title="Jeff Standen's Website" href="http://www.jeffstanden.com/" target="_blank">good friend of mine</a> sent me the following IM this morning, it brought a bit of a smile to my face:</p>
<p><center><a title="iChat log with a friend earlier today by Jeremy Johnstone, on Flickr" href="http://www.flickr.com/photos/jeremyjohnstone/2425575353/"><img src="http://farm3.static.flickr.com/2161/2425575353_10bfeb5342_o.jpg" alt="iChat log with a friend earlier today" width="523" height="177" /></a></center> </p>
<p>Of course I quickly had to go and watch the video and lo and behold I find he&#8217;s right! The Twitter @reply that JetBlue sent me a while back is fairly prominently visible as shown in this video:</p>
<p> </p>
<p><center><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/v3yFKx3-AVc" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/v3yFKx3-AVc"></embed></object></center> </p>
<p>For reference, here is the twitter thread:</p>
<p><center><a title="Tweet #1 by Jeremy Johnstone, on Flickr" href="http://www.flickr.com/photos/jeremyjohnstone/2425620335/"><img src="http://farm3.static.flickr.com/2044/2425620335_02136ee3df.jpg" alt="Tweet #1" width="500" height="178" /></a> </p>
<p><a title="Tweet #2 by Jeremy Johnstone, on Flickr" href="http://www.flickr.com/photos/jeremyjohnstone/2426434064/"><img src="http://farm4.static.flickr.com/3051/2426434064_06214c9373.jpg" alt="Tweet #2" width="500" height="137" /></a></p>
<p><a title="Tweet #3 by Jeremy Johnstone, on Flickr" href="http://www.flickr.com/photos/jeremyjohnstone/2425620557/"><img src="http://farm3.static.flickr.com/2249/2425620557_f71c91131d.jpg" alt="Tweet #3" width="500" height="210" /></a></center></p>
<p> </p>
<p>Here&#8217;s a couple helpful links for more information in case you are curious:</p>
<p><a href="http://www.ymessengerblog.com/blog/2007/12/11/im-from-the-sky-on-jetblue/">So what is BetaBlue and what does Yahoo! have to do with it?</a></p>
<p><a href="http://www.flickr.com/photos/jeremyjohnstone/sets/72157603439427199/">Photos that the guy from JetBlue was talking about.</a></p>
<p><a href="http://webmessenger.yahoo.com/flightstatus/">Part of the project which is visible from the ground (since most is visible only from the plane) that I developed.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-04-19-jetblues-twitter-reply-to-me-shows-up-in-a-video-interview-w-twitter-founders.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apparently hubris comes cheap these days&#8230;</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-04-17-apparently-hubris-comes-cheap-these-days.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-04-17-apparently-hubris-comes-cheap-these-days.html#comments</comments>
		<pubDate>Thu, 17 Apr 2008 19:30:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=376</guid>
		<description><![CDATA[Recruiters these days never cease to amaze me. I am constantly hit by a barrage of &#8220;crap&#8221;, and I do mean &#8220;crap&#8221;, on a regular basis. Take an email I received today, not sure what&#8217;s supposed to entice me in this, but here&#8217;s the email as sent to me:
Since you&#8217;ve communicated with [company name] in [...]]]></description>
			<content:encoded><![CDATA[<p>Recruiters these days never cease to amaze me. I am constantly hit by a barrage of &#8220;crap&#8221;, and I do mean &#8220;crap&#8221;, on a regular basis. Take an email I received today, not sure what&#8217;s supposed to entice me in this, but here&#8217;s the email as sent to me:</p>
<blockquote><p>Since you&#8217;ve communicated with [company name] in the past, I wanted to touch base and get caught up with you on your potential career advancement.  We’ve been placing many of your Yahoo colleagues lately, and are currently working with many Yahoo employees on their passive job searches, both at the individual contributor level and Management/Director level.  Based on these dynamics and the information we have gathered, it looks like the timing is looking better and better to get out of Yahoo!  Even if Yahoo is trying to bribe you into staying with promotions, counteroffers, or severance packages, don’t be fooled.  The smartest people will leave now.  One example:  we had a candidate making 160k at Yahoo that would have gotten a 1 year  severance package if he stayed till after the Microsoft acquisition, but he still left and is happily placed at a much better company.</p>
<p><br/></p>
<p>Consider this:   Before the last round of layoffs, we were usually able to get Yahoo candidates significant pay raises and multiple offers.  After the latest round, Yahoo candidates’ value has gone down because there are more of them available in the market and Yahoo has continued to lose respect in the industry.  We foresee this trend continuing through the Microsoft Acquisition, when there will probably be another round of layoffs and voluntary departures of your colleagues..</p>
<p><br/></p>
<p>This all means that the sooner you move from Yahoo, the better off you’ll be..</p>
<p><br/></p>
<p>Please contact me as soon as possible so we can show you some better alternatives with much hotter companies/jobs.  When you email me, let me know what’s new since the last time we talked, and what type of opportunities you’d like us to get you.  The job market is very hot right now!</p>
</blockquote>
<p>Do people really respond to this kind of utter crap? Especially when I have _never_ &#8220;communicated&#8221; with [company name] in the past? Apparently someone completely ignored my LinkedIn profile&#8217;s message because it&#8217;s recruiters like this that caused me to hate recruiters in general.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-04-17-apparently-hubris-comes-cheap-these-days.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally updated my website!</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-04-13-finally-updated-my-website.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-04-13-finally-updated-my-website.html#comments</comments>
		<pubDate>Sun, 13 Apr 2008 11:29:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=375</guid>
		<description><![CDATA[It&#8217;s been a long time in the coming, but I have finally updated my website. I&#8217;ve still got a couple pieces to finish porting to the new design, namely the photo and code galleries, and a couple things I need to build still but for the most part it&#8217;s now live.
The main changes are:

New visual [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time in the coming, but I have finally updated my website. I&#8217;ve still got a couple pieces to finish porting to the new design, namely the photo and code galleries, and a couple things I need to build still but for the most part it&#8217;s now live.</p>
<p>The main changes are:</p>
<ol>
<li>New visual theme (pretty obvious to anyone who visited before)</li>
<li>Homepage now shows a little &#8220;About me&#8221; and my latest blog post / latest three tweets instead of just dumping you into the blog directly</li>
<li>Tweets are now clearly separated from blog posts. Blog posts remain on <a title="My Blog" href="http://www.jeremyjohnstone.com/blog">/blog</a> while Tweets have now moved to <a title="Twitter Blog" href="http://www.jeremyjohnstone.com/twitter">/twitter</a>. There are also separate RSS feeds for each now. If there is demand, I will make a combined feed, but as of now one doesn&#8217;t exist.</li>
<li>(coming very soon) I am now hosting a photo gallery on my site. This will more or less be a portfolio of my work. You can still go to <a title="My Flickr Photostream" href="http://www.flickr.com/photos/jeremyjohnstone">Flickr</a> as always to see the latest stuff, but the photos here will be more hand picked and showcase my better ones.</li>
<li>Bunch of backend management pieces + tons of automation</li>
<li>Moved the site from Dreamhost.com to Bluehost.com. While Bluehost&#8217;s cPanel installation is completely horrid, their performance is so much better than Dreamhost it&#8217;s not even funny. On average, pageload time is an order of magnitude faster, but there has been times it&#8217;s been two orders of magnitude faster. I&#8217;ve had an account on both for quite a while, so will see which works best long term and adjust accordingly.</li>
</ol>
<p>I&#8217;m pretty excited this is now live and hopefully more changes will be coming very soon. I have tested with all browsers that I care about personally (aka not IE6), but if you see an issue with your specific browser please let me know in a comment and I will be sure and take a look.</p>
<p>Enjoy!<br />
-Jeremy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-04-13-finally-updated-my-website.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adapting from one rare personality type to another</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-04-06-adapting-from-one-rare-personality-type-to-another.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-04-06-adapting-from-one-rare-personality-type-to-another.html#comments</comments>
		<pubDate>Sun, 06 Apr 2008 21:55:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[enfp]]></category>
		<category><![CDATA[entp]]></category>
		<category><![CDATA[infp]]></category>
		<category><![CDATA[intp]]></category>
		<category><![CDATA[personality]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=368</guid>
		<description><![CDATA[Reading an old blog post of a friend today, it reminded me that I hadn&#8217;t taken a personality profile in a long time. I&#8217;ve never been a fan of personality tests because they are so easily corruptible once you learn the differences between the questions. I&#8217;ve found the only way I can really be honest [...]]]></description>
			<content:encoded><![CDATA[<p>Reading an <a href="http://terrychay.com/blog/article/my-personality.shtml">old blog post</a> of a <a href="http://terrychay.com/">friend</a> today, it reminded me that I hadn&#8217;t taken a personality profile in a long time. I&#8217;ve never been a fan of personality tests because they are <span class="afterthought" title="I once challenged a psychologist to name a Myers-Briggs profile and that I would take her test and match that profile. Needless to say, she accepted the challenge and soundly lost.">so easily corruptible</span> once you learn the differences between the questions. I&#8217;ve found the only way I can really be honest on them anymore is to go through the test rapidly and try to avoid thinking about the question and just go with my first gut reaction. Prompted by Terry&#8217;s post, I decided to take a couple profiles today and see if there was any change, which somehow not surprisingly there was. </p>
<p>All my life I have been an <a href="http://www.personalitypage.com/INTP.html">INTP</a> with <a href="http://www.personalitypage.com/INFP.html">INFP</a> tendencies, both rare personality types (less than ~3% of the world). INTPs are the &#8220;Architects&#8221; and INFPs are the &#8220;Healers&#8221;. Below are a couple traits which I feel directly apply to me from both:</p>
<blockquote><p>Ruthless pragmatists about ideas, and insatiably curious, Architects are driven to find the most efficient means to their ends, and they will learn in any manner and degree they can. They will listen to amateurs if their ideas are useful, and will ignore the experts if theirs are not. Authority derived from office, credential, or celebrity does not impress them. Architects prize intelligence, and with their grand desire to grasp the structure of the universe, they can seem arrogant and may show impatience with others who have less ability, or who are less driven. Architects do not like to lead or control people. They&#8217;re very tolerant and flexible in most situations, unless one of their firmly held beliefs has been violated or challenged, in which case they may take a very rigid stance. The Architect is likely to be very shy when it comes to meeting new people. On the other hand, the Architect is very self-confident and gregarious around people they know well, or when discussing theories which they fully understand. The Architect has no understanding or value for decisions made on the basis of personal subjectivity or feelings. They strive constantly to achieve logical conclusions to problems, and don&#8217;t understand the importance or relevance of applying subjective emotional considerations to decisions. For this reason, Architects are usually not in-tune with how people are feeling, and are not naturally well-equiped to meet the emotional needs of others. The Architect may have a problem with self-aggrandizement and social rebellion, which will interfere with their creative potential. Since their Feeling side is their least developed trait, the Architect may have difficulty giving the warmth and support that is sometimes necessary in intimate relationships. If the Architect doesn&#8217;t realize the value of attending to other people&#8217;s feelings, he or she may become overly critical and sarcastic with others. If the Architect is not able to find a place for themself which supports the use of their strongest abilities, they may become generally negative and cynical. If the Architect has not developed their Sensing side sufficiently, they may become unaware of their environment, and exhibit weakness in performing maintenance-type tasks, such as <span class="afterthought" title="Look at my credit report and you will see this used to be a big problem for me.">bill-paying</span> and <span class="afterthought" title="Still working on this, but definitely a major problem for me in the past.">dressing appropriately</span>.</p></blockquote>
<blockquote><p>Healers are highly intuitive about people. They rely heavily on their intuitions to guide them, and use their discoveries to constantly search for value in life. They are on a continuous mission to find the truth and meaning underlying things. Every encounter and every piece of knowledge gained gets sifted through the Healer&#8217;s value system, and is evaluated to see if it has any potential to help the Healer define or refine their own path in life. The goal at the end of the path is always the same &#8211; the Healer is driven to help people and make the world a better place. Healers have a profound sense of idealism that comes from a strong personal sense of right and wrong. They conceive of the world as an ethical, honorable place, full of wondrous possibilities and potential goods. In fact, to understand Healers, we must understand that their deep commitment to the positive and the good is almost boundless and selfless, inspiring them to make extraordinary sacrifices for someone or something they believe in. Frequently they hear a call to go forth into the world and help others, a call they seem ready to answer, even if they must sacrifice their own comfort. Also, Healers might well feel a sense of separation because of their often misunderstood childhood. Healers live a fantasy-filled childhood-they are the prince or princess of fairy tales-an attitude which, sadly, is frowned upon, or even punished. Generally thoughtful and considerate, Healers are good listeners and put people at ease. Although they may be reserved in expressing emotion, they have a very deep well of caring and are genuinely interested in understanding people. This sincerity is sensed by others, making the Healer a valued friend and confidante. A Healer can be quite warm with people he or she knows well. Healers have very high standards and are perfectionists. Consequently, they are usually hard on themselves, and don&#8217;t give themselves enough credit. Healers may have problems working on a project in a group, because their standards are likely to be higher than other members&#8217; of the group. In group situations, they may have a &#8220;control&#8221; problem. The Healer needs to work on balancing their high ideals with the requirements of every day living. Without resolving this conflict, they will never be happy with themselves, and they may become confused and paralyzed about what to do with their lives.</p></blockquote>
<p>It seems my efforts to become more outgoing in general over the past 5 years or so have also bled into my personality, as according to all the tests today I am now more of an <a href="http://www.personalitypage.com/ENTP.html">ENTP</a> with <a href="http://www.personalitypage.com/ENFP.html">ENFP</a> tendencies, which coincidentally are just as rare of personality types. ENTPs are the &#8220;Inventors&#8221; and ENFPs are the &#8220;Champions&#8221;. Below are a couple traits which I feel directly apply to me from both:</p>
<blockquote><p>With Extraverted Intuition dominating their personality, the Inventor&#8217;s primary interest in life is understanding the world that they live in. They are constantly absorbing ideas and images about the situations they are presented in their lives. Using their intuition to process this information, they are usually extremely quick and accurate in their ability to size up a situation. This ability to intuitively understand people and situations puts the Inventor at a distinct advantage in their lives. They generally understand things quickly and with great depth. Accordingly, they are quite flexible and adapt well to a wide range of tasks. They are good at most anything that interests them. As they grow and further develop their intuitive abilities and insights, they become very aware of possibilities, and this makes them quite resourceful when solving problems. Inventors are idea people. They get excited and enthusiastic about their ideas, and are able to spread their enthusiasm to others. Inventors are less interested in developing plans of actions or making decisions than they are in generating possibilities and ideas. Following through on the implementation of an idea is usually a chore to the Inventor. For some Inventors, this results in the habit of never finishing what they start. Inventors are keenly pragmatic, and often become expert at devising the most effective means to accomplish their ends. They are the most reluctant of all the types to do things in a particular manner just because that&#8217;s the way they have been done. As a result, they often bring fresh, new approaches to their work and play. They are intensely curious and continuously probe for possibilities, especially when trying to solve complex problems. Inventors can be engaging conversationalists, able to express their own complicated ideas and to follow the ideas of others. When arguing issues, however, they may deliberately employ debate skills to the serious disadvantage of their opponents. Inventors are usually non-conformists in the workplace, and can succeed in many areas as long as the job does not involve too much humdrum routine. They make good leaders on pilot projects that test their ingenuity. And they are skilled at engineering human relationships and human systems, quickly grasping the politics of institutions and always wanting to understand the people within the system rather than tell them what to do. No matter what their occupation, however, Inventors display an extraordinary talent for rising to the demands of even the most impossible situations. &#8220;It can&#8217;t be done&#8221; is a challenge to an Inventor and elicits a reaction of &#8220;I can do it.&#8221;</p></blockquote>
<blockquote><p>Champions have an unusually broad range of skills and talents. They are good at most things which interest them. Project-oriented, they may go through several different careers during their lifetime. To onlookers, the Champions may seem directionless and without purpose, but Champions are actually quite consistent, in that they have a strong sense of values which they live with throughout their lives. Everything that they do must be in line with their values. Because Champions live in the world of exciting possibilities, the details of everyday life are seen as trivial drudgery. They place no importance on detailed, maintenance-type tasks, and will frequently remain oblivous to these types of concerns. When they do have to perform these tasks, they do not enjoy themselves. The most outgoing of the Idealists, Champions often can&#8217;t wait to tell others of their extraordinary experiences. Champions can be tireless in talking with others, like fountains that bubble and splash, spilling over their own words to get it all out. And usually this is not simple storytelling; Champions often speak (or write) in the hope of revealing some truth about human experience, or of motivating others with their powerful convictions. Their strong drive to speak out on issues and events, along with their boundless enthusiasm and natural talent with language, makes them the most vivacious and inspiring of all the types. Fiercely individualistic, Champions strive toward a kind of <span class="afterthought" title="which might be why I unwrapped my car">personal authenticity</span>, and this intention always to be themselves is usually quite attractive to others. At the same time, Champions have outstanding intuitive powers and can tell what is going on inside of others, reading hidden emotions and giving special significance to words or actions. In fact, Champions are constantly scanning the social environment, and no intriguing character or silent motive is likely to escape their attention. Far more than the other Idealists, Champions are keen and probing observers of the people around them, and are capable of intense concentration on another individual. Their attention is rarely passive or casual. On the contrary, Champions tend to be extra sensitive and alert, always ready for emergencies, always on the lookout for what&#8217;s possible.</p></blockquote>
<p> </p>
<p><a href="http://www.flickr.com/photos/jeremyjohnstone/2393265697/"><img src="http://farm3.static.flickr.com/2059/2393265697_626c2750ca_o.jpg" alt="" /></a> </p>
<p>If you look at the breakdown based on one personality profile I took, you can see I still very much am IN*P as well, just with EN*P getting the competitive edge now. I don&#8217;t remember the exact breakdown in the past, but I seem to think EN*P was about where IN*P was in the past, so probably just a role reversal of sorts. Very interesting to say the least.</p>
<p>So I guess I could now be called an Inventing Champion instead of an Architecting Healer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-04-06-adapting-from-one-rare-personality-type-to-another.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo! Web Messenger Meets Fluid.app</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-04-04-yahoo-web-messenger-meets-fluidapp.html</link>
		<comments>http://www.jeremyjohnstone.com/blog/2008-04-04-yahoo-web-messenger-meets-fluidapp.html#comments</comments>
		<pubDate>Sat, 05 Apr 2008 03:14:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Fluid]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Messenger]]></category>

		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=365</guid>
		<description><![CDATA[This evening I decided to play with a really kewl new app called Fluid. What this app does is allow you to create Site Specific Browsers. One of the first usages which popped into mind was a product I helped develop, Yahoo! Web Messenger. An annoyance of mine with it is that it had to [...]]]></description>
			<content:encoded><![CDATA[<p>This evening I decided to play with a really kewl new app called <a href="http://fluidapp.com">Fluid</a>. What this app does is allow you to create <span class="afterthought" title="fancy name for a wrapper around a web based app to allow you to use it "outside" the browser, sorta kinda">Site Specific Browsers</span>. One of the first usages which popped into mind was a product I helped develop, <a href="http://web.im">Yahoo! Web Messenger</a>. An annoyance of mine with it is that it had to live in a browser tab, something prone to getting closed accidentally, and also didn&#8217;t have any <span class="afterthought" title="scrolling title bar in the browser doesn't count to me">decent notifications of new messages when not in focus</span>. Being the perfect candidate for Fluid, IMHO, I set out to give it a shot. In less than an hours time I built a pretty kewl demo and here&#8217;s how you can use it too. </p>
<ol>
<li>First things first, you need to download and install Fluid. You can do this by visiting <a href="http://fluidapp.com">http://fluidapp.com</a>. <span class="afterthought" title="if I have to explain how to do this, stop now, you are hopeless">After installing it</span>, fire up the app.</li>
<li>Second off, we now need to create our SSB instance. For the URL, enter in
<pre class="brush: plain; light: true">http://webmessenger.yahoo.com</pre>
<p> For the name use something like <em>Yahoo! Web.IM</em> or whatever else strikes your fancy. The icon you can download from <a href="http://www.jeremyjohnstone.com/images/cesario.png">here</a>. Click create and you are all set.</li>
<li>Next we can fire up the application. It should live inside your applications folder just like any other desktop app. You use <a href="http://www.blacktree.com/">Quicksilver</a> right?</li>
<li>Now that the app is running, you can see the normal login screen of Web.IM and if you like, sign in just as a test.</li>
<li>Next comes the real powerful part. We need to create a new &#8220;userscript&#8221; which will add advanced functionality over what a normal browser experience provides. We do this by clicking on the <b>Userscripts</b> menu and then selecting &#8220;New Userscripts&#8230;&#8221;, or you can use Cmd-Option-N if you are a keyboard shortcut lover like me. Type in a meaningful name, I used WebIM, and then a new script editor opens. Paste the following code into the window <b>replacing</b> what was there already and then save and close the script editor.
<pre class="brush: jscript">
// ==UserScript==
// @name        WebIM
// @namespace   http://www.jeremyjohnstone.com
// @description Enables advanced notifications and disables ads
// @include     *
// @author      Jeremy Johnstone
// ==/UserScript==

(function () {
    if (window.fluid) {
			// unread is a bit of misnomer, because we clear this
			// as soon as the window regains focus, not when you
			// actually read the IM (TODO: telepathy enabled?)
			var unreadIMCount = 0;

			// store the state of the user being active
			var activeState = true;

			// I don't want ads in my IM client
			window.showAd = function(locale) { }

			// When the window regains focus, clear the unread IM count
			// Also save the state for other functions
			window.onfocus = function() {
				activeState = true;
				unreadIMCount = 0;
				window.fluid.dockBadge = "";
			}
			window.onblur = function() {
				activeState = false;
			}

			// disabling this turns off the normal new IM
			// notification (aka the scrolling title message)
			window.startNotify = function(msg) { }

			// Here we latch into the advancedNotify which
			// splits out the yid from the msg separately
			window.advancedNotify = function(yid, msg) {
				// We don't want to show growl alerts if the
				// user is active already
				if(activeState) return;

				msg = unescape(msg);
				window.fluid.showGrowlNotification({
					title: "New Message from: " + yid,
					description: msg,
					priority: 1,
					sticky: false,
					identifier: null,
					onclick: null
				});

				// Now we increment the unread IM count and then
				// set the dockBadge to be the number of unseen IMs
				unreadIMCount++;
				window.fluid.dockBadge = unreadIMCount;
			}

			// Instead of blowing away the cookies going to login,
			// Let's just close the app instead
			window.exit = function(url) {
				// seems neither of these work... hmmm..
				// fluid bug???
				window.fluid.terminate();
				window.fluid.hide();
			}
    }
})();
</pre>
</li>
<li>Finally, not sure this is needed, but I found it easiest to quit the app and restart it as that way you know for sure your script got loaded right. Probably not needed, but always safer. Also check the Userscripts menu and you should see a menu option for your new script. Make sure there is a check mark next to it. If so, go ahead and sign in as usual.</li>
</ol>
<p>That&#8217;s it! You now have a new Web Messenger client inside it&#8217;s own browser tab with the following new features:</p>
<ul>
<li>Growl Notifications for IMs received when the app isn&#8217;t in focus</li>
<li>Dock Badge updates with the count of unread IMs received</li>
<li>No advertising banners shown</li>
</ul>
<p>My hope is that I can get the <a href="http://twitter.com/iTod">author of Fluid</a> to add a couple more improvements which will make it even better as well as hopefully fix what I think is a bug with hide() and terminate() not working. With dock icon bouncing and a separate cookie jar for each application this will be immensely useful, IMHO.</p>
<p>Here&#8217;s a little video tutorial taking you through the steps above.</p>
<p><object width="640" height="400"><param name="movie" value="http://www.youtube.com/v/dERIgeG7q6Q&#038;hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/dERIgeG7q6Q&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="640" height="400"></embed></object></p>
<p>Enjoy!</p>
<p>-Jeremy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremyjohnstone.com/blog/2008-04-04-yahoo-web-messenger-meets-fluidapp.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
