<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Cordinc Blog</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/" />
    <link rel="self" type="application/atom+xml" href="http://www.cordinc.com/blog/atom.xml" />
    <id>tag:www.cordinc.com,2008-02-05:/blog//1</id>
    <updated>2010-07-26T19:36:55Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Personal 4.1</generator>

<entry>
    <title>The Graeco-Roman city of Paestum</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/07/the-graecoroman-city-of-paestu.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.115</id>

    <published>2010-07-25T15:56:40Z</published>
    <updated>2010-07-26T19:36:55Z</updated>

    <summary> Available on iTunes and OU Podcasts Another of the numerous Open University podcasts, this series of videos gives an overview of the town of Paestum, located in Campania. The town was originally called Poseidonia when founded by Greek colonists...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="history" label="History" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="podcasts" label="Podcasts" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p> Available on <a href="http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.open.ac.uk.2586219469.02586399294">iTunes</a> and <a href="http://podcast.open.ac.uk/oulearn/arts-and-humanities/podcast-a219-graeco-roman-city-paestum">OU Podcasts</a></p>

<p>Another of the numerous <a href="http://www.open.ac.uk/">Open University</a> podcasts, this series of videos gives an overview of the town of <a href="http://en.wikipedia.org/wiki/Paestum">Paestum</a>, located in <a href="http://en.wikipedia.org/wiki/Campania">Campania</a>. The town was originally called Poseidonia when founded by Greek colonists in the 7th century <span class="caps">BC.</span> There are 4 videos totalling just over 20 minutes in length. They are available in iPod or a larger (640×360) format. There are also transcripts. The visuals are of the modern ruins or of artefacts recovered from the town.</p>

<p>Modern day Paestum is dominated by three big temples built by the Greek founders. The first video spends some time on these temples and the time in which they were built. Unfortunately, the site was excavated in haste in the last century and damaged in the process. Despite this there is evidence of variations from established Greek culture. There are 24 flutes on the temples' columns rather than the traditional 20. The second video shows paintings from an archaic Greek tomb. In the 5th century BC Poseidonia was conquered by a nearby tribe - the Lucanians. The third video focuses on some funeral paintings from this period. Despite the Lucanians' reputation as barbarians, there is little physical evidence of disruption from this period in the city, and they must have been largely Hellenised. There was a large discontinuity to the city when it became Roman in 273BC and renamed Paestum. Much of the city was rebuilt in the Roman style although the temples remained intact. The fourth video deals with this period.</p>

<p>An interesting, but very short and narrowly focused, series.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Memories of September 11th</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/07/memories-of-september-11th.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.114</id>

    <published>2010-07-19T19:45:26Z</published>
    <updated>2010-07-19T20:53:39Z</updated>

    <summary> Some friends of mine are getting married this September 11th. Apparently that was the only date available when they booked locations. It seems people want to avoid that date for the obvious reasons. On September 11th 2001 I was...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="memories" label="Memories" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p> Some friends of mine are getting married this September 11th. Apparently that was the only date available when they booked locations. It seems people want to avoid that date for the obvious reasons. On <a href="http://en.wikipedia.org/wiki/September_11_attacks">September 11th 2001</a> I was in the US staying with friends in the town of <a href="http://en.wikipedia.org/wiki/Frederick,_Maryland">Frederick, Maryland</a>. I was halfway through an round-the-world holiday, and the next day I was scheduled to go to New York to stay with another set of friends.</p>]]>
        <![CDATA[<p>Frederick is a pretty little colonial town where the residents seem to be largely commuters. Most people there including Katrina and Chris, work in surrounding towns - one of which is Washington, <span class="caps">DC.</span> I did a postgrad degree with Katrina. Soon after graduating she married and travelled to the US for Chris' work, although she quickly got a job at the same international engineering firm. On the day, Chris took the day off work (it was a Tuesday) to go with me to <a href="http://en.wikipedia.org/wiki/Battle_of_Gettysburg">Gettysburg</a>, while Katrina was going to work as normal. Just as we were leaving we saw on the news that a plane had crashed into one of the World Trade Centre towers. Initially it didn't look that serious, and there wasn't much information or any pictures of the incident. There was just what seemed to be a small plume of smoke coming from the tower. I assumed when they said plane they meant a small plane. Chris and I left. Arriving in Gettysburg after a short drive, we stopped to pick up a packed lunch at a local deli. As we walked in there were half a dozen people staring at the <span class="caps">TV.</span> The second plane had just crashed into the other tower and this time there were explicit pictures. </p>

<p>We stared at the TV with the others until lunch was ready and then went to the Gettysburg battlefield. I remember seeing an exhibition showing the broad outline of the battle in the museum. There was a small auditorium with steeply banked seating. The "stage" was a map of the battlefield. Little lights blinked on and off to show the location of events in the battle with a recorded commentary. I don't remember much of the exhibition's content other than it was a deadly battle - my mind was elsewhere for most of it. We went to start a tour of the battlefield, but Chris had a call from Katrina saying that another plane had hit the <a href="http://en.wikipedia.org/wiki/The_Pentagon">Pentagon</a>, a fourth had crashed in Pennsylvania and that most people in the office were going home, including her. We walked for a little bit, but Chris soon asked if I would like to stop the tour and go back to their place. I said yes, so we left straight away. I was happy to go; it was hard to concentrate on my surroundings. Chris appeared concerned too. </p>

<p><img src="http://farm5.static.flickr.com/4098/4809188585_4a56371a21.jpg" alt="" /></p>

<p>We got back to the house, sat down and watched <span class="caps">TV.</span> I think we got back after the towers collapsed, but it is hard to remember as the footage of the towers being hit and collapsing were played on a loop. Almost all the channels were dedicated to live news. I remember thinking that it must be serious because no channels were showing Star Trek (a running joke on my trip - as it always seemed to be on). Not sure if I said that out loud as the mood was very serious. There was a general concern over what would be coming next and a sense of "if they can do this, what else can they do?" It was around this time that I discovered that the house was walking distance to <a href="http://en.wikipedia.org/wiki/Fort_Detrick">Fort Detrick</a> a US military base where the national chemical weapons arsenal was stored. I remember this causing some tension, especially as later <a href="http://en.wikipedia.org/wiki/Oliver_North">Oliver North</a> appeared on one of the channels suggesting Fort Detrick was the target for the fourth plane (although I believe this was later disproved). I later walked to the front gates of the fort and nothing could be seen other than bush.</p>

<p>Chris and Katrina started calling and emailing people to let them know they were fine. Katrina asked if I wanted to let people back in Perth know I was ok. I was focused on what was happening and said they all knew I wouldn't be in New York until Wednesday, but Katrina suggested I might like to let them know anyway. So I emailed everyone. I also tried calling Skot and Tara - the friends I planned to stay with in <span class="caps">NY.</span> It took some time to get through to them. Communication was understandably difficult. Mobile phone connections were rare. They eventually emailed to say they were fine, but their apartment (very close to the World Trade Center) was inside the exclusion zone and they would be staying with friends for the next few days. In the end they never stayed another night in that apartment. It was days before they could re-enter it, and then only to collect their stuff - they rented a place in Brooklyn instead. By then the airspace had been closed and trains cancelled - it was clear I would not be going to <span class="caps">NY.</span> Indeed by the end of that day it felt as if the world was at war - the TV news helped promote  this perception. </p>

<p>The following days were spent watching the news, wandering around Frederick and imposing on Katrina and Chris' extended hospitality. A few events stand out from this time. I remember passing what looked like a fire station and there being a small armoured vehicle outside and a group of people with flack jackets and assault rifles on the driveway - it was a little intimidating. For days after the attack airspace was closed to commercial flights. However, there were many helicopters flying overhead. They were all heading to or from Fort Detrick and looked military. Sometimes there were a couple of dual rotor helicopters with escorts of smaller war-like helicopters. I remember playing volleyball with some of Chris' workmates a few days later and a plane going overhead. We all stopped and just watched it draw a contrail across the sky. Afterwards we went to the pub and when I said I was from Australia (the same as Chris) they replied "are you with us?" At first I thought they were kidding, but they were very serious. I assured them Australia would support the US (as it did) and they went back to their drinks. Patriotism was highly visible. US flags proliferated on the streets. Most houses had a flag outside, as the picture taken round the corner from where I was staying shows.</p>

<p>I never did make it to New York. Instead I spent a week in Boston and then caught the bus from there direct to my outbound flight at <span class="caps">JFK </span>airport. I passed through the city and had 10 minutes interchange at the bus station near 42nd street. I took one photo.</p>

<p><img src="http://farm5.static.flickr.com/4074/4809815702_be5ef954c6.jpg" alt="" /></p>]]>
    </content>
