<?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>Matt Jones' Blog &#187; development</title>
	<atom:link href="http://www.mattjones.workhorsy.org/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattjones.workhorsy.org</link>
	<description>Blah You, Blah Me, Blah We</description>
	<lastBuildDate>Fri, 09 Jul 2010 02:50:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Interviewed On Uber Leet Hacker Force Radio</title>
		<link>http://www.mattjones.workhorsy.org/2010/07/08/interviewed-on-uber-leet-hacker-force-radio/</link>
		<comments>http://www.mattjones.workhorsy.org/2010/07/08/interviewed-on-uber-leet-hacker-force-radio/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 02:50:48 +0000</pubDate>
		<dc:creator>mattjones</dc:creator>
				<category><![CDATA[Rootin Tootin]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.mattjones.workhorsy.org/?p=365</guid>
		<description><![CDATA[The latest episode of Uber Leet Hacker Force Radio is out. I did a quick interview near the end of the show. I talked a little about D and Rootin Tootin. This may be interesting to people who want to learn more about D, and my motivations for creating Rootin Tootin.
Uber Leet Hacker Force Radio [...]]]></description>
			<content:encoded><![CDATA[<p>The latest episode of <a href="http://uberleethackerforce.deepgeek.us">Uber Leet Hacker Force Radio</a> is out. I did a quick interview near the end of the show. I talked a little about <a href="http://digitalmars.com/d/index.html">D</a> and <a href="http://rootin.toot.in">Rootin Tootin</a>. This may be interesting to people who want to learn more about D, and my motivations for creating Rootin Tootin.</p>
<p>Uber Leet Hacker Force Radio is syndicated on <a href="http://hackerpublicradio.org">Hacker Public Radio</a>. The episode can be directly <a href="http://hackerpublicradio.org/eps.php?id=0552">downloaded from here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattjones.workhorsy.org/2010/07/08/interviewed-on-uber-leet-hacker-force-radio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Porting Tornado to D</title>
		<link>http://www.mattjones.workhorsy.org/2010/03/12/porting-tornado-to-d/</link>
		<comments>http://www.mattjones.workhorsy.org/2010/03/12/porting-tornado-to-d/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 03:03:53 +0000</pubDate>
		<dc:creator>mattjones</dc:creator>
				<category><![CDATA[Code Fragment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.mattjones.workhorsy.org/?p=353</guid>
		<description><![CDATA[The other day I started porting the Tornado web server to D. I just got the IO Loop part ported. I&#8217;m planning on using this in my web framework Rootin Tootin.
You can check out the code on Launchpad: http://launchpad.net/dornado. Next I will add proper Epoll and the HTTP part. But in the meantime, you can [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I started porting the <a href="http://tornadoweb.org">Tornado web server</a> to <a href="http://digitalmars.com/d/index.html">D</a>. I just got the IO Loop part ported. I&#8217;m planning on using this in my web framework <a href="http://rootin.toot.in">Rootin Tootin</a>.</p>
<p>You can check out the code on Launchpad: <a href="http://launchpad.net/dornado">http://launchpad.net/dornado</a>. Next I will add proper Epoll and the HTTP part. But in the meantime, you can try it out with this demo code snippet:</p>

<div class="wp_syntax"><div class="code"><pre class="d" style="font-family:monospace;"><span style="color: #993333;">private</span> <span style="color: #000000; font-weight: bold;">import</span> tango.<span style="color: #006600;">net</span>.<span style="color: #006600;">device</span>.<span style="color: #006600;">Socket</span><span style="color: #66cc66;">;</span>
<span style="color: #993333;">private</span> <span style="color: #000000; font-weight: bold;">import</span> tango.<span style="color: #006600;">io</span>.<span style="color: #006600;">model</span>.<span style="color: #006600;">IConduit</span><span style="color: #66cc66;">;</span>
<span style="color: #993333;">private</span> <span style="color: #000000; font-weight: bold;">import</span> tango.<span style="color: #006600;">net</span>.<span style="color: #006600;">InternetAddress</span><span style="color: #66cc66;">;</span>
<span style="color: #993333;">private</span> <span style="color: #000000; font-weight: bold;">import</span> tango.<span style="color: #006600;">io</span>.<span style="color: #006600;">Stdout</span><span style="color: #66cc66;">;</span>
<span style="color: #993333;">public</span> <span style="color: #000000; font-weight: bold;">import</span> ioloop<span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #993333;">class</span> HelloServer <span style="color: #66cc66;">&#123;</span>
    <span style="color: #993333;">private</span> ServerSocket sock<span style="color: #66cc66;">;</span>
    <span style="color: #993333;">private</span> <span style="color: #993333;">char</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000dd;">1024</span><span style="color: #66cc66;">&#93;</span> buffer<span style="color: #66cc66;">;</span>
&nbsp;
    <span style="color: #993333;">public</span> <span style="color: #993333;">void</span> handle_connection<span style="color: #66cc66;">&#40;</span>Socket connection<span style="color: #66cc66;">,</span> <span style="color: #993333;">char</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> address<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        connection.<span style="color: #006600;">read</span><span style="color: #66cc66;">&#40;</span>buffer<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
        connection.<span style="color: #006600;">write</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;hello world!&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        connection.<span style="color: #006600;">shutdown</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        connection.<span style="color: #006600;">detach</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #993333;">public</span> <span style="color: #993333;">void</span> connection_ready<span style="color: #66cc66;">&#40;</span>ServerSocket sock<span style="color: #66cc66;">,</span> ISelectable.<span style="color: #006600;">Handle</span> fd<span style="color: #66cc66;">,</span> <span style="color: #993333;">uint</span> events<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            Socket connection <span style="color: #66cc66;">=</span> sock.<span style="color: #006600;">accept</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
            connection.<span style="color: #006600;">socket</span>.<span style="color: #006600;">blocking</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
            handle_connection<span style="color: #66cc66;">&#40;</span>connection<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #993333;">public</span> <span style="color: #993333;">void</span> call_connection_ready<span style="color: #66cc66;">&#40;</span>ISelectable.<span style="color: #006600;">Handle</span> fd<span style="color: #66cc66;">,</span> <span style="color: #993333;">uint</span> events<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        connection_ready<span style="color: #66cc66;">&#40;</span>sock<span style="color: #66cc66;">,</span> fd<span style="color: #66cc66;">,</span> events<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #993333;">public</span> <span style="color: #993333;">void</span> start<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #993333;">int</span> port <span style="color: #66cc66;">=</span> <span style="color: #0000dd;">3000</span><span style="color: #66cc66;">;</span>
        <span style="color: #993333;">int</span> max_waiting_clients <span style="color: #66cc66;">=</span> <span style="color: #0000dd;">128</span><span style="color: #66cc66;">;</span>
        <span style="color: #993333;">bool</span> reuse_address <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">sock</span> <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ServerSocket<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> InternetAddress<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;0.0.0.0&quot;</span><span style="color: #66cc66;">,</span> port<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> max_waiting_clients<span style="color: #66cc66;">,</span> reuse_address<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">sock</span>.<span style="color: #006600;">socket</span>.<span style="color: #006600;">blocking</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
        <span style="color: #993333;">auto</span> io_loop <span style="color: #66cc66;">=</span> IOLoop.<span style="color: #006600;">instance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #993333;">auto</span> callback <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&amp;</span>this.<span style="color: #006600;">call_connection_ready</span><span style="color: #66cc66;">;</span>
        io_loop.<span style="color: #006600;">add_handler</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">sock</span>.<span style="color: #006600;">fileHandle</span><span style="color: #66cc66;">,</span> callback<span style="color: #66cc66;">,</span> io_loop.<span style="color: #006600;">READ</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        Stdout<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://localhost:3000&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">newline</span>.<span style="color: #006600;">flush</span><span style="color: #66cc66;">;</span>
        io_loop.<span style="color: #006600;">start</span><span style="color: #66cc66;">&#40;</span>sock<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #993333;">public</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    IOLoop.<span style="color: #006600;">use_epoll</span> <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">;</span>
    <span style="color: #993333;">auto</span> server <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HelloServer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
    server.<span style="color: #006600;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>
You can compile this with:<br />
<code><br />
ldc helloworld.d ../ioloop.d ../language_helper.d<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattjones.workhorsy.org/2010/03/12/porting-tornado-to-d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing Packaging in Linux #1</title>
		<link>http://www.mattjones.workhorsy.org/2009/10/05/fixing-packaging-in-linux-1/</link>
		<comments>http://www.mattjones.workhorsy.org/2009/10/05/fixing-packaging-in-linux-1/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 00:15:54 +0000</pubDate>
		<dc:creator>mattjones</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[packaging]]></category>

		<guid isPermaLink="false">http://www.mattjones.workhorsy.org/?p=310</guid>
		<description><![CDATA[I really, really, really want feedback on this:
Over the past few months, I&#8217;ve really gotten into packaging on Fedora and Ubuntu. I&#8217;m not an expert, but I can genuinely say our packaging situation is crap. We are so close. And yet we ended up with two major implementations, that are almost the same. There is [...]]]></description>
			<content:encoded><![CDATA[<p>I really, really, really want feedback on this:</p>
<p>Over the past few months, I&#8217;ve really gotten into packaging on Fedora and Ubuntu. I&#8217;m not an expert, but I can genuinely say our packaging situation is crap. We are so close. And yet we ended up with two major implementations, that are almost the same. There is no significant difference between RPM and Dpgk.</p>
<p>So will Fedora abandon their 15,000 packages and choose Dpkg? Will Debian abandon their 35,000 packages and choose RPM? No. Neither will. There is no way for them to transition. And they will not give up their self branded solution. The only way forward is to make a new system, that is both better, and backwards compatible with RPM and Dpkg.</p>
<p>That is what I have been toying with for the past few months. It is called <a href="http://launchpad.net/packagetastic">Packagetastic</a> and It is a replacement for Dpkg and RPM, but still backwards compatible with them. Right now it is just a proof of concept, but can build many small packages on Ubuntu and Fedora.</p>
<p>I made a screencast to show how it works. This is just a simple, introduction. More example on how to use it will come soon. You can view the screencast below:</p>
<p><a href="http://workhorsy.org/junk/packagetastic_1.ogv"><br />
<img src="http://workhorsy.org/junk/packagetastic_1.png" /><br />
<br />packagetastic_1.ogv (96.2 MB)<br />
</a></p>
<p>More information about the project can be found here: <a href="http://launchpad.net/packagetastic">http://launchpad.net/packagetastic</a></p>
<p>Please provide your criticism and feedback at the <a href="https://lists.launchpad.net/packagetastic-developers/">mailing list</a>, this blog post, or my <a href="http://identi.ca/matthewjones">identica page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattjones.workhorsy.org/2009/10/05/fixing-packaging-in-linux-1/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
<enclosure url="http://workhorsy.org/junk/packagetastic_1.ogv" length="100835511" type="video/ogg" />
		</item>
		<item>
		<title>Rester Screencast 1: Intro and Server Push</title>
		<link>http://www.mattjones.workhorsy.org/2009/08/09/rester-screencast-1-intro-and-server-push/</link>
		<comments>http://www.mattjones.workhorsy.org/2009/08/09/rester-screencast-1-intro-and-server-push/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 04:56:00 +0000</pubDate>
		<dc:creator>mattjones</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.mattjones.workhorsy.org/?p=265</guid>
		<description><![CDATA[During my job hunting, I was going over my resume and portfolio. I noticed that my project Rester is just about a year old. It is also getting to a point, where is is almost useful to other people.
If you are interested: Rester is a fast RESTful web server and framework written in D. It [...]]]></description>
			<content:encoded><![CDATA[<p>During my job hunting, I was going over my resume and portfolio. I noticed that my project <a href="https://launchpad.net/rester">Rester</a> is just about a year old. It is also getting to a point, where is is almost useful to other people.</p>
<p>If you are interested: <a href="https://launchpad.net/rester">Rester</a> is a fast <a href="http://en.wikipedia.org/wiki/RESTful">RESTful</a> web server and framework written in <a href="http://digitalmars.com/d/index.html">D</a>. It should be as easy to use as Ruby on Rails, but provide good performance by default, and be easy to deploy.</p>
<p>I made a brief screencast, with an introduction and an example that uses server push.</p>
<p><a href="http://workhorsy.org/junk/rester_1.ogv"><br />
rester_1.ogv (27.7 Megabytes):<br />
<img src="http://workhorsy.org/junk/rester_1.png" alt="" /></a></p>
<p>You can also view the video in the legacy flash format at Youtube:<br />
<a href="http://www.youtube.com/watch?v=uBfdn5RCrlw">http://www.youtube.com/watch?v=uBfdn5RCrlw</a></p>
<p>Feel free to try it out yourself, and leave comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattjones.workhorsy.org/2009/08/09/rester-screencast-1-intro-and-server-push/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Code Fragment: How to programatically get MySQL table relationships</title>
		<link>http://www.mattjones.workhorsy.org/2009/02/27/code-fragment-how-to-programatically-get-mysql-table-relationships/</link>
		<comments>http://www.mattjones.workhorsy.org/2009/02/27/code-fragment-how-to-programatically-get-mysql-table-relationships/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 19:43:47 +0000</pubDate>
		<dc:creator>mattjones</dc:creator>
				<category><![CDATA[Code Fragment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.mattjones.workhorsy.org/?p=195</guid>
		<description><![CDATA[This magical chunk of goodness will allow you to query a mysql database to determine what table fields are foreign keys, and what they reference. Just replace &#8216;database_name&#8217; and &#8216;table_name&#8217; with the respective names you want:

1
2
3
4
5
6
7
SELECT column_name, referenced_table_name,
referenced_column_name
FROM information_schema.key_column_usage
WHERE table_schema='database_name'
AND table_name='table_name'
AND referenced_table_name IS NOT NULL
AND referenced_column_name IS NOT NULL;

]]></description>
			<content:encoded><![CDATA[<p>This magical chunk of goodness will allow you to query a mysql database to determine what table fields are foreign keys, and what they reference. Just replace &#8216;database_name&#8217; and &#8216;table_name&#8217; with the respective names you want:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> column_name<span style="color: #66cc66;">,</span> referenced_table_name<span style="color: #66cc66;">,</span>
referenced_column_name
<span style="color: #993333; font-weight: bold;">FROM</span> information_schema<span style="color: #66cc66;">.</span>key_column_usage
<span style="color: #993333; font-weight: bold;">WHERE</span> table_schema<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'database_name'</span>
<span style="color: #993333; font-weight: bold;">AND</span> table_name<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'table_name'</span>
<span style="color: #993333; font-weight: bold;">AND</span> referenced_table_name <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>
<span style="color: #993333; font-weight: bold;">AND</span> referenced_column_name <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.mattjones.workhorsy.org/2009/02/27/code-fragment-how-to-programatically-get-mysql-table-relationships/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moved eveything to Bazaar</title>
		<link>http://www.mattjones.workhorsy.org/2007/10/01/moved-eveything-to-bazaar/</link>
		<comments>http://www.mattjones.workhorsy.org/2007/10/01/moved-eveything-to-bazaar/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 02:42:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Intuitive Desktop]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.mattjones.workhorsy.org/?p=28</guid>
		<description><![CDATA[Bye Bye Subversion. Hello Bazaar.
bzr branch http://intuitive-desktop.org/bzr/main/
Merging is SOOOOO much easier in Bazaar.
Also. I stumbled over a tool called Meld Diff that is very useful when you need to perform complex merges that can&#8217;t be performed automatically.
Look at the pic. You can click the little arrows to merge each section, one-by-one.

]]></description>
			<content:encoded><![CDATA[<p>Bye Bye Subversion. Hello <a href="http://bazaar-vcs.org/" title="http://bazaar-vcs.org/">Bazaar</a>.</p>
<p>bzr branch <a href="http://intuitive-desktop.org/bzr/main/" title="http://intuitive-desktop.org/bzr/main/">http://intuitive-desktop.org/bzr/main/</a></p>
<p>Merging is <strong>SOOOOO</strong> much easier in Bazaar.</p>
<p>Also. I stumbled over a tool called <a href="http://meld.sourceforge.net/" title="http://meld.sourceforge.net/">Meld Diff</a> that is <strong>very</strong> useful when you need to perform complex merges that can&#8217;t be performed automatically.</p>
<p>Look at the pic. You can click the little arrows to merge each section, one-by-one.</p>
<p><a href="http://www.mattjones.workhorsy.org/wp-content/uploads/2007/10/meld_diff.png" title="meld_diff.png"><img src="http://www.mattjones.workhorsy.org/wp-content/uploads/2007/10/meld_diff.png" alt="meld_diff.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattjones.workhorsy.org/2007/10/01/moved-eveything-to-bazaar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why can&#8217;t I dive into a project in 2 to 4 hours?</title>
		<link>http://www.mattjones.workhorsy.org/2007/08/28/why-cant-i-dive-into-a-project-in-2-to-4-hours/</link>
		<comments>http://www.mattjones.workhorsy.org/2007/08/28/why-cant-i-dive-into-a-project-in-2-to-4-hours/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 09:24:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[desktop]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.mattjones.workhorsy.org/?p=19</guid>
		<description><![CDATA[Note: Before you read this, know that I like Network Manager. I&#8217;m using it as an example, because I liked it enough to want to hack on it. I don&#8217;t want to piss anyone off that works on it. This is just my biased opinion and experience with it.
I&#8217;ve been researching problems in the current [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> <em>Before you read this, know that I like <a title="http://www.gnome.org/projects/NetworkManager/" href="http://www.gnome.org/projects/NetworkManager/" target="_blank">Network Manager</a>. I&#8217;m using it as an example, because I liked it enough to want to hack on it. I don&#8217;t want to piss anyone off that works on it. This is just my biased opinion and experience with it.</em></p>
<p>I&#8217;ve been researching problems in the current desktop paradigm for a few years now. I even carry a list of said problems around in my pocket. Throughout the years there have been a few problems that have driven me mad. I have seen them reflected in so many dying projects. I literally have dreams about them, where I&#8217;m at a podium in front of millions of developers, trying to beat them in the head with the most critical problems.</p>
<p>By far, the most critical problem is: &#8220;The barrier to entry for contributing to other projects is too large. If you want to contribute to someone else’s project, you have to spend hours or days reading their code, and trying to find out where everything is and how the ‘program flow’ works.&#8221;</p>
<p>For example, recently I had a few hours and decided to spend them looking at the code for <a title="http://www.gnome.org/projects/NetworkManager/" href="http://www.gnome.org/projects/NetworkManager/" target="_blank">Network Manager</a>, to see how I could add support for EVDO laptop cards (I was using a Verizon pc5740). I decided on two goals for that sitting: first, to figure out how NM uses <a title="http://www.freedesktop.org/wiki/Software/hal" href="http://www.freedesktop.org/wiki/Software/hal" target="_blank">HAL</a> to get information on networking hardware. And second, to figure out if HAL worked with EVDO cards. I downloaded the NM source code and started looking in the src directory. I had the immediate observations:</p>
<ol>
<li>Where is the start of the program?</li>
<li>It looks like this is actually a daemon and an applet, possibly more</li>
<li>Most everything, header files, source files, and make files are dumped into one directory</li>
<li>I remember why I haven&#8217;t used C or C++ in a few years, on my own projects</li>
<li>Has anyone on this project even heard of Model View Controller?</li>
<li>Why the hell do Gnome developers still use C?</li>
</ol>
<p>Those are some dirty thoughts. I continued to dig. I found main and started reading. Still not knowing if what I was looking at was some sort of service or the Network Manager Applet. Next I noticed the naming convention used. It seems that they are using the naming convention of giving everything a prefix such as &#8220;nm_&#8221; to simulate name spaces. There is no context of where the function or variable comes from. Because the directory and file structure  does not reflect the namespace, I had to search through many headers to find out where functions and variables were coming from.</p>
<p>Once I finished main, I decided to just open a bunch of the other source files, and look at their code. The problem I encountered was that there was no context to where this piece of code would fit into the program flow. In order to determine that, I would have to go back to main, and trace the entire flow of the program. I had no desire to do that, so I moved on.</p>
<p>Next I decided to just look at the Models, because they would have to be networking hardware. I could then find out how the other hardware was accessed and then see if an EVDO card could be hooked up the same way. But of course that didn&#8217;t turn out. There was zero separation of data, logic, and user interface. If they had used Model, View, Controller, this would have been much easier.</p>
<p>So a few hours had passed, and I was about half way through my four hour block. I decided to look at one of the small examples to see how this program could be easily used in a few lines of code. There were no examples.</p>
<p>I used beagle to look for the dbus and hal calls to try and find the &#8220;magic&#8221; of how the program worked. But as usual, almost every function used dbus and hal. It was nearly impossible for me to figure our the &#8220;flow&#8221; of how either dbus or hal were used.</p>
<p>Ding. Time was up. It had been four hours. I had made zero progress. I was pissed. Pissed at how Gnome worked under the covers.  And pissed at myself for not understanding the inner workings of someone else&#8217;s mind. I closed all the gedit tabs and deleted the Network Manager source code.</p>
<p>Now, what were the problems I encountered?:</p>
<ol>
<li>It was very hard to track the program flow</li>
<li>There was little context to any of the code,</li>
<li>Code namespaces and class names were not reflected in the file and directory names</li>
<li> There were no example programs to help me get started</li>
<li>It was difficult to find main</li>
<li>There was no separation of Model, View, and Controller</li>
<li>There was little separation of layers of abstraction with dbus and hal code everywhere</li>
<li>The limitations of the C language were hampering my progress. IE: No unit tests, no namespaces, cryptic make files, and evil header files</li>
</ol>
<p>Now we could have solved those problems by changing a few things:</p>
<ol>
<li>Make it easy to track program flow, by using Model View Controller, and having the file hierarchy reflect the code namespaces</li>
<li>Use a programming language that supports unit tests, object orientation, and importing code rather than header files</li>
<li>Have a few example programs that show how to do very simple stuff. The more trivial, the better</li>
<li>Sticking to Model View Controller would have also solved the abstraction problems, as the dbus and hal stuff would naturally gravitate into Models</li>
<li>Having a unit test friendly language would have made it easy for newcomers to know if they screwed anything up</li>
</ol>
<p>Will any of these changes be addressed in Gnome? I don&#8217;t think so. Things may get a little better with <a title="http://live.gnome.org/Vala" href="http://live.gnome.org/Vala" target="_blank">Vala</a> becoming popular. Despite that, any Gnome developer reading this will probably think I am an idiot, that just needs to learn the ropes. Which is exactly the problem. The way things work is the barrier to entry. I keep harping on Gnome, but KDE has the same problems (It is astonishing how similar KObject and QT is to GObject and Gtk once you spend some time with them).</p>
<p>To answer my question, I can&#8217;t contribute to many Gnome projects in 2 to 4 hours because of the way things are developed, and the way the code is organized.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattjones.workhorsy.org/2007/08/28/why-cant-i-dive-into-a-project-in-2-to-4-hours/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The point of views you will need for framework development</title>
		<link>http://www.mattjones.workhorsy.org/2007/08/22/the-point-of-views-you-will-need-for-framework-development/</link>
		<comments>http://www.mattjones.workhorsy.org/2007/08/22/the-point-of-views-you-will-need-for-framework-development/#comments</comments>
		<pubDate>Thu, 23 Aug 2007 05:55:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Intuitive Desktop]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.mattjones.workhorsy.org/?p=16</guid>
		<description><![CDATA[This may seem like an obvious post from the title, but I think there are a few things here that may be of interest to developers that are writing libraries. I am going to specifically talk about the point-of-view you should have when writing parts of your code.
Usually when people write their unit test, they [...]]]></description>
			<content:encoded><![CDATA[<p>This may seem like an obvious post from the title, but I think there are a few things here that may be of interest to developers that are writing libraries. I am going to specifically talk about the point-of-view you should have when writing parts of your code.</p>
<p>Usually when people write their unit test, they are just trying to get them to work. The point of view they have is the Test Case Point of View. A developer with this point of view will have these goals:</p>
<ol>
<li>The framework needs to be robust enough to satisfy all the unit tests</li>
<li>Once all the test cases are covered, and pass, the code is done</li>
</ol>
<p>Now most developers would stop here, without moving on to the next stage. But they would discover that their framework was hard to use, redundant, or unnecessarily wordy. Or worse, only their users would find that out.</p>
<p>The next stage is the Usability Point of View. In This stage, the developer should make many example applications using their framework. This includes &#8220;Hello Word&#8221; applications as well as large apps that try to test the limits of the framework. And Don&#8217;t forget cloning neat little apps, like <a href="http://macslow.thepimp.net/?page_id=23" title="http://macslow.thepimp.net/?page_id=23">Cairo Clock</a> or <a href="http://www.gnome.org/projects/tomboy/" title="http://www.gnome.org/projects/tomboy/">Tomboy</a>. While doing this, they should try and focus on these items:</p>
<ol>
<li>Too much configuration or the innards of the framework being exposed for no reason</li>
<li>If you end up writing unit tests that test both the application and the framework, this is a sign that there is too much overlap in parts of the framework. Remember Model View Controller.</li>
<li>If the framework is very wordy or has a lot of options that should be consolidated, that can cause example programs to bloat up and get very long.</li>
<li>There should be very little coupling. If every time you add new code, you have to add multiple dependent pieces of code to deal with that one new thing, that is called Coupling to The Nth Power. That leads to a framework that grows exponentially, and is concrete, near impossible to change, and usually requires a lot of code to do even simple program. Examples of this are The .NET Framework, and J2EE/JBoss.</li>
<li>If you run into a problem that requires a change in the framework, and it would be &#8220;very unpleasant&#8221; to fix that  problem, that is a bad sign. Everything should be as easy to change as possible.</li>
<li>If you are having to write a ton of comments to explain some voodoo that is happening in the framework, that is a sign that the naming in the framework is confusing, or that there is too much overlap in the classes.</li>
<li>If you are not enjoying yourself while making the framework, that is a bad sign. That should be fixed too.</li>
</ol>
<p>Now that is a pretty large list of things to look out for. I would say the one that I often run into is number 3. I always end up having too many options, or overlapping options in my classes. I even ran into that problem this evening, (which inspired me to write this) while working on a Cairo Clock clone.</p>
<p>Just for fun, I will go over the thing that caused the example to go wrong: I was writing the part that uses data binding to attach the SVG images to layers in the Drawing control. Now the Cairo Clock has a lot of layers. I think it is 12 layers. So for each layer I had to write a binding just to connect it to the SVG file. The binding looks like this:</p>
<p><code><br />
&lt;Layer name="clock_drop_shadow"&gt;<br />
&lt;Binding name="image"<br />
model="ClockImages"<br />
view_properties="image_file"<br />
model_properties="clock_drop_shadow_image"<br />
on_model_change="save_changes_to_view"<br />
on_view_change="do_nothing" /&gt;<br />
&lt;/Layer&gt;</code></p>
<p>Basically we have a Layer with a Binding. The Bindings job is to connect the View to the Model. This one connects the &#8216;image_file&#8217; property of the View to the &#8216;clock_drop_shadow_image&#8217; property of the Model. It connects them so that it automatically updates the View when the property in the Model changes.  Now this is a great way to do data binding, much better than anything that is out there. But as said above, it is too much code for something that will have to be used many times in each object. Not surprisingly, this revelation has come up by writing an example that requires a lot of data binding.</p>
<p>Now to fix it we can do this:</p>
<p><code><br />
&lt;Layer name="clock_drop_shadow"&gt;<br />
&lt;Binding name="image"<br />
bind_direction="view_to_model"<br />
property_map="image_file:clock_drop_shadow_image" /&gt;<br />
&lt;/Layer&gt;<br />
</code></p>
<p>This looks good. It solves the duplication problem of having two properties that are used to say how the binding direction flows, and the problem of having two properties to hold the way we map one set of properties to another. It also uses fewer lines, and could even be squished into one line.</p>
<p>So it worked. We went one step further, and used our Usability Point of View, and now we were able to make the code more usable, where we would not have seen a problem. So keep those two points of view in mind next time you are developing a framework. And if you have any tips on improving this concept, or have any success stories to tell, email (mattjones@workhorsy.org) me, because I love this shit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattjones.workhorsy.org/2007/08/22/the-point-of-views-you-will-need-for-framework-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Struggle to Find The Right Language</title>
		<link>http://www.mattjones.workhorsy.org/2007/08/08/the-struggle-to-find-the-right-language/</link>
		<comments>http://www.mattjones.workhorsy.org/2007/08/08/the-struggle-to-find-the-right-language/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 02:37:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Intuitive Desktop]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.mattjones.workhorsy.org/?p=12</guid>
		<description><![CDATA[Over the past 2 years while working on my main project, I&#8217;ve been struggling with what programming language to use. I went through many rewrites and many different languages. Now I think I may have arrived at a good solution.
I started with C#. That went down in flames because of the huge overhead in startup [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past 2 years while working on my <a href="http://www.intuitive-desktop.org/" title="http://www.intuitive-desktop.org/">main project</a>, I&#8217;ve been struggling with what programming language to use. I went through many rewrites and many different languages. Now I think I may have arrived at a good solution.</p>
<p>I started with C#. That went down in flames because of the huge overhead in startup time for large assemblies. It also did not have all the code implemented on the <a href="http://www.mono-project.com" title="http://www.mono-project.com">Mono</a> side of things. I wanted an easy-to-use language, with all the great Linux technology, like DBus, Cairo, Hal, and GStreamer.</p>
<p>At that point I decided that I was being too much of a wussy, and was going to use C/C++. That quickly crashed and burned as I re-learned why I hated C/C++ in the first place: &#8220;Standard Libraries&#8221; that are not standard or consistent across platforms; No standard libraries for Lists, Array Lists, and Hash tables (yes. I&#8217;ve used STL. It is very fucked up on Ubuntu and Fedora Core); Threads were not &#8220;Standard&#8221; either; Endless fighting with header files to make the compiler happy; And finally the nightmare that is USING Gobject. It all amounted to too much work, and almost no progress.</p>
<p>My next attempt was to use D. Which was, and is very promising. It is as fast as C, and includes all the threading and collection support. The problem however was that the  <a href="http://dgcc.sourceforge.net/" title="http://dgcc.sourceforge.net/">Gnu D Compiler</a> was not packaged in Debian, and didn&#8217;t include the standard &#8216;Phobos&#8217; library. That was fine. I fought with it and got it working myself. I was cruising along and creating the Postgresql database back-end when I hit a wall. The wall was that the promise of ABI compatibility with C was not entirely true. It was true for the <a href="http://cairographics.org/" title="http://cairographics.org/">Cairo</a> wrappers I made, but not for the Postgresql wrappers. So I decided to wait a bit longer and see if a solution presented itself.<a href="http://dgcc.sourceforge.net/" title="http://dgcc.sourceforge.net/"><br />
</a></p>
<p>A solution came a few months later, after I spent a while learning <a href="http://www.rubyonrails.org/" title="http://www.rubyonrails.org/">Ruby on Rails</a>, and gained the wisdom that comes with not focusing on performance and over configuration. I decided to try and implementing everything in <a href="http://www.ruby-lang.org/en/" title="http://www.ruby-lang.org/en/">Ruby</a>. Simply put: Ruby is amazing. Once I understood the Model View Controller technique. And I mean really understood how it works. Not like the <a href="http://en.wikipedia.org/wiki/Model_view_controller" title="http://en.wikipedia.org/wiki/Model_view_controller">outright lie that is in Wikipedia</a> article. I had an epiphany: If you break your programs up into user interface, logic, and data, it makes everything so much more streamlined. All the problems with coupling and optimization simply vanish. Well it was (and still is) sufficient to say that I would do the entire project in Ruby.</p>
<p>But then I started to notice things. Like the amount of memory even a simple <a href="http://www.intuitive-desktop.org/wiki/1/DocumentsOverview" title="http://www.intuitive-desktop.org/wiki/1/DocumentsOverview">Intuitive Document</a> was using. This wasn&#8217;t really a problem. But it would be for small machines like the <a href="http://www.nseries.com/products/n800/#l=products,n800" title="http://www.nseries.com/products/n800/#l=products,n800">n800</a>, and would inevitably be a problem when the entire desktop consisted of 6 programs that each use 20 to 30 megabytes of ram. We would have all kinds of issues with paging memory to disk, and the CPU waking up like crazy to manage it all.</p>
<p>I decided to wait a bit and see what the community came up with. This was a long stretch where things like <a href="http://www.youtube.com/watch?v=6ViKhwdXmmE" title="http://www.youtube.com/watch?v=6ViKhwdXmmE">Lowfat</a>, <a href="http://pyrodesktop.org/Main_Page" title="http://pyrodesktop.org/Main_Page">Pyro Desktop</a>, and <a href="http://online-desktop.org/wiki/Online_Desktop" title="http://online-desktop.org/wiki/Online_Desktop">Online Desktop</a> where being revealed. So it gave me hope that someone else would want to write libraries in a high level language.</p>
<p>Then very recently, I started seeing blog posts about this new GObject friendly, C#-like language called <a href="http://live.gnome.org/Vala" title="http://live.gnome.org/Vala">Vala</a>. Like <a href="http://aruiz.typepad.com/siliconisland/2007/08/the-first-vala-.html" title="http://aruiz.typepad.com/siliconisland/2007/08/the-first-vala-.html">this post where a person makes Gtk MozEmbed wrappers for Vala in a few lines of code</a>. This is how GObject should be used! Since I am using a lot of the Gnome infrastructure under the covers, this might be a very good choice for a library-level language.</p>
<p>So this is the plan so far: Once we get more stable, someone will rewrite the Intuitive Framework to use Vala. Then we will need a way to still use Ruby for the Intuitive Desktop and application part.</p>
<p>Sounds good. Now we just need more contributors!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattjones.workhorsy.org/2007/08/08/the-struggle-to-find-the-right-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
