<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
	<channel>
<title>Odds &#x26; Ends</title><link>http://homepage.mac.com/benjamin_miller/odds_ends/index.html</link><description>Hot News&#x21;</description><dc:language>en-gb</dc:language><dc:creator>benjamin@watershed.co.uk</dc:creator><dc:rights>Copyright 2005-2006 Benjamin Miller</dc:rights><dc:date>2009-02-10T08:43:07+00:00</dc:date><admin:generatorAgent rdf:resource="http://www.realmacsoftware.com/" />
<admin:errorReportsTo rdf:resource="mailto:benjamin@watershed.co.uk" /><sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
<lastBuildDate>Tue, 10 Feb 2009 10:08:27 +0000</lastBuildDate><item><title>Contacts Plug-In Update</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Other Work</category><dc:date>2009-02-10T08:43:07+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/contacts_pb3.html#unique-entry-id-53</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/contacts_pb3.html#unique-entry-id-53</guid><content:encoded><![CDATA[<p class="summary">Another beta version of the Address Book plug&ndash;in for RapidWeaver</p>


<div class="essay">


<p>Here is a new beta of the Contacts plug-in.   This release simply corrects a problem running under 10.5 and extends the preview date.   No work has been done to enhance the plug-in for use in RapidWeaver 4 or use the new API features.</p>


<p>'List view' will give more reliable results than 'Cards view' but please test thoroughly before using on a public site.   Most of the 'display issues' still occur in Internet Explorer 6 and vary depending on the RapidWeaver theme used.   Clicking on telephone numbers still gives unpredictable results in Internet Explorer.</p>


<p>Many of the issues with the <a href="/benjamin_miller/odds_ends/files/contacts_pb1.html" title="Blog: Contacts Plug-in">first version</a> still remain.   Public Beta 2 will expire on 25th June 2009.</p>


<p><a href="http://www.fourbytwoflat.com/downloads/addresses_pb3.zip" title="Download the zip file">Download Contacts Public Beta 3</a>.</p>


</div>
]]></content:encoded></item><item><title>Safari Kiosk Tabs</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2009-02-02T09:03:45+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/safari_tabs.html#unique-entry-id-50</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/safari_tabs.html#unique-entry-id-50</guid><content:encoded><![CDATA[<p class="summary">An AppleScript to ensure that new Safari windows are opened in a tab</p>


...<p>In the Watershed Caf&eacute;/Bar there are a number of &lsquo;Slacker Tables&rsquo;&mdash;public web browser kiosks set in glass tables.   Oliver asked about a way to ensure that the instances of Safari running on the tables would open a new tab and not a new window.   This is a simple AppleScript, to be saved as an Application and run, in a loop in the background.</p>


<p>This was only a quick, five minute hack but the results are surprisingly usable.   Running the script as an application in the background doesn't appear to affect performance or stability over longer periods of time.</p>


<p><strong>Note</strong>: this script has only been tested with Safari 3.2.1 in  MacOS X 10.5.5</p>


...<li class="indent1"><code>tell application "Safari"</code></li>


<li class="indent2"><code>if the (count of documents) > 1 then</code></li>


<li class="indent3"><code>set theURL to the URL of the front document</code></li>


<li class="indent3"><code>if theURL is not "" then</code></li>


...<li class="indent4"><code>tell front window</code></li>


<li class="indent5"><code class="comment">-- Safari appears to only let the front window create tabs</code></li>


<li class="indent5"><code>set theTab to make new tab</code></li>


<li class="indent5"><code>set current tab to theTab</code></li>


<li class="indent5"><code>set the URL of theTab to theURL</code></li>


<li class="indent4"><code>end tell</code></li>


<li class="indent3"><code>end if</code></li>


<li class="indent2"><code>end if</code></li>


<li class="indent1"><code>end tell</code></li>
]]></content:encoded></item><item><title>Cocoa network persistence</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2009-01-09T12:47:02+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/fd9823e05d48bc26629096af46686fc7-49.html#unique-entry-id-49</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/fd9823e05d48bc26629096af46686fc7-49.html#unique-entry-id-49</guid><content:encoded><![CDATA[<p><a href="http://couchdb.apache.org" title="CouchDB Project Home">Apache CouchDB</a> is a distributed, fault-tolerant and schema-free document-oriented database.   CouchDB does support data structures within the document but deep hierarchies are best served using a relational database.</p>


<p>Document elements are stored in a <a href="http://www.json.org/" title="JSON Spec">JSON</a> representation within a document.   There is a natural &ldquo;impedance match&rdquo; between JSON and Cocoa&rsquo;s Property List objects with the exception of NSDate. 

...CouchDB&rsquo;s most beneficial feature to Watershed&rsquo;s situation now is the casual integration with all categories of applications and the ease with which sophisticated shared storage is possible from application resource&ndash;sensitive client environments such as Cocoa on the iPhone and Javascript applications.</p>


...<p>Persistence is achieved in Cocoa by using NSMutableDictionary as the container for each document.   Each document can be identified by the identifer and the revision, stored in the dictionary using the NSString keys <em>_id</em> and <em>_rev</em>. ...  Most of the hard work is done by <a href="http://code.google.com/p/json-framework/" title="Google Code Home">json-framework</a> which will need to be included in the project.</p>


...		<li class="indent2"><code class="comment">// this dictionary originated from the document database so update by including ID in URL</code></li>


...		<li class="indent2"><code>requestURL = [NSURL URLWithString:[self objectForKey:COUCHDB_ID_KEY] relativeToURL:storeURL];</code></li>


...		<li class="indent2"><code class="comment">// This is a new Dictionary so we are inserting</code></li>


...	<li class="indent1"><code>NSDictionary *results = [jsonParser objectWithString:result allowScalar:NO error:&error];</code></li>


...		<li class="indent2"><code class="comment">// update the revision and the id (in case this is an insertion we do both)</code></li>


		<li class="indent2"><code>[self setValue:[results valueForKey:@"id"] forKey:COUCHDB_ID_KEY];</code></li>


...<p>The next step will be creating a database co&ndash;ordinator or connection proxy to manage persistence in a more sophisticated fashion.   This can support features such as authentication &amp; authorisation, revisions, rollback &amp; merging of documents and the efficient storage &amp; retrieval of collections.</p>


<p>Whilst CouchDB is not an object database and doesn&rsquo;t encourage deep hierarchies, we&rsquo;ve experimented recently combining CouchDB documents with Core Data&rsquo;s NSManagedObjects by keeping document identifiers in managed objects and merging at display time.   In the other direction, NSManagedObjects&rsquo; snapshots can easily be included in documents in the store when the NSManagedObject is saved in the context.</p>


<p>CouchDB is a peer-based distributed database system, it allows for users and servers to access and update the same shared data while disconnected and then bi-directionally replicate those changes later.   We&rsquo;d like to look into the possibility of using Couch, embedded in the desktop application bundle, locally and then allow CouchDB to replicate and sync between different instances as they appear on the network.</p>
]]></content:encoded></item><item><title>Unfuddle</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Software</category><dc:date>2008-08-17T14:50:10+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/unfuddle.html#unique-entry-id-47</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/unfuddle.html#unique-entry-id-47</guid><content:encoded><![CDATA[<p class="summary">Initial personal responses from using web-based software and project management for a day.</p>


...<p><a href="http://www.unfuddle.com" title="Unfuddle's home page">Unfuddle.com</a> provides issue tracking tickets, a documentation wiki, Subversion &amp; Git repositories along with web-based interfaces to all these services.   Whilst beginning a new personal iPhone project today, I wanted to test a hosted service to aid with small, non-public development projects.</p>


<p>Sign up was quick and simple; further profile information can be entered at a later date.   Next, the user is given the option to create a new repository&mdash;a choice of Subversion or Git. ...  The repository was available immediately both in local client applications and in the web-based browser.   The connection was not the fastest, especially for a Sunday afternoon and I wonder how it will cope midweek.   As mentioned, I writing a small, by their nature, iPhone application which shouldn't overwhelm any network connections.</p>


<p>The UI is OK.   The interface, especially for tickets is not as nice as <a href="http://www.lighthouseapp.com" title="Lighthouse Issue Tracking">lighthouseapp.com</a> which we use at Watershed.   The web-based source code browser does support Objective-C highlighting.   Which was nice.</p>


<p>An HTTP REST API is available with read &amp; write access to most of the data.   At Watershed, a Cocoa bundle uses the REST API to allow end users to send feedback from within the application directly into the Lighthouse database.   Repository commit comments can be linked against individual bugs with a rudimentary text formatting pattern in the comment.</p>


<p>A dashboard widget is available for MacOS X.   The widget is well designed and shows the latest messages, repository commits and project progress.   Clearly designed and concise email reports can be received hourly, or at less frequent intervals.   I found, as a solo developer, these two features less useful but small teams may benefit.</p>


<p>Unfuddle could save lots of time, configuring a server, providing network access &amp; off-site backup services, adding repositories and writing Subversion hook scripts.</p>
]]></content:encoded></item><item><title>Cocoa EOF? No thanks</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><category>dShed</category><dc:date>2008-07-15T08:55:45+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/cocoa_eof.html#unique-entry-id-46</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/cocoa_eof.html#unique-entry-id-46</guid><content:encoded><![CDATA[<p class="summary">As our current persistent framework at Watershed needs work I&rsquo;ve been thinking about shared persistent data frameworks</p>