</entry>

<entry>
    <title>Egypt Photos</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/07/egypt-photos.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.113</id>

    <published>2010-07-11T09:22:38Z</published>
    <updated>2010-07-11T09:27:35Z</updated>

    <summary>Having recently scanned all my old film photos onto my computer, I thought some of them could go on Flickr. In January 2003 I went on a two week tour of Egypt (partially to avoid the English winter). The best...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="travel" label="Travel" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p>Having recently scanned all my old film photos onto my computer, I thought some of them could go on Flickr. In January 2003 I went on a two week tour of Egypt (partially to avoid the English winter). The best photos are now a <a href="http://www.flickr.com/photos/33547649@N07/sets/72157624468653274/show/">set on Flickr, available here</a>.</p>

<p><a href="http://www.flickr.com/photos/33547649@N07/sets/72157624468653274/show/"><img src="http://farm5.static.flickr.com/4095/4782579482_2402979939.jpg" alt="" /></a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Blender Tutorial: Mech Model Part 4: Animating</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/07/blender-tutorial-mech-model-pa-3.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.112</id>

    <published>2010-07-03T15:07:52Z</published>
    <updated>2010-07-04T10:31:16Z</updated>

    <summary>Once the mech model is rigged as in the previous tutorial, the bones can be used to help animate the mech. Here we will create a simple walk cycle for the rigged mech. This is the last tutorial in this...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="blender" label="Blender" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p>Once the mech model is rigged as in the <a href="http://www.cordinc.com/blender/tutorials/mech/3_rigging/">previous tutorial</a>, the bones can be used to help animate the mech. Here we will create a simple walk cycle for the rigged mech. This is the last tutorial in this series on using Blender to create a mech model. The final result of this tutorial, and thus the entire series, is shown in the video below.</p>

<p><a href="/blender/tutorials/mech/4_animating/">The continuation of this post is a set by step tutorial detailing my methodology</a>.   </p>

<p><center><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Aj-Y-8h5xt8&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Aj-Y-8h5xt8&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></center></p>]]>
        
    </content>
</entry>

