<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Tower Of Power</title>
	
	<link>http://www.toosweettobesour.com</link>
	<description>Far Too Sweet To Be Sour</description>
	<lastBuildDate>Wed, 01 Jul 2009 19:14:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<geo:lat>30.571905</geo:lat><geo:long>-96.298825</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/toosweettobesour/HrtK" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Good News Everyone!</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/xPNEChmCj1s/</link>
		<comments>http://www.toosweettobesour.com/2009/07/01/good-news-everyone/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 19:14:54 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=434</guid>
		<description><![CDATA[Naturally it&#8217;s been over a month since I&#8217;ve updated and rather than posting something techincal I feel I should be a little selfish and announce that:
I&#8217;M GOING TO BE SPEAKING AT ZENDCON 09!
I will be giving my talk on automated deployment techniques with Phing.
To say that I&#8217;m excited is quite an understatement. Nervous now probably [...]]]></description>
			<content:encoded><![CDATA[<p>Naturally it&#8217;s been over a month since I&#8217;ve updated and rather than posting something techincal I feel I should be a little selfish and announce that:</p>
<h3>I&#8217;M GOING TO BE SPEAKING AT <a href="http://zendcon.com/">ZENDCON 09</a>!</h3>
<p>I will be giving my talk on automated deployment techniques with Phing.</p>
<p>To say that I&#8217;m excited is quite an understatement. Nervous now probably tops excitement as now I have to make sure I give a damned good talk and not make <a href="http://eliw.com/">Eli White</a> look like a fool for having picked me for a slot.</p>
<p>Time to go bury my nose in Power Point and research!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/07/01/good-news-everyone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/07/01/good-news-everyone/</feedburner:origLink></item>
		<item>
		<title>Logitech MX Revolution revoco in Ubuntu 9.04 Jaunty: Click-to-Click even after a resume/wakeup</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/YGG59bEre3E/</link>
		<comments>http://www.toosweettobesour.com/2009/05/13/logitech-mx-revolution-revoco-in-ubuntu-904-jaunty-click-to-click-even-after-a-resumewakeup/#comments</comments>
		<pubDate>Thu, 14 May 2009 02:56:26 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=428</guid>
		<description><![CDATA[It&#8217;s been a LOONG time since I&#8217;ve posted eh?
Well I finally solved my issues I&#8217;ve been having with revoco in the later version of Ubuntu. For those of you who don&#8217;t know, when you buy a Logitech MX Revolution mouse (or its ilk), the middle button can alternatively work in &#8220;click-to-click&#8221; mode (where you feel [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a LOONG time since I&#8217;ve posted eh?</p>
<p>Well I finally solved my issues I&#8217;ve been having with revoco in the later version of Ubuntu. For those of you who don&#8217;t know, when you buy a Logitech MX Revolution mouse (or its ilk), the middle button can alternatively work in &#8220;click-to-click&#8221; mode (where you feel &#8220;clicking&#8221; when you spin the wheel) or &#8220;free spin&#8221; mode where the wheel spins free of resistance. By default the mouse maps the middle click to alternate in between these modes (by default I mean every time it loses connection with the PC, e.g. in the event of a shut down). This has the unfortunate habit of also laying the smack down on a normal middle button event (like middle clicking a link in Firefox to open it up in a new tab) sent to the PC (plus I hate free spin).</p>
<p>For a while btnx solved my problems as it had the ability to send revoco signals to supported mice, but recent changes in Xorg have rendered this useless.</p>
<p>However an enterprising individual named Edgar Toernig wrote a command line utility called revoco that lets you set the modes.</p>
<p>So to get the mouse to always work in click-to-click mode (as you would expect it) you would first need to get a copy of revoco from <a href="http://goron.de/~froese/revoco/">here</a>. Alternatively, if the site goes down you can <a href='http://www.toosweettobesour.com/wp-content/uploads/2009/05/revoco-05tar.gz'>download revoco version 0.5</a> from me.</p>
<p>Next you&#8217;ll need to compile it (just run make in the extracted directory).</p>
<p>Once it&#8217;s all compiled, I like to use sudo to move the file to <code>/usr/local/bin/</code>.</p>
<p>Next I create an init.d script to set the mouse to click-to-click on boot. Save the following to the text file <code>/etc/init.d/revoco</code>:</p>
<pre class="code" lang="sh">
#!/bin/bash
/usr/local/bin/revoco click
</pre>
<p>Finally run a <code>chmod +x /etc/init.d/revoco</code> to allow the code to execute.</p>
<p>All this is well and good but you&#8217;ll notice that on a resume from hibernate/sleep, your mouse will be back to its old shenanigans. To fix this we want to create a script in <code>/etc/pm/sleep.d/</code>. So in this folder lets edit a text file <code>10revoco</code>:</p>
<pre class="code" lang="sh">
#!/bin/bash
case "$1" in
        hibernate|suspend)
                /usr/local/bin/revoco click
                ;;
        thaw|resume)
                /usr/local/bin/revoco click
                ;;
        *) exit $NA
                ;;
esac
</pre>
<p>Again lets run a <code>chmod +x /etc/pm/sleep.d/10revoco</code> to allow us to execute</p>
<p>Now if you give it a try, you&#8217;ll notice that even on wakeup/resume from hibernation/suspend your mouse will stay in click to click mode!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/05/13/logitech-mx-revolution-revoco-in-ubuntu-904-jaunty-click-to-click-even-after-a-resumewakeup/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/05/13/logitech-mx-revolution-revoco-in-ubuntu-904-jaunty-click-to-click-even-after-a-resumewakeup/</feedburner:origLink></item>
		<item>
		<title>tamulink-wpa and Ubuntu (For my aggie linux readers)</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/nsNWOmQjez0/</link>
		<comments>http://www.toosweettobesour.com/2009/03/24/tamulink-wpa-and-ubuntu-for-my-aggie-linux-readers/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 17:29:47 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=420</guid>
		<description><![CDATA[Finally, I no longer have the pain of not being able to connect to the wireless network on campus (without having wicd installed).
I got it working using the network-manager applet in Gnome that comes installed by default (cause I like it and it makes my life easier). I&#8217;ve had people poke fun at me because [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, I no longer have the pain of not being able to connect to the wireless network on campus (without having wicd installed).</p>
<p>I got it working using the network-manager applet in Gnome that comes installed by default (cause I like it and it makes my life easier). I&#8217;ve had people poke fun at me because I don&#8217;t feel like traversing the console and running wpa_supplicant manually, I have better things to do, like expecting things to work with the least hassle. But that&#8217;s a rant for another time.</p>
<p>Sadly <a href="http://cis.tamu.edu/">CIS</a> or whoever is responsible for the wireless networks has decided that Ubuntu, Fedora, or any other flavor of Linux won&#8217;t be supported. Thanks to one enterprising <a href="http://calclab.math.tamu.edu/~rahe/2008c_470_502/wpa.html">Maurice Rahe</a>, I had enough information to get started. Since I was working with Ubuntu 9.10 (Jaunty Jackelope) Alpha 6, I needed to update the instructions a bit and turns out we didn&#8217;t need to do the manual wpa_supplicant.conf at all. Simply attempt to connect to tamulink-wpa and when it asks for the connection details:</p>
<dl>
<dt><strong>Security</strong></dt>
<dd>WPA &#038; WPA 2 Enterprise</dd>
<dt><strong>Authentication</strong></dt>
<dd>Protected EAP (PEAP)</dd>
<dt><strong>Anonymous Identity</strong></dt>
<dd><em>Leave Blank</em></dd>
<dt><strong>CA Certificate</strong></dt>
<dd>/usr/share/ca-certificates/mozilla/ValiCert_Class_2_VA.crt</dd>
<dt><strong>PEAP Version</strong></dt>
<dd>Version 0</dd>
<dt><strong>Inner Authentication</strong></dt>
<dd>MSCHAPv2</dd>
<dt><strong>User Name</strong></dt>
<dd><em>NETID</em></dd>
<dt><strong>Password</strong></dt>
<dd><em>NETID Password</em></dd>
</dl>
<p>VOILA, it works! Reconnections kinda suck, but what&#8217;ll you do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/03/24/tamulink-wpa-and-ubuntu-for-my-aggie-linux-readers/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/03/24/tamulink-wpa-and-ubuntu-for-my-aggie-linux-readers/</feedburner:origLink></item>
		<item>
		<title>Calculating Daylight Savings Time Boundary In PHP</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/iY5DOEJ2c1w/</link>
		<comments>http://www.toosweettobesour.com/2009/03/10/calculating-daylight-savings-time-boundary-in-php/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 14:30:23 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Daylight Savings Time]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[strtotime]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=397</guid>
		<description><![CDATA[I had an issue recently where I needed to calculate the Unix timestamp for the daylight savings time boundaries. According to the United States Naval Observatory, daylight savings time begins the Second Sunday of March and ends on the First Sunday of November.
Awkward date calculations if you don&#8217;t have the magical strtotime() function in PHP. [...]]]></description>
			<content:encoded><![CDATA[<p>I had an issue recently where I needed to calculate the Unix timestamp for the daylight savings time boundaries. According to the <a href="http://aa.usno.navy.mil/faq/docs/daylight_time.php">United States Naval Observatory</a>, daylight savings time begins the <strong>Second Sunday of March</strong> and ends on the <strong>First Sunday of November</strong>.</p>
<p>Awkward date calculations if you don&#8217;t have the magical <a href="http://php.net/strtotime"><code>strtotime()</code></a> function in PHP. <code>strtotime()</code> is able to do relativistic time conversions from the common &#8220;+1 hours&#8221; to the more complex (and more relevant) &#8220;Second Sunday March 0&#8243;.</p>
<p>Why do we do the &#8216;March 0&#8242; in the above string to calculate the start boundary? Doing some tests with <code>strtotime()</code> reveals some behavior you should be aware of.</p>
<p><code>strtotime("March");</code> doesn&#8217;t actually give you the first of March, it gives you the current day in the month specified (<code>date('D, F j, Y, g:i a', strtotime("March"));</code> returns <code>Tue, March 10, 2009, 12:00 am</code> at the time of this post). Doing a similar test but substituting April for March results in the 10th of April (at 12 am).</p>
<p>Now in most cases doing a <code>strtotime("March 1")</code> will suffice (<code>date('D, F j, Y, g:i a', strtotime("March 1"));</code> results in <code>Sun, March 1, 2009, 12:00 am</code>). However, as you can tell, this month is going to be awkward because the first day of the month is a Sunday. <code>strtotime()</code>, when calculating the fuzzy &#8220;Second Sunday,&#8221; doesn&#8217;t include the current day. So calculating <code>date('D, F j, Y, g:i a', strtotime("Second Sunday March 1"));</code> will actually return the 3rd Sunday (<code>Sun, March 15, 2009, 12:00 am</code>).</p>
<p>So our solution is actually to take a step back and return the <strong>PREVIOUS</strong> day to the first day of March and then calculate the Second Sunday from there (since we know that starting from the next day will account for the first). Normally, dealing with the last day in February is a headache, BUT again thanks to PHP magic we don&#8217;t have to figure out if it&#8217;s February 28th or 29th, we merely do a &#8220;March 0&#8243; which steps us back a month (<code>date('D, F j, Y, g:i a', strtotime("March 0"));</code> returns <code>Sat, February 28, 2009, 12:00 am</code>). From there we can calculate the Second Sunday with ease and eventually determine that the second sunday is March 8th, which is confirmed by the above USNO website.</p>
<p>Applying these lessons to calculating the first Sunday in November we come up with the following snippit:</p>
<pre name="code" class="php">&lt;?php
$remove_hour = strtotime("Second Sunday March 0");
$add_hour = strtotime("First Sunday November 0");

$time  = time();

if( $time &gt;= $remove_hour &#038;&#038; $time &lt; $add_hour )
{
    var_dump("Lost an hour");
}
else
{
    var_dump("Gained an hour");
}</pre>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/03/10/calculating-daylight-savings-time-boundary-in-php/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/03/10/calculating-daylight-savings-time-boundary-in-php/</feedburner:origLink></item>
		<item>
		<title>PHP File Uploads And Background Conversion: Oopsie</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/ZH0AW9FO5PE/</link>
		<comments>http://www.toosweettobesour.com/2009/02/26/php-file-uploads-and-background-conversion-oopsie/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 21:53:19 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[File Upload]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=393</guid>
		<description><![CDATA[So I spent an inordinate amount of time tracking down a bug recently for a former employer in a system that accepts media file uploads and converts them on the fly.
The system spawns off a small script that manages mplayer/ffmpeg/lame into the background and holds on to the PID to track the conversion process. HOWEVER, [...]]]></description>
			<content:encoded><![CDATA[<p>So I spent an inordinate amount of time tracking down a bug recently for a former employer in a system that accepts media file uploads and converts them on the fly.</p>
<p>The system spawns off a small script that manages mplayer/ffmpeg/lame into the background and holds on to the PID to track the conversion process. HOWEVER, there was a problem in the system where large files were being ignored and no error messages were popping up.</p>
<p>What ended up happening was I forgot to take into account PHP&#8217;s file upload behavior in the conversion process.</p>
<p>When PHP accepts a file upload it creates a temporary file (usually in <code>/tmp/</code>). The caveat is PHP frees (read: deletes) the temporary uploaded file at the end of script execution.</p>
<p>So, while the converters could convert a small file in the same encoding as the desired output, a large file (say, a 10mb MPEG) that needed to be converted to a different format (say, a FLV), the converter would begin working in the background but when the PHP script finished executing, PHP would delete the file right out from under the converter&#8217;s feet.</p>
<p>So, a tip to anyone doing anything similar, go ahead and at least rename/move the file (I created a unique MD5 hash from the current time plus a few other things and use that as the new file name) and pass that to any background processing functions so PHP won&#8217;t delete the file at the end of processing.</p>
<p>It will save a WHOLE lot of headaches for you in the future.</p>
<p>Also, if anyone is interested, I will probably write up a tutorial on how to write a PHP script that will convert your MP3&#8217;s in the background.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/02/26/php-file-uploads-and-background-conversion-oopsie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/02/26/php-file-uploads-and-background-conversion-oopsie/</feedburner:origLink></item>
		<item>
		<title>PHP, Mumbles (Growl), and DBus: Sweeet</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/YPV3lftuI3g/</link>
		<comments>http://www.toosweettobesour.com/2009/02/13/php-mumbles-growl-and-dbus-sweeet/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 07:58:30 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[DBus]]></category>
		<category><![CDATA[Growl]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mumbles]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=372</guid>
		<description><![CDATA[So, after reading Mark Shuttlework&#8217;s blog on ideas for notifications in Ubuntu (basically mimicking Growl notifications for the Mac), I decided I wanted that kind of functionality, but&#8230; you know, NOW!
There are a multitude of options available but currently I&#8217;m liking Mumbles. Unlike, say, Specto, which does the monitoring itself, Mumbles provides a DBus interface, [...]]]></description>
			<content:encoded><![CDATA[<p>So, after reading <a href="http://www.markshuttleworth.com/archives/253">Mark Shuttlework&#8217;s blog on ideas for notifications in Ubuntu</a> (basically mimicking <a href="http://growl.info/">Growl</a> notifications for the Mac), I decided I wanted that kind of functionality, but&#8230; you know, NOW!</p>
<p>There are a multitude of options available but currently I&#8217;m liking <a href="http://www.mumbles-project.org/">Mumbles</a>. <del datetime="2009-02-17T07:13:24+00:00">Unlike, say, <a href="http://specto.sourceforge.net/">Specto</a>, which does the monitoring itself, Mumbles provides a DBus interface, a command-line app named <code>mumbles-send</code>, and (I&#8217;m not sure if it&#8217;s implemented in the current stable download) libnotify support.</del> Woutc, from the Specto project, commented below explaining that Specto is not intended to be a Mumbles competitor, but a package to easily monitor system internals (I quote <em>&#8220;&#8230;the purposes from mumbles and specto are different…specto is monitoring what happens outside your desktop, mumbles monitors what happens on your desktop (or in your network)&#8230;&#8221;</em>) Apparently he has plans to build a Mumbles plugin so that one can optionally have Specto send its messages to Mumbles for display.</p>
<p>I decided the <del>best</del> easiest route is to access the internal DBus API, however the forums and other resources on the Mumbles site&#8230; well&#8230; just plain suck. And by suck I mean tell you that something exists and&#8230; thaaats about it.</p>
<div id="attachment_375" class="wp-caption alignright" style="width: 310px"><a href="http://www.toosweettobesour.com/wp-content/uploads/2009/02/d-feet.png" rel="lightbox[372]"><img src="http://www.toosweettobesour.com/wp-content/uploads/2009/02/d-feet-300x242.png" alt="D-Feet browsing Mumble&#039;s Growl interface" title="D-Feet Growl Interface Screenshot" width="300" height="242" class="size-medium wp-image-375" /></a><p class="wp-caption-text">D-Feet browsing Mumble's Growl interface</p></div>
<p>Well in my Google quest I discovered the existence of <a href="https://fedorahosted.org/d-feet/">D-Feet</a>, a DBus debugging tool (on <a href="http://arstechnica.com/open-source/news/2008/01/learning-from-d-feet-a-quick-look-at-a-new-d-bus-debugger.ars">Ars</a> of all places). Thanks to a quick <code>sudo apt-get install d-feet</code> I found the existence of a public interface in <code>info.growl.Growl</code> that allows for a <code>Notify(title, message)</code> signal to be passed.</p>
<p>Well, with a place to access all I needed was DBus integration with PHP (because I want to start sending debug notification via Growl/Mumbles like <a href="http://framework.zend.com/wiki/pages/viewpage.action?pageId=8454257">this idea</a> on the Zend Framework incubator).</p>
<p>Luckily, GREE Labs provides a <a href="http://labs.gree.jp/Top/OpenSource/DBus-en.html">DBus C extension for PHP</a> that was easily downloaded and installed. Once installed I read <a href="http://labs.gree.jp/Top/OpenSource/DBus/Document-en.html">the documentation</a> to get an idea on how to use the API (which is a 1:1 mapping to the <a href="http://dbus.freedesktop.org/doc/api/html/">DBus API</a>).</p>
<p>After a bit of hacking I finally came up with an alpha product:</p>
<pre name="code" class="php">&lt;?php
function null_callback()
{
        var_dump(func_get_args());
}

$dbus = dbus_bus_get(DBUS_BUS_SESSION);

$m = new DBusMessage(DBUS_MESSAGE_TYPE_SIGNAL);

$m->setPath('/info/growl/Growl');
$m->setInterface('info.growl.Growl');
$m->setMember('Notify');
$m->appendArgs('Hello World!');
$m->appendArgs('Lorem Ipsum Dolor Sit Amet. (' . time() . ')');

$r= $dbus->send($m);
</pre>
<p>After running the script in the console, did I see success?</p>
<div id="attachment_378" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.toosweettobesour.com/wp-content/uploads/2009/02/mumbles-php.png" rel="lightbox[372]"><img src="http://www.toosweettobesour.com/wp-content/uploads/2009/02/mumbles-php-300x67.png" alt="Mumbles and PHP Test: Success!" title="Mumbles and PHP Test: Success!" width="300" height="67" class="size-medium wp-image-378" /></a><p class="wp-caption-text">Mumbles and PHP Test: Success!</p></div>
<p>Damn right I did!</p>
<p><del datetime="2009-02-17T07:17:02+00:00">Though with a caveat:</p>
<blockquote><p><code>Warning: dbusconnection::sendwithreplyandblock(): dbus_connection_send_with_reply_and_block() failed (Traceback (most recent call last):<br />
  File "/var/lib/python-support/python2.5/dbus/service.py", line 643, in _message_cb<br />
    (candidate_method, parent_method) = _method_lookup(self, method_name, interface_name)<br />
  File "/var/lib/python-support/python2.5/dbus/service.py", line 244, in _method_lookup<br />
    raise UnknownMethodException('%s is not a valid method of interface %s' % (method_name, dbus_interface))<br />
UnknownMethodException: org.freedesktop.DBus.Error.UnknownMethod: Unknown method: Notify is not a valid method of interface info.growl.Growl<br />
) in /home/daniel/test.php on line 21</code></p>
<p><code>Call Stack:<br />
    0.0002      64496   1. {main}() /home/daniel/test.php:0<br />
    0.0024      66372   2. dbusconnection->sendwithreplyandblock() /home/daniel/test.php:21<br />
</code></p></blockquote>
<p>Apparently Mumbles seems to be throwing an Exception that it&#8217;s failing to to find the Notify signal (though everything works correctly). I guess I could ignore this, use the error suppressor (<code>@</code>), or even yell at GREE Labs to have the objects throw exceptions so I can catch them&#8230; I guess I&#8217;ll hack on it some more and report back. I should probably spend more time learning the DBus specs since this is my first project playing with DBus&#8230;</del></p>
<p><strong>Update:</strong> Though it&#8217;s not listed on the API page for PHP DBus&#8217;s API, there is a method <code>send()</code> that takes only a single argument (the message object).</p>
<p><strong>Edit:</strong></p>
<p>I saw a question on Reddit asking what is the use of this technique if it&#8217;s limited to the desktop it was called on and PHP is primarily a server side language. Why not do this in Python or Perl?</p>
<p>Well, Mumbles was written in Python so there&#8217;s no point in me doing this in Python: it&#8217;s already been done.</p>
<p>However, the primary use case of a technique like this is having a web app post notifications and errors for the developer. When I work on a site I have a local copy running on my desktop and/or laptop, so when it posts Growl/Mumbles notifications, I get them on my desktop. It&#8217;s great for situations where, say, I have a page in my PHP app that never displays its contents because it processes data then redirects to another page. If a warning or other non-fatal error that I should really fix occurs, then I would normally have to dig through the system wide PHP error log (if you even have error logging enabled). However, if I wrote a custom error handler that posts errors to Growl/Mumbles as they happen, when I visit a transitory page like I described I get little Growl/Mumbles notifications showing that I screwed up!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/02/13/php-mumbles-growl-and-dbus-sweeet/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/02/13/php-mumbles-growl-and-dbus-sweeet/</feedburner:origLink></item>
		<item>
		<title>On Looking For A Job And Online Reputation</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/pvCVjRdFmVw/</link>
		<comments>http://www.toosweettobesour.com/2009/02/05/on-looking-for-a-job-and-online-reputation/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 17:08:55 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Jobs]]></category>
		<category><![CDATA[Reputation]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=359</guid>
		<description><![CDATA[As many of you know I am finishing up my last semester at school and at the same time on the lookout for jobs (For those interested, you can look at my résumé).
As a part of the last few classes I have to finish, I am taking a CPSC Seminar course which so far has [...]]]></description>
			<content:encoded><![CDATA[<p>As many of you know I am finishing up my last semester at school and at the same time on the lookout for jobs (For those interested, you can look at my <a href="http://www.toosweettobesour.com/resume/">résumé</a>).</p>
<p>As a part of the last few classes I have to finish, I am taking a CPSC Seminar course which so far has consisted of talks from the <a href="http://careercenter.tamu.edu/">Texas A&#038;M Career Center</a>. A lot of talk has been on managing your personal on line reputation. Besides the obvious &#8220;don&#8217;t post pictures of you on Facebook doing keg stands&#8221; or &#8220;don&#8217;t post embarrassing, topless photos of yourself&#8221;. </p>
<p><a href="http://www.toosweettobesour.com/wp-content/uploads/2009/02/me-emberassing.jpg" rel="lightbox"><img src="http://www.toosweettobesour.com/wp-content/uploads/2009/02/me-emberassing-300x225.jpg" alt="Me (without my shirt) at Fish Camp" title="Me (without my shirt) at Fish Camp" width="300" height="225" class="alignright size-medium wp-image-360" /></a></p>
<p>A lot of these tips are based on the idea that you don&#8217;t want potential employers that read your blog (Hi prospective employers!) and research your internet famousness to screen you based on what they gather from their research. From not hiring you because all of your Facebook pictures involve you being trashed at a party to an extreme scenario of a Baptist corporate recruiter seeing that post you did on how much you hate Baptists. The theme is the same: don&#8217;t let the company screen you unnecessarily. Usually the safe bet is to TIGHTLY titrate the amount of information you post on the internet.</p>
<p>However if one does a cursory <a href="http://www.google.com/search?q=Daniel+Cousineau">Google search of my name</a>, one will find that I have not shied away from associating my content with myself. Granted the first page of Google results is mayhaps even sexy to recruiters (hey look, a couple of my technical blog posts linked on <a href="http://phpdeveloper.org/">PHPDeveloper.org</a>, <a href="http://www.linkedin.com/in/dcousineau">my LinkedIn account</a>), if one can see or gets access to my Facebook profile or read the rest of my blog, one will notice that I do not hesitate in expressing myself.</p>
<p>Why would I put myself out there like that? Because while companies are out shopping for employees, I am out shopping for companies. And such shopping extends beyond basic research on a company and visiting their work environment.</p>
<p>How many of you found the above photo offensive? uncouth? unprofessional? ridiculous? How many people would put that person lower on a hiring list because of the information you&#8217;ve gathered so far in seeing that photo? If you were, I would bid you adieu (yes, that picture is of me) because a company that would penalize me without investigating as to why a picture is ridiculous. Would the backstory that this picture was taken of me performing a skit as a <a href="http://fishcamp.tamu.edu/">Fish Camp</a> counselor in front of 150 freshmen, trying to provide a little humor as we spent a little over 3 days preparing them for their time at Texas A&#038;M, change your opinions?</p>
<p>The way I see it is the company that would weigh so heavily on the superficial and not on the content (leeway given to the fact that not every company will have the time to do full background research on me) is not a company I wish to work for. If they do this while they&#8217;re in the process of hiring me, what do I have to look forward to in my future with that company? Apparently not much.</p>
<p>Maybe this is just an excuse to myself for having a lot of information about me out in the wild, however I feel like I have carefully filtered information about me onto the internet to aid in my job search, and to help potential recruiters understand my personality a bit better. Because as cantankerous as I sound above, the &#8220;not being hired by X firm&#8221; works both ways. I don&#8217;t want to work at a firm where I will not be a good fit. I&#8217;ll cause friction, drop morale, and generally be ineffective.</p>
<p>Plus this post has been a great chance to explain that picture.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/02/05/on-looking-for-a-job-and-online-reputation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/02/05/on-looking-for-a-job-and-online-reputation/</feedburner:origLink></item>
		<item>
		<title>My brother’s actually blogging!</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/Qp2DC8ns6Z0/</link>
		<comments>http://www.toosweettobesour.com/2009/02/01/my-brothers-actually-blogging/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 02:36:05 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Updates]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Family]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=281</guid>
		<description><![CDATA[Hey everyone, my brother is actually blogging! Check out Eric Cousineau&#8217;s blog. Right now it&#8217;s looking like the focus of his posting will be about Digital Mars D programming language. Everyone go give him some traffic and encourage him to keep posting!
]]></description>
			<content:encoded><![CDATA[<p>Hey everyone, my brother is actually blogging! Check out <a href="http://deadimp.org/">Eric Cousineau&#8217;s blog</a>. Right now it&#8217;s looking like the focus of his posting will be about <a href="http://www.digitalmars.com/d/">Digital Mars D programming language</a>. Everyone go give him some traffic and encourage him to keep posting!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/02/01/my-brothers-actually-blogging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/02/01/my-brothers-actually-blogging/</feedburner:origLink></item>
		<item>
		<title>Blog Updates</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/sW77W6R81i0/</link>
		<comments>http://www.toosweettobesour.com/2009/01/29/blog-updates/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 17:38:23 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=279</guid>
		<description><![CDATA[Just made a few changes to the blog. I added a recaptcha to the comment system as well as subscribing to the comments via email. I also updated the code highlighter so we get the pretty boxes and line numbering (and the code will look much nicer on skinnier browsers).
I also added my résumé for [...]]]></description>
			<content:encoded><![CDATA[<p>Just made a few changes to the blog. I added a recaptcha to the comment system as well as subscribing to the comments via email. I also updated the code highlighter so we get the pretty boxes and line numbering (and the code will look much nicer on skinnier browsers).</p>
<p>I also added my <a href="http://www.toosweettobesour.com/resume/">résumé</a> for those interested in me. If you have any suggestions for improvements on the résumé feel free to let me know.</p>
<p>The code highlighter was a big enough change that I think sometime in the future I&#8217;ll be updating the blog design in the future. However for now I&#8217;m just going to try to come up with stuff to post!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/01/29/blog-updates/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/01/29/blog-updates/</feedburner:origLink></item>
		<item>
		<title>OSS Bugs Are Features</title>
		<link>http://feedproxy.google.com/~r/toosweettobesour/HrtK/~3/Wih_lqzk7nE/</link>
		<comments>http://www.toosweettobesour.com/2009/01/16/oss-bugs-are-features/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 20:47:13 +0000</pubDate>
		<dc:creator>Daniel Cousineau</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[OSS]]></category>

		<guid isPermaLink="false">http://www.toosweettobesour.com/?p=259</guid>
		<description><![CDATA[I&#8217;ve been thinking a lot lately about a presentation given by whurley at a refreshBCS meeting a long time ago. He gave his presentation on Open Source Software, only SLIGHTLY an era of his expertise (just in case you can&#8217;t tell, that was sarcasm) and raise an interesting point.
He talked about how when BMC Software [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking a lot lately about a presentation given by <a href="http://whurley.com/">whurley</a> at a <a href="http://refreshbcs.org/">refreshBCS</a> meeting a long time ago. He gave his presentation on Open Source Software, only SLIGHTLY an era of his expertise (just in case you can&#8217;t tell, that was sarcasm) and raise an interesting point.</p>
<p>He talked about how when <a href="http://www.bmc.com/BMC/Common/CDA/hou_Page_Detail/0,3464,9926222_10636326_76443375,00.html">BMC Software</a> picked him up to head up their open source efforts, he battled a little bit the developers. They wanted to make sure the code was perfected, polished, and at its best whenever they started dumping it on the public. Of course they&#8217;d want to do this, releasing code as OSS is almost equivalent to deciding to present yourself to the work naked and without makeup. They wanted their friends who could see the code to be in awe, and their code base to be a shining example of a project done right.</p>
<p>Whurley wanted them just to release it. Not because he wanted it now, not because of impatience or deadlines or anything else. He wanted them to just release it because, and I&#8217;m paraphrasing him, releasing open source thats a little buggy will actually help grow and foster the project. Granted, you do not introduce bugs, you just open and display the code and start making releases even though there are still tickets in your bug tracking system.</p>
<p>He gave the hypothetical example of the stereotypical arrogant OSS developer finding a bug in BMC&#8217;s FooBar software, calling the BMC devs dumbasses, fixing it (because it was a small and easy bug), and now being invested in the software. You don&#8217;t really lose much reputation, but you gain an invested and loyal following.</p>
<p>While this sounds good and true, and it makes a lot of sense (if there&#8217;s nothing to do, OSS developers will never get involved), it never really clicked for me until I associated another story with whurley&#8217;s principle.</p>
<p>I meet Elizabeth Marie Smith (aka auroraeosrose) at ZendCon08 and had good times talking with her and many of the other #phpc members. At one point in the conference, at an opening for one of her talks (a brief overview of PECL extensions), she told the audience how she got into programming PHP and PHP C extensions. She wasn&#8217;t a computer science major, she only started in the early 2000&#8217;s (prior to that not much computer science experience).</p>
<p>What had happened was, to the best of my recollection and <a href="http://elizabethmariesmith.com/2009/01/seven-weird-things/">her seven things post</a>, in the early days of 2001-ish she was really big into Anime and wanted to start a fan site. Her dad helped her install a forum (written in PHP) on a server he was running out of his house on a cable connection.</p>
<p>Well, as with many of the forum projects, there were bugs to be had in the software. Elizabeth was dedicated to the idea of her site and decided to break open the forum and dig around to fix the bugs. Fix them she did but everything kinda snowballed from there. In fact it was bugs in the PHP-GTK extension that caused her to learn C (not an easy feat) and become the maintainer of PHP-GTK as well as the Windows port of PHP maintainer.</p>
<p>It was bugs and problems in the software that caused her to be where she is now, it was bugs in the OSS world that caused her to latch on to PHP-GTK and the Windows PHP port and get them to where they are today. Though she told this story a long time ago, and whurley&#8217;s presentation was even further back yet, it only just now clicked that I had seen a real life example of whurley&#8217;s principle of &#8220;just publish it, flaws and all.&#8221;</p>
<p>The lesson from all this can even be applied outside of OSS development. It&#8217;s a lesson on perfectionism and can be applied towards my personal development practices. I know that agile teaches to publish early and publish often, fixing bugs and adding features on the way, but perfectionism still plagues me. I have maybe 10 drafts on this blog on small little PHP and Python topics I could publish that I never do because I feel it&#8217;s not good enough, or too simple. I have had code at work that I could have released a week ago but instead I obsess over making sure its &#8220;perfect&#8221; when a simple staging deployment will keep everyone happy, keep my moral up, and show me where the REAL bugs are.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toosweettobesour.com/2009/01/16/oss-bugs-are-features/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.toosweettobesour.com/2009/01/16/oss-bugs-are-features/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.870 seconds. --><!-- Cached page generated by WP-Super-Cache on 2009-07-06 23:01:43 -->
