I can do all things through him who strengthens me.

February 28th, 2011

ESV: Philippians 4:13.

This is a wonderful feeling. That there is nothing to fear, nothing is impossible – that whatever happens, whatever tomorrow brings – I am not afraid. Not because I have any strength in myself to face such things. Rather because I know that He does.

38 For I am sure that neither death nor life, nor angels nor rulers, nor things present nor things to come, nor powers,39 nor height nor depth, nor anything else in all creation, will be able to separate us from the love of God in Christ Jesus our Lord.
ESV: Romans Chapter 8

Death holds no fear, for Christians can’t die — only sleep rather deeply while their body rots/burns away — and that holds no fear when you know that an alarm clock has been set that wakes even those who sleep so deeply — a trumpet that none can ignore.

What then can tomorrow bring?

… “but whoever drinks of the water that I will give him will never be thirsty forever. The water that I will give him will become in him a spring of water welling up to eternal life.”
ESV: John 4:14.

So I can pour out from my heart never fearing that it might run dry because it is not my heart that is being poured from, not my love being drawn on, but rather the love of God which has no bounds.

Obviously the danger here is that though the spring never runs dry messed up broken people like me can’t have oceans flowing through us that fast as our time is finite and so is our desire to do so. However that is only where we are — not where we are going.

So: bring it. Come sunshine, come rain, come storm, come hurricane. Come good times, come bad times. Come death, come life, come good, come evil. Come beginnings and endings. Come despair, come persecution, beatings and prison. All those things and more besides hold no fear for God is more powerful than all of them and he does not change. They hold no fear for I know those who have faced them and come out praising. Those who have died, been beaten, raped, who sit on death row, who sweat locked in shipping containers in the noonday sun. They are only a couple of hops across the friendship graph and they face more than I ever expect to and they praise the God who remains faithful and gives them strength to carry on in the face of all of that.

So summary for those who are by now thoroughly confused: there is a hope in my heart stronger than life itself and a joy to which nothing compares. I have bad days, I have good days but joy does not depend on me (it depends on Him) and it is better than happiness. (the life of a Christian is a pretty awesome thing (this is not the same thing as being easy))

Apologies if this doesn’t make much sense. If you think me crazy then well, no change there then. ;-) It was on my heart and is one of the rather better things in there so count yourself lucky. :-)

Telling good news

February 9th, 2011

This week the Cambridge Inter-Collegiate Christian Union (CICCU) is running a week of talks about the truth that sets you free having been to the first two talks I know that they are very good.

Frequently one finds that people don’t understand why someone would want to tell people about Jesus. Why do Christians do that? Isn’t faith a personal private thing?

Perhaps this answers that question: if the Christian message is true then it is the best news in the world – there has never been anything more important. If then someone believes that it is true how can they not tell people – what a horrible thing to do to someone – to not tell someone you care about something you believe to be so incredibly important. If you don’t understand that if it were true then it would be the most important news then you don’t understand Christianity.

However Christians are human and we mess up a lot. It doesn’t help people if the way we try and tell them about this wonderful news turns them off and makes them ignore it. It doesn’t help if people think that we want to tell them about Jesus out of some sort of legalism or rule following or because we think that makes us better people – it doesn’t. How can we not tell those we love about the person we love the most.

Apologies if this comes across poorly. I may be a coward but if you ask me a serious question then I will try to answer. If you want to find out more then the truth talks are very good as are the gospels in the bible and two ways to live is a good introduction.

tidy_vig: Automatically reformatting generated HTML into something cleaner

February 4th, 2011

As webmaster and secretary of various things I regularly need to upload minutes to websites and hence want to upload html files. While Open/LibreOffice’s export to html functionality works it doesn’t produce nice html. tidy is a useful tool for finding flaws in html and making it correct and nicer but it is not sufficient to accomplish this task on its own. Hence I have finally scriptified the various automatable parts of turning generated html into something publishable (this loses all style definitions so won’t look the same – use tidy_up if you want to avoid that).


#!/bin/bash

set -e #bail if something goes wrong

tidy_up='tidy -indent -modify -clean -bare -asxml -utf8 -wrap 80 -access 3 --logical-emphasis yes'

$tidy_up $1 #Normalise to lowercase and remove most rubbish
$tidy_up $1
$tidy_up $1 #Repeat until stabalises - this happens third time
# Get sed to select the range of lines to apply the replacement on first.
# No I don't know what is going on here.
sed -i '/]*>/,/<\/style>/ {:ack N; /<\/style>/! b ack s/]*>.*<\/style>//g }' $1
sed -i 's/ class="[^"]*"//g' $1
sed -i 's/<\/*span>//g' $1
$tidy_up $1 #Reformat now that remaining cruft removed
sed -i 's/ class="[^"]*"//g' $1 #Remove any classes that got un-line breaked

Unfortunately there may still need to be some manual work if for example headers haven’t been specified as headers when the person who wrote the original file wrote it and so it may be that some sections might need conversion.

It is probably possible to do this in a cleaner more logical way and I have probably missed edge cases and this probably counts as being a little hacky however hopefully someone will find it useful.

Enforcing ‘fairness’ through reverse discrimination for Universities

January 9th, 2011

Recently there has been again a lot of media attention on Simon Hughes’ comments that universities should increase the proportion of their intake from state schools to reflect the proportion of pupils in the secondary school education system going to state and private schools.
While I accept it is really important for universities to make a particular effort to ensure pupils from disadvantaged backgrounds who would thrive at university do go to university and go to the university which will stretch them the most. I also hold that each and every person who universities fail in this regard is being really badly let down. I think that it is correct that universities should be considering the quality of the teaching that pupils received when considering admissions as if someone managed to do the same amount with less then they have achieved more even if their grades are identical.

I am however going to say something which is possibly controversial – we are never under any sane system going to end up with representative proportions of people across all sectors of society and all types of school going to university and in particular to the best universities. We shouldn’t even try for that as it fundamentally isn’t going to work. What we should be aiming for is what the proportions would be if universities were doing their job perfectly – which would probably be significantly more representative than is currently the case. However it would not be and should not be completely representative.

Why? [Begin controversy] There are genetic factors which impact on the ability of students to thrive at university. If someone’s parents went to University then probabilistically they are more likely to have those factors. HOWEVER this does not mean that people whose parents didn’t go to university didn’t have those factors as not everyone wants to or should go to university even if they could. Additionally as humans we are not limited by our genes we may have natural tendencies towards certain things but with enough effort most of these things can be overcome. My argument is not that people whose parents didn’t go to university shouldn’t go – simply that you are not going to get a representative split there is going to be some natural bias and if we are making our assessments correctly we shouldn’t be upset about this. Of course universities should, can and are making an additional effort to reach those whose parents didn’t go to university as they are less likely to know that they can and should.[End controversy]

Additionally it is not the place of universities to make up for all the failings of all the previous educational establishments that students have previously been to – they make a great effort to do so and have great successes but if the Government really wants to make progress on making university education more representative of the population as a whole it really needs to look very hard at other areas first.

The differences in achievement between people from disadvantaged backgrounds and people from privileged backgrounds (like for example me) appears really quite early on in a child’s education and so the additional effort needs to be being put in there – in primary and secondary schools. Additionally people from privileged backgrounds are likely to be able to put time into learning the right kind of parenting methods and into implementing them that would increase the probability of their children going to university. This is not to say that other kinds of parenting are worse university is not that important in the grander scheme of things and there are far more important things for parents to focus on imparting to their children.

However parenting is hard (yes I find the idea slightly scary) and if there are things which can be taught which do help then they should be taught to those who want to learn them – people only get one childhood and it is important to get it right.