...<p>It appears to be with increasing frequency that one can hear experienced Cocoa developers reminiscing about EOF for desktop applications and new developers wondering why Core Data doesn&rsquo;t use stores in network RDBMS&rsquo;s from a range of vendors.</p>


<p>As Watershed&rsquo;s persistence framework will shortly be replaced, I&rsquo;ve been working on some possible replacements.   One of the best things about being an in-house developer is, I get to to see people using my applications every day.   I walk past people&rsquo;s desks and see which windows are open and what tasks users perform. 

...<li>The user needs to make a quick edit to an item stored in a relational database.</li>


<li>The user opens their Cocoa client and a window opens, normally containing a NSTableView listing all the entries.</li>


<li>The persistence routines generate the required SQL, sends it to the database and receives a stream of data.</li>


<li>The persistence routines turn the data into a object graph generating thousands and thousands of objects.   Each business object, even with relationships represented by proxy objects, contains many attributes each of which is represented by an object.</li>


<li>Once the persistence routines have finished creating the thousands and thousands of objects, making copies &amp; caches and linking them together by setting object instance variables: the user opens the first item in the list, corrects a typo and quits the application.</li>


...Possibly the way forward is to follow iPhone applications&rsquo; methods of display a small number of entries then prompting the user to load then next batch. iTunes displays thousands of tracks in a table on launch so why can&rsquo;t my applications do the same? ...  Why does the application need to populate an entire business object just to display the title in one column?

...<p>Caching large chunks of data on the client made efficiency enhancements that were just not needed. ...  Our controllers in the Cocoa applications now save changes more frequently, and with less modality in the edits.   This results in a constant trickle of data across the network but a much smoother user experience.</p>


<p>Public applications with a large number of users render bulky local caches ineffective.   As the number of editors increases, the probability that a local cache is no longer synchronised increases.</p>


<p>Frameworks such as EOF or ActiveRecord work very well over high speed, high quality networks but many network connections for Macintosh, and iPhone, clients are mobile and made wirelessly or are intermittent. 

...<p>So, no I don&rsquo;t want Apple to re-release EOF for Objective-C or allow Core Data stores to reside in a network RDBMS&mdash;I want something better.</p>
]]></content:encoded></item><item><title>New Design</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>This Site</category><dc:date>2008-06-15T17:27:54+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/2008_design.html#unique-entry-id-43</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/2008_design.html#unique-entry-id-43</guid><content:encoded><![CDATA[<p class="summary">A new, easier to read, design for my personal site.</p>


<div class="essay">


<p>As much as I liked the <a href="assets/2006_design.png" rel="self">last design</a> for the site, it just didn't work anymore.   The columns were too narrow: the code samples had to be edited to fit the narrow width and images had to be scaled fairly small to fit the narrow colum.</p>


<p>I designed and almost finished the RapidWeaver template almost  year ago.   Whilst adding recent posts with copious code examples, I saw that I really needed to get the new template used.   I wanted the new design to be easy to read longer articles and typographically mature.   I do think the site, is perhaps, not as distinctive, but is far less painful to read.</p>


<p>I'm using <a href="http://www.realmacsoftware.com/rapidweaver/">RapidWeaver</a> 4.0 now, and have made a few small changes, partly due to new features in RapidWeaver, partly due to changes at Watershed and partly because I just haven't completed the template.   Comments are back, iChat status and links are gone and so is Twitter messages.</p>


</div>]]></content:encoded></item><item><title>Using RESTful WebObjects</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2008-06-08T19:25:13+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/using_restful_webobjects.html#unique-entry-id-42</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/using_restful_webobjects.html#unique-entry-id-42</guid><content:encoded><![CDATA[This can be seen in use at the <a href="http://www.watershed.co.uk/cgi-bin/WebObjects/Watershed.woa/wa/programme?

...<p>REST URLs describe the location of the resource in a hierarchy, so arguments are sent mimicking a directory structure: <a href="http://www.watershed.co.uk/cgi-bin/WebObjects/WatershedAPI.woa/REST/exhibits/1527" title="Send the REST request as GET in the browser">www.watershed.co.uk/cgi-bin/WebObjects/WatershedAPI.woa/REST/exhibits/1527</a>


...URLs generated by the data modules are 'pretty' and incoming requests are rewritten in Apache so the previous URL becomes: <a href="http://www.watershed.co.uk/cgi-bin/WebObjects/WatershedAPI.woa/REST/exhibits/1527" title="Send the REST request as GET in the browser">api.watershed.co.uk/exhibits/1527</a>.</p>


...Using <a href="http://curl.haxx.se/" title="cURL">CURL</a>, from Terminal, can be useful, optionally adding headers to, or, setting the method or body of, the HTTP request.   Typing man curl into Terminal will display a page explaining the options. <a href="http://code.google.com/p/rest-client/" title="Google Code project page">RESTClient</a> is a Java Swing application to test RESTful web services.   It can be used to test variety of HTTP communications and has GUI options for most of the HTTP 1.1 specification, including setting the method, authentication values and the message body as well as viewing the response headers. 

...Using the model described earlier, we can find the <strong>Programme</strong> with the primary key of 57 by using the URL: <a href="http://api.watershed.co.uk/programmes/57/" title="Send the REST request as GET in the browser">api.watershed.co.uk/programmes/57/</a> .   As the entity name is underscore separated then to set the target for the <strong>MediaSet</strong> entity with a primary key of 1234, we can use the URL: <a href="http://api.watershed.co.uk/media_sets/1234" title="Send the REST request as GET in the browser">api.watershed.co.uk/media_sets/1234</a>.</p>


...To find the Programme of an Exhibit we use the URL: <a href="http://api.watershed.co.uk/exhibits/1527/programme/" title="Send the REST request as GET in the browser">api.watershed.co.uk/exhibits/1527/programme/</a>.   We can follow the key path, defined in the EOModel, even further by using the to-many relationship back to an array of Exhibits: <a href="http://api.watershed.co.uk/exhibits/1527/programme/exhibits/" title="Send the REST request as GET in the browser">api.watershed.co.uk/exhibits/1527/programme/exhibits/</a>. ...  Using this relationship results in a URL similar to: <a href="http://api.watershed.co.uk/exhibits/1527/media_sets/" title="Send the REST request as GET in the browser">api.watershed.co.uk/exhibits/1527/media_sets/</a>.</p>


...<p>Outlined in the <a href="/benjamin_miller/odds_ends/files/restful_webobjects.html" title="Blog:RESTful WebObjects">last post</a> was a technique whereby changing the Accept HTTP header changed the response data format or allowed a client to send updated data to the web application in a variety of formats. 

...<p><code>curl -H 'Accept: text/xml' http://api.watershed.co.uk/exhibits/1530/</code><br />produces an XML response, whilst:</p>


<p><code>curl -H 'Accept: text/plist' http://api.watershed.co.uk/exhibits/1530/</code><br />produces a response in Apple's Property List format.</p>


...The FreeBSD web server adapter, for watershed.co.uk applications, was compiled from the Apple source code and does not support the PUT &amp; DELETE methods. 

...<code>curl -X PUT -d "<exhibit><tit1e>A new title<title></exhibit>" http://api.watershed.co.uk/exhibits/1530/</code></p>


...<code>curl -X POST -d "<exhibit><title>A new Exhibit<title><copyText>What a wonderful&hellip;<title></copyText>" http://api.watershed.co.uk/exhibits/1530/</code></p>


...<p>To insert a new Exhibit in the data store and add it to the array of exhibits in a programme, specify the array as the target resource:<br />


<code>curl -X POST -d "<exhibit><title>A new Exhibit<title><copyText>What a wonderful&hellip;<title></copyText>"<br />http://api.watershed.co.uk/programmes/57/exhibits/</code></p>


...<p>As mentioned previously, the adapter installed on the web server does not handle PUT &amp; DELETE requests but we will compile a new version that supports these methods shortly. ]]></content:encoded></item><item><title>Replacing Cocoa Persistence Framework</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2008-07-18T11:27:50+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/b7a067b89adb74acea84ee0ae89f58f6-41.html#unique-entry-id-41</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/b7a067b89adb74acea84ee0ae89f58f6-41.html#unique-entry-id-41</guid><content:encoded><![CDATA[<p>Watershed's Communications staff use an in-house desktop application, named <a href="/benjamin_miller/odds_ends/files/restful_webobjects.html" title="Blog:Communicate">Communicate</a>, to edit and control "what's on" information for the organisation.   Communicate uses a Cocoa persistence framework, I wrote some years ago in Objective-C, to fetch and save objects into an <a href="http://www.openbase.com">Openbase</a> relational database. 

...<p>An Objective-C, Cocoa, business objects framework is written on top of the persistence classes which describes and implements all the business logic. 

...As the size of the database has grown, unarchiving large streams of data into the object graph is beginning to use a significant amount of time.</p>


...The flexability is currently provided by database specific plug-ins and we would like to change this to use a three tier architecture for desktop client applications.</p>


<p>Using a set of desktop frameworks, written in Objective-C, mirroring a set of server frameworks, written in Java, means defining and implementing any object relationships, validation rules and convenience routines twice. 

...<p>Web applications, such as <a href="http://www.basecamphq.com/" title="Information about Basecamp web application">Basecamp</a>, <a href="http://lighthouseapp.com/" title="Information about Lighthouse web application">Lighthouse</a> and soon Watershed, frequently provide a REST API  to the services. ...  This API can be used to build a wide range of software but is especially useful for desktop applications, widgets and iPhone applications communicating with the web service. 

...This approach where the framework connects and authenticates directly to the database <a href="/benjamin_miller/odds_ends/files/cocoa_eof.html" title="Blog:Cocoa EOF? 

...<p>Some performance issues could be resolved by adding the ability to partially load business objects, similar to the way raw rows can be used in EOF.   We suspect performance improvements could also be found in the routines that deal with the model lookups and the creation of Cocoa objects from huge streams of database data.</p>


...Moving our base business object to a subclass of NSManagedObject we can reuse many of the change tracking functionality built into NSManagedObject to store our objects into a network RDBMS.</p>


...<p>The third option is to essentially use Core Data as a local cache for REST web services. 

...<p>Using the delegate notifications from the managed object context, changes would be propagated through RESTful HTTP POST and PUT methods to URLs on the server. 

...<p>By using REST stores we're complementing the work we have been doing to add RESTful request handing to WebObjects applications and would be useful when writing desktop clients for the upcoming changes in dShed.net as well as the ever increasing number of web applications with REST APIs.</p>


...We would need to find out if managed objects could be made to support property values that can be trickled in as they are needed, in a similar fashion to the way relationships are faulted in.</p>


...With the limited memory and performance available on the iPhone, I suspect it would be advantageous to create a separate, simpler, resource saving mapping routines that deserialze XML or binary Property LIsts.</p>


...<p>We've been using WebObjects' frameworks to create web applications for some time now and have recently been working on a method to quickly and effortlessly add <a href="/benjamin_miller/odds_ends/files/restful_webobjects.html" title="Blog:RESTful WebObjects">RESTful interfaces</a> to applictions.</p>


<p>The REST interface over HTTP was designed, not only to provide a publicy available API, but also as low configurtion data provider to a desktop persistence framework.</p>


...<p>Whilst, not heavy user of Ruby on Rails, it's impressive how simply and amazingly quickly a web application can be developed to vend XML, or JSON, data for a desktop client. ]]></content:encoded></item><item><title>RESTful WebObjects</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2008-06-02T10:13:39+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/restful_webobjects.html#unique-entry-id-40</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/restful_webobjects.html#unique-entry-id-40</guid><content:encoded><![CDATA[<p>REST web services vending XML & plist data appeared a good fit for all the above but we didn't want to have to write a whole collection of direct actions and components for each site.   So we are in the process of building a REST Request Handler for new and existing applications.   This is still a work in progress and is only, a day or two old, but hopefully in the near future there should be useable code alongside the explanation.</p>


...<p>First we create a new instance of the handler and assign it to handle particular requests. 

...The request handler key is "REST" so any request sent to www.domain.com/cgi-bin/WebObjects/App.woa/REST/... will be processed by our handler.</p>


...<p>The REST Handler can automatically provide public access to any database so as a precaution a security delegate must be implemented and added to the request handler before any requests can be accepted. 

...There are some general REST authentication and authorisation practices in use and these leverage existing  features of HTTP: with a secure HTTPS connection to prevent eavesdropping and use, either, HTTP Basic or Digest authentication, or, include a security token as a HTTP header key such as:</p>


...Next the REST Handler asks the delegate, using <code>requiredHTTPAuthentication()</code>,  if the request will require authentication and, if the client hasn't provided any, will ask the client to provide authentication. 

...<p>Once the security delegate has approved the request, a data module is then invoked with the task of handling of the request.   Using a number of installed data modules allow the application to vend REST web services in any number of different data formats. ...  Each data module implements an interface based on HTTP actions and the REST Handler invokes a method passing the original WORequest and the target EO, or array of EO's.</p>


