<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>James Ivings @ BIT</title>
	<atom:link href="http://www.ivings.org.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ivings.org.uk</link>
	<description>University of The West of England - Computer Science</description>
	<lastBuildDate>Wed, 11 Apr 2012 17:17:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Why StackOverflow?</title>
		<link>http://www.ivings.org.uk/2012/02/why-stackoverflow/</link>
		<comments>http://www.ivings.org.uk/2012/02/why-stackoverflow/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 17:26:55 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ivings.org.uk/?p=367</guid>
		<description><![CDATA[Recently I&#8217;ve found myself getting into StackOverflow in a big way. There are two different types of StackOverflow users, those who use it for an easy answer to their less simple programming problems, and those who indulge the first type by answering. Having leeched the StackOverflow community for the first three years of my degree [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve found myself getting into <a href="http://www.stackoverflow.com" target="_blank">StackOverflow</a> in a big way. There are two different types of StackOverflow users, those who use it for an easy answer to their less simple programming problems, and those who indulge the first type by answering.</p>
<p>Having leeched the StackOverflow community for the first three years of my degree I decided it was time to give something back. This was the single best self development decision I have ever made.</p>
<p>I have learned more from answering SO questions over the last few weeks than I&#8217;ve learned in the last few years of my degree. As an example, here&#8217;s a question from the other day that I answered. The original question (<a href="http://stackoverflow.com/questions/9045353/how-to-block-a-group-of-threads-in-java">found here</a>) was this:</p>
<blockquote><p>I have a task in which I have to read data using different threads.</p>
<p>The problem is that due to the limitation of read rates, I built different threads with thread groups.</p>
<p>Can any one tell me how to sleep one entire thread group so that it begins execution from exact same place where it left and the other thread groups remain executing? </p></blockquote>
<p>Not a very normal problem, obviously Threads should not be controlled like this. However, trying to be helpful I hastily answered:</p>
<blockquote><p><em>Is it enough to enumerate the Thread group and call sleep on each thread?</em></p>
<div style="font-style:normal;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// initialise the ThreadGroup with Threads</span>
<span style="color: #003399;">ThreadGroup</span> tg<span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// initialize an Array to hold enumerated Threads</span>
<span style="color: #003399;">Thread</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> threadsToSleep <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Thread</span><span style="color: #009900;">&#91;</span>count<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Copy thread references into array</span>
tg.<span style="color: #006633;">enumerate</span><span style="color: #009900;">&#40;</span>threadsToSleep<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// Sleep each thread for specified time</span>
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Thread</span> t <span style="color: #339933;">:</span> threadsToSleep <span style="color: #009900;">&#123;</span>
    t.<span style="color: #006633;">sleep</span><span style="color: #009900;">&#40;</span>sleepTime<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

</div>
</blockquote>
<p>That sounds simple enough. However, had I thought about it for more than a minute I would have realised a debilitating flaw, which was instantly pointed out to me by the comment:</p>
<blockquote><p>Sleep is a static method. You will sleep the current thread and not the thread you&#8217;re iterating on – John Vint</p></blockquote>
<p>Duh. Of course Thread.sleep() is Static and my answer is useless.</p>
<p>My idiocy aside, the point I&#8217;m trying to make is that my quick humiliation on this question means I will <strong>never forget my mistake</strong>. </p>
<p>I need not point out the usefulness of this. It&#8217;s even <a href="http://programmers.stackexchange.com/questions/20407/will-high-reputation-in-stack-overflow-help-to-get-a-good-job">suggested</a> that high StackOverflow reputation will help you stand out to employers and is a great thing to <a href="http://meta.stackoverflow.com/questions/58947/at-what-point-do-you-put-your-so-reputation-in-your-resume">include on your resume</a>.<br />
So what are you waiting for? Start answering questions too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ivings.org.uk/2012/02/why-stackoverflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>University Update</title>
		<link>http://www.ivings.org.uk/2011/11/university-update/</link>
		<comments>http://www.ivings.org.uk/2011/11/university-update/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 11:21:25 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ivings.org.uk/?p=355</guid>
		<description><![CDATA[Not many posts recently! I&#8217;ve been concentrating on my final year University project for the past few months and it&#8217;s finally taking shape. The project itself is based on JavaScript and I&#8217;ve decided that I will share several problems I&#8217;ve encountered and my own thoughts on the language over the next few months. When my [...]]]></description>
			<content:encoded><![CDATA[<p>Not many posts recently! I&#8217;ve been concentrating on my final year University project for the past few months and it&#8217;s finally taking shape. </p>
<p>The project itself is based on JavaScript and I&#8217;ve decided that I will share several problems I&#8217;ve encountered and my own thoughts on the language over the next few months. When my project is finally complete I will be releasing it under the <a href="http://en.wikipedia.org/wiki/Creative_Commons" title="CC">Creative Commons</a> license for others to explore.</p>
<p>It&#8217;s very exciting (at least for me!) so stay tuned for updates! Time to get back to work&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ivings.org.uk/2011/11/university-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH bypassing Firewall and NAT</title>
		<link>http://www.ivings.org.uk/2011/09/ssh-bypassing-firewall-and-nat/</link>
		<comments>http://www.ivings.org.uk/2011/09/ssh-bypassing-firewall-and-nat/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 10:07:59 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.ivings.org.uk/?p=330</guid>
		<description><![CDATA[Just spent a while helping Jon Tremelling with his most recent Linux faux pas (for the future Jon; Don&#8217;t ever run dd on the wrong device!). Anyway, as per usual we have a problem with me trying to SSH around his routers closed and forwarded ports. This got me thinking about reverse SSH tunneling and [...]]]></description>
			<content:encoded><![CDATA[<p>Just spent a while helping <a href="https://plus.google.com/110337150199578371216/posts" title="Jon Tremelling" target="_blank">Jon Tremelling</a> with his most recent Linux faux pas (for the future Jon; Don&#8217;t ever run dd on the wrong device!).</p>
<p>Anyway, as per usual we have a problem with me trying to SSH around his routers closed and forwarded ports. This got me thinking about reverse SSH tunneling and if we could use my VPS as a middle man.</p>
<p>Through some Googling I found the SSH option -R which allows you to bind a port on the remote server to a new host.<br />
So let us run this command on the machine we are trying to reach, our destination machine, using my VPS (ivings.org.uk) as the middle man:</p>

<div class="wp-terminal">ssh -R 10022:localhost:22 middleman@ivings.org.uk<br/></div>

<p>This opens and binds port 10022 on the VPS for listening, and all connections on that port are forwarded to port 22 of our destination.</p>
<p>Now if I ssh to the VPS:</p>

<div class="wp-terminal">ssh james@ivings.org.uk<br/></div>

<p>Then connect to the tunnel port:</p>

<div class="wp-terminal">ssh user@localhost -p 10022<br/></div>

<p>Where `user` is our username for the destination, then we should be logged on through our tunnel, bypassing the destination machines firewall and NAT.</p>
<p>If you want to add extra security, then this situation should work fine with normal <a href="http://pkeck.myweb.uga.edu/ssh/">ssh keys instead of passwords</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ivings.org.uk/2011/09/ssh-bypassing-firewall-and-nat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Ubuntu from Jaunty 9.04 to Lucid 10.04</title>
		<link>http://www.ivings.org.uk/2011/08/upgrading-ubuntu-from-jaunty-9-04-to-lucid-10-04/</link>
		<comments>http://www.ivings.org.uk/2011/08/upgrading-ubuntu-from-jaunty-9-04-to-lucid-10-04/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 09:34:20 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.ivings.org.uk/?p=318</guid>
		<description><![CDATA[Recently the lack of support for the version of Ubuntu I was lumped with on my VPS (9.04) was starting to be a major hindrance to development. It appears that once an Ubuntu version gets too old all the packages get deprecated completely, rendering the package manager apt completely useless. Obviously I had put off [...]]]></description>
			<content:encoded><![CDATA[<p>Recently the lack of support for the version of Ubuntu I was lumped with on my VPS (9.04) was starting to be a major hindrance to development. It appears that once an Ubuntu version gets too old all the packages get deprecated completely, rendering the package manager apt completely useless.</p>
<p>Obviously I had put off upgrading long enough, so went searching on the best way to migrate to the newest version. The first command I found seemed pretty simple;</p>

<div class="wp-terminal">sudo do-release-upgrade<br/></div>

<p>This should automagically download the latest kernel source and upgrade all packages to the newest supported version, awesome. However, if it was that simple then I wouldn&#8217;t be blogging about it right? Right.<br />
It appears that this command gets deprecated when you fall more than one version behind. So although it can be used effectively to upgrade from Karmic to Lucid, it doesn&#8217;t work when upgrading from Jaunty. For reference, the the command gives the following output:</p>

<div class="wp-terminal">sudo do-release-upgrade<br/><br/>Checking for a new ubuntu release<br/>Done Upgrade tool signature<br/>Done Upgrade tool<br/>Done downloading            <br/>extracting 'lucid.tar.gz'<br/>authenticate 'lucid.tar.gz' against 'lucid.tar.gz.gpg' <br/>tar: Removing leading `/' from member names<br/><br/>Reading cache<br/><br/>Checking package manager<br/><br/>Can not upgrade <br/><br/>An upgrade from 'jaunty' to 'lucid' is not supported with this tool. <br/></div>

<p>In order to pull this off we firstly need to upgrade to Karmic. Luckily there is a small hack that allows us to upgrade all our packages to Karmic versions, including the kernel.<br />
Edit the apt sources list so that it looks like this:</p>

<div class="wp-terminal">sudo nano /etc/apt/sources.list<br/><br/>## EOL upgrade sources.list<br/># Required<br/>deb http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse<br/>deb http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse<br/>deb http://archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse<br/><br/># Optional<br/>#deb http://archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse<br/>#deb http://archive.ubuntu.com/ubuntu/ karmic-proposed main restricted univ</code><br/><br/></div>

<p>Now, if we run a system upgrade, all Karmic packages will be downloaded and installed, including the new kernel.</p>

<div class="wp-terminal">sudo apt-get update && apt-get upgrade<br/></div>

<p>Now we are running Karmic we can upgrade to Lucid using:</p>

<div class="wp-terminal">sudo do-release-upgrade<br/></div>

<p>Hopefully you should not have any issues with this, but I had a couple with the old kernel files.<br />
Explained by <a href="http://askubuntu.com/questions/59261/dpkg-cannot-remove-package-linux-restricted-modules">this StackOverflow post by me</a>, I was stuck with some old kernel modules that would not uninstall because the kernels no longer existed. This was giving me this error message every time I ran apt:</p>

<div class="wp-terminal">The following packages will be REMOVED<br/>linux-restricted-modules-2.6.28-11-server <br/>linux-restricted-modules-2.6.28-19-server<br/><br/></div>

<p>Thank god for StackOverflow or I would still be stuck on it now. Check the link above for the given solution. Apart from that, and <a href="http://askubuntu.com/questions/59272/php-not-working-in-apache2-after-system-upgrade/59393#59393">a few issues</a> with my Apache server, it was a relatively smooth upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ivings.org.uk/2011/08/upgrading-ubuntu-from-jaunty-9-04-to-lucid-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>From Edison to Google &#8211; The rise of Utility Computing</title>
		<link>http://www.ivings.org.uk/2011/06/the-rise-of-utility-computing/</link>
		<comments>http://www.ivings.org.uk/2011/06/the-rise-of-utility-computing/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 08:46:18 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Self]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[icloud]]></category>

		<guid isPermaLink="false">http://www.ivings.org.uk/?p=300</guid>
		<description><![CDATA[Popular in recent news is the rise of cloud computing services and although products such as Apple&#8217;s iCloud have received a large amount of criticism, most will agree that a great deal of the leading trends in the computing industry can be associated to one model, that of computing distributed as a utility. The most [...]]]></description>
			<content:encoded><![CDATA[<p>Popular in recent news is the rise of cloud computing services and although products such as <a href="http://www.apple.com/icloud/">Apple&#8217;s iCloud</a> have received a <a href="http://www.telegraph.co.uk/technology/apple/8564093/Apple-iCloud-the-criticism.html">large amount</a> of <a href="http://ashcotton.com/blog/forecast-cloudy-with-a-chance-of-apple-shoving-another-product-down-my-throat-that-i-really-don%E2%80%99t-want">criticism</a>, most will agree that a great deal of the leading trends in the computing industry can be associated to one model, that of computing distributed as a utility.</p>
<p>The most compelling and thought inspiring comparison I have read on the issue is in a book called <a href="http://www.amazon.co.uk/Big-Switch-Rewiring-Edison-Google/dp/0393062287">The Big Switch</a>. In his book, Nicholas Carr takes us through the electricity generation and the evolution from power generation to mass power distribution. In the 19th century, any business wishing to power their plant would need to purchase and run a personal electricity generator built using Edison&#8217;s dynamos. Thomas Edison realised late in the century that electricity could be outsourced to power plants, which were able to supply an entire block with life giving power. </p>
<p>Edison however, never saw beyond this and believed he could profit by manufacturing and distributing the components for his power plant dynamos. It took a man named Samuel Insull to realise the potential of electrical power distributed as a utility. He discovered that power could be created and distributed in large quantities much more efficiently and at a fraction of the cost of Edison&#8217;s Dynamos. In a very short time he was powering the majority of the businesses in Chicago from one huge power plant.<br />
These companies had realised that by avoiding the purchase of expensive equipment, they were able to reduce their own fixed costs and not have to worry about maintenance or obsolescence. Electricity as a utility had triumphed over the private power plant.</p>
<p>Present-day, we can see the same process taking place in the computing industry. The personal computer era facilitated by Microsoft saw the rise of the Client-Server model of computing. Through office based data-centres, workers on personal computers are able to access the network, files, printers or other services. Although this model became hugely popular it also made the entire process massively inefficient.<br />
This is largely due to the lack of industry standards, meaning that hardware and software companies constantly compete by selling products that do not interact well with their competitors versions. This results in machines dedicated to single purposes, such as databases or web-servers and in order to host a new application or service a company must purchase another machine to dedicate to it. Furthermore, in a stable system, these computers need the capability to reach peak demands, and their available resources must reflect this even if the peak is rarely reached.<br />
My most recent employer was suffering from this in a bad way, a recent review estimating that under 40% of the total processing power was in use over 90% of the time.<br />
In short, client-server computing has destroyed the conservation of energy and processing power that had been present in previous generations.</p>
<p>Obviously clear similarities can be made from this to the electricity era, the self contained data-centres businesses construct being just as wasteful and expensive as Edison&#8217;s private dynamos.<br />
From this comparison it is easy to wonder why computing as a utility was not at the forefront of the computing generation. However, it had always been limited by a lack of sufficient bandwidth in the same way that electrical power was limited by DC. Now that network speeds are sky-rocketing and becoming cheaper, the power of computers can be delivered to users from a great distance, ushering in the age of utility computing.</p>
<p>From this description it&#8217;s difficult to see how Apple&#8217;s new service fits into the cloud computing model. By that I mean the fact that when using their iCloud service you get nothing more than online storage for your music. In order to listen you are still required to download your tracks to a physical device. Essentially they are providing outsourced storage, but hard drives are as cheap as they have ever been, and storage is now the most inexpensive part of computing. However, Microsoft and other manufacturers have also been following this same, seemingly unprofitable business model. </p>
<p>I believe it&#8217;s plain to see the future lies in outsourcing the whole deal, or more importantly, the processing element of a system. This is already happening, but we have obviously not crossed over to this model yet and due to current mind-sets I don&#8217;t think we are quite ready to leave the client-server model behind. This said, I don&#8217;t think it will be long before our home PC&#8217;s consist of barely more than a monitor, accessing the cloud for any service we require, we just need a large corporation to give the industry a shake. Google have already attempted proper cloud computing like this with <a href="http://en.wikipedia.org/wiki/Google_Chrome_OS">their new OS</a> and it has also been experimented with on a <a href="http://www.jolicloud.com/">few other platforms</a>.</p>
<p>However, large companies such as Apple and Microsoft are doing nothing to facilitate this jump. Personally I see these companies as the Edison of the digital world. They came up with a good idea, but are unwilling to push it onto the next logical step, and their concern with the potential obsolescence of their current products (such as Windows or iTunes) is holding the industry back and costing us all money. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ivings.org.uk/2011/06/the-rise-of-utility-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