So in summary yes we should be doing better than we are but there are limits to how well we can do (and these limits are very hard to calculate and as limits can only be tended towards). It is unhelpful to say “lets just do reverse discrimination and hope this causes the private school system to collapse in a heap” that doesn’t solve the problem of differences in the quality of education provided by different schools it just gives middle class people even more angst about choosing schools for their little darlings. It causes sillyness like children going to state schools to increase their chances of getting into a good university but actually being taught by private tutors “off the record” which just make inequality harder to measure without actually solving this.

Again please bear with the fact that this won’t actually communicate what I want it to and is eminently capable of being misunderstood. Sorry. However I hope you can see through that to what I really mean.

(Yes as a Guardian reading lefty who went to two different private schools for my secondary education there is some ‘guilt’ that I have been given a better start in life than most people and so all I have had to do is make the effort to tuck in to the plate placed in front of me rather than having to go and fill the plate first. I do try and make an effort to help those from disadvantaged backgrounds through various different mechanisms – but that doesn’t stop my private sixth form school from asking me back to help their pupils but then they gave me a scholarship so I owe them something as well.)

On paying attention – or optimising ordinary things

January 8th, 2011

Sometimes it seems to me that many people go through life with their eyes only half open. I suspect this might be because that other half is paying attention to things which I don’t[0].
I think this might be something which helps with and is strengthened by Computer Science. A continual paying attention – observing how things are and why they are that way. Then working out how to optimise – to do things better. A continual[1] desire to improve things which doesn’t stop just because what I am doing or considering is an ordinary thing that billions of people do every day without really thinking. By thinking we can actually do better.
I will illustrate this (poorly) with two trivial examples.

Emptying Dishwashers

Now it might seem that this task is incredibly simple and requires very little thought at all and to an extent that is true. However actually there are significant advantages to emptying the bottom tray first.
Why? Consider that when removing items from a dishwasher we want to maximise dryness. We don’t want wet crockery in the cupboards. Also consider that dishwashers don’t completely dry things – water tends to linger in depressions. This water can be dislodged and drip off if the item it is on is moved. Hence if we empty the top tray first then water will drop off onto items on the bottom tray just when you want them to be dry.
You probably hadn’t thought about that before. Perhaps you think me silly for mentioning it and perhaps I am.

Drying after showers

This might seem even stranger but it is something that even sensible people regularly get wrong.
Here again we wish to maximise dryness both of the person and the room. The situation we wish to avoid is that of a vast puddle stretching across the floor and drying only very slowly resulting in damp problems and wet feet/clothes.
Avoiding this is quite simple – dry in the shower where it is warmer and any drips can go down the plughole. To do this it is necessary to put one’s towel within easy reach of the shower before getting in it. It isn’t really possible to dry below the knees like this and so at the point placing the towel on the floor and then standing on it solves the problem.

Trivia? Yes. OCD? Possibly (certainly my mentioning this has previously resulted in chants of “OCD! OCD! OCD!”) but I am not responsible for the large puddle on the floor. ;-)

Unfortunately this appears to be rather poorly written and probably doesn’t covey what I want it to (it was originally written while half asleep on a train) sorry. But I think I will publish it anyway – hopefully you can enjoy laughing at how silly I am if nothing else.

(Yes Julia this counts as wittering on ;-)

[0]: For example optimising the value for money when shopping to a greater extent than I do through paying more attention.
[1]: At least continual at the limit not perhaps in reality ;-)

Having sensible discussions

January 3rd, 2011

Recently I have been thinking quite a lot about how people who have different points of view on a particular issue can have a proper discussion about that issue. So often we don’t actually engage with each other or even really try to but instead go from the position “I know I am right and the other person is wrong” to the position “I know I am right and the other person is wrong because of X, Y and Z” but at the same time something similar is happening for the other person for possibly different Xs Ys and Zs.