<entry>
    <title>Ordered Java Multi-channel Asynchronous Throttler</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/06/ordered-java-multichannel-asyn.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.111</id>

    <published>2010-06-27T14:22:24Z</published>
    <updated>2010-06-29T18:55:42Z</updated>

    <summary>Some time ago I wrote a post describing a Java Multi-channel Asynchronous Throttler I had written. At the time, I stated it would preserve the order of calls, but as Asa commented on that blog post, this was not always...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="java" label="Java" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="technical" label="Technical" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p>Some time ago I wrote a post describing a <a href="http://www.cordinc.com/blog/2010/04/java-multichannel-asynchronous.html">Java Multi-channel Asynchronous Throttler</a> I had written. At the time, I stated it would preserve the order of calls, but as Asa commented on that blog post, this was not always the case. Here is a new version that does preserve order, and passes Asa's test. As part of this work I also extracted common code into new classes and created a ChannelThrottler interface. It works by placing incoming tasks on an internal queue. All the code detailed in this post (and the other throttler post) <a href="http://www.cordinc.com/projects/throttler.zip">is available here</a>.</p>]]>
        <![CDATA[I'm defining a multi-channel throttler as a class that inputs other Runnable tasks (together with an optional channel identifier) and throttles the rate they are executed. The throttling depends on rules defined as allowing X calls in Y time period. Different channels may have different rates, but there is also an overall rate. For more information <a href="http://www.cordinc.com/blog/2010/04/java-multichannel-asynchronous.html">see the previous blog post</a>. So the interface for a generic channel throttler becomes the below:<br />
<div style="background: #DFE8DF; overflow: auto; padding: 5px; margin-bottom: 10px; height: 80px">


<pre>
//imports skipped for prettier code display
public interface ChannelThrottler {
	Future&lt;?&gt; submit(Runnable task);
	Future&lt;?&gt; submit(Object channelKey, Runnable task);
}
</pre>


</div>

From the previous work, I extracted the Rate as an independent class (previously it was an inner class). It keeps track of an individual channel throttle rate. Using this information it can calculate the delay that needs to be applied to a Runnable task for it to meet the throttling requirements.<br />
<div style="background: #DFE8DF; overflow: auto; padding: 5px; margin-bottom: 10px; height: 100px">


<pre>
//imports skipped for prettier code display
public final class Rate {

	private final int numberCalls;
	private final int timeLength;
	private final TimeUnit timeUnit;
	private final LinkedList&lt;Long&gt; callHistory = new LinkedList&lt;Long&gt;();
	
	public Rate(int numberCalls, int timeLength, TimeUnit timeUnit) {
		this.numberCalls = numberCalls;
		this.timeLength = timeLength;
		this.timeUnit = timeUnit;
	}
	
	private long timeInMillis() {
		return timeUnit.toMillis(timeLength);
	}

	
	/* package */ void addCall(long callTime) {
		callHistory.addLast(callTime);
	}
	
	private void cleanOld(long now) {
		ListIterator&lt;Long&gt; i = callHistory.listIterator();
		long threshold = now-timeInMillis();
		while (i.hasNext()) {
			if (i.next()&lt;=threshold) {
				i.remove();
			} else {
				break;
			}
		}
	}
	
	/* package */ long callTime(long now) {
		cleanOld(now);
		if (callHistory.size()&lt;numberCalls) {
			return now;
		}
		long lastStart = callHistory.getLast()-timeInMillis();
		long firstPeriodCall=lastStart, call;
		int count = 0;
		Iterator&lt;Long&gt; i = callHistory.descendingIterator();
		while (i.hasNext()) {
			call = i.next();
			if (call&lt;lastStart) {
				break;
			} else {
				count++;
				firstPeriodCall = call;
			}
		}
		if (count&lt;numberCalls) {
			return firstPeriodCall+1;
		} else {
			return firstPeriodCall+timeInMillis()+1;
		}
	}
}
</pre>


</div>

I also extracted some code common to both implementations (this one and the previous one) as an abstract super class.<br />
<div style="background: #DFE8DF; overflow: auto; padding: 5px; margin-bottom: 10px; height: 100px">


<pre>
//imports skipped for prettier code display
/* package */ abstract class AbstractChannelThrottler implements ChannelThrottler {

	protected final Rate totalRate;
	protected final TimeProvider timeProvider;
	protected final ScheduledExecutorService scheduler;
	protected final Map&lt;Object, Rate&gt; channels = new HashMap&lt;Object, Rate&gt;();
	
	protected AbstractChannelThrottler(Rate totalRate, ScheduledExecutorService scheduler, Map&lt;Object, Rate&gt; channels, TimeProvider timeProvider) {
		this.totalRate = totalRate;
		this.scheduler = scheduler;
		this.channels.putAll(channels);
		this.timeProvider = timeProvider;
	}
	
	protected synchronized long callTime(Rate channel) {
		long now = timeProvider.getCurrentTimeInMillis();
		long callTime = totalRate.callTime(now);
		if (channel!=null) {
			callTime = Math.max(callTime, channel.callTime(now));
			channel.addCall(callTime);
		}
		totalRate.addCall(callTime);
		return callTime;			
	}
	
	protected long getThrottleDelay(Object channelKey) {
		long delay = callTime(channels.get(channelKey))-timeProvider.getCurrentTimeInMillis();
		return delay&lt;0?0:delay;
	}
}
</pre>


</div>

Now for the order-preserving throttler itself. The problem with the previous throttler was that it worked by calculating the delay necessary on a Runnable task to meet the various throttle rates and then schedule its execution just after that delay. This meant that if multiple tasks were scheduled at the same time the <span class="caps">JVM </span>would run them in any order it chose. To get around this, the tasks are now stored in a <a href="http://en.wikipedia.org/wiki/FIFO"><span class="caps">FIFO</span></a> queue. The appropriate delay to fulfill the rate requirements is still calculated, but now it is used to schedule a call that takes the first task off the queue and executes it. Note that the queue contains <a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/FutureTask.html">FutureTask</a> objects and the input Runnable tasks are converted to a FutureTask. This is to maintain the proper interface and allow the process calling the throttler to see the progress of the task (or cancel it).<br />
<div style="background: #DFE8DF; overflow: auto; padding: 5px; margin-bottom: 10px; height: 350px">


<pre>
public final class QueueChannelThrottler extends AbstractChannelThrottler {
	
	private final Runnable processQueueTask = new Runnable() {
		@Override public void run() {
			FutureTask&lt;?&gt; task = tasks.poll();
			if (task!=null &amp;&amp; !task.isCancelled()) {
				task.run();
			}
		}		
	};
	private final Queue&lt;FutureTask&lt;?&gt;&gt; tasks = new LinkedList&lt;FutureTask&lt;?&gt;&gt;();

	public QueueChannelThrottler(Rate totalRate) {
		this(totalRate, Executors.newSingleThreadScheduledExecutor(), new HashMap&lt;Object, Rate&gt;(), TimeProvider.SYSTEM_PROVIDER);
	}
	
	public QueueChannelThrottler(Rate totalRate, Map&lt;Object, Rate&gt; channels) {
		this(totalRate, Executors.newSingleThreadScheduledExecutor(), channels, TimeProvider.SYSTEM_PROVIDER);
	}
	
	public QueueChannelThrottler(Rate totalRate, ScheduledExecutorService scheduler, Map&lt;Object, Rate&gt; channels, TimeProvider timeProvider) {
		super(totalRate, scheduler, channels, timeProvider);
	}
	
	@Override public Future&lt;?&gt; submit(Runnable task) {
		return submit(null, task);
	} 
	
	@SuppressWarnings(&quot;unchecked&quot;)
	@Override public Future&lt;?&gt; submit(Object channelKey, Runnable task) {
		long throttledTime = channelKey==null?callTime(null):callTime(channels.get(channelKey));
		FutureTask runTask = new FutureTask(task, null);
		tasks.add(runTask);
		long now = timeProvider.getCurrentTimeInMillis();
		scheduler.schedule(processQueueTask, throttledTime&lt;now?0:throttledTime-now, TimeUnit.MILLISECONDS);
		return runTask;
	} 

}
</pre>


</div>

All the code detailed in this post (and the other throttler post) <a href="http://www.cordinc.com/projects/throttler.zip">is available here</a>. For reference, here are the tests used. They are very similar to the tests used for the previous throttler. However, I have added Asa's ordered calls test. <br />
<div style="background: #DFE8DF; overflow: auto; padding: 5px; margin-bottom: 10px; height: 250px">


<pre>
//imports skipped for prettier code display
public class QueueChannelThrottlerTest {

	private static final String CHANNEL1 = &quot;CHANNEL1&quot;;
	private static final String CHANNEL2 = &quot;CHANNEL2&quot;;
	private DeterministicScheduler scheduler;
	private AtomicLong currentTime = new AtomicLong(0);
	private QueueChannelThrottler throttler;
	private AtomicInteger count = new AtomicInteger(0);
	private Runnable countIncrementTask = new Runnable() {@Override public void run() {count.incrementAndGet();}};
	
	@SuppressWarnings(&quot;serial&quot;)
	@Before public void setupThrottler() {
		scheduler = new DeterministicScheduler();
		currentTime.set(0);	
		Map&lt;Object, Rate&gt; channels = new HashMap&lt;Object, Rate&gt;() {{
			put(CHANNEL1, new Rate(3, 1, TimeUnit.SECONDS));
			put(CHANNEL2, new Rate(1, 1, TimeUnit.SECONDS));
		}};
		throttler = new QueueChannelThrottler(new Rate(2, 1, TimeUnit.SECONDS), scheduler, channels, new TimeProvider() {
			@Override public long getCurrentTimeInMillis() {return currentTime.get();}		
		});
		count = new AtomicInteger(0);
	}	
	
	@Test public void testTotalChannelWithNoDelay() throws Exception {
		throttler.submit(countIncrementTask);
		throttler.submit(countIncrementTask);
		scheduler.tick(1, TimeUnit.MILLISECONDS);
		assertEquals(2, count.get());
	}
	
	@Test public void testTotalChannelWithDelay() throws Exception {
		throttler.submit(countIncrementTask);
		throttler.submit(countIncrementTask);
		throttler.submit(countIncrementTask);
		scheduler.tick(1, TimeUnit.MILLISECONDS);
		assertEquals(2, count.get());
		scheduler.tick(1000, TimeUnit.MILLISECONDS);
		assertEquals(3, count.get());
	}
	
	@Test public void testTotalChannelWithDoubleDelay() throws Exception {
		throttler.submit(countIncrementTask);
		throttler.submit(countIncrementTask);
		throttler.submit(countIncrementTask);
		throttler.submit(countIncrementTask);
		throttler.submit(countIncrementTask);
		scheduler.tick(1, TimeUnit.MILLISECONDS);
		assertEquals(2, count.get());
		scheduler.tick(500, TimeUnit.MILLISECONDS);
		assertEquals(2, count.get());
		scheduler.tick(500, TimeUnit.MILLISECONDS);
		assertEquals(3, count.get());
		scheduler.tick(1, TimeUnit.MILLISECONDS);
		assertEquals(4, count.get());
		scheduler.tick(1000, TimeUnit.MILLISECONDS);
		assertEquals(5, count.get());
	}
	
	@Test public void testTotalChannelWithShortestDelay() throws Exception {
		throttler.submit(countIncrementTask);
		currentTime = new AtomicLong(777);	
		scheduler.tick(777, TimeUnit.MILLISECONDS);
		throttler.submit(countIncrementTask);
		throttler.submit(countIncrementTask);
		currentTime = new AtomicLong(877);
		scheduler.tick(100, TimeUnit.MILLISECONDS);
		throttler.submit(countIncrementTask);
		
		assertEquals(2, count.get());
		scheduler.tick(124, TimeUnit.MILLISECONDS);
		assertEquals(3, count.get());
		scheduler.tick(777, TimeUnit.MILLISECONDS);
		assertEquals(4, count.get());
	}
	
	@Test public void testChannel() throws Exception {
		throttler.submit(CHANNEL2, countIncrementTask);
		currentTime = new AtomicLong(777);	
		scheduler.tick(777, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL2, countIncrementTask);
		currentTime = new AtomicLong(877);
		scheduler.tick(100, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL2, countIncrementTask);
		
		assertEquals(1, count.get());
		scheduler.tick(124, TimeUnit.MILLISECONDS);
		assertEquals(2, count.get());
		scheduler.tick(1000, TimeUnit.MILLISECONDS);
		assertEquals(2, count.get());
		scheduler.tick(1, TimeUnit.MILLISECONDS);
		assertEquals(3, count.get());
	}
	
	@Test public void testChannelAndTotal() throws Exception {
		throttler.submit(CHANNEL1, countIncrementTask);
		currentTime = new AtomicLong(777);	
		scheduler.tick(777, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL1, countIncrementTask);
		throttler.submit(CHANNEL1, countIncrementTask);
		currentTime = new AtomicLong(877);
		scheduler.tick(100, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL1, countIncrementTask);
		
		assertEquals(2, count.get());
		scheduler.tick(124, TimeUnit.MILLISECONDS);
		assertEquals(3, count.get());
		scheduler.tick(777, TimeUnit.MILLISECONDS);
		assertEquals(4, count.get());
	}
	
	@Test public void testChannelAffectsTotal() throws Exception {
		throttler.submit(CHANNEL1, countIncrementTask);
		currentTime = new AtomicLong(777);	
		scheduler.tick(777, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL1, countIncrementTask);
		throttler.submit(countIncrementTask);
		currentTime = new AtomicLong(877);
		scheduler.tick(100, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL1, countIncrementTask);
		
		assertEquals(2, count.get());
		scheduler.tick(124, TimeUnit.MILLISECONDS);
		assertEquals(3, count.get());
		scheduler.tick(777, TimeUnit.MILLISECONDS);
		assertEquals(4, count.get());
	}
	
	private class OrderedTask implements Runnable {
		private final int order;
		public OrderedTask(int order) {this.order=order;}
		@Override public void run() {
			assertEquals(count.incrementAndGet(), order);
		}
	};
	
	@Test public void testChannelCallsAreOrdered() throws Exception {
		throttler.submit(CHANNEL1, new OrderedTask(1));
		throttler.submit(CHANNEL2, new OrderedTask(2));
		throttler.submit(CHANNEL1, new OrderedTask(3));
		throttler.submit(CHANNEL2, new OrderedTask(4));
		throttler.submit(CHANNEL2, new OrderedTask(5));
		throttler.submit(CHANNEL1, new OrderedTask(6));
		throttler.submit(CHANNEL1, new OrderedTask(7));
		scheduler.tick(5000, TimeUnit.MILLISECONDS);
		assertEquals(7, count.get());
	}
	
	@Test public void testMultiChannel() throws Exception {
		throttler.submit(CHANNEL1, countIncrementTask);
		currentTime = new AtomicLong(777);	
		scheduler.tick(777, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL2, countIncrementTask);
		throttler.submit(CHANNEL1, countIncrementTask);
		currentTime = new AtomicLong(877);
		scheduler.tick(100, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL2, countIncrementTask);
		throttler.submit(CHANNEL2, countIncrementTask);
		throttler.submit(CHANNEL1, countIncrementTask);
		throttler.submit(CHANNEL1, countIncrementTask);
		
		assertEquals(2, count.get());
		scheduler.tick(123, TimeUnit.MILLISECONDS);
		assertEquals(2, count.get());
		scheduler.tick(1, TimeUnit.MILLISECONDS);
		assertEquals(3, count.get());
		scheduler.tick(778, TimeUnit.MILLISECONDS);
		assertEquals(4, count.get());
		scheduler.tick(1001, TimeUnit.MILLISECONDS);
		assertEquals(6, count.get());
		scheduler.tick(999, TimeUnit.MILLISECONDS);
		assertEquals(6, count.get());
		scheduler.tick(1, TimeUnit.MILLISECONDS);
		assertEquals(7, count.get());
	}
	
	@Test public void testMultiChannelWithTotal() throws Exception {
		throttler.submit(CHANNEL1, countIncrementTask);
		currentTime = new AtomicLong(777);	
		scheduler.tick(777, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL2, countIncrementTask);
		throttler.submit(countIncrementTask);
		currentTime = new AtomicLong(877);
		scheduler.tick(100, TimeUnit.MILLISECONDS);
		throttler.submit(CHANNEL2, countIncrementTask);
		throttler.submit(CHANNEL2, countIncrementTask);
		throttler.submit(countIncrementTask);
		throttler.submit(CHANNEL1, countIncrementTask);
		
		assertEquals(2, count.get());
		scheduler.tick(123, TimeUnit.MILLISECONDS);
		assertEquals(2, count.get());
		scheduler.tick(1, TimeUnit.MILLISECONDS);
		assertEquals(3, count.get());
		scheduler.tick(778, TimeUnit.MILLISECONDS);
		assertEquals(4, count.get());
		scheduler.tick(1001, TimeUnit.MILLISECONDS);
		assertEquals(6, count.get());
		scheduler.tick(999, TimeUnit.MILLISECONDS);
		assertEquals(6, count.get());
		scheduler.tick(1, TimeUnit.MILLISECONDS);
		assertEquals(7, count.get());
	}
	
	@Test
	public void scheduledTasksMonotonicallyIncreasing(){
		int numCalls = 50;
		int totalCalls = 1000;
		int ratePeriod = 100;
		final CountDownLatch latch = new CountDownLatch(totalCalls);
		Rate rate = new Rate(numCalls, ratePeriod, TimeUnit.MILLISECONDS);
		QueueChannelThrottler throttler = new QueueChannelThrottler(rate);
		final ConcurrentLinkedQueue&lt;Long&gt; base = new ConcurrentLinkedQueue&lt;Long&gt;();
		
		for(int i = 0; i &lt; totalCalls; i++) {
			throttler.submit(new Runnable() {
				@Override public void run() {
					base.add(System.currentTimeMillis());
					latch.countDown();
				}			
			});
		}
	
		// wait for the tasks to finish, before exiting
		try {
			latch.await((totalCalls/numCalls)*ratePeriod, TimeUnit.MILLISECONDS);
		} catch (InterruptedException e) {
			fail();
		}

		assertEquals(base.size(), 1000);
		long last = 0;
		for (Long next: base) {
			assertTrue(next &gt;= last);
			last = next;
		}
	}
	
	@Test
	public void scheduledTasksShouldRunInOrder(){
		int numCalls = 50;
		int totalCalls = 1000;
		int ratePeriod = 100;
		CountDownLatch latch = new CountDownLatch(totalCalls);
		Rate rate = new Rate(numCalls, ratePeriod, TimeUnit.MILLISECONDS);
		QueueChannelThrottler throttler = new QueueChannelThrottler(rate);
		ConcurrentLinkedQueue&lt;Integer&gt; base = new ConcurrentLinkedQueue&lt;Integer&gt;();
		ConcurrentLinkedQueue&lt;Integer&gt; toCompare = new ConcurrentLinkedQueue&lt;Integer&gt;();
		
		for(int i = 0; i &lt; totalCalls; i++) {
			throttler.submit(new RunnableImpl(i, toCompare, latch));
			base.add(i);
		}
	
		// wait for the tasks to finish, before exiting
		try {
			latch.await((totalCalls/numCalls)*ratePeriod, TimeUnit.MILLISECONDS);
		} catch (InterruptedException e) {
			fail();
		}

		assertEquals(toCompare.size(), base.size());
		for (int i=0; i&lt;toCompare.size(); i++) {
			assertEquals(toCompare.poll(), base.poll());
		}
		//assertEquals(toCompare, base);
	}

	public class RunnableImpl implements Runnable {
		public final int id;
		private final ConcurrentLinkedQueue&lt;Integer&gt; collection;
		private final CountDownLatch latch;
		
		public RunnableImpl(int id, ConcurrentLinkedQueue&lt;Integer&gt; collection, CountDownLatch latch) {
			this.id = id;
			this.collection = collection;
			this.latch = latch;
		}
		
		public void run() {
			collection.add(id);
			latch.countDown();
		}
	}
}
</pre>


</div>]]>
    </content>
