<?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>Waves.ky &#187; Programming</title>
	<atom:link href="http://waves.ky/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://waves.ky</link>
	<description>Caymanian Geek...</description>
	<lastBuildDate>Mon, 30 Nov 2009 22:07:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>YUI CSS Kicks Ass</title>
		<link>http://waves.ky/2008/03/20/yui-css-kicks-ass/</link>
		<comments>http://waves.ky/2008/03/20/yui-css-kicks-ass/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 03:24:05 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://waves.ky/2008/03/20/yui-css-kicks-ass/</guid>
		<description><![CDATA[I was looking for a color picker widget over at Yahoos YUI site. I have been there before mostly to watch the videos on Javascript. Douglas Crockford is obviously the man when it comes to Javascript. 
Anyway, I saw a link for a video on YUI&#8217;s CSS component and I was just a little bit [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a color picker widget over at Yahoos <a href="http://developer.yahoo.com/yui/">YUI</a> site. I have been there before mostly to watch the videos on Javascript. Douglas Crockford is obviously the man when it comes to Javascript. </p>
<p>Anyway, I saw a link for a video on <a href="http://developer.yahoo.com/yui/grids/">YUI&#8217;s CSS component</a> and I was just a little bit interested. I though it was probably just another CSS reset. There was some vague promise of Grids and I couldn&#8217;t imagine how they could make that easy so I still didn&#8217;t think it looked promising.</p>
<p>Wow was I wrong. If you haven&#8217;t seen this then you need to go check it out. Nate Koechley and crew have done a seminal piece of CSS work here. Here are the highlights:</p>
<ul>
<li>They provide a reset for all styles and fonts in <a href="http://developer.yahoo.com/yui/articles/gbs/index.html">all major browsers</a>, including IE6. You are leveraging all the cross browser testing done by Yahoo</li>
<li>Everything (fonts, boxes etc) is sized with em&#8217;s or percentages of em&#8217;s so the entire page will scale gracefully for 508C</li>
<li>The Grids can be nested. You can do 2, 3 or 4 columns in a variety of width ratios (e.g. 2 columns: 1/4, 3/4 )</li>
<li>Its really simple to use</li>
</ul>
<p>At work we have struggled with CSS. We don&#8217;t have a full time web designer to work for us. So the devs do all the html &amp; css. I&#8217;m fairly handy with this sort of thing but have no where near enough time to produce the level of product that you can get with YUI. Other devs have even less patience for this sort of thing. For us this make a whole lot of sense. </p>
<p>We are really sensitive to the semantic markup of the page and the use of em&#8217;s for 508C support. We want it to be nice to use not just live up to the letter of some spec. I started using em&#8217;s when we first did the style sheet but I was about to give up because it was getting so difficult to use. Now its going to be easy to provide the kind of experience and cross browser compatibility that I have wanted all along.</p>
<p>Just go to Yahoo&#8217;s home page and increase the font size. Look at how smoothly that works and realize how hard that is to set up. Now realize you can do that to your site and still get work done faster than before. Your developers can pick this up in an hour or two and start building better stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2008/03/20/yui-css-kicks-ass/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Indrio Performance Enhancements</title>
		<link>http://waves.ky/2006/01/04/indrio-performance-enhancements/</link>
		<comments>http://waves.ky/2006/01/04/indrio-performance-enhancements/#comments</comments>
		<pubDate>Thu, 05 Jan 2006 03:24:04 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://waves.ky/2006/01/04/indrio-performance-enhancements/</guid>
		<description><![CDATA[Indrio development took a back seat to some other more important real world stuff for a while. I&#8217;ll get into that at a later time but right now I&#8217;m gonna focus on Indrio. 
Some parts of the iTunes API are shamefully slow. The Enumerator for ITrackCollection operates in n &#178; time. So the time it [...]]]></description>
			<content:encoded><![CDATA[<p>Indrio development took a back seat to some other more important real world stuff for a while. I&#8217;ll get into that at a later time but right now I&#8217;m gonna focus on Indrio. </p>
<p>Some parts of the iTunes API are shamefully slow. The Enumerator for ITrackCollection operates in n &sup2; time. So the time it takes to walk the list grows quadratically with the length of the list. Iterating over the list with python and calling Item is actually faster that the enumerator. That was a bit of a shock. Item() is definitely n &sup2;, access at the end of the list is much slower than at the start of the list.</p>
<p>Even if Apple were to fix this we are talking about 5 seconds here which would give a max speedup of 2.2 seconds. Thats still too slow for search as you type. Besides, have you ever seen what happens when you drop a 5k rows worth of table into a web page? It won&#8217;t render correctly on anything.</p>
<p>The real solution is to page the results. This way access to the results is fast even in the worst case scenario at the end of a large list. This is what you would do in a real GUI application anyway. Never show the user more information that then can digest and Never do processing for anything you didn&#8217;t show the user.</p>
<p>The search for answers to Inrdio&#8217;s speed problems lead me down a path of optimizations that tightly coupled the iTunes stuff to the web server. Some of the optimizations were good but I&#8217;m not going to pay for them with bad architecture. So I took a step back and completely abstracted everything behind three classes: AudioPlayerInterface, TrackList, &amp; Track. </p>
<p>The AudioPlayerInterface supports searching, queuing, and provides information about what songs will play/are playing. The TrackList supports the paged access to tracks, either from search results or from the playlist. Tracks are, of course, tracks with information like Artist, Title and so on.</p>
<p>In the iTunes implementation of TrackList is extremely fast. You construct a TrackList without having to iterate through the tracks. Then the web application module can get a page of tracks and compose them with the templating engine.</p>
<p>Access to Track data is done as its requested. The absolute minimum number of COM calls are made to render each template. The Track interface uses the wrapper pattern so its thin and fast. This way the tracks can support a large set of properties without having to copy each one into a temporary variable. The extra fields can be used by other templates, like the one that will render what playing now.</p>
<p>Expect a release (with code) as soon as I get the obvious bugs out. </p>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2006/01/04/indrio-performance-enhancements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indrio Development: Fun with DOM</title>
		<link>http://waves.ky/2005/11/20/indrio-development-fun-with-dom/</link>
		<comments>http://waves.ky/2005/11/20/indrio-development-fun-with-dom/#comments</comments>
		<pubDate>Mon, 21 Nov 2005 03:44:50 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://waves.ky/2005/11/20/indrio-development-fun-with-dom/</guid>
		<description><![CDATA[DOM is a swell gal, she treats me all right, just so long as I take her out to her favourite restaurant; Firefox. When I get cheap and go for fast food at Internet Explorer, she&#8217;s not happy.
innerHTML is a read only property in IE for the table and tbody elements. Trying to set it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Document_Object_Model">DOM</a> is a swell gal, she treats me all right, just so long as I take her out to her favourite restaurant; Firefox. When I get cheap and go for fast food at Internet Explorer, she&#8217;s not happy.</p>
<p>innerHTML is a <a href="http://www.ajaxian.com/archives/2005/10/innerhtml_gotch.html">read only</a> property in IE for the table and tbody elements. Trying to set it causes a very nondescript error with a code of 0. Firefox isn&#8217;t totally off the hook either. With large sets of rows there are rendering errors at the bottom of the table if you don&#8217;t define a background color. I&#8217;m using prototype.js to insert the rows returned from an AJAX call. I kluged a fix for IE&nbsp;by inserting the entire table every time.</p>
<p>Performance building that table&nbsp;was very bad for large result sets (1k+ rows). Python had a built in profiler &amp; CherryPy has profiler support. I totally love this, this rocks 1000% more than Java. Reading and building the data set from iTunes&nbsp;was about 1/10th the total execution time so something else was not very fast. Turns out it was a module for the template engine that only worked with 2.4. I upgraded everything to 2.4 and performance got drastically better.</p>
<p>Now the major bottleneck is with fetching values from iTunes via COM. Thats about 80% of the time is spent in <code>__getattr__</code> and <code>_ApplyTypes_</code>. Thats the COM stuff translating returned values into Python types and the majority of that time is probably spent in iTunes. The stop gap to give reasonable performance is to limit the number of rendered results.&nbsp; I picked a &#8216;magic&#8217; number, 300, which renders in under&nbsp;2 seconds on my system. This will suck if your trying to search for music by genre and there are 1K+ results for &#8216;Trance&#8217; in your library. Some sort of paging solution may have to be used to get through a result set like that. I don&#8217;t really see that as a major usage pattern in my experience. People generally ask for music by title or artist&nbsp;and this turns out to be very specific and returns a limited number of results.</p>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2005/11/20/indrio-development-fun-with-dom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indrio Development Continues Apace: HTTP Server</title>
		<link>http://waves.ky/2005/11/12/indrio-development-continues-apace-http-server/</link>
		<comments>http://waves.ky/2005/11/12/indrio-development-continues-apace-http-server/#comments</comments>
		<pubDate>Sun, 13 Nov 2005 10:42:49 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://waves.ky/2005/11/12/indrio-development-continues-apace-http-server/</guid>
		<description><![CDATA[For this particular application I don&#8217;t care where the user interface is displayed. In fact it would be cooler if the UI could go somewhere other than where iTunes is. In fact it would also be cool if a couple of people on different computers could access the thing at the same time, bonus. So [...]]]></description>
			<content:encoded><![CDATA[<p>For this particular application I don&#8217;t care where the user interface is displayed. In fact it would be cooler if the UI could go somewhere <em>other</em> than where iTunes is. In fact it would also be cool if a couple of people on different computers could access the thing at the same time, bonus. So I decided to send the UI out over an HTTP server to a browser and use a bit of AJAX to make this snappy. This brought development to an impasse, where do you get an HTTP server for python. Apache was out of the question, I&#8217;m not having users install that thing just to run this little app, way overkill. In fact what I wanted was fairly specific:</p>
<ul>
<li>Small; as in not large, as in less than&nbsp;1 MB compiled</li>
<li>Embedded; must run from inside the app, no external servers please</li>
<li>Must not stop me from talking to COM</li>
<li>Must be nice to Unicode strings</li>
<li>Must be nice to AJAX</li>
<li>Must serve some static files</li>
<li>Must server some dynamic content probably composed with a template system</li>
</ul>
<p>Turns out there was only one system that I could locate that fit the bill, <a href="http://www.cherrypy.org/">CherryPy</a>. Getting the demo up and running was easy. Getting it to talk to COM was trickier. Its got something to do with threads and <a href="http://www.cherrypy.org/wiki/UsingCOMObjects">CoInitialize</a>-ing them. The docs there almost have the magic formula, you have to hook on to whatever COM object you are calling <em>after</em> you call <code>CoInitialize()</code>. This means you can&#8217;t start up COM in the built in <code>__init__</code> function of your root class in CherryPy, you have to call it from in the <code>InitializeCOM()</code>function, after the call to <code>CoInitialize()</code>. With that sorted I got the&nbsp;HTTP server to stop giving 501 errors and spit out the version of iTunes; &#8220;6.0.1.3 &#8220;. So far so good.</p>
<p>Now I am a big believer in the MVC pattern, code should stay in the code, and the view should be just the view. So next I wanted a template language to put together with CherryPy to complete my tool set. There seem to be a lot of these out there, mainly that want to mess with the HTML your writing to make sure your doing it right. Now, writing XHTML strict isn&#8217;t a problem and there is the posibility that I might generate some JavaScript code. The template engine has to be general, small size is a plus, easy to learn is a plus. <a href="http://www.cheetahtemplate.org/">Cheetah</a> looks almost exactly like <a href="http://jakarta.apache.org/velocity/">Velocity</a> to me, and&nbsp;I&#8217;ve worked with Velocity before so its a good fit for a rapid prototype.</p>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2005/11/12/indrio-development-continues-apace-http-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indrio Development Begins: iTunes, COM &amp; Python</title>
		<link>http://waves.ky/2005/11/11/indrio-development-begins-itunes-com-python/</link>
		<comments>http://waves.ky/2005/11/11/indrio-development-begins-itunes-com-python/#comments</comments>
		<pubDate>Fri, 11 Nov 2005 18:18:16 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://waves.ky/2005/11/11/indrio-development-begins-itunes-com-python/</guid>
		<description><![CDATA[Indrio is the name or a road not too far form here. Indrio is also the code name for a little project I&#8217;m working on to help me learn Python.  It involves talking to iTunes, over COM. This is easier than it sounds. The iTunes SDK documentation is well written, well organized and easy [...]]]></description>
			<content:encoded><![CDATA[<p>Indrio is the name or a road not too far form here. Indrio is also the code name for a little project I&#8217;m working on to help me learn Python.  It involves talking to iTunes, over COM. This is easier than it sounds. The iTunes SDK documentation is well written, well organized and easy to understand. It&#8217;s an easy API to work with, thats the good news.</p>
<p>The bad news is that some of the cool stuff that iTunes is doing in the UI is not available through the COM interface. Of particular interest to me was the Party Shuffle playlist. You can add tracks to it but only at the end i.e. No â€œPlay Next in Party Shuffleâ€ via COM. You can&#8217;t determine how many previously played tracks are showing (unless your actually playing that playlist and work it out from the currently playing track). You can&#8217;t set the playlist that feeds into the party shuffle or any of the other parameters. These things are not blockers for what I wanted to do but they would have made things much nicer for users.</p>
<p>Then there is fun with ID&#8217;s. The docs say that all objects in iTunes support four script friendly functions to return the Source, Playlist, Track &#038; Database ID&#8217;s respectively. If you have a problem accessing these functions its because the Source, Playlist and Track functions are declared to start with common letters; sourceID(), playlistID(), trackID(). The database ID function is capitalized as per the docs: TrackDatabaseID(). Also of interest, Python can handle the multiple return values of GetITObjectIDs() by turning them into an array. Score one for Python! Score another one for the Python COM browser which helped me track down the capitalization bug.</p>
<p>iTunes.GetITObjectByID() doesn&#8217;t work if all you have is the Database ID, which makes knowing that basically useless. To make GetITObjectID() work you need to know all 4 parameters. That isn&#8217;t exactly congruent with the docs. Supplying 0 to any of the parameters throws some sort of error.</p>
<p>The final twist is with Python. It supplies base types when a function returns a derived type over COM. So you have to cast the return type to the type you expected. This had me stumped for a while until I saw this <a href="http://www.brunningonline.net/simon/blog/archives/001742.html">Simon Brunning&#8217;s code</a>. win32com.client.CastTo() is the magic bullet that fixes this. I wish there was some good docs for the Python COM interface.</p>
<p>Stay tunes for the next installment where I reveal even less about what Indrio might be or do or why you should care&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2005/11/11/indrio-development-begins-itunes-com-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iTunes Folder Sync 0.2 Release</title>
		<link>http://waves.ky/2005/10/17/itunes-folder-sync-02-release/</link>
		<comments>http://waves.ky/2005/10/17/itunes-folder-sync-02-release/#comments</comments>
		<pubDate>Mon, 17 Oct 2005 18:42:32 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Continuous Loop]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://waves.ky/2005/10/17/itunes-folder-sync-02-release/</guid>
		<description><![CDATA[This version is a bit faster than the old one. It does the import in one batch so you get a nice progress bar in iTunes. Finally you can now edit the script to tell it where you store your music. This is the answer for people with complex music storage hierarchies that were not [...]]]></description>
			<content:encoded><![CDATA[<p>This version is a bit faster than the old one. It does the import in one batch so you get a nice progress bar in iTunes. Finally you can now edit the script to tell it where you store your music. This is the answer for people with complex music storage hierarchies that were not seeing new things being imported.</p>
<p><a href="http://waves.ky/iTunes/iTunesFolderSync.js">Download iTunes Folder Sync 0.2</a></p>
<p>Here is a link to <a href="http://waves.ky/2005/04/30/itunes-folder-sync/">how this script got started</a> and how to use it. As always you need the Windows Scripting Host (aka wscript) installed and the .js extension set to be executed using \windows\system32\wscript.exe</p>
<p>These enhancements were made possible by Howard Darwin who did the beta testing and contributed ideas. He has a wish list for future enhancements that I would love to accommodate but I&#8217;m not sure that the iTunes SDK makes this practical with the WScript engine.</p>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2005/10/17/itunes-folder-sync-02-release/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quality Caymanian Website</title>
		<link>http://waves.ky/2005/03/23/quality-caymanian-website/</link>
		<comments>http://waves.ky/2005/03/23/quality-caymanian-website/#comments</comments>
		<pubDate>Thu, 24 Mar 2005 04:06:40 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.waves.dreamhosters.com/?p=32</guid>
		<description><![CDATA[Well at least the Caymanian Compass got it right.&#160;They were last to the web but their page is&#160;valid XHTML and valid CSS,&#160;bravo! The site is based on tables not CSS but thats a small nit pick compared to other sites like Cayman Net News and gov.ky where the errors number in the hundreds.
They had an [...]]]></description>
			<content:encoded><![CDATA[<p>Well at least the <a href="http://www.caycompass.com/index.shtml">Caymanian Compass</a> got it right.&nbsp;They were last to the web but their page is&nbsp;<a href="http://validator.w3.org/check?verbose=1&amp;uri=http%3A//www.caycompass.com/index.shtml">valid XHTML</a> and <a href="http://jigsaw.w3.org/css-validator/validator?profile=css2&amp;warning=2&amp;uri=http%3A//www.caycompass.com/index.shtml">valid CSS</a>,&nbsp;bravo! The site is based on tables not CSS but thats a small nit pick compared to other sites like <a href="http://caymannetnews.com/">Cayman Net News</a> and <a href="http://www.gov.ky/">gov.ky</a> where the errors number in the hundreds.</p>
<p>They had an off island firm (<a href="http://cyber-dynamics.com/">cyber-dynamics.com</a>)&nbsp;code the site for them. It&#8217;s a proper news site with articles on their own pages etc. They still don&#8217;t pepper articles with the classifieds but perhaps that will come in&nbsp;the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2005/03/23/quality-caymanian-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript for Popups = Bad</title>
		<link>http://waves.ky/2005/03/23/javascript-for-popups-bad/</link>
		<comments>http://waves.ky/2005/03/23/javascript-for-popups-bad/#comments</comments>
		<pubDate>Thu, 24 Mar 2005 02:45:38 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.waves.dreamhosters.com/?p=31</guid>
		<description><![CDATA[To my dismay I discovered that the Cayman Islands Government home page uses a very broken version of a java-script popup function, probably stolen from some 1998, 4 inch thick,&#160;&#8217;The Web&#160;For Beginners&#8217;&#160;guide to HTML. It makes incorrect use of the DOM, this is either an error or was never tested by the developers. In any [...]]]></description>
			<content:encoded><![CDATA[<p>To my dismay I discovered that the <a href="http://www.gov.ky/">Cayman Islands Government home page</a> uses a very broken version of a java-script popup function, probably stolen from some 1998, 4 inch thick,&nbsp;&#8217;The Web&nbsp;For Beginners&#8217;&nbsp;guide to HTML. It makes incorrect use of the DOM, this is either an error or was never tested by the developers. In any case the usability of the site is horrid and the code is sloppy at best. I sent them a bug report to the purported webmasters <a href="mailto:webmaster@gov.ky">e-mail address</a>&nbsp;two weeks ago. It detailed the problem and its solutions, as yet I have received no response.</p>
<p>I wont&nbsp;bother to regale you with a description of how livid it makes me as a technology professional to see my country misrepresented in this way. I will defer to Mr. <a href="http://youngpup.net/">Aaron Boodman</a>, who already keeps a hit list&nbsp;for people who deserve execution for their negligence. His <a href="http://youngpup.net/2003/popups">article</a> details the problem and its very simple solution.</p>
<p>I have also found a way to make <a href="http://www.gov.ky/">www.gov.ky</a> your own personal bitch by rewriting their broken java-script on the fly using the fantastic <a href="http://greasemonkey.mozdev.org/">greasemonkey</a> plugin for <a href="http://www.mozilla.org/products/firefox/">Firefox</a> (You do have <a href="http://www.mozilla.org/products/firefox/">Firefox</a>, don&#8217;t you?).</p>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2005/03/23/javascript-for-popups-bad/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Test Faster</title>
		<link>http://waves.ky/2004/04/29/test-faster/</link>
		<comments>http://waves.ky/2004/04/29/test-faster/#comments</comments>
		<pubDate>Thu, 29 Apr 2004 12:54:33 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Mindshare]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.waves.dreamhosters.com/?p=46</guid>
		<description><![CDATA[Sometimes its good to take a step back and look at what&#8217;s going on. I think this week that&#8217;s what I needed to do. I know that I need to get working on the file transfer feature but in finding it hard to get fired up about it. Part of the problem is that debugging [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes its good to take a step back and look at what&#8217;s going on. I think this week that&#8217;s what I needed to do. I know that I need to get working on the file transfer feature but in finding it hard to get fired up about it. Part of the problem is that debugging and testing&nbsp;are becoming a nightmare. The code has stayed fairly well organized and I can still fix bugs quickly once I can reproduce them. The problem lies more with the amount of time it takes to build the client, setup a test environment, get the clients connected etc. You can do ruthless testing without some automation.</p>
<p>My first move was to add a configuration option to have the client act as an rdv-server. This stops the client from running any services. It loads the groups and becomes an RDV in each. Then I had some more ideas about automation:</p>
<ul>
<li>It would be nice to launch one or more peers (say up to 4) from within Eclipse. I could do this either with Eclipse or with Ant. It would also be nice if the&nbsp;files for these clients didn&#8217;t clutter up the main development directory.</li>
<li>It would be nice if each client would remember its position on screen. (sometimes its the simple things)</li>
<li>I still don&#8217;t have a good idea of how to write JUnit tests that use the client when its online. JUnit seems naturally useful for simple things but for network interaction testing I&#8217;m not sure how it should be used. I think at least the client would have to be headless (no GUI).</li>
<li>Restart JXTA from within the application, optionally erasing the config data. There may be issues with this, i see developers having trouble doing this on the dev list.</li>
<li>Have the client display what version it is, and write that to the log file at startup. I&#8217;m not sure where that should be stored. The version numbers are generated by Ant at build time. It would be nice if I could retrieve it as a property of the mindshare.jar file.</li>
<li>Peer initialization times aren&#8217;t consistent, mainly in joining the NetPG. If only there was something I could do in code to &#8216;encourage&#8217; each peer to find an RDV. Starting my own NetPG is an option, perhaps just on my LAN using multicast. I don&#8217;t like testing things on the LAN though, multicast hides problems that don&#8217;t crop up till you use the program across the internet.</li>
</ul>
<p>Other stuff unrelated to testing:</p>
<ul>
<li>RDV timeouts are 2 minutes! That&#8217;s way too long for a real world application. The JXTA guys need to remember that people will hardly sit still for 7 seconds while a web page loads. It would be nice if I could get more fined grained control of the RDV service and perhaps speed things up. Empirical evidence seems to indicate that 15 seconds might be as fast as the current implementation can manage.</li>
<li>It would be nice to have a bug tracking database to testers could report bugs. Either as a forum of a dedicated bug tool. (<a href="http://bugzilla.org/">Bugzilla</a> perhaps?)</li>
<li>It would be nice to have source control. I have the history in Eclipse at the moment which is all I have needed so far but source control would be better. <a href="http://subversion.tigris.org/">Subversion</a> has been suggested as an alternative to CVS, but Eclipse has nice CVS integration.</li>
<li>I need to update this website. Its not nice to look at and it needs a better description of the project.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2004/04/29/test-faster/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Questions about JXTA</title>
		<link>http://waves.ky/2003/07/24/questions-about-jxta/</link>
		<comments>http://waves.ky/2003/07/24/questions-about-jxta/#comments</comments>
		<pubDate>Thu, 24 Jul 2003 22:59:27 +0000</pubDate>
		<dc:creator>Gareth Farrington</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.waves.dreamhosters.com/?p=8</guid>
		<description><![CDATA[JXTA is a standard (and accompanying reference implementation in Java) for P2P nodes to connect, form groups and &#8216;advertise services&#8217;. I&#8217;m currently looking at JXTA for the core networking technology in my project.  Several things have struck me about JXTA&#8217;s design as overly presumptuous and are deal breakers for me.
All peers belong to the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jxta.org">JXTA</a> is a standard (and accompanying reference implementation in Java) for P2P nodes to connect, form groups and &#8216;advertise services&#8217;. I&#8217;m currently looking at JXTA for the core networking technology in my project.  Several things have struck me about JXTA&#8217;s design as overly presumptuous and are deal breakers for me.</p>
<p>All peers belong to the &#8220;World Peer Group&#8221;. I presume this means that all peers can communicate with each other because they belong to this group. Furthermore all peers are encouraged to rout traffic for each other. As a peer I would not be inclined to rout traffic unless it directly benefited me or other peers in my group. The last thing I want to be doing is routing traffic for some file sharing service when I&#8217;m trying to commit to changes to the group. My traffic comes first, preferable exclusively. The only thing I would agree to route for other peers would be discovery messages. Using the network at large to help people find each other is a fair exchange in value for traffic.</p>
<p>I&#8217;m aiming for a secure network. It seams peers can join my group without authenticating with one of the group members first. I want to have a custom authentication protocol with public key encryption.</p>
<p>There dost seam to be clear answers to these questions on the JXTA website either. I guess its time to dig into the protocol spec to find out.</p>
]]></content:encoded>
			<wfw:commentRss>http://waves.ky/2003/07/24/questions-about-jxta/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