In reality people don’t generally hold views which they consider to be wrong and don’t do things that they think are evil (at least not and then support them afterwards – I regularly do things that I think are wrong). So in a sensible discussion what we want to find out is what the underlying facts, assumptions and beliefs are and what the relative importance of each of those things. Then hopefully it will be possible to see how these fit together to form a worldview in which the opposite point of view is in fact the correct view.

Unfortunately this is frequently rather difficult partly because it is all to easy to reject things outright and so not actually examine these underlying issues and partly because all these things tend to be interconnected in a rather complex manner. So it may be necessary to talk about a very wide range of underlying issues which are all mutually dependant resulting in it taking a rather long time. Very few people will be prepared to put in that kind of time and even with those who are it is still difficult as there are fundamental restrictions on the number of hours in a day.

Recently I have been having sensible discussions with some of my Christian friends who are inclined to the ‘right’ while I myself generally consider myself inclined towards the ‘left’. In this situation it is possible to have really quite interesting discussions by virtue of the fact that we both already agree on a wide range of very important issues and have worldviews which are on a deep level very close indeed. At the same time outward political views can end up at opposite ends of the spectrum. It is also rather helpful that we already love each other a lot and so it is easier not to get angry or to consider them a bad person because of views that I might find objectionable because I already know that since they love all the people who are affected by implementations of policy based on those views they must have good reasons for them.

In this I have found that it is surprising how big a difference in policy subtle differences in the priority given to different underlying good principles can have. Having had the whole of Christmas to allow these thoughts to mature in the absence of such discussion I appear to have lost my recollection of good examples of this and since some of these thoughts stretch back to April or earlier that is not completely surprising.

So in summary: If both sides in a discussion are willing to put real effort into having a sensible discussion and looking carefully at the underlying issues then it is possible to get rather more out of if than one might expect. (This is also far more interesting than discussing the weather etc. and I should put more effort into making it happen).

Relatedly I had a ‘fairly’ sensible discussion about religion on #cl (It didn’t descend to a flamewar though IRC isn’t really a good place for going into detail on complex issues) this must be some kind of miracle. :-)

dh_installdocs –link-doc when using jh_installjavadoc

January 3rd, 2011

This post exists to stop people (possibly including myself) spending hours being thoroughly confused as to why

override_dh_installdocs:
dh_installdocs --link-doc=package
l
is not working. In fact it probably is working but your package-doc.javadoc probably looks something like:

docs/api

rather than like:

docs/api /usr/share/doc/package/api

and hence jh_installjavadoc is correctly creating the /usr/share/doc/package-doc/ directory when really you didn’t want that to happen and so dh_installdocs –link-doc silently ignores your instruction as it doesn’t make sense in context.

Relatedly I have ‘finished’ packaging JEval for Debian partly using the instructions on packaging java packages using git. It just needs some further testing and to be uploaded and sponsored.
(I am packaging the dependencies of my Part II Project)

Do you support the current occupation of the University Combination Room?

November 28th, 2010

The Peterhouse JCR is currently holding a vote on the current occupation of the University Combination Room by students of the University.

In the process of deciding how to vote on that issue I should consider the demands that the occupiers are making and so that follows.

1. That the University completely oppose the increase in fees, fight against it and fight against all cuts to education, and use its influence to oppose the spending review’s threat to education, welfare, health, and other public services.

I think that the issue here is that it is not sufficient to simply oppose increases in fees it is necessary to coherently explain an alternative solution. Now the University does have influence but it is not an overt one – it is a behind the scenes one and so while I expect that the University is working behind the scenes to do what is best for the University and for Universities in general it probably won’t tell us when and how because diplomacy of that sort doesn’t work like that. With the latter points on welfare, health and other public services – the University is not a political entity. Its purpose is education and research not political change. Members of the University should indeed be encouraged to campaign for things which they believe in and to make their voices heard in government but that does not mean that the University itself can express one particular view and support it.

2. That the University use its influence to fight for free education for all.

There are principles here which I agree with but I think this statement too general in that it includes things I would disagree with. For example if students have parents who clearly can and will pay for their children’s university education then they probably should as this means more money available for those who can’t. (I am in the category of people who’s parents could and indeed do pay). Also if this ‘education’ doesn’t involve actually spending >40 hours a week working on said education (during term) then it is rather pointless and should probably not be paid for in full by the government as it it probably counts as an extended holiday. [1]

3. That the University acknowledge and take steps to combat the systemic inequality of access to this elitist institution and the danger of its intensification posed by the scrapping of EMA, a rise in tuition fees and removal of programs such as Aim Higher.

Here I worry as to the definition of elitist being used. Certainly Cambridge only accepts students with the best academic ability and so discriminates on the basis of academic merit and that is what it should do. However I fear that the definition being used here relates to discrimination on the basis of background. Cambridge does not do that. Cambridge is not elitist under that definition. It once was but it is no longer – we have moved on and so I don’t think that Cambridge could now acknowledge that it is an ‘elitist institution’ because that would be a lie. Yes Cambridge is greatly concerned to ensure that no financial hardship prevents or hinders students from studying at Cambridge but anyone at Cambridge knows that it is exemplary in doing so and provides bursaries and financial support better than that available anywhere else. I am confident that the University will maintain these bursaries and other financial support at whatever level is necessary. Hence I think this point is rather pointless in that it asks the University to admit a line and to do what it is already doing.

4. That the University declare it will never privatise.

This is a rather odd point. Yes I can see that there would be large issues which would need to be addressed before the University could privatise (in particular relating to access and funding) but it would be foolish to for the University to state that at no point in the life of the University will it privatise. In the hundreds of years of history which may yet lie in the future of this University circumstances may change such that privatising is the right thing to do. For a large proportion of its past the University was private and outside (at least to an extent) of the influence of government there are many things that the University has gained through being funded by the government but we can’t be sure that all future governments will not try and do something which would be detrimental to the University to the extent that the University was forced to privatise to avoid it.

5. That the University commit to ensure the autonomy of education from corporate interests.

What this means is not well defined. Yes education should not be commercialised – it is of intrinsic value to society quite apart from its standard economic impacts. However not all influence from all companies is necessarily bad just as not all influence from governments is necessarily good. Both can be both good and bad at different times and on different areas and it would be naive to exclude companies from all influence for all time. Yes they should never be allowed to run the University or its courses but they may at times be able to provide things of value and so can’t be ignored completely.

6. That the University recognise UCU (University & College Union). We urge post-graduates, academics and all university staff to unionise.

This seems rather irrelevant to the issue at hand. Yes unions have value and can serve a useful purpose however since the University is (or at least should be) run by the academics in a perfect world there would be no need for them to unionise as they are their own managers. My main concern with this point is that it is offtopic and to an extent partisan – unfortunately not all students like unions and hence making one of the points involve unions is not going to increase support. As far as I know the UCU has been fairly sensible and if I were at some point to be eligible for membership I would probably join. However some unions have done eminently stupid things at various points including the recent past which has unfortunately tarred all unions.

7. That the University ensure that no students who take part in any form of peaceful protest will face disciplinary action.

Here I agree save for that stipulation that I define peaceful to also include not causing damage to property as well as people. Should people commit criminal offences[0] while protesting then they will of course remain liable for the consequences of their actions.

8. That the University urge Gonville and Caius College to open their library, and allow Caius Students full access. (mission accomplished)

Of course I agree with this – I think the Caius rather silly to have closed it in the first place yes the conservative offices were rather badly damaged but Cambridge students are not in that kind a of a rage with Caius or the Caius library and suitable access controls could have been placed on it to prevent anything bad from occurring.

So in conclusion while agree with some of the demands raised and with the right of students to peaceful protest and consider that it is a good thing that they are doing this protest (and would indeed stand in front of tanks that they retain this right) I disagree with a sufficient number of their demands sufficiently strongly that I can’t support this protest. If they were occupying the local Conservative or Lib Dem headquarters then I would come visit, bring cake and ask what their proposals are for an alternative mechanism for funding University properly. (Clearly what we are being given is suboptimal but it is not sufficient to criticise it is also necessary to present an alternative).

[0]: Here I would also specify further that the laws under which these offences are committed are also good laws we have had quite a few rather bad ones in recent years. In the eyes of the law this is of course irrelevant but to my eyes it matters a lot.
[1]: If it doesn’t take three years of working really really hard then it is not a degree and should not be treated as such – instead it should be compressed into a shorter period of time such that that time is spent working really really hard and then it should be called a Diploma and offered by polytechnics – but I digress.

LaTeX user search path

November 1st, 2010

Because this took far too long to find out:
If you have .sty files you have written want to be able to easily reuse in multiple documents then put them in ~/texmf/tex
Then you should be able to use them with \usepackage{foo} as normal.

Firesheep as applied to Cambridge

October 26th, 2010

Many of you will have already heard about Firesheep which is essentially a Firefox extension which allows you to login to other people’s Facebook, Amazon etc. accounts if they are on the same (unsecured) network to you. This post is on my initial thoughts on what this means to the people on Cambridge University networks.

Essentially this whole thing is nothing new – in one sense people who know anything about security already knew that this was possible and that programs for doing this existed. The only innovation is an easy to use User Interface and because Human Computer Interaction (HCI) is hard, this means that Eric Butler has won.

In Cambridge we have unsecured wireless networks such as Lapwing and the CLs shared key networks and I think that Firesheep should work fine on these and so for example in lectures where lots of students are checking Facebook et al. (especially in the CL) there is great potential for “pwned with Firesheep” becoming the status of many people. However this would be morally wrong and violate the Terms of Service of the CUDN/JANET etc. If that isn’t sufficient – the UCS has magic scripts that watch network traffic, they know where you live and if you do something really bad they can probably stop you graduating. So while amusing I don’t think that a sudden epidemic of breaking into people’s accounts would be sensible.

So what does that mean for the users of Cambridge networks? Use Eduroam. Eduroam is wonderful and actually provides security in this case (at least as long as you trust the UCS, but we have to do that anyway). If you are using Lapwing and you use a site listed on the handlers page for firesheep (though don’t visit that link on an unsecured network as GitHub is on that list) then you have to accept the risk that someone may steal your cookies and pretend to be you.

What does this mean for people running websites for Cambridge people? Use SSL, if you are using the SRCF then you win as we provide free SSL and it is simply a matter of using a .htaccess file to turn it on. It should also be pointed out that if you are using Raven for authentication (which you should be) then you still need to use SSL for all the pages which you are authenticated on or you lose[0]. If you are not using the SRCF – then why not? The SRCF is wonderful![1] . If you are within *.cam.ac.uk and not using the SRCF then you can also obtain free SSL certificates from the UCS (though I doubt anyone likely to read this is).

So do I fail on this count? Yes I think I have multiple websites on the SRCF which don’t use SSL everywhere they should and I don’t think any uses secure cookies. I also feel slightly responsible for another website which both uses poorly designed cookies and no SSL.

Users – know the risks. Developers – someone is telling us to wake up again, and even though I knew I was sleeping.

[0]: Unfortunately I think that until the SRCF rolls out per user and society subdomains which will be happening RSN if you use raven to login to one site on the SRCF and then visit any non-SSL page on the SRCF then your Raven cookie for the SRCF has just leaked to anyone listening. Oops. Using secure cookies would fix this though I haven’t worked out how to do this yet – I will post a HOWTO later Update: if the original authentication is done to an SSL protected site then the Raven cookie will be set to be secure.
[1]: I may be wearing my SRCF Chairman hat while writing that – though that doesn’t mean it isn’t true.