<?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>Rob Golding &#187; university</title>
	<atom:link href="http://www.robgolding.com/blog/category/university/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robgolding.com</link>
	<description>Technology Consultant</description>
	<lastBuildDate>Mon, 07 Jun 2010 22:04:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>3rd Year Project: Back to Backtrac</title>
		<link>http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/</link>
		<comments>http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/#comments</comments>
		<pubDate>Tue, 25 May 2010 09:49:00 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[backtrac]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=381</guid>
		<description><![CDATA[After contacting the university regarding my 3rd year project/dissertation, my ideal choice has been confirmed. I'll be making a distributed backup system, based around a Django web interface and AMQP.
Backtrac is a pretty old project, and one whose name I am likely to change once I'm working on it. It was started in my first [...]]]></description>
			<content:encoded><![CDATA[<p>After contacting the university regarding my 3rd year project/dissertation, my ideal choice has been confirmed. I'll be making a distributed backup system, based around a <a title="Django Project" href="http://djangoproject.com" target="_blank">Django</a> web interface and <a title="Advanced Message Queueing Protocol" href="http://www.amqp.org/confluence/display/AMQP/About+AMQP" target="_blank">AMQP</a>.</p>
<p><span id="more-381"></span>Backtrac is a pretty old project, and one whose name I am likely to change once I'm working on it. It was started in my first semester of university last year, when I didn't have enough work to keep me busy. I didn't know enough about Django back then, though, so it was left unfinished and only half-working.</p>
<p>Now I think I know enough to pull this off, and it's a chance to do something I really enjoy - while getting marks for it in the process! If everything goes to plan I'll be supervised by <a title="Dr. Julie Greensmith" href="http://www.cs.nott.ac.uk/~jqg/" target="_blank">Dr. Julie Greensmith</a>, which I'm really looking forward to.</p>
<p>I'll be using an app called <a title="Celery Distributed Task Queue" href="http://celeryproject.org/" target="_blank">Celery</a> to handle the background tasks, which will be simple "pings" to the client machines, telling them to start a backup. Celery uses AMQP, provided by a broker such as <a title="RabbitMQ Enterprise Messaging System" href="http://www.rabbitmq.com/" target="_blank">RabbitMQ</a> (which is written in Erlang). It's usually used for processing intensive computational tasks, but can also be put to use for jobs that need executing on a periodic basis, like backups.</p>
<p>I can tell you're getting too excited, so I'll stop. Rest assured, though, I will be writing about the discoveries I make along the way to finishing this ambitious project.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/&amp;title=3rd+Year+Project%3A+Back+to+Backtrac" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/&amp;title=3rd+Year+Project%3A+Back+to+Backtrac" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/&amp;title=3rd+Year+Project%3A+Back+to+Backtrac" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/&amp;title=3rd+Year+Project%3A+Back+to+Backtrac" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/&amp;t=3rd+Year+Project%3A+Back+to+Backtrac" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=3rd+Year+Project%3A+Back+to+Backtrac+-+http://tinyurl.com/2w63be4+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/&amp;n=3rd+Year+Project%3A+Back+to+Backtrac&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=381&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/05/25/3rd-year-project-back-to-backtrac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Django Model Templates (sans-Denormalisation)</title>
		<link>http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/</link>
		<comments>http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 13:43:44 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[myuni]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=302</guid>
		<description><![CDATA[I came across an interesting problem recently, while trying to model the structure of a university course in Django.
The model needed to represent the notion of a university module, which can be taught over a number of semesters and/or years, by different people, and with different students each time round. Some information remained common to [...]]]></description>
			<content:encoded><![CDATA[<p>I came across an interesting problem recently, while trying to model the structure of a university course in Django.</p>
<p>The model needed to represent the notion of a university module, which can be taught over a number of semesters and/or years, by different people, and with different students each time round. Some information remained common to each of these modules however, such as the code, name, and type of the module (single semester or full-year).</p>
<p><span id="more-302"></span></p>
<p>One solution that crossed my mind was to use a sort of template, and copy the common information over each time the module was taught. This would mean duplicating the common fields over a template model and the module's model, and copying the data every time a new "Module" object gets created. This just didn't sit well with me though, as I really don't like denomalising data when it's not absolutely necessary.</p>
<p>The solution I have settled on (for now, anyway) works something like this: I use the model template idea, but with a foreign key from the Module to it's template. Then, to access the fields on the template directly from the Module model, I use a combination of the Python <em>property</em> and a smart lambda function.</p>
<p>Here's a simplified version of the model to illustrate what I'm talking about:</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">class</span> ModuleDefinition<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    <span style="color: #dc143c;">code</span> = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">6</span>, unique=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
    name = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">200</span><span style="color: black;">&#41;</span>
    credits = models.<span style="color: black;">IntegerField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">4</span><span style="color: black;">&#41;</span>
    level = models.<span style="color: black;">IntegerField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>
    <span style="color: #008000;">type</span> = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">30</span>, choices=MODULE_TYPE_CHOICES<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Module<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    <span style="color: #dc143c;">code</span> = <span style="color: #008000;">property</span><span style="color: black;">&#40;</span><span style="color: #ff7700;font-weight:bold;">lambda</span> s: s._get_definition_property<span style="color: black;">&#40;</span><span style="color: #483d8b;">'code'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    name = <span style="color: #008000;">property</span><span style="color: black;">&#40;</span><span style="color: #ff7700;font-weight:bold;">lambda</span> s: s._get_definition_property<span style="color: black;">&#40;</span><span style="color: #483d8b;">'name'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    credits = <span style="color: #008000;">property</span><span style="color: black;">&#40;</span><span style="color: #ff7700;font-weight:bold;">lambda</span> s: s._get_definition_property<span style="color: black;">&#40;</span><span style="color: #483d8b;">'credits'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    level = <span style="color: #008000;">property</span><span style="color: black;">&#40;</span><span style="color: #ff7700;font-weight:bold;">lambda</span> s: s._get_definition_property<span style="color: black;">&#40;</span><span style="color: #483d8b;">'level'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
    definition = models.<span style="color: black;">ForeignKey</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'ModuleDefinition'</span><span style="color: black;">&#41;</span>
    semester = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">20</span>, choices=SEMESTER_CHOICES<span style="color: black;">&#41;</span>
    year = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">20</span>, choices=YEAR_CHOICES<span style="color: black;">&#41;</span>
    convener = models.<span style="color: black;">ForeignKey</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'auth.User'</span>, related_name=<span style="color: #483d8b;">'modules_convened'</span><span style="color: black;">&#41;</span>
    students = models.<span style="color: black;">ManyToManyField</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'auth.User'</span>, blank=<span style="color: #008000;">True</span>, related_name=<span style="color: #483d8b;">'modules_taken'</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> _get_definition_property<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, <span style="color: #008000;">property</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">definition</span>.<span style="color: #0000cd;">__getattribute__</span><span style="color: black;">&#40;</span><span style="color: #008000;">property</span><span style="color: black;">&#41;</span></pre>
<p>In this model I've called the template a "definition", but the idea is the same. The <em>_get_definition_property()</em> method allows me to get a property from the parent definition programmatically, which is used in the lambda functions to add the fields from the definition to the model itself, as read-only properties. This allows me to access them as if they were a field stored on the model itself (i.e. <em>module.code</em>, <em>module.name</em>, etc.) which is handy in the templates where <em>module.definition.code</em> would get very old, very fast.</p>
<p>I'd be really interested to hear how others have tackled the same issue, as I'm sure it's not just restricted to university modules. Maybe soon I'll be making a post about how I model a timetable in Django...after all, how hard can it be!?</p>
<p>Oh, and if you're wondering, this code is for the <a title="MyUni" href="http://bitbucket.org/robgolding63/myuni/" target="_blank">MyUni</a> project that is occupying me recently. I'm restricting myself to just <strong>thinking</strong> about how the models could work (and maybe writing little bit of code) until <a title="Robert S. K. Miles" href="http://robertskmiles.com" target="_blank">Rob</a> and <a title="Ben Jenkinson" href="http://benjenkinson.com" target="_blank">Ben</a> come back to university.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/&amp;title=Django+Model+Templates+%28sans-Denormalisation%29" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/&amp;title=Django+Model+Templates+%28sans-Denormalisation%29" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/&amp;title=Django+Model+Templates+%28sans-Denormalisation%29" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/&amp;title=Django+Model+Templates+%28sans-Denormalisation%29" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/&amp;t=Django+Model+Templates+%28sans-Denormalisation%29" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Django+Model+Templates+%28sans-Denormalisation%29+-+http://tinyurl.com/2vugsj2+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/&amp;n=Django+Model+Templates+%28sans-Denormalisation%29&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=302&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/04/27/django-model-templates-sans-denormalisation/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>MyUni and Django 1.2</title>
		<link>http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/</link>
		<comments>http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 12:59:36 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[myuni]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=294</guid>
		<description><![CDATA[MyUni is hailed as my "latest venture" on the front page of my website. In fact, it was conceived early last year, when I was in my first year at Nottingham University, by Rob Miles and Ben Jenkinson. We were only just starting to get to grips with this new fad, called Django.
The project has [...]]]></description>
			<content:encoded><![CDATA[<p><a title="MyUni" href="http://bitbucket.org/robgolding63/myuni/wiki" target="_blank">MyUni</a> is hailed as my "latest venture" on the front page of my website. In fact, it was conceived early last year, when I was in my first year at Nottingham University, by <a title="Robert S. K. Miles" href="http://robertskmiles.com" target="_blank">Rob Miles</a> and <a title="Ben Jenkinson" href="http://benjenkinson.com" target="_blank">Ben Jenkinson</a>. We were only just starting to get to grips with this new fad, called <a title="Django Project" href="http://djangoproject.com" target="_blank">Django</a>.<span id="more-294"></span></p>
<p>The project has gone through several iterations since then, never really reaching any form of completeness. This time round, we are using proper version control (thanks to <a title="Mercurial SCM" href="http://selenic.com/mercurial" target="_blank">Mercurial</a> and <a title="BitBucket" href="http://bitbucket.org" target="_blank">BitBucket</a>), and trying to adhere to Django best practices as much as possible.</p>
<p>Straight from the repository website:</p>
<blockquote><p>MyUni is a portal-style web application for Universities, offering students a central location to access all the relevant information about their course, modules, assignments, and staff members.</p></blockquote>
<p>The project came about because of a passionate hatred for the WebCT system that our university is using, and a general feeling that things could be (and should be) better.</p>
<p>Django 1.2 will bring some really exciting <a title="Django 1.2 Release Notes" href="http://docs.djangoproject.com/en/dev/releases/1.2/" target="_blank">new features</a>, which I am sure would make developing and using MyUni a better experience. One of the things I'm most looking forward to using is the messages framework. I plan to use it for a bunch of things, possibly including form error messages...maybe.</p>
<p>Now, if only the release date would stay in the same place for more than a week!</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;title=MyUni+and+Django+1.2" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;title=MyUni+and+Django+1.2" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;title=MyUni+and+Django+1.2" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;title=MyUni+and+Django+1.2" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;t=MyUni+and+Django+1.2" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=MyUni+and+Django+1.2+-+http://tinyurl.com/2drhnmo+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/&amp;n=MyUni+and+Django+1.2&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=294&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/04/23/myuni-and-django-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mercurial on University of Nottingham Computer Science Servers</title>
		<link>http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/</link>
		<comments>http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 21:20:09 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=194</guid>
		<description><![CDATA[For a while now, I've been using Subversion to keep track of personal projects and coursework at university. SVN is installed on the UNIX servers as Computer Science, so it's a relatively trivial process to get up and running with a repository when I start a new assignment.
Recently though, I've been looking in to Mercurial [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin: 10px;" title="Mercurial" src="http://www.robgolding.com/wp-content/uploads/2010/03/mercurial.png" alt="Mercurial Logo" width="120" height="144" />For a while now, I've been using Subversion to keep track of personal projects and coursework at university. SVN is installed on the UNIX servers as Computer Science, so it's a relatively trivial process to get up and running with a repository when I start a new assignment.</p>
<p>Recently though, I've been looking in to Mercurial as a more modern alternative. Some things about Subversion are really starting to annoy me, like the inability to ignore files on a repository-wide level easily (I work with Python all the time, so .pyc files can really get on my nerves!). Mercurial seems slicker, and I'm interested in the concept of <a title="Distributed Revision Control" href="http://en.wikipedia.org/wiki/Distributed_revision_control" target="_blank">DVCS</a>, as opposed to the classic client-server way of thinking.</p>
<p>However, Mercurial is not installed on the (rather ancient, now) Solaris servers at university. I really admire the job that the sysadmins do, so I am in no way condemning them for it not being installed. Instead, I set out to get it compiled and working myself.</p>
<p>Installing it on the servers, it seemed, was the easy part. I followed the <a title="Installation Instructions for Solaris 10 (Sparc)" href="http://mercurial.selenic.com/wiki/UnixInstall#Solaris_10_.28Sparc.29" target="_blank">installation instructions</a> (making sure to include the LD_LIBRARY_PATH variable) and all was well.</p>
<p>Cloning from the server, however, wasn't so easy. The problem lies in the fact that Mercurial is now installed for me, and me alone. The hg binary lives in my home directory, not on the server's main path (i.e. the /usr/bin/ directory). Therefore, I needed to tell the client exactly what command to run on the server. If anyone else is having the same trouble, the command that I finally came up with looks like this:</p>
<pre class="bash">hg --config ui.<span style="color: #007800;">remotecmd=</span><span style="color: #ff0000;">&quot;LD_LIBRARY_PATH=/usr/sfw/lib PYTHONPATH=~/lib/python ~/bin/hg&quot;</span></pre>
<p>I then aliased this command to <strong>hgtuck</strong> to save my sanity (the server is named tuck, after Friar Tuck in the Robin Hood legends), and I now have a perfectly working Mercurial install!</p>
<p>If anyone else is looking to do something similar, then I hope this little tip saves you some time!</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/&amp;title=Mercurial+on+University+of+Nottingham+Computer+Science+Servers" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/&amp;title=Mercurial+on+University+of+Nottingham+Computer+Science+Servers" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/&amp;title=Mercurial+on+University+of+Nottingham+Computer+Science+Servers" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/&amp;title=Mercurial+on+University+of+Nottingham+Computer+Science+Servers" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/&amp;t=Mercurial+on+University+of+Nottingham+Computer+Science+Servers" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Mercurial+on+University+of+Nottingham+Computer+Science+Servers+-+http://tinyurl.com/ydblaj8+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/&amp;n=Mercurial+on+University+of+Nottingham+Computer+Science+Servers&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=194&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/03/01/mercurial-on-university-of-nottingham-computer-science-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Section Numbering in LaTeX</title>
		<link>http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/</link>
		<comments>http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 22:54:16 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=183</guid>
		<description><![CDATA[For our last coursework (which was for a really interesting compilers module), I chose to present my answers in LaTeX. It's been a very steep learning curve, but I'm extremely happy with the results. I don't even mind the slight drop in productivity that's caused by my uncontrollable urge to stop and admire my document [...]]]></description>
			<content:encoded><![CDATA[<p>For our last coursework (which was for a really interesting <a title="G52CMP" href="http://www.cs.nott.ac.uk/~nhn/G52CMP/" target="_blank">compilers</a> module), I chose to present my answers in <a title="LaTeX" href="http://www.latex-project.org/" target="_blank">LaTeX</a>. It's been a very steep learning curve, but I'm extremely happy with the results. I don't even mind the slight drop in productivity that's caused by my uncontrollable urge to stop and admire my document every so often! One thing that had me stuck for a while, however, was the automatic section numbering system.</p>
<p>To answer the questions for the compilers coursework, I wanted my <em>section</em>s to be numbered (1, 2, 3), my <em>subsection</em>s to be numbered (a, b, c), and my <em>subsubsection</em>s to be numbered (i, ii, iii). This numbering pattern matches that which is given in the question paper, whereby a number of nested <em>enumerate</em>s were used. The default LaTeX section numbering however is (1, 1.1, 1.1.1). I finally found a way to alter this default behaviour by using the following code in the preamble:</p>
<pre class="latex"> <span style="color: #800000; font-weight: normal;">\renewcommand</span>{<span style="color: #2222D0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\thesubsection</span>}{(<span style="color: #800000; font-weight: normal;">\alph</span>{subsection})</span>}
&nbsp;
<span style="color: #800000; font-weight: normal;">\renewcommand</span>{<span style="color: #2222D0; font-weight: normal;"><span style="color: #800000; font-weight: normal;">\thesubsubsection</span>}{<span style="color: #800000; font-weight: normal;">\roman</span>{subsection}.</span>}</pre>
<p>This code modifies the way that the counters for subsections and subsubsections are printed (section counters are correct when left at the default).</p>
<p>I hope this saves someone even the few minutes it took me to work this out, once I'd applied some logic! It's very useful to know that LaTeX has a counter for <strong>everything</strong>. <a title="Counters in LaTeX" href="http://texblog.wordpress.com/2007/07/25/counters-in-latex/">This particular post</a> was very helpful in working out which ones to alter, and how.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;title=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;title=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;title=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;title=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;t=Custom+Section+Numbering+in+LaTeX" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Custom+Section+Numbering+in+LaTeX+-+http://tinyurl.com/yc26pbq+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/&amp;n=Custom+Section+Numbering+in+LaTeX&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=183&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2010/02/28/custom-section-numbering-in-latex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>It Begins&#8230;</title>
		<link>http://www.robgolding.com/blog/2009/09/22/it-begins/</link>
		<comments>http://www.robgolding.com/blog/2009/09/22/it-begins/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 17:55:45 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=162</guid>
		<description><![CDATA[The country has just undergone a mass-exodus of university students from their parents' houses back into halls. I played by own small part in blocking up the roads moving back into university accommodation this weekend, and it's all gearing up for the new school year.
I've been working with Django more and more lately, and I've [...]]]></description>
			<content:encoded><![CDATA[<p>The country has just undergone a mass-exodus of university students from their parents' houses back into halls. I played by own small part in blocking up the roads moving back into university accommodation this weekend, and it's all gearing up for the new school year.</p>
<p>I've been working with Django more and more lately, and I've written my first "commercial" application using my new favourite framework - a booking system for taught causes at the City Council. I'm really enjoying writing web applications with Django, and I'm sure this blog will start to resemble a web-developer's in the near future.</p>
<p>Also, I'm really looking forward to this year at university. As I understand it, there's a lot more work to be done, but the software engineering group project should be fun - as long as my "randomly chosen" team are happy with us using Python!</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2009/09/22/it-begins/&amp;title=It+Begins..." rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2009/09/22/it-begins/&amp;title=It+Begins..." rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2009/09/22/it-begins/&amp;title=It+Begins..." rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2009/09/22/it-begins/&amp;title=It+Begins..." rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2009/09/22/it-begins/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2009/09/22/it-begins/&amp;t=It+Begins..." rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=It+Begins...+-+http://tinyurl.com/yeexepf+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2009/09/22/it-begins/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2009/09/22/it-begins/&amp;n=It+Begins...&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=162&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2009/09/22/it-begins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Trials and Tribulations of Django + Git</title>
		<link>http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/</link>
		<comments>http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 21:23:10 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=144</guid>
		<description><![CDATA[I just finished my last exam today - Web Programming and Scripting - which explains the distinct lack of activity around here in recent times. Thankfully I could end my exam season on a high, as web programming is, well, what I do - so it wasn't too much of a challenge!
Something strange happens to [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished my last exam today - Web Programming and Scripting - which explains the distinct lack of activity around here in recent times. Thankfully I could end my exam season on a high, as web programming is, well, what I do - so it wasn't too much of a challenge!</p>
<p>Something strange happens to me every time exams come around. I seem to pick up new projects, and just run with them. This time, I've become involved with a small group of people at university, writing a portal-style information system for universities. I suppose most people call this behavior procrastination, but I'm quite deeply in denial about that.</p>
<p><img class="alignleft" style="margin: 5px 10px;" title="Django Badge" src="http://media.djangoproject.com/img/badges/djangowish126x70.gif" alt="" width="126" height="70" />Ever since my post about the <a href="http://www.robgolding.com/index.php/2009/03/06/my-latest-project-backtrac-backup-system/">Backtrac Backup System</a>, I've been really enjoying using <a href="http://www.djangoproject.com/">Django</a>. Something about it just makes developing for the web, well, exciting. That can only be good, right? I am the designated server administrator for this latest project, mostly due to the fact that I am the only one with a server to administer, and some of the things I've learned so far seem worthy of a mention here.  Firstly, we as developers were - how can I put it - stepping on each other toes somewhat. The project at this point had no version control, so we were just editing a bunch of files over SFTP. Obviously, some sort of Source Control Management was in order. I did some research, and decided that Git was a nice, modern alternative to the ever-popular SVN. It also meant that my server was constantly backed up by everyone on the team - but that's just a bonus!</p>
<p>So, I installed Git, and started a repository. A lot of effort went into learning how the system works, and more importantly, how to make it work for us. Directed Acyclic Graphs thankfully made some sense to me, so I could just about understance the documentation. I wrote some custom hooks, and a C Program to syncronise the web-server. I was happy, and absolutely certain that this was the solution to all our woes. I was mistaken. Git just didn't work the way I had hoped. The custom hooks were throwing permission errors all over the place, and my development team (read: my friend Rob Miles) was locked out of the repository. We made the decision yesterday to scrap Git, and go back to the previous system of editing the files over SFTP. We are always in constant communication when developing for the project, so it's not too big a deal, but I feel that I failed as an adminisrator. You see, as an admin your job isn't just to play with cool toys and loud servers - your primary purpose is to give the users what they need to work, and that is most certainly not what I achieved.</p>
<p>I'm glad I took the time to learn Git - and I'm sure it will help me later in life, in some way or another. It's just unfortunate that it didn't work out the way I had hoped for our project.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;title=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;title=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;title=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;title=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;t=The+Trials+and+Tribulations+of+Django+%2B+Git" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=The+Trials+and+Tribulations+of+Django+%2B+Git+-+http://tinyurl.com/yc5ofsu+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/&amp;n=The+Trials+and+Tribulations+of+Django+%2B+Git&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=144&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2009/06/02/the-trials-and-tribulations-of-django-git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ubuntu and The University of Nottingham&#8217;s Proxy</title>
		<link>http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/</link>
		<comments>http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 18:23:54 +0000</pubDate>
		<dc:creator>Rob Golding</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://www.robgolding.com/?p=67</guid>
		<description><![CDATA[I have recently enrolled on a Computer Science course at The University of Nottingham, and as such have had to make sure my machines correctly use their proxy server for web access. This post outlines the process of configuring Ubuntu for exactly that purpose - and could be applied to any network with a similar [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-69" style="margin: 15px;" title="nottingham-ubuntu" src="http://www.robgolding.com/wp-content/uploads/2008/11/nottingham-ubuntu.png" alt="" width="144" height="75" />I have recently enrolled on a Computer Science course at The University of Nottingham, and as such have had to make sure my machines correctly use their proxy server for web access. This post outlines the process of configuring Ubuntu for exactly that purpose - and could be applied to any network with a similar layout.</p>
<p><em><strong>Network Proxy</strong></em></p>
<p>First and foremost, Ubuntu has a setting in gnome for the Network Proxy, which should set gnome's proxy - but I can't see as it affects anything at all - still, better to be safe than sorry.</p>
<p>At Nottingham University, the recommended configuration is a proxy auto-configuration script (<em>proxy.pac</em>) which is downloaded by the client and parsed to configure the appropriate proxy server. In this case, it is located at http://wwwcache.nottingham.ac.uk/proxy.pac. This URL is entered into the correct field of the gnome Network Proxy settings dialogue.</p>
<p><img class="alignnone size-medium wp-image-77" style="border: 0pt none; margin-top: 10px; margin-bottom: 10px;" title="network-proxy" src="http://www.robgolding.com/wp-content/uploads/2008/11/network-proxy-300x241.png" alt="" width="300" height="241" /></p>
<p><em><strong>Terminal Proxy</strong></em></p>
<p>Secondly, the terminal has a proxy configuration option, so that programs that run inside the terminal making HTTP requests can access the internet - namely <strong>wget </strong>and <strong>aptitude</strong>. This is slightly more difficult to configure than the previous, and is achieved like so:</p>
<p>The terminal proxy is set using a variable called <em>http_proxy</em>, which is set using the <strong>export</strong> command, i.e.</p>
<pre class="bash"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">http_proxy=</span><span style="color: #ff0000;">&quot;http://proxy_server_ip:port&quot;</span></pre>
<p>In this case, the proxy server's IP and port for the SNS (Student Network Service) is 128.243.253.119:8080.</p>
<p>This change can be made permanent by editing <em>/etc/bash.bashrc</em>, and adding the above line to the end of the file. Otherwise, the change is only effective in the terminal window currently open by the user, and disappears when it is closed.</p>
<p><em><strong>Synaptic</strong></em></p>
<p>Lastly, Synaptic Package Manager must have the proxy set, in order to update your installation using the in-built Update Manager or Synaptic GUI. This is done by opening Synaptic, and choosing Settings, Preferences, and setting the above proxy information using the Network tab. Unfortunately Synaptic cannot read auto-configuration scripts, so the IP and port must be manually entered here.</p>
<p><img class="alignnone size-medium wp-image-76" style="border: 0pt none; margin-top: 10px; margin-bottom: 10px;" title="synaptic-proxy" src="http://www.robgolding.com/wp-content/uploads/2008/11/synaptic-proxy-300x266.png" alt="" width="300" height="266" /></p>
<p>Obviously once all this is done, Firefox must be configured to use the correct proxy - but I trust you know how to do that! This turns out to be quite a pain, so I'll be looking at ways to do this in one fell swoop. If anyone has any suggestions, then please let me know.</p>
<p class="note"><strong>Note:</strong> These changes can be made much less painful by adding an entry to the <em>hosts file </em>for each of the proxy IPs you need to configure - so you only need to type the word <strong>proxy </strong>for example, instead of the entire IP. I will document this process shortly in a separate post.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/&amp;title=Ubuntu+and+The+University+of+Nottingham%27s+Proxy" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/&amp;title=Ubuntu+and+The+University+of+Nottingham%27s+Proxy" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/&amp;title=Ubuntu+and+The+University+of+Nottingham%27s+Proxy" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/&amp;title=Ubuntu+and+The+University+of+Nottingham%27s+Proxy" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/" rel="nofollow" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/&amp;t=Ubuntu+and+The+University+of+Nottingham%27s+Proxy" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Ubuntu+and+The+University+of+Nottingham%27s+Proxy+-+http://tinyurl.com/yf45rvx+&amp;source=shareaholic" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/&amp;n=Ubuntu+and+The+University+of+Nottingham%27s+Proxy&amp;pli=1" rel="nofollow" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

<img src="http://www.robgolding.com/?ak_action=api_record_view&id=67&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.robgolding.com/blog/2008/11/24/ubuntu-and-the-university-of-nottinghams-proxy/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