</entry>

<entry>
    <title>Blender Tutorial: Mech Model Part 3: Rigging</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/06/blender-tutorial-mech-model-pa-2.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.110</id>

    <published>2010-06-25T19:29:42Z</published>
    <updated>2010-06-29T19:20:52Z</updated>

    <summary>After creating and texturing a mech model, the next step towards animating it is rigging. This is the process of setting up bones in the model such that when the bone is moved, the mech mesh deforms in an expected...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="blender" label="Blender" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p>After <a href="http://www.cordinc.com/blender/tutorials/mech/1_model/">creating</a> and <a href="http://www.cordinc.com/blender/tutorials/mech/2_texture/">texturing</a> a mech model, the next step towards animating it is rigging. This is the process of setting up bones in the model such that when the bone is moved, the mech mesh deforms in an expected manner. The final set of bones to animate a walk cycle is shown in the image below. Once this step is complete, the model will be ready to animate.</p>

<p><a href="/blender/tutorials/mech/3_rigging/">The continuation of this post is a set by step tutorial detailing my methodology</a>.   </p>

<p><a href="/blender/tutorials/mech/3_rigging/"><img src="/blender/tutorials/mech/3_rigging/result.png" alt="Mech model" height="468" width="482" /></a></p>]]>
        
    </content>
</entry>

<entry>
    <title>UCLA History 9A - History of India</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/06/ucla-history-9a-history-of-ind.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.109</id>

    <published>2010-06-17T17:37:27Z</published>
    <updated>2010-06-20T18:57:19Z</updated>

    <summary> Available at the course website. Finding podcasts on ancient history which do not focus on Mediterranean civilisations is very hard. The only one I have found so far is UCLA&apos;s History 9A - History of India course. This is...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="history" label="History" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="podcasts" label="Podcasts" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p> Available at <a href="http://www.oid.ucla.edu/webcasts/courses/2009-2010/2009fall/hist9a-1">the course website</a>.</p>

<p>Finding podcasts on ancient history which do not focus on Mediterranean civilisations is very hard. The only one I have found so far is <a href="http://www.ucla.edu/"><span class="caps">UCLA'</span>s</a> History 9A - History of India course. This is a recording of the lectures given as part of the university course by <a href="http://www.history.ucla.edu/people/faculty?lid=51">Vinay Lal</a> at the end of 2009. However, the course encompasses far more than the ancient history for which I was searching. Starting with the first civilisations, it races through history to end with <a href="http://en.wikipedia.org/wiki/Indian_independence_movement">Indian Independence</a> and <a href="http://en.wikipedia.org/wiki/Partition_of_India">Partition</a>. </p>

<p>This course is not available on iTunes but there is a course website with the lectures in both <span class="caps">MP3 </span>audio-only and video in real player format. Unfortunately, two of the lectures were not recorded. The 27 recorded lectures are around 50 minutes in length and 24MB (for the <span class="caps">MP3</span>s, I didn't watch the videos). As is normal with recorded lectures there is some class discussion taking up the first few minutes of each podcast. The course reading is also available from the <a href="http://classes.sscnet.ucla.edu/course/view/09F-HIST9A-1?topic=-1">class website</a>. Professor Lal occasionally mentions visual aids, but video is available. Production quality is otherwise fine and the material is presented in an interesting manner.</p>

<p>The podcasts start with the <a href="http://en.wikipedia.org/wiki/Indus_Valley_Civilization">Indus Valley Civilisation</a> (in what is modern Pakistan), one of the three early human civilisations along with <a href="http://en.wikipedia.org/wiki/Ancient_egypt">Egypt</a> and <a href="http://en.wikipedia.org/wiki/Mesopotamia">Mesopotamia</a>). These people were replaced by the Aryans (no relation to the Nazi Aryans) in some <a href="http://en.wikipedia.org/wiki/Aryan_invasion_theory">disputed manner</a>. From there the course quickly skips to <a href="http://en.wikipedia.org/wiki/Hinduism">Hindu</a> religion and culture, telling Indian history through Hindu texts. I imagine a similar history of Europe could be told through early Christian texts, but it would miss much. In Europe, there were many non-religious texts; the lectures suggest that in comparison, Hindu texts are the main primary sources for ancient Indian history.</p>

<p>In any case the lectures on Hinduism are quite interesting if you don't already know much about the religion. The course covers the content of the main <a href="http://en.wikipedia.org/wiki/Hindu_scriptures">Hindu texts</a> from the Vedas, Upanishads, the Bhagavad Gita, the Puranas and a little on the Bhakti poets. It is intriguing to see how some Hindu concepts such as Karma or Yoga have been transformed in western culture. Yoga is a much larger concept then physical exercise and describes many methods of achieving the goals of life. The Hindu gods also have many avatars - incarnations or personifications of aspects of the god. One of the <a href="http://en.wikipedia.org/wiki/Avatar#Avatars_of_Vishnu">avatars of the main god Vishnu</a> is Buddha - this avatar appeared at a time when Buddhism was expanding in India. The lectures also detail the basic beliefs of <a href="http://en.wikipedia.org/wiki/Jainism">Jainism</a>,  <a href="http://en.wikipedia.org/wiki/Sikhism">Sikhism</a> and <a href="http://en.wikipedia.org/wiki/Buddhism">Buddhism</a> (including a discussion on its disappearance from India) - all of which have their origins in India.</p>

<p>After the arrival of Islam towards the end of the first millennium <span class="caps">AD, </span>the course returns to a more traditional history format. As there is still a thousand years to the present day, the coverage of events can be succinct. Starting with the <a href="http://en.wikipedia.org/wiki/Delhi_Sultanate">Delhi Sultanate</a>, Muslim rule of India continued with the <a href="http://en.wikipedia.org/wiki/Mughal_Empire">Mughal Empire</a>, which succumbed to the <a href="http://en.wikipedia.org/wiki/East_India_Company">East India Company</a>. It seems strange to have a country ruled by a foreign company and Professor Lal spends some time detailing how this occurred. The subsequent rule (and sometimes, misrule) of the <a href="http://en.wikipedia.org/wiki/British_Raj">British Empire</a> is covered, with the final lecture detailing <a href="http://en.wikipedia.org/wiki/Mohandas_Karamchand_Gandhi">Gandhi</a> and his policy of nonviolent civil disobedience leading to independence.</p>

<p>Not knowing much about Indian history other than the basics, I can't say I learnt a huge amount more through this podcast, although there are occasional worthwhile tidbits. However, I did learn a huge amount about Hinduism. It covers all Indian history in an introductory sweep.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Hurt Locker</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/06/hurt-locker.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.108</id>

    <published>2010-06-12T15:03:34Z</published>
    <updated>2010-06-12T15:10:38Z</updated>

    <summary> Possible Spoilers Below Last night I watched Hurt Locker for the first time. I was looking forward to it. I had heard so many reviews and it had won 6 Oscars. However, to put it politely, I didn&apos;t like...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="general" label="General" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p> <strong>Possible Spoilers Below</strong></p>

<p>Last night I watched <a href="http://en.wikipedia.org/wiki/The_Hurt_Locker">Hurt Locker</a> for the first time. I was looking forward to it. I had heard so many reviews and it had won 6 Oscars. However, to put it politely, I didn't like it. I consider it well below average. Both the major and minor characters are unbelievable and fit neatly into standard movie stereotypes ("he's a maverick, doing dangerous things - but he gets results!"). The scenarios in which the characters find themselves seem unlikely. One character carjacks a local and travels across Baghdad, then runs back to the base. At another point, 3 characters search for enemy bombers in the backstreets by themselves and unknown to their support. Coming to a three-way junction, they split up! The script is often heavy-handed, letting the audience know exactly what they are supposed to be thinking. For instance, when confronted with a possibly involuntary suicide bomber, the interpreter repeatedly reminds us "he's a good guy". Once is required, maybe twice to stress the point. However, the many repetitions beyond that are just clunky. At once crucial point we are told "he has 4 children". Are we perhaps supposed to empathise with him?</p>

<p>The plot is quite episodic. This got me thinking. It might be that the story's ambition was neutered by making it a movie in the first place. The story has potential and maybe many of its problems (heavy handedness, stock characters) could be solved by taking longer to tell it - much longer. It is very hard to fit a complete interesting story with detailed real characters into the 2 hour timeframe of a film. I doubt even extending the running length to 3 hours, the extreme end of theatrical releases, would give enough room to properly tell Hurt Locker's story. Perhaps it should be a TV series.</p>

<p>I remember a time not long ago when the 4 or 6 hours of a mini-series were the longest storylines around. Now there have been quite a few TV series with continuous storylines. <a href="http://en.wikipedia.org/wiki/Babylon_5">Babylon 5</a> was the first I remember, but since then there have been the excellent <a href="http://en.wikipedia.org/wiki/The_Wire">The Wire</a> and <a href="http://en.wikipedia.org/wiki/The_Sopranos">The Sopranos</a> among many others. <a href="http://en.wikipedia.org/wiki/Generation_Kill">Generation Kill</a> told a similar story to Hurt Locker more successfully over 7 hours. After watching these, other TV shows with their "everything resolved in 40 minutes" episodes seem inferior (<a href="http://en.wikipedia.org/wiki/Doctor_Who">Dr Who</a> is suffering from this at the moment). I am not suggesting film is inferior in general, just that it has its limits and most of the best films don't try to do too much. For great characters and great stories the extra time afforded by TV pays great dividends.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Blender Tutorial: Mech Model Part 2: Texturing</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/06/blender-tutorial-mech-model-pa-1.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.107</id>

    <published>2010-06-06T16:25:52Z</published>
    <updated>2010-06-14T19:25:02Z</updated>

    <summary> Having crated a basic low-poly mecha model in a previous tutorial, it is now time to liven up the model by texturing it. The application of materials and textures is the hardest part of modelling for me, and I&apos;m...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="blender" label="Blender" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p> Having crated a basic low-poly <a href="http://en.wikipedia.org/wiki/Mecha">mecha</a> model in <a href="http://www.cordinc.com/blender/tutorials/mech/1_model/index.html">a previous tutorial</a>, it is now time to liven up the model by texturing it. The application of materials and textures is the hardest part of modelling for me, and I'm not entirely happy with the result. My artistic abilities need some work. However, the general technique is still worth noting. The tutorial will show how the mech model was made to look as below. Later tutorials will show how to rig the model and animate a walk cycle.</p>

<p><a href="/blender/tutorials/mech/2_texture/">The continuation of this post is a set by step tutorial detailing my methodology</a>.   </p>

<p><a href="/blender/tutorials/mech/2_texture/"><img src="/blender/tutorials/mech/2_texture/result.png" alt="Mech model" height="400" width="480" /></a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Blender Tutorial: Mech Model Part 1: Modelling</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/05/blender-tutorial-mech-model-pa.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.106</id>

    <published>2010-05-26T18:19:53Z</published>
    <updated>2010-06-12T15:13:33Z</updated>

    <summary>I decided to move away from historical models for this tutorial. I chose a mecha, a walking robot, as an exercise in texturing, rigging and animation. The idea is to first create a low-poly model so that most of the...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="blender" label="Blender" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p>I decided to move away from historical models for this tutorial. I chose a <a href="http://en.wikipedia.org/wiki/Mecha">mecha</a>, a walking robot, as an exercise in texturing, rigging and animation. The idea is to first create a low-poly model so that most of the visual detail is in the textures applied. Then a walk cycle will be animated using bone rigging to aid further animations. The result will be the sort of model that could be used in a simple game. As there are quite a few steps in achieving all of this, the tutorial has been split into four parts. This first part creates the base model. Following posts will cover texturing, rigging and animating.</p>

<p><a href="/blender/tutorials/mech/1_model/">The continuation of this post is a set by step tutorial detailing my methodology</a>.   </p>

<p><a href="/blender/tutorials/mech/1_model/"><img src="/blender/tutorials/mech/1_model/result.png" alt="Mech model" height="420" width="560" /></a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Buildings of Ancient Rome</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/05/buildings-of-ancient-rome.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.105</id>

    <published>2010-05-16T14:51:12Z</published>
    <updated>2010-05-16T16:49:12Z</updated>

    <summary> Available on iTunes and and OU Podcasts &apos;Buildings of Ancient Rome&apos; is another of the consistently good Open University short podcasts. This one describes and details the histories of certain buildings (mainly temples) of Ancient Rome in the Circus...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="history" label="History" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="podcasts" label="Podcasts" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p> Available on <a href="http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.open.ac.uk.2586889064.02586203076">iTunes</a> and <a href="http://podcast.open.ac.uk/oulearn/arts-and-humanities/podcast-a219-buildings-ancient-rome">and OU Podcasts</a></p>

<p>'Buildings of Ancient Rome' is another of the consistently good <a href="http://www.open.ac.uk/">Open University</a> short podcasts. This one describes and details the histories of certain buildings (mainly temples) of <a href="http://en.wikipedia.org/wiki/Ancient_Rome">Ancient Rome</a> in the <a href="http://en.wikipedia.org/wiki/Circus_Flaminius">Circus Flaminus</a>, <a href="http://en.wikipedia.org/wiki/Largo_di_Torre_Argentina">Largo Argentina</a> and <a href="http://en.wikipedia.org/wiki/Roman_Forum">Roman Forum</a>. Thus it focuses on a few quite small (and, apart from the Forum, less well-known) areas of ancient Roman ruins. The format is a series of 5 short video documentaries (although iTunes only lists 4 videos on its iPod page, it then lists all 5 on the Mac/PC page). The videos are available in a 640&#215;360 format or a smaller iPod optimised format. They range from 2 minutes to 15 minutes in length, and transcripts are also available.</p>

<p>The videos are made entirely of pictures of the temples/buildings being discussed in their current state (with the very occasional floor plan). The audio comprises details of the buildings and their history. There are no reconstructions or interviews. The information comes think and fast - dates of construction (and sometimes destruction), architectural notes, interesting events in their history and how it is thought they were used. It can be hard to orientate yourself - a little knowledge of Rome's history and layout helps immensely. Interesting, but not introductory.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Lies, Damn Lies and Indices</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/05/lies-damn-lies-and-indexes.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.104</id>

    <published>2010-05-08T17:28:55Z</published>
    <updated>2010-05-09T15:09:22Z</updated>

    <summary> The last few days before the UK election saw the image below circulating around the city. I saw it first on FT Alphaville. I find this image incredibly annoying. Not because the message is necessarily wrong. There is a...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="general" label="General" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p> The last few days before the UK election saw the image below circulating around the city. I saw it first on <a href="http://ftalphaville.ft.com">FT Alphaville</a>. I find this image incredibly annoying. Not because the message is necessarily wrong. There is a strong case to be made that the Labour's party's rhetoric on their ability to manage the UK economy is in no way matched by their actual management of the economy (although it's debatable whether the Tories would have been any better). Instead, it is because the image is using a misunderstood part of the financial world to produce a misleading graph.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="boom-to-bust.jpg" src="http://www.cordinc.com/blog/boom-to-bust.jpg" width="520" height="300" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>

<p>The image is a graph of the <a href="http://en.wikipedia.org/wiki/FTSE_100_Index"><span class="caps">FTSE</span> 100</a> stock <a href="http://en.wikipedia.org/wiki/Share_index">market index</a> of the largest companies listed on the <a href="http://www.londonstockexchange.com/" title="LSE">London Stock Exchange</a>. It is a UK version of the <a href="http://en.wikipedia.org/wiki/S%26P_500"><span class="caps">S&amp;P</span> 500</a>. Like other share indexes it is often quoted on the news in absolute terms as well as the absolute rise or drop over some time period. For example yesterday the <span class="caps">FTSE</span> 100 closed at 5123, a drop of 138 points. However, to compare movements the absolute point value should not be used. This is because the index is calculated as the change relative to some reference date. Calculated from this base, the larger the index, the larger point move required to be equivalent to a move at a smaller index move. A 2% move when the index is at 5000 is 100 points, when the index is at 2000 an equivalent move is 40 points. As the index gets larger, point movements will naturally become larger for no difference in activity. Thus the graph above is misleading because it exaggerates the more recent point moves at a larger index level compared to the earlier moves.</p>

<p>It is the percentage move that is important. If the graph showed percentage moves the 1987 crash would appear much larger and the recent crashes smaller. To better show the relative moves, I found a graph of the <a href="http://uk.finance.yahoo.com/echarts?s=%5EFTSE%23chart3%3Asymbol=%5Eftse;range=my;indicator=volume;charttype=line;crosshair=on;ohlcvalues=0;logscale=on;source=undefined"><span class="caps">FTSE </span>using a logarithmic scale on Yahoo</a>. As can be seen below the recent boom and bust don't seem as large, but they are still there. So the same message could have been sent with a less misleading graph.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="ftse.GIF" src="http://www.cordinc.com/blog/ftse.GIF" width="520" height="300" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></p>]]>
        
    </content>
</entry>

<entry>
    <title>Impressions of Greece</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/05/impressions-of-greece.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.103</id>

    <published>2010-05-03T10:55:45Z</published>
    <updated>2010-05-03T10:57:13Z</updated>

    <summary>Greece is collapsing. The news regularly shows riots in Athens; the papers discuss the dire economic straits. A person here in London could easily form the view the precipice is near. Having spent a week in Athens last month, I...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="memories" label="Memories" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="travel" label="Travel" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p>Greece is collapsing. The news regularly shows riots in Athens; the papers discuss the dire economic straits. A person here in London could easily form the view the precipice is near. </p>

<p>Having spent a week in Athens last month, I didn't leave with the impression disaster was imminent. People generally seemed to be going about their daily business. There were no clear signs of distress (apart from one incongruity). Indeed, other cities I have visited appeared to be in worse situations. While a large amount of my time was spent in busy tourist throngs around the archealogical sites, I also travelled out into the surrounding areas. What I saw appeared to be a working city. There were numerous storefronts with decent traffic and many business offices. The streets became busier after work hours. Bars and resturants were quiet during the day, but became busy late in the night. At one point we saw a crowd blocking a street near Syntagma, it could have been a well behaved protest, or just as easily people waiting for some celebrity. There was a lot of graffiti, but also a lot of graffiti art. Not so different to London really and there was probably about the same number of unused/abandoned buildings. Although unlike London, many of the occupied buildings appeared quite run-down and not well maintained. </p>

<p>There was one indication of possible problems. On a quiet side street North-East of Omonoia we walked past trees, parked cars, buildings that looked like apartment blocks, and little shops. Then there were two burnt out cars next to each other. They were completely wrecked - the fire destroyed everything. However, there was no damage apart from the cars. Either the fire was somewhere else and then the wrecks dumped there or the immediately surrounding area was cleaned up (but the cars left). Both seem strange. Apart from these wrecks, Athens did not feel different to most cities I have visited. </p>

<p>Cities are ususally places of vibrant activity - normally business related. Visit London, Paris, Sydney, Barcelona or Milan and you feel you are in a working city. There is the sense that the locals are busy getting things done. Travelling around London, I am constantly amazed by the number and variety of business nameplates outside buildings. You can walk for hours from the Shoreditch across to Hammersmith and it is busy offices the entire way. Washington and Rome feel more dominated by tourism and government, but there is still lots happening around you. Two places I feel didn't match this description, at the time I visited, are Lisbon and Tunis. There was a general lack of activity in Lisbon, it seemed almost empty. Never have I seen so many empty, decrepit buildings. Tunis was similar, full of people, but they didn't seem to be doing much. There was always a large number of men sitting in cafes, presumably un- or underemployed. These two cities felt like they were in dire economic straits. Indeed, Portugal is currently mentioned in similar financial terms to Greece, but that situation was clearer on the streets of Lisbon than Athens. </p>]]>
        
    </content>
</entry>

<entry>
    <title>The Harwood Arms</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/04/the-harwood-arms.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.102</id>

    <published>2010-04-18T10:03:02Z</published>
    <updated>2010-04-18T10:03:58Z</updated>

    <summary> This week saw a visit to The Harwood Arms - a gastro pub in Fulham, recently awarded a Michelin star. It is round a few corners from Fulham Road, on a quiet suburban street. From the outside the place...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="restaurant" label="Restaurant" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p> This week saw a visit to <a href="http://www.harwoodarms.com/index.htm">The Harwood Arms</a> - a gastro pub in Fulham, recently awarded  a Michelin star. It is round a few corners from Fulham Road, on a quiet suburban street. From the outside the place looks like a pub, but inside it is set up like a restaurant. Apart from the bar and a small sofa area, the entire floorspace is occupied with tables. So I can't imagine your meal would ever be interrupted by casual drinkers, although there is a quiz night every Tuesday.</p>

<p>The menu focusses on British produce with a special emphasis on game, most of which is apparently hunted or caught by the owners. For a starter I had a wild mushroom soup with mussel fritters. There was a surprisingly large amount, although it was so nice it certainly was not a problem to get through it all. The main dish was shoulder of deer for two with celeriac mash, vegetables and a little salad. It all came on a large platter so that you could carve the shoulder yourself. However, this wasn't at all arduous as the meat was so beautifully tender it just fell off the bone. Again, a large amount of delightful food. After that I was too full for dessert, but I'm assured the sticky toffee and date ice cream with lemon curd was delicious.</p>

<p>The Harwood Arms had a pleasant atmosphere, not quite a pub but still welcoming. Service was prompt and courteous. The cost was reasonable for a top restaurant (by London standards!), dinner for two (starters, main and one dessert) with wine was under £100. Excellent food and well worth a visit.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Greek Theatre</title>
    <link rel="alternate" type="text/html" href="http://www.cordinc.com/blog/2010/04/greek-theatre.html" />
    <id>tag:www.cordinc.com,2010:/blog//1.101</id>

    <published>2010-04-11T17:25:43Z</published>
    <updated>2010-04-11T18:14:49Z</updated>

    <summary>Available on iTunes and OU Podcasts This Open University series examines theatre during the time of Classical Greece. In particular it details the production of the world&apos;s oldest surviving play The Persians by Aeschylus, first performed in Athens at the...</summary>
    <author>
        <name>Charles</name>
        
    </author>
    
    <category term="history" label="History" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="podcasts" label="Podcasts" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.cordinc.com/blog/">
        <![CDATA[<p>Available on <a href="http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.open.ac.uk.2515430856.02515953864">iTunes</a> and <a href="http://podcast.open.ac.uk/oulearn/arts-and-humanities/podcast-a219-greek-theatre">OU Podcasts</a></p>

<p>This <a href="http://www.open.ac.uk/">Open University</a> series examines theatre during the time of <a href="http://en.wikipedia.org/wiki/Classical_Greece">Classical Greece</a>. In particular it details the production of the world's oldest surviving play <a href="http://en.wikipedia.org/wiki/The_Persians">The Persians by Aeschylus</a>, first performed in Athens at the <a href="http://en.wikipedia.org/wiki/Theatre_of_Dionysus">Theatre of Dionysus</a> in 472BC. Like the other OU podcasts, this series is a set of short documentaries to accompany lectures. There are 4 video podcasts totalling around 40 minutes in length, with the individual videos ranging from 7 to 14 minutes. They are available in iPod or a larger (640×360) format. There are also transcripts. The visuals are mainly talking heads interspersed with shots of theatre ruins, vases or in later episodes modern productions of The Persians. </p>

<p>The first video details what the Theatre of Dionysus would have looked like in the 5th century BC and what it would have meant culturally to attend the theatre at that time. Performances would have been important events, it is estimated that the theatre could probably hold around a third of the male citizens of Athens (it is not certain women were allowed to attend). The second video covers the actors and chorus in Ancient Greek theatre. Ancient Greek plays only had 2 or 3 actors, who would each play multiple parts while wearing masks. The next video examines how some Greek plays have managed to survive 2500 years - only 7 of Aeschylus' estimated 90 plays still exist. The last episode discusses some modern interpretations of The Persians.</p>

<p>A good short podcast series, but probably only for people particularly interested in Ancient Greek theatre.</p>]]>
        
    </content>
</entry>

</feed>