<p>Currently, the REST Handler selects an appropriate data module based on the Accept HTTP header sent in the request by the client.   It was assumed that clients would have fine grained control over the request and the client would not always be a browser window so the REST Handler treats each acceptable MIME Type as HTTP 1.1 would, MIME Types are listed in order of preference: most desirable first. ...  If a header such as <code>Accept: image/jpeg, video/mp4, text/xml;q=0.9, text/json, text/plist, */*</code> were received then the request handler would look first for a module that handled JPEG images and so on.</p>


...Currently we are just using a particular XML data module for testing and in the process of writing a plist module for use with Cocoa desktop and iPhone clients. 

...<p>The REST Handler will pass the request and the target Enterprise Objects to the data module but on some occasions we may not want make every entity available to the public. ...  An optional model delegate provides the REST Handler and the data modules with answers and information they need to handle the requests efficiently. 

...It's currently difficult to adjust or influence the target enterprise objects provided to the data modules which would be useful for situations where we may not want to include all the available films, just the ones screening this month.   There is no HTTP Digest authentication and the ability to specify query strings, such as <code>commence<2007-05-29</code> or <code>isPublic=true</code>, in the URL or a request header would be very useful.   There is still plenty of work to be done until the REST Handler is complete but it will be a valuable tool as we make architectural, storage and communication changes in watershed.co.uk and dshed.net.</p>]]></content:encoded></item><item><title>Beamer</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>dShed</category><dc:date>2008-01-15T12:00:20+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/beamer.html#unique-entry-id-39</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/beamer.html#unique-entry-id-39</guid><content:encoded><![CDATA[<p>As part of 2007's <a href="http://www.electricdecember.org" title="Electric December's Home Page">Electric December</a> we wanted to send video films to mobile phones quickly and cheaply.   One method selected was to send the films directly to user's mobile phones using Bluetooth from inside the Watershed building. ...  There wasn't a budget for this and we thought that Bluetooth broadcasting was a technology that would be useful for us to repeat so we allowed ourselves a few days to write the software.</p>


...Strange when a daemon would perhaps have been a better choice but we hope one day to make the application an easy to use broadcasting application for any user with playlists and other features.   We built a Cocoa application using <a href="http://developer.apple.com/documentation/Cocoa/Reference/CoreData_ObjC" title="Apple's Developer Documentation">Core Data</a> to store discovered device lists and preferences.   Bluetooth connectivity was handled using C functions and Objective-C methods in the <a href="http://developer.apple.com/documentation/DeviceDrivers/Reference/IOBluetooth" title="Apple's Developer Documentation">IOBluetooth</a> framework. 

...<p>Each day, a different film from Electric December is broadcast to mobile phone users in the foyer and Caf&eacute; Bar.</p>


...Although the Mac Mini was surrounded on most sides by copious amounts of tin foil to make the radio signal as directional as possible it often registered mobile phones from people walking along the quayside below or using the Chicago Rock bar. 

...Some users moved so quickly through the space that they were out of range before Beamer had a chance to ask the device for its name.   For the first half of December the films were broadcast from Watershed's foyer, above the Box Office, but we noticed that apart from the periods when visitors queue for the cinemas in the evenings, a space with a large turnover of transient users is not ideal location.   For the second half of the transmission period the Mac Mini was located in the Caf&eacute; Bar, below the spirits' rack, and this increased the number of names retrieved and connections attempted.</p>


...The films were transferred to 57 different devices so a small number of users, mostly staff, received more than one film.</p>


...Beamer attempted to connect to roughly two thirds of the mobile devices that stayed around long enough to get the display name but only managed a connection in less than 20% of cases. 

...The largest numbers are recorded when interest in the project is high at the start of the month and gradually decreases over the month until just before Christmas when the project is forgotten.</p>


<p>In the early days of the deployment, kernel panics were frequent and and Beamer only managed to run for a number of hours at a time.   Days two and five were days when the application was only running for a small number of hours. 

...As well as future short film distribution, Bluetooth could also be used to distribute other information to users of the Watershed such as contact or screening information.   Having written that, I'm not convinced that broadcasting, unannounced content out to mobile phones will ever be that&nbsp; successful on a large scale.   I'm hoping at some point in the near future, to produce a 'kiosk' type viewer with user initiated wireless transfers to mobile phones and devices.   Having the user send a film to their own device is far less intrusive and perhaps would be used widely.</p>
]]></content:encoded></item><item><title>New Beta of Contacts Plug-in </title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Other Work</category><dc:date>2007-07-17T08:35:23+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/contacts_pb2.html#unique-entry-id-35</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/contacts_pb2.html#unique-entry-id-35</guid><content:encoded><![CDATA[<div class="essay">


<p>Here is a new beta of the Contacts plug-in.   There have been fixes since the last version, primarily with Internet Explorer display issues.   It is now possible to use the plug-in in production sites depending on the options selected.</p>


<p>'List view' will give more reliable results than 'Cards view' but please test thoroughly before using on a public site.   Most of the 'display issues' occur in Internet Explorer 6 and vary depending on the RapidWeaver theme used.   They are also some CSS & Javascript problems with Safari 3 that have yet to be resolved.</p>


<p>Many of the issues with the <a href="/benjamin_miller/odds_ends/files/contacts_pb1.html" title="Blog: Contacts Plug-in">last version</a> still remain.   Public Beta 2 will expire on 25th September 2007.</p>


<p><a href="http://www.fourbytwoflat.com/downloads/addresses_pb2.zip" title="Download the zip file">Download Contacts Public Beta 2</a>.</p>


</div>
]]></content:encoded></item><item><title>iPhone SDK</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Software</category><dc:date>2007-06-20T10:35:47+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/iphone_sdk_one_trip.html#unique-entry-id-34</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/iphone_sdk_one_trip.html#unique-entry-id-34</guid><content:encoded><![CDATA[<div class="essay">


<p>As disappointing as the lack of an iPhone Cocoa SDK was at last week's WWDC and the 'controversial' techniques developers are encouraged to use to write applications for the iPhone, there is an application that appears to substantiate Apple's suggestions.</p>


<p><a href="http://onetrip.org">OneTrip</a> is a shopping list web application specifically styled and built for the iPhone.   It uses UI metaphors from the iPhone's applications, is styled sympathetically and is designed with features such as drag-scrolling and screen resolution in mind.   Data storage happens on the  server with cookies managing session identification so there is no user registration or login.</p>


<p>If all iPhone web applications are like this then maybe the current lack of a SDK it isn't such a disaster.</p>


</div>]]></content:encoded></item><item><title>Multi-Channel Audio</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>dShed</category><dc:date>2007-06-08T11:24:39+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/multi_channel_quicktime.html#unique-entry-id-33</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/multi_channel_quicktime.html#unique-entry-id-33</guid><content:encoded><![CDATA[<p class="summary">Delivering forty channel audio using QuickTime APIs to adjust movie files.</p>


...<p>A little while ago, <a href="http://www.hs4cl.com" title="Oliver's Blog">Oliver</a> (Watershed's ICT Co-ordinator) , asked me to write a small command line tool to set the audio output channels of a QuickTime movie.   Oliver was writing software for <a href="http://www.dshed.net/studio/residencies/clarkbursary/journal/">Dream Director</a>, a project  that plays audio to people sleeping in pods in response to rapid eye movement.</p>


<p>A <a href="http://www.apple.com/macmini/">Mac mini</a> plays back the audio to up to twenty pods (containing sleeping people) through a <a href="http://www.dshed.net/studio/residencies/clarkbursary/journal/wp-content/uploads/2007/05/bertha-behind.jpg">collection of M-Audio Firewire410 boxes</a>.   As the audio-out hardware units have been aggregated into a single virtual device with forty available channels, it was just a case of playing back a stereo file through a selected pair of channels.</p>


<p>QuickTime movies will save the audio channel mapping inside the file, so the requirement was to build a tool that would set the selected channels in a movie and save the file to disk.   The source listing is for a Cocoa command-line Tool, using QTKit,  to open an audio file, set the track mapping and save as a QuickTime movie. </p>


<p>QuickTime now uses <a href="http://www.apple.com/macosx/features/coreaudio/">Core Audio</a> to handle the audio channel mapping and I thought this may be of some use to people.   The partial listing below shows the code needed to map audio channels using QuickTime and a link to the source file of the tool is below the listing. 

...<li><code class="comment">// Allocate a layout of the required size</code></li>


<li><code>trackChannelLayoutSize = fieldOffset(AudioChannelLayout, mChannelDescriptions[2]);</code></li>


<li><code>trackChannelLayout = (AudioChannelLayout*)calloc(1, trackChannelLayoutSize);</code></li>


...<li><code class="comment">// Adjust the channel Assignment so that for an index we get a pair of channel</code></li>


...<li><code class="comment">// ... and so on</code></li>


...<li><code>#warning This will break if Apple change the CoreAudio's Channel Layout internals</code></li>


<li><code>trackChannelLayout->mChannelDescriptions[0].mChannelLabel =  (1L<<16) | channelAssignment;</code></li>


<li><code>trackChannelLayout->mChannelDescriptions[1].mChannelLabel =  (1L<<16) | (channelAssignment + 1);</code></li>


...<li><code class="comment">// Set the track layout</code></li>


...<li class="indent1"><code>NSLog(@"**Error** QuickTime SetPropertyError: %i", err);</code></li>


...<p>Download the <a href="/benjamin_miller/odds_ends/assets/SetChannel.m.zip">full source code</a>.</p>
]]></content:encoded></item><item><title>Off to WWDC</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2007-06-08T08:23:48+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/8d2685d0af016efbc8199b309331154f-32.html#unique-entry-id-32</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/8d2685d0af016efbc8199b309331154f-32.html#unique-entry-id-32</guid><content:encoded><![CDATA[<p>I'm catching a flight, from Bristol to San Francisco, Saturday morning to attend Apple's <a href="http://developer.apple.com/wwdc/">WWDC</a>.   Although I've been a number of times, I'm still excited as ever about the technical content of the sessions and the chance to meet other Cocoa & WebObjects developers.</p>
]]></content:encoded></item><item><title>Contacts Plug-in</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Other Work</category><dc:date>2007-06-08T10:23:16+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/contacts_pb1.html#unique-entry-id-28</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/contacts_pb1.html#unique-entry-id-28</guid><content:encoded><![CDATA[<p class="summary">There's been (some) progress on the <a href="http://www.realmacsoftware.com/rapidweaver/">RapidWeaver</a> plug-in that allows users to create a page using cards from Address Book.</p>


<div class="essays">


<p>I've been pretty busy working on the Church Hall conversion in my spare time so development of this plug-in has been painfully slow and I'm still far from finished but I thought I would release an early Beta for anybody that is interested in seeing progress. </p>


<p><strong>Warning</strong>: <em>this plugin is not for production use</em>.   It may look fine when previewed in RapidWeaver but things go downhill when the pages are exported and things get even worse when viewed in Internet Explorer.</p>


<p>Some notable omissions include (but not limited to):</p>


<ul>


<li>No support for mobile telephone numbers</li>


<li>Incorrect handling of PNGs, Javascript and CSS in Internet Explorer</li>


<li>No visual feedback of 'Large Type' telephone numbers; just click them</li>


<li>Incomplete Microformat support</li>


<li>Dragging multiple cards, or groups, from the list or in from Address Book results in a single card being added</li>


<li>Broken pagination links in List view</li>


<li>Miscalculated pagination when some contacts are disabled in the list</li>


<li>The Appearance tab in Setup does nothing.   Still not sure how I will handle changing the appearance (If at all).</li>


</ul>


<p>and so it goes on&hellip;  Anyway, if you haven't been put off and are still interested the <a href="http://www.fourbytwoflat.com/downloads/addresses_pb1.zip" title="Download the compressed file containing the plug-in">download</a> and have a look.</p>


</div>
]]></content:encoded></item><item><title>It&#x27;s been a while...</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>This Site</category><dc:date>2007-01-25T19:20:00+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/267798cf08c64e16011dd93f72d6a573-27.html#unique-entry-id-27</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/267798cf08c64e16011dd93f72d6a573-27.html#unique-entry-id-27</guid><content:encoded><![CDATA[<div class="essay">


<p>It's been a while since I posted anything and one of my New Year's resolutions was to post useful, technical information, more frequently.   I guess I haven't started the year very well with a post whinging on about QuickTime just before the end of the month.</p>


<p>It was a busy last few months of the year.   It is always like that every year at work.   All the arts and media events appear to happen in the last quarter.   I been busy at Watershed working on sites such as <a href="http://www.electricdecember.org/">Electric December</a>, <a href="http://www.watershed.co.uk/">Watershed</a> and trying to get <a href="/benjamin_miller/odds_ends/files/communicate.html" title="Blog: Communicate">Communicate</a> 1.0 finished and deployed.</p>


<p>I've also been busy helping Jackie with her <a href="http://www.jackiechettur.com/exhibit/show/5">Pontypridd station residency</a>, working on three RapidWeaver plug-ins (one of which came to nothing), designing a new brochure for <a href="http://www.prema.demon.co.uk">Prema</a> and 'things' for other people.   We've also been working hard on the Church Hall, trying to make it resemble a house a bit more (although we still don't have any heating).</p>


</div>]]></content:encoded></item><item><title>Where is the QuickTime I knew?</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Software</category><dc:date>2007-01-24T18:26:53+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/where_is_quicktime.html#unique-entry-id-26</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/where_is_quicktime.html#unique-entry-id-26</guid><content:encoded><![CDATA[<p class="summary">Interactive <a href="http://www.apple.com/quicktime/" title="Apple's QuickTime Home page">QuickTime</a> is pretty much dead and the QuickTime (.mov) file format is dying.</p>


<p>A short while ago, whilst working on <a href="http://www.electricdecember.org/06/" title="Electric December 2006">Electric December</a>, I spent some more time working on server generated, interactive video presentation.   This was an exact repeat of the previous year's Electric December development and once again I abandoned the work after a couple of weeks.</p>


...<p>Yes, I know this type of thing can be done easily enough in Flash but I wanted to do it in QuickTime for a few reasons:</p>


...<li>We want to keep the video content in MPEG4 data files because we don't want to encode very large amounts of our content in a proprietry codec.</li>


...<li>We need to distribute our content in a format that can be played on mobile devices such as iPods, PSPs and of course the iPhone.</li>


...<p>In the Applesphere it appears that the QuickTime file format has been beaten down by MPEG4.   The <a href="http://www.apple.com/appletv">Apple TV</a> doesn't appear to support QuickTime files and neither does the <a href="http://www.apple.com/ipod">iPod</a>.   If the ipod doesn't support quicktime files then it is very unlikely the iPhone will.   Interactivity and the other advanced features of MPEG4 are not supported in QuickTime and MPEG4 is seen as a linear audio and video format.</p>


...The user can re-activate the functionality, but the settings are hidden many levels down in nested preference panels, and not something you would expect an end user to perform in order to view content.</p>


...<p>QuickTime's XML parsing and resource loading performance makes using techniques such as SMIL or wired, umbrella movies very difficult to deploy. 

...<p>There are so many differences between the implementations of features, that haven't changed, in versions 6 and 7 of QuickTime? ...  Why does QuickTime 7 install two <a href="file:///Library/Internet%20Plug-Ins/" title="Local plug-ins folder">different versions of the plug-in</a>?   One, a Coca/QTKit Webkit plug-in used by Safari, and the other, a Netscape style plug-in that all the other Macintosh browsers use. 

...Based on content from Apple's own site, the Quicktime plug-in is used simply to provide basic, interactive playback of linear MPEG4 video controlled by Javascript. 

...<p>It appears all the graphics &amp; media engineers at Apple are working on technologies such as such as CoreAnimation, CoreVideo &amp; Quartz Composer. ...  This is nothing we can deploy effectively to the public at large, for which the MS Windows using majority, the QuickTime plug-in is the only bridge there is.   QuickTime will become a media generation framework to support Apple's pro &amp; iLife applications, along with third party developer's desktop applications. 

...<p>I guess what I'm trying to say is don't waste any more time trying to use QuickTime for interactive work, use it for what it's best at: playback of MPEG4 content and leave the interactivity &amp; interface to Javascript &amp; HTML.</p>]]></content:encoded></item><item><title>Communicate</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2006-07-16T08:50:19+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/communicate.html#unique-entry-id-22</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/communicate.html#unique-entry-id-22</guid><content:encoded><![CDATA[<p>Communicate is a desktop application that Watershed staff use to administer the data that is used in the creation of the Web site. ...  Communicate runs on Apple Macintosh computers running MacOS X 10.3 or later and is written in Cocoa by Watershed's Communications department.</p>


<p>Watershed's Web site contains constantly changing content and it was decided to build a desktop application to administer the data.   A desktop application has many advantages of a web application, especially in 2002 when there was no AJAX, widget toolkits, Javascript libraries&hellip; etc. 

...The application itself uses a number of plug-ins and bundles to provide functionality and sits on frameworks that provide the data and ensure it is available to the Web site. 

...<p>The OpenBase frameworks and MySQL C libraries are used in database plug-in modules that provide network access to the databases.   The plug-ins are relatively simple and just read and write data over the wire to the database.   Currently we have written just the two for accessing OpenBase and MySQL databases, but adding more database plug-ins is relatively straight forward.</p>


...The persistence framework can be thought of an EOF lite, similar to Ruby on Rails' Active Record or other ORM libraries.</p>


...<p>When starting the project, I decided to model Watershed's operations in a business logic framework rather than just build another Content Management System.   By modelling the organisation's data and operations we get a framework that accurately describes Watershed but ,more importantly, is reusable.   The WSHDCoreData framework can be used in any application Watershed needs to develop, such as a cinema audience tracking, exhibition planning&hellip; etc.   WSHDCoreData contains the classes that describe Watershed: Events, Exhibits, Media, StaffPositions , Locations and the XML mapping file used by FBTFPersistentObjects to map to the persistence database. ...  It was named to describe it's purpose at Watershed before we were aware of , and Apple demonstrated CoreData.</p>


...<p><a href="/benjamin_miller/odds_ends/assets/communicate/exhibit_media_events_list.jpg" rel="lightbox" class="thumbnailLink" title="Media pane for an Exhibit and the Event list"><img title="Click to view a larger version" align="middle" alt="interface screen shot" src="/benjamin_miller/odds_ends/assets/communicate/exhibit_media_events_list_thumb.jpg" /></a> <a href="/benjamin_miller/odds_ends/assets/communicate/media_list_exhibits_list.jpg" rel="lightbox" class="thumbnailLink" title="Media browser and Exhibits list"><img title="Click to view a larger version" align="middle" alt="interface screen shot" src="/benjamin_miller/odds_ends/assets/communicate/media_list_exhibits_list_thumb.jpg" /></a> <a href="/benjamin_miller/odds_ends/assets/communicate/adverts_articles.jpg" rel="lightbox" class="thumbnailLink" title="Advertisement preview and Articles list"><img title="Click to view a larger version" align="middle" alt="interface screen shot" src="/benjamin_miller/odds_ends/assets/communicate/adverts_articles_thumb.jpg" /></a></p>


<p><a href="/benjamin_miller/odds_ends/assets/communicate/descriptions_site_programmes.jpg" rel="lightbox" class="thumbnailLink" title="Descriptions, Site plug-ins and Programme contents"><img title="Click to view a larger version" align="middle" alt="interface screen shot" src="/benjamin_miller/odds_ends/assets/communicate/descriptions_site_programmes_thumb.jpg" /></a> <a href="/benjamin_miller/odds_ends/assets/communicate/update_jobs_prefs.jpg" rel="lightbox" class="thumbnailLink" title="Software Update, Jobs listing and Preferences window"><img title="Click to view a larger version" align="middle" alt="interface screen shot" src="/benjamin_miller/odds_ends/assets/communicate/update_jobs_prefs_thumb.jpg" /></a></p>


<p>Communicate will load plug-ins, from inside its own bundle, at launch time to provide control over the Web applications which generate the site data. 

...<p><a href="/benjamin_miller/odds_ends/assets/communicate/site_cafebar.jpg" rel="lightbox" class="thumbnailLink" title="Caf&eacute;Bar site plug-in"><img title="Click to view a larger version" align="middle" alt="interface screen shot" src="/benjamin_miller/odds_ends/assets/communicate/site_cafebar_thumb.jpg" /></a> <a href="/benjamin_miller/odds_ends/assets/communicate/site_message.jpg" rel="lightbox" class="thumbnailLink" title="Message site plug-in"><img title="Click to view a larger version" align="middle" alt="interface screen shot" src="/benjamin_miller/odds_ends/assets/communicate/site_message_thumb.jpg" /></a> <a href="/benjamin_miller/odds_ends/assets/communicate/site_caches.jpg" rel="lightbox" class="thumbnailLink" title="Caches site plug-in"><img title="Click to view a larger version" align="middle" alt="interface screen shot" src="/benjamin_miller/odds_ends/assets/communicate/site_caches_thumb.jpg" /></a></p>


...This includes new features to support new site and Web application features, UI and workflow enhancements and performance optimisations We learnt in the past that creating a new shiny site and just sitting back is guaranteed way to create lots of work in the future and a repetition of the process in an endless loop. 

...<li>A more user friendly and intuitive UI centred around a publishing paradigm and not requiring the user to have a knowledge of the underlying frameworks data structure.</li>
]]></content:encoded></item><item><title>Scriptable Applications</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2006-07-11T18:19:10+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/scriptable_internal_tools.html#unique-entry-id-20</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/scriptable_internal_tools.html#unique-entry-id-20</guid><content:encoded><![CDATA[<p class="summary"><a href="http://www.apple.com/applescript/">AppleScript</a> is thought of as an 'added extra' for desktop applications but for internal tools it should be an essential on the 1.0 feature list.</p>


...<p>Many shrink-wrapped, commercial applications do not add AppleScript support until later versions and with internal tools developed in-house it is an even lower priority.   Many of these internal tools have a quick and dirty UI and none, or little, online help so being scriptable is not very likely.</p>


<p>With Cocoa applications adding AppleScript support is relatively easy and quick to implement.   This is certainly the case in applications that are strongly based around a business logic model with data objects, as many internal tools are, and are already Key Value Coding compliant.   Cocoa AppleScript support will do lots of the work for you.</p>


<p>So why should an in-house developer make their applications scriptable?

...If I write a scriptable application, the staff members who use the app or Oliver, Alex or Paddy of our ICT department can add new features or work around bugs without waiting for me to deploy the next version.   I can spend my time implementing features that really need to be done rather than a feature to 'duplicate every cinema screening in Cinema One on every second Wednesday in the month'.</p>


...We could save so much time with a script that created the web data from the brochure:</p>


...<li class="indent1"><code>repeat with every text box in the front document</code></li>


<li class="indent2"><code>tell application "Communicate"</code></li>


<li class="indent3"><code>set newExhibit to make new Exhibit</code></li>


<li class="indent3"><code>set the title of newExhibit to the first line of text box</code></li>


...<li class="indent2"><code>end tell</code></li>


...<p>AppleScript support is a springboard or stepping stone to an Automator Action that even more users can make use of with even less training.   Actions can be built by the users or by our ICT department.</p>


<p>If I ever left the Watershed, being able to implement some new features using AppleScript would give the users and ICT a breathing gap before a new developer could be employed and was up to speed with the application.</p>


<p>There are many other reasons to make any application scriptable that are often just applied to commercial development.   These are just some reasons to add AppleScript support to internal tools.</p>
]]></content:encoded></item><item><title>Web Horizontal Layout</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Other Work</category><dc:date>2006-07-11T09:09:44+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/web_horizontal_layout.html#unique-entry-id-19</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/web_horizontal_layout.html#unique-entry-id-19</guid><content:encoded><![CDATA[<p class="summary">After a gap of some time away, it's time for another horizontally scrolling site for an <a href="http://www.timespent.info">artist's residency</a>.</p>


<div class="essay">


<p>I've just started work on a quick, small site for Jackie who needs something for her residency at Pontypridd railway station.   The site just needs to provide an online diary and some brief background information.   So Jackie can update the diary quickly and easily I've decided to make her a RapidWeaver template.</p>


<p>It's been three years since I last worked on a horizontal layout for the <a href="http://www.dshed.net/digest/04/" title="Digest 2004 project">Digest</a> project and obviously the memories have faded enough for me to start work on another.</p>


<p>I do like the way the horizontal layout forces the content to be broken up into small, neat chunks and reading large amounts of text appears easier.   A reader doesn't 'loose their place' quite so many times.</p>


<p>There are plenty of reasons not to use a horizontal layout:</p>


<ul>


<li>Not many sites are designed in this way and the user could become confused or not notice the horizontal scroll bars at the bottom of the window.</li>


<li>Web browser support for content to the right of the viewport is lacking.   Browsers will happily scroll the page vertically to follow a fragment link but many do not alter the horizontal scroll position.</li>


<li>Using CSS to position elements on the page is particularly irksome for this layout.   All the content columns need a parent container with a fixed width to force the browser to extend the right side of the box past the window's edge.   As the content varies from page to page, Javascript is needed to adjust the width of the page after it has loaded.</li>


</ul>


<p>My head is telling me to stay well away from this layout but my heart is telling me to persevere and continue.   I think it's too late now anyway.</p>


</div>
]]></content:encoded></item><item><title>Do people search?</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>dShed</category><dc:date>2006-06-21T17:52:06+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/e56996293dd7a803e8c29a3580a5f26e-18.html#unique-entry-id-18</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/e56996293dd7a803e8c29a3580a5f26e-18.html#unique-entry-id-18</guid><content:encoded><![CDATA[<p class="summary">In the era of viral content, RSS feeds and social bookmarking do people search any more?

...<div class="essay">


<p>Information and new content is so pervasive and is being created at an ever-increasing rate do peopIe have any time to search?   In an environment where 'newer' is often seen as 'better' Users are enjoying the relative luxury of having targeted content, that they have chosen, delivered to their desktops through technologies such as RSS news feeds and podcasts.</p>


<p>Social bookmarking and selection sites present third party content arranged in a natural, almost evolutionary, way.   Popular content bubbles up to the top of the pile and by being there is presented more often.   This works in a similar way to the way your favourite mug is always at the front of the cub-hoard or shirt at the front of the wardrobe.   Should content be displayed using a simple ranking mechanism to control positioning?  </p>


<p>How many links to short pieces of video content are followed from email recommendations from trusted sources (although with the amount of money spent on 'viral marketing' through email and actors being paid to strike up conversations with strangers on the streets and trains about products these become less trusted)?   The content has been selected and is in your in-box waiting for you to make the decision to view it.</p>


<p>Looking at the search statistics for some of Watershed previous and current projects would suggest that search is not a high priority for must users:</p>


...<li>0.34% of requests were search requests for Electric December during December 2005</li>


<li>0.60% of requests to watershed.co.uk are search requests</li>


<li>0.21% of requests to dShed/Digitised are search requests</li>


...<p>Pre-set searches, or showcases, may be useful to users and to us to promote old content from the archive alongside newer content, such as "recently added short films" or "gay and lesbian animation".   These smart searches could be initiated by administrative staff or users of the site. </p>


<p>Does an archive have the values it once had?   An archive's value may lie simply in it's URI: a location for trusted new content.</p>


<p>Lots of the structure to hold and display content has been over-specified for past projects and we want to make sure functionality will be used before devoting engineering resources to it.</p>
]]></content:encoded></item><item><title>dShed Search</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>dShed</category><dc:date>2006-06-16T10:54:20+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/dshed_search.html#unique-entry-id-17</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/dshed_search.html#unique-entry-id-17</guid><content:encoded><![CDATA[<p>As part of the redevelopment  of <a href="http://www.dshed.net" title="dShed Home page">dShed</a> we are looking at search techniques for the dShed site and now wondering what user features it should contain.


<p>For content that has a pedigree a simple search text field will do the job.   The iTunes Music Store has approximately three and a half million items available and locating an item is trouble free.   Similarly, selecting products to purchase using Amazon's single text field isn't something that causes lots of issues.</p>


...Using a text field that searches enough attributes and anticipates the users intentions would be sufficient for most situations.   An example/ prototype for a simple search is illustrated at <a href="http://www.dshed.net/benjamin/" title="Simple search example">www.dshed.net/benjamin/</a>.   This is not an interface demonstration, is not fully implemented and only works in recent versions of Safari and Firefox. 

...<p>Using these four attributes users can find a wide variety of content: </p>


...<li>"architecture" will get the series of films made for Architecture Week as part of 90 Second Challenge</li>


...<p>Increasing the number of attributes, from the four listed above, would allow the user to find items based on abstract properties or human interpreted descriptions but will also return more false positives. ...  Current metadata is sufficient to specify Creations with a fine granularity and also synthesise collections of creative content. 

...<p>At some point, as the number of attributes increases an attribute specific advanced search (such as <a href="http://www.dshed.net/cgi-bin/WebObjects/Digitised.woa/wa/advancedSearch">Digitised&rsquo;s Advanced Search</a>) will return higher dividends to users.</p>


<p>The search mechanism is currently an engineering project to test performance and possible optimisations so the results from the demo simple search are simply returned in alphanumerical order and there is no ranking. 

...The user begins by typing "6" and the application searches the dShed archive.   Next the user adds a space and the application searches the archive using the terms "6 ".   Next the user adds a 'g' and the application searches the entire archive using the terms "6 g". 

...Using some form of session identifier, we can track the progress of individual searches and, where appropriate, just search the results of the user's previous search.</p>


<p>Maybe search should be about trying to guess what the user wants rather than the act of simply matching search terms?   If no results are found maybe we can try searching on a further set of different attributes or else try to return something similar or useful.   The lowest point in a browsing session is when no results are returned from a search; this says 'this site has nothing for me and I am in the wrong place'.</p>
]]></content:encoded></item><item><title>Rapidweaver 3.5</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>This Site</category><dc:date>2006-06-06T08:52:16+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/rw3.5#unique-entry-id-16</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/rw3.5#unique-entry-id-16</guid><content:encoded><![CDATA[<div class="essay"><p>I've decided to start using the public beta of RapidWeaver 3.5 to edit the site now.   I mention this in case the site goes a 'bit funny' over the next few weeks.   For a public beta it appears very stable and hopefully the site will still be online tomorrow.   The interface changes are a refreshing change and the layout feels much more logical, especially splitting some of the inspectors into separate panels.</p>


<p>I need to make some small changes to the template (apart from finishing it) to allow it to work with RapidWeaver 3.5.   Rich media content is now embedded using Javascript and the functions are missing from my JS file.   I thought I read that a feature of the blog in 3.5 was the ability to make 'sub pages' use the main template with the sidebar menus.   Just can't seem to get that to work.</p>


<p>The more I use Rapidweaver, the more I like it and recommend it to anybody with a Macintosh who asks how to create and maintain a web site quickly and easily.   A demo can be <a href="http://www.realmacsoftware.com/rapidweaver/" title="Realmac Software's Site">downloaded</a> from RealMac Software's site.</p></div>
]]></content:encoded></item><item><title>Universal Binary Address Book Plug-ins</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Other Work</category><dc:date>2006-06-06T09:14:07+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/address_book_plugins_ub.html#unique-entry-id-15</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/address_book_plugins_ub.html#unique-entry-id-15</guid><content:encoded><![CDATA[<p class="summary">Streetmap.co.uk and Google Maps plug-ins for Address Book are now Universal Binaries.</p>





<div class="essay"><p>


Just a quick entry to note that I have uploaded Universal Binary versions of the two Address Book plug-ins.   There are some additional small bug fixes in the Streetmap plug-in that are worth upgrading for.</p>





<p>The minimum requirements haven't changed: still MacOS 10.3 or later, Apple's Address Book application and an Internet connection.</p>


<p><a href="http://www.versiontracker.com/dyn/moreinfo/macosx/21519">Streetmap.co.uk Plug-in</a> &amp; <a href="http://www.versiontracker.com/dyn/moreinfo/macosx/30018">Google Maps Plug-in</a></p></div>]]></content:encoded></item><item><title>New Site Design</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>This Site</category><dc:date>2005-12-02T12:46:04+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/dcfc855e99e4b3cdae96869e09d0366a-14.html#unique-entry-id-14</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/dcfc855e99e4b3cdae96869e09d0366a-14.html#unique-entry-id-14</guid><content:encoded><![CDATA[<div class ="essay">


<p>This is the new template for the site now.   It's quite nice to be able to develop something for myself and not have people say "isn't the text a bit small?"   or "no colour then?".   Well they do say it but being my own site and can just ignore it.   The same goes for browsers: the site is primarily designed for Safari & Firefox.   It looks OK in IE 6.   I'm not too bothered about other browsers.</p>


The <a href="http://www.realmacsoftware.com/rapidweaver">RapidWeaver</a> theme isn't finished yet and there are some rough edges but enough is done that I can use it.   There are no heirarchic menus at the top of the page so I need to wait until that is done before adding photos and the 'selection' blog pages (when you view a month or category) need a little work.   I also need to finish off the sidebar and add Javascript to extend the page to the full size of the window.</p>


</div>
]]></content:encoded></item><item><title>RapidWeaver</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>This Site</category><dc:date>2005-11-08T18:11:11+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/b62fa5413c944e34e78c5f2785b10b0e-13.html#unique-entry-id-13</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/b62fa5413c944e34e78c5f2785b10b0e-13.html#unique-entry-id-13</guid><content:encoded><![CDATA[<div class ="essay">


<p>Just thought I would say some more about this site and how it is built.</p>


<p>I'm using <a href="http://www.realmacsoftware.com/rapidweaver">RapidWeaver</a>, from Brighton based <a href="http://www.realmacsoftware.com/">Realmac Software</a>, to make this site.   It's such a sweet little application.   Very MacOS X.   I guess it's designed for Mom & Pop but if you spend all day at work trying to force IE to do something other browsers don't appear to have a problem with then you don't want to do that in the evening as well.</p>


<p>I'm using one of the templates that ships with RapidWeaver at the moment.   It's pleasant enough but given some time should be able to get something a little less bright in place.   Site templates are nice little MacOS X bundles with all the required files inside.   There is normally an XHTML page with placeholder markers, CSS & Javascript files and all the interface graphic files inside the bundle.   There is a healthy market for selling themes but I don't think I will have the time.</p>


<p>RapidWeaver is so easy to use and new plug-ins can be built for it so instead of building a site for a client and updating it under contract, it makes much more sense to just provide the client with a theme (and possibly plug-ins) and they can update the content with their own RapidWeaver.</p>


</div>
]]></content:encoded></item><item><title>MacOS X Web Screensaver</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2006-04-05T11:09:42+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/web_screensaver.html#unique-entry-id-12</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/web_screensaver.html#unique-entry-id-12</guid><content:encoded><![CDATA[<p class="summary">A screensaver that will display your favorite Web page.</p>


...<p>Whilst doing some graphics and layout work on Watershed's public display system (the screens at the top of the stairs) I thought it would be useful for staff to have the daily What's On information displayed on their computers.   A screensaver looked to be a good idea:</p>


...<li>We already had, not only the data, but formatted and layed out for display.</li>


<li>The public screens are very simillar a screensaver - non-interactive content is displayed in a sequence.</li>


<li>The public screens are built using standard HTML, CSS & Javascript making the content easy to display.</li>


...The application displaying the content does not have to interact with the content in any way.</li>


...<p>One evening, on the train home, I quickly built a screensaver that would load and display the content.


...<p>The Web content you wish to display must change itself.   This can be done usins a meta refresh tag, Javascript timers (AJAX calls work well) or using a simple HTML wrapper around QuickTime, Flash or Shockwave content.   Obviously user events, such as mouse & keyboard (this being a screensaver), are not passed to the HTML.


...<p>Requires MacOS X 10.3 or later. <a href="http://www.watershed.co.uk/download/web_screensaver/1.0/web_screensaver.dmg">Download .dmg file</a></p>


...<p>Redistribution is permitted but please give Watershed Media Centre with an engineering credit and include a link to the homepage at www.watershed.co.uk in either a splash screen or Read Me file. ...  If you use the screen saver, then please send us an email (<a href="mailto:benjamin@watershed.co.uk">benjamin@watershed.co.uk</a>) because we are interested in any use it receives.</p>


...<p>The screensaver just needs a full, absolute URL to operate.   It will not currently work with a relative  URL for content distributed inside the screensaver bundle.   The URL is stored in a plist file inside the .saver bundle.</p>


...<li>Open the .saver bundle by ctrl-clicking the icon and select Show Package Contents from the contextual menu that is displayed.</li>


<li>Open the Info.plist file, that is inside the Content folder, in either a text editor or Apple's Plist Editor.</li>


<li>Change the value of the WSHDWebLocation key to the location of yout content. ]]></content:encoded></item><item><title>Bonjour WebObjects</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2006-02-28T10:06:35+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/d8bb4c705c42f374792478433a928807-11.html#unique-entry-id-11</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/d8bb4c705c42f374792478433a928807-11.html#unique-entry-id-11</guid><content:encoded><![CDATA[<p>Watershed.woa, the WebObjects application that generates the pages for www.watershed.co.uk, was developed some time ago. ...  A single instance will happily handle all the requests but there was no redundancy against application failure or server failure. 

...This only works when the browser returns to the same instance (that generated the page) to fetch the images.   With Component Actions, everything works as expected but Direct Action requests can only be sent to the instance that created the page.</p>


...The caching mechanisms are crude; the application provides a fixed amount of memory to cache images - once the cache is full older images are dropped.   Other data is cached with a time to live and once the time limit has expired the cache is nuked.</p>


...<p>Admin messages are sent from Communicate (a Cocoa desktop application) to Watershed.woa to configure the site and control the running web application.   With a single instance running, these admistrative messages always reach the instance but with a number of instances deployed then only one instance will receive the request and act upon it.</p>


...When the RRH receives a request, it then forwards that request on to all the other running instances. ...  It's not a good idea to forward a replicated request on to other instances that will then forward each request on to other instances... 

...The instance that receives the replicated request returns data but responses from the other instances are discarded.</li>


...Instances are stagger scheduled, so at any point in time it is difficult to determine which intances are up and running.   The problem will be further exaserbated in the near future when different instances of different applications are run on different days of the week.</p>


...<p>The watershed.co.uk data is provided by a number of applications that share a common business logic framework. 

...<p>When working from the Watershed office I almost always open iTunes and instead of listening to my own music I browse other people's music collections and listen to music that is not avallable to me the other five days of the week.   As a bonus for providing free Internet access in the Caf&eacute;Bar, customer's own music is availablo to listen to. 


...<p>Since <a href="http://developer.apple.com/opensource/internet/bonjour.html">Bonjour</a>'s, n&eacute;e Rendezvous, introduction SDKs have become available for Windows and Java and the C source is part of the <a href="http://developer.apple.com/opensource/">Darwin open source project</a>.    We downloaded the source for mDNS responder from Apple's Darwin site and a quick build of the Xcode project results in a MacOS X folder.   Located inside this is the Java build products. lib-mdns-jni.lib was copied over to an Xserve in /usr/bin/lib/ and the mdns.jar was added to the WebObjects project's classpath.</p>


...<p>So now we have instances running that are aware of other instances and can share requests with them. ]]></content:encoded></item><item><title>Oops</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2006-01-18T08:59:54+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/e020c0ba27fe10eddba252e8a2a102cf-10.html#unique-entry-id-10</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/e020c0ba27fe10eddba252e8a2a102cf-10.html#unique-entry-id-10</guid><content:encoded><![CDATA[<p>Below is a graph of the processor loads on one of the Xserves we use for WebObjects deployment.   I guess those threading locks were not quite right.</p>


<p>Even with the two processors flat-out for three days, over the weekend, and a significant temperature rise on the processors and in the enclosure, Apple's Server Software has no way to send an alert via email.</p>
]]></content:encoded></item><item><title>Server Side Stills from QuickTime</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2006-05-18T08:42:34+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/b3471bda39c70bc1c70f0f8f114dd7d2-9.html#unique-entry-id-9</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/b3471bda39c70bc1c70f0f8f114dd7d2-9.html#unique-entry-id-9</guid><content:encoded><![CDATA[<p class="summary">Generating still JPEG images from QuickTime movies using Java running on the server.</p>


...<p>Often it is useful to generate preview thumbnail images of QuickTime video movies on the server.   CMS type applications that allow an admin user to upload and display video would be the most obvious use of this.</p>


<p>Having said that, generating still images on the desktop is far quicker and more efficient.   Opening 80MB video files, over the network, in the web application's RAM in not the best use of resources.   This solution requires Java 1.4.1 to be running on the server and most importantly requires QuickTime for Java.   QuickTime for Java is essentially a series of JNDI hooks into the native C libraries of QuickTime. 

...<p>Watershed uses something like the code below in WebObjects applications as part of the QuickTime generation and manipulation classes used in web sites such as watershed.co.uk, electricdecember.org and dshed.net.   These are expensive operations and the results should be  aggressively cached either in RAM or on disk.</p>


<p>The code below has been a bit mangled to fit the narrow columns and still has a lot of commented-out logging statements. </p>


...<li class="indent3"><code class="comment">// Optionally you could just use the poster image if it has been set by the person encoding the video</code></li>


...<li class="indent3"><code class="comment">// Now encode the Macintosh PICT as a JPEG or PNG or ....</code></li>


...<li class="indent3"><code>System.out.println("You need to specify a URL and a location time in seconds when launching");</code></li>


...<p>The following instructions assume you are using a Macintosh but are almost identical for other platforms. ...  Copy the code above into a text file and save the file as GetImage.java on the Desktop, or alternatively <a href="/benjamin_miller/odds_ends/assets/QTImageStills/GetImage.java" title="Download the source file">download the class</a> in a .java file. 

...<p><code>javac -classpath /System/Library/Java/Extensions/QTJava.zip GetImage.java</code></p>


...Alternatively <a href="/benjamin_miller/odds_ends/assets/QTImageStills/GetImage.class.zip" tttle="Download the compiled binary">download the compiled application</a>.   To run the application, navigate to the directory containing the GetImage.class and type something like:</p>


<p><code>java -classpath /System/Library/Java/Extensions/QTJava.zip:  GetImage http://localhost/Cremaster.mov 22</code></p>


<p>The application will save the result as a file named StillImage.jpg in the same directory. ]]></content:encoded></item><item><title>iTunes Video Podcast</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>dShed</category><dc:date>2005-11-06T17:34:16+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/c436b9b468871155130c69f85de945a1-8.html#unique-entry-id-8</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/c436b9b468871155130c69f85de945a1-8.html#unique-entry-id-8</guid><content:encoded><![CDATA[<div class ="essay">


<p>We've had a <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?  id=78913188&s=143444" title="Podcast at the iTunes Store">video podcast</a> of recent additions to the <a href="http://dshed.net/90secondchallenge">90 Second Challenge</a> for some time now.   In fact the podcast has been running since before Apple released the video iPod linked from the 90 Second Challenge Web site.</p>


<p>It's only since Apple started promoting video podcasts through the iTunes Music Store that subscribers have increased.   Since the 90SC podcast was highlighted in the iTMS, iTunes accounts for 62% for all requests to the <a href="http://www.dshed.net">dshed.net</a> site.   From all the content available in dShed, 10 microfilms account for a large proportion of the traffic.</p>


<p>Of course we don't know if the films are actually being watched but it is definitely a distribution method we are interested in taking advantage of in the future.</p>


</div>]]></content:encoded></item><item><title>Transparent Room Screen Saver</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2006-01-18T08:38:01+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/75b107dfe6d137d935ae406e05ff3fe3-5.html#unique-entry-id-5</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/75b107dfe6d137d935ae406e05ff3fe3-5.html#unique-entry-id-5</guid><content:encoded><![CDATA[<p>Been working on updating the Transparent Room screen saver for MacOS X recently.   QuickTime <a href="/benjamin_miller/odds_ends/assets/trssAVC_Lg_Prog.mp4">movie of the screensaver</a> (requires QuickTime 7).   The screen saver uses Core Image, a Quartz Composition and OpenGL, making the minimum system requirement 10.4 with a graphics card.</p>]]></content:encoded></item><item><title>MPEG4 on dShed</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>dShed</category><dc:date>2006-05-12T09:13:24+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/dshed_mpeg4.html#unique-entry-id-4</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/dshed_mpeg4.html#unique-entry-id-4</guid><content:encoded><![CDATA[<p>For the last eight years Watershed has always distributed video over the Web using QuickTime .mov files.   The last time we explored encoding and distribution standards was during the research stage of the Digitised project in 2001.   As we start to think about dShed and the implications of a digital archive it's time to look at how we produce, and our users consume, video.</p>


...<p>As all of the video content becomes part of the dShed archive we need to think about what is best for the future users of the archive not just the users of dShed this week.</p>


...Using MPEG4 pt10 files in Electric December 2005 meant that almost all of Watershed's staff were unable to view the video content. 

...<p>Apple have set the hardware and OS bar quite high for QuickTime 7, especially (and ironically) for Macintosh users.   Many Windows users are reticent about upgrading to QuickTime 7 because the most prominently displayed installer installs iTunes as an 'added extra'. iTunes will probably become Apple's default media player in the future replicating the UI mistakes Real made almost 10 years ago.</p>


...Even when the files become fully compliant we will still push the files through the QuickTime plug-in to maintain a consistently good user experience (unless they don't have QuickTime installed).</p>


...This saving can be substantial with thousands of visitors viewing large video files.   We get reduced bandwidth costs and the users spend less time downloading and more time viewing. ...  Some people compress a different version with colour and gamma settings for each platform; we didn't.   Previously, the gamma was set somewhere between that of a Macintosh and a Windows PC, with no user getting the best experience. </p>


...<p>We may lose some content viewers by requiring QuickTime 7 to view the video in the browser but we will gain many more users by leveraging a common, standard media format that is supported by low power consumption, hardware decoders in a variety of portable devices.   The iPod and PSP currently account for most of these, but their share will diminish as more and more mobile phones get the decoders.<br />


New distribution methods, such as video podcasts, allow us to broadcast further to an audience that has 'opted in' to view specific content.   After we added a 90 Second Challenge video podcast to the iTunes Music Store, even before video iPods were released, the feed accounted for 62% of all traffic to dShed.<br />


In the short-term we may loose up to 30% of current potential viewers but will gain more than a 300% increase through new deployment opportunities.</p>


...The podcast is marketed by Apple (using iTMS) and other directory sites to a very large number of users at no cost or effort on our part.   It is quite wondrous when comparing the time and money spent developing large content umbrella and directory sites.   There may even be a situation where we don't need a web-site - just a podcast.</p>
]]></content:encoded></item><item><title>Universal Binary Widget</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>Watershed</category><dc:date>2006-04-05T11:05:49+01:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/3e2880f6c4c0f8e9e9750052d6f996a6-3.html#unique-entry-id-3</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/3e2880f6c4c0f8e9e9750052d6f996a6-3.html#unique-entry-id-3</guid><content:encoded><![CDATA[<p class="summary">The Watershed What&lsquo;s OnWidget is now a <a href="http://developer.apple.com/transition/">Universal Binary</a></p>


...<p>We have a few MacOS X applications, written against the Cocoa frameworks, that are used internally. 

...<p>In his keynote at WWDC 2005, Steve Jobs announced that Intel Macintoshes would ship by summer 2006 and almost all developers assumed this meant shipping in summer 2006.   So when Apple announced the new Core Duo iMac and MacBook Pro in January it was a bit of a surprise. 

...<p>The Widget started out as an experiment/toy not long after the first developer previews of Tiger were released in 2004.   Almost all of the work was done and the Widget had been hanging around for over a year with no work done on it.   A link(commented out) has been present in the Accessing Calendar Data page in the Watershed site since the site's redevelopment.</p>


...<p>Unfortunately, the Widget uses a couple of plug-ins to provide some of its functionality:</p>


...<li>a widget plug-in, Watershed Utilities, is used to bridge Javascript into the Address Book;</li>


<li>a webkit browser plug-in, RippleSelector, displays the thumbnails and draws the Core Image ripple transitions.</li>


...<p>The Widget, not being a 'standard' desktop application, had escaped my attention when looking for projects that needed to be re-built as Universal Binaries.</p>


<p>I didn't envision any problems building the Universal versions of the plug-ins as Apple had advised that in most cases it was just a checkbox tick. 

...<li>install the plugin into a Widget bundle in my public folder</li>


...<li>launch Dashboard and the Widget from my mounted public folder</li>


<li>wait for the Widget to launch, get the SOAP results and crash</li>


...<p>Eventually I tracked down the problem to a method that dealt with calculating the layout and positions of the thumbnails in the view.   The method -(int)batchCount; calculates the number of batches required to display all the thumbnails  and.contains a line something like:</p>


...<p>The number of events is rarely 0, apart from Christmas Day, Boxing Day... and the time window between when the plug-in is first drawn to the screen and when the results of the Javascript XMLHttpRequest SOAP call are returned. ...  Exept when running on an Intel chip; zero batches means crash.</p>


...<p>The Universal Binary version of thc Watershed widget is fixed now and can now be <a href="http://www.watershed.co.uk/cgi-bin/WebObjects/Watershed.woa/wa/news?]]></content:encoded></item><item><title>This Site</title><dc:creator>benjamin@watershed.co.uk</dc:creator><category>This Site</category><dc:date>2005-11-05T09:40:09+00:00</dc:date><link>http://homepage.mac.com/benjamin_miller/odds_ends/files/050699e17b838c728a94cce5e1f4134a-0.html#unique-entry-id-0</link><guid isPermaLink="true">http://homepage.mac.com/benjamin_miller/odds_ends/files/050699e17b838c728a94cce5e1f4134a-0.html#unique-entry-id-0</guid><content:encoded><![CDATA[<div class ="essay">


<p>I thought I would start a personal web site.   Having spent so many years building web sites for so many people it seemed odd that I didn't have one.   I don't have a particular need for a web site really - just a place to gather pictures of friends & family, store the odd file and record recipes that exist on pieces of paper scattered around the house.</p>


<p>I originally started putting stuff up on <a href="http://www.fourbytwoflat.com">www.fourbytwoflat.com</a> but I need to use that for other things soon and wanted to extract as much value from my .mac subscription as possible.   I'm in the process of moving personal stuff into this site.</p>


</div>
]]></content:encoded></item></channel>
</rss>