October 14, 2010


Writing about web page https://start.warwick.ac.uk/

Portal has always been a dirty word in web development. Many people remember the late 90s and the early 2000s, where “portal” referred to a website such as Excite, Lycos and Hotbot. They didn’t provide any intrinsic value of their own, they were just wrappers for a search page that had lots of advertising.

hotbot lycos excite

So when I was tasked with building a “Personalised Information Portal” for staff and students at the University, I was sceptical – it’s the natural progression of every web developer that they will eventually be asked by their employer to build a “portal” for something or other. At Warwick, I think there is actually a lot of scope for pulling together a lot of the services that we provide into a single place, particularly with the anecdotal evidence we have that a lot of students simply don’t know about a lot of the services that are available to them. In that sense, building a portal that was little more than a directory of all of our other services still had some intrinsic value.

In the end, we settled on something remarkably similar to iGoogle in terms of usability. Each window to another application is actually a “gadget”, which are organised in columns on a number of “tabs”. This is a similar model to that used by other University institutions who have tried something like this, such as myHome at Ithaca (http://www.ithaca.edu/myhome/) and go.edgehill.ac.uk.

myhome ithaca go.edgehill.ac.uk

The magic comes from a standard called OpenSocial, originally developed by Google and implemented by LinkedIn, MySpace etc. (but not Facebook). This has a specification for rendering gadgets for users, while also provided the features to potentially build the base of social networking – though it should be noted that we aren’t using any of the social features in Start.Warwick at the moment.

Once we had a gadget container up and running, the real trick was building gadgets for a lot of IT Services (and non-IT Services) applications so that users can add them to their pages. This is deceptively simple to start doing, but difficult to take to completion! Each gadget is a mini-application in itself, and as such has to go through the same strenuous process of design, implementation, testing, review, etc. of a period of multiple iterations. We’ve built around 25 of these gadgets, plus a few more that didn’t make it into the final cut, for everything from the weather to your email inbox.

At the moment, with the gadgets that we’ve been able to provide, we’ve targeted undergraduate students. This was a simple decision based on the fact that we unfortunately can’t get Microsoft Exchange information for users on our staff email system at the moment, but, with the student move to live@edu, we are able to provide users with a view of their email, calendar and TODO list.

If you want to start using Start.Warwick, you can do so today, whether you’re an undergraduate student or not (even if you’re an alumnus!). Just go to http://start.warwick.ac.uk/ and sign in with your IT Services username and password. The first time you visit, it’ll take us a little while to generate a page based on who you are (around 10 seconds) but after that, you can customise the page any way you want.

We’ve created some introductory videos to get you started, these are at http://go.warwick.ac.uk/starthelp/videos

August 19, 2010

A–Level Results Day

ORIGINALLY POSTED: 18th August 2005

In about 8 hours time, there’ll be a horde of 17 and 18 year olds prancing around in pubs all over the country, getting completely leathered and acting like prats for no apparant reason, and that reason is that today is A-Level results day. What it also means is it’s the annual Mat-gets-angry-at-the-idiotic-paper day.

I’m sure we’ll see a greater pass rate coming out of A-Levels, or at least something similar coming out than the 96% that we got last year. Then respectable newspapers like The Daily Mail and The Daily Express will go on a big mother of whinging campaign in order to point out the fact that A-Levels have been dumbed down and kids these days are stupid and whatnot.

Seriously, I can’t think of anything that gets me so angry as this, and I get angry at a lot of things. But I specifically have to try and avoid the statistics and any newspaper on this day, particularly the aforementioned Tory-biased trash (I specifically mention the Tory newspapers simply because they’re the most harsh on the results as they see it as an evil Labour construct). Luckily, since they’ve decided not to release the statistics first it means that the students can actually get their results before being told they’re worthless.

You go up to any A-Level student and tell them that their exams are easier than the previous years, and see what kind of response you get. When you get a giant stick in the eye, you’ll bloody deserve it.

Now, of course I have to have some kind of argument to back all this up, so:

There’s no definitive evidence the exams are easier

The evidence that exams are easier than previously is based entirely on the fact that more people pass than the previous year, and also the fact that there are uptight people who probably failed their A-Levels who feel like their qualifications are devalued just because someone else dares to pass them several years later.

How can you base exams being easier on that? It’s impossible to guage this – you’d have to give a student the exact same knowledge, and give them exams over a 10 year period with exactly the same syllabus, and then scale it up to around 1000 students at least and look at the marks for it. It’s just impossible to make such a sweeping statement.

Competition is greater

More people are going to University, so more people are placing a high valuation on their A-Level marks as they are necessary to get into University. If you weren’t going to a University that required ABB in your A-Levels, would you try as hard as if you required BCC? Quite simply, with competition being greater, particularly for the most popular Universities, there is more incentive for people to try harder, and this would probably be reflected in the results for A-Levels.

Stability breeds higher passrates

The syllabi for the major A-Level subjects has remained the same for many years now with only a few very slight differences, particularly since modular AS/A2 style A Levels became the norm. This has meant that teachers have become better at teaching them – simple as that – they know the material and they know the kind of things that are going to come up in the exam. They’re able to refine their techniques, which increases the competence of students.

The exam system is flawed

It’s been discussed many times, and it doesn’t just apply to A-Levels but to all non-Vocational qualifications (and to Vocational qualifications to a lesser extent) because there is an inordinate amount of emphasis based on core knowledge of the subject (memory based questions) and much less emphasis on knowledge of the application of the subject. Personally I can take experience on this: an exam such as Artificial Intelligence or Computer Graphics this year is based on a lot of memory, memory of techniques and whatnot. I got some pretty poor marks on these exams compared to my coursework marks. In the first year, my Programming for Computer Scientists module (although too long) asked questions that asked you to write programs to solve a problem – something that simply can’t be remembered – and I got 95% on that module, meaning I got something like 102% in the exam when you take into account my coursework mark.

As this continues, teachers become more demoralised with teaching practical knowledge of the subject and teach their students to pass their exams – giving the fact by fact point by point knowledge required to get a good grade in an exam these days. The problem is that teachers (or lecturers, for that matter) who teach their subject matter “properly” in a practical sense and then set an exam in the same vein are actually not contributing to the system, if for no other reason than their students will get poor marks.

The State/Private School System Skews Results

Private school students are more competent because they have better teachers, more pressure to succeed and generally are given more opportunity to succeed than a student at a state school. Should this mean that private school students are marked on the same scale as state school students? At the end of the day, you’re being marked on overall knowledge of the subject matter (which is going to be higher for a private school student) rather than actual skill, talent or potential, which simply isn’t graded in the current system.

Of course, when it comes down to it, your education is only as good as your last qualification. If you leave school at 16, your GCSEs/GNVQs are going to be the thing that employers take into account. At 18, yourGCSEs are almost entirely pointless – your employer is only going to take into account your A Level grades. Once you have a degree, your A Level degrees are a moot point, they may show some grounding in a subject you didn’t take to degree level, but the thing that they’re going to look at most is your degree classification and where it is from.

Good luck to Kendal, my sister, who is getting her A-Level results today.

Edit: This blog entry is 5 years old. Today, my brother got his results today, and had to go through the traumatic event of UCAS/his Uni declining his firm offer despite him achieving the necessary points.

May 31, 2010

England's World Cup Squad

It's that time of year again, and everyone has their own opinion on England's best XI and the 23 that should go to South Africa. So I'm going to act like I know what I'm talking about, here's my 23:

Goalkeepers: Hart, Green, James

Defenders: Glen Johnson, Carragher*, Ashley Cole, Baines, Ferdinand, Terry, King

Midfielders: Adam Johnson, Gerrard, Barry, Huddlestone, Milner, Lampard, Lennon, Walcott, Joe Cole

Forwards: Rooney, Crouch, Heskey, Defoe

* I'm only taking Carragher because I don't want to take Milner as the only cover for right back.

Nothing really controversial there, other than a couple of points:

  • Taking four strikers: Since the preferred formation should be 4-3-3 with two wide forwards/wingers or 4-1-1-1 with Gerrard or Joe Cole behind a "lone" striker, it seems madness to have 4 strikers warming the bench.

  • Utility players: It's important in a squad of 23 to have genuine backup for every position as well as the option to change formation and still have backup. Carragher, as much maligned as he (rightly) is, provides excellent backup at both right back and centre back. Milner fills the "Hargreaves gap" of cover at right back as well as being able to play anywhere across the middle

  • No place for Carrick: Carrick has been in absolutely rotten form and his Hollywood pass in the first half against Mexico condemns him to a summer at home

So, with that in mind, my first XI would be (4-1-2-3/4-1-4-1 with wingers acting as wide forwards):

Goalkeeper: Hart

Defenders: G. Johnson, Ferdinand, King, A. Cole

Midfielders: Lampard, Barry (DM), Gerrard

Forwards: Lennon (WF), Rooney, Milner (WF)

Adam Johnson and Theo Walcott can be devastating impact substitutes here in place of Lennon and Milner. My "Plan B" formation would probably just be a straight 4-4-2, with Lampard sacrificed to bring on Heskey (or, in a pinch, Crouch). Players like Baines, Terry, Huddlestone, Defoe and Joe Cole are taken as backup and in order to rest the first XI against Slovenia and Algeria. 

Without injuries, there wouldn't be that many changes, though Hargreaves would be a definite, and I'd be tempted to take both Owen and Beckham as impact substitutes. Hargreaves is the only player the England team is actually missingthough, particularly with an unfit Barry.

September 21, 2009

Using Windows Live Writer to publish to Warwick Blogs

I’ve been playing around with the Atom Publishing Protocol the last couple of days, and as part of this I’ve been able to make a few improvements to the Atom implementation that we have on Warwick Blogs. As a result, it’s now possible to use Windows Live Writer to publish blog entries, which is pretty neat-o as it has draft saving and some better formatting options than can be reliably provided in a browser. Some people may prefer to use it to publish blog entries, although there are a few caveats (in particular, uploading files isn’t supported in our Atom implementation yet so you won’t be able to add pictures inline into blog entries, which is a bit of a shame).

To set it up, you need to add a new account in Windows Live Writer.

Choose “Other blog service”.

Enter the URL of your blog and your ITS username and password. For the security conscious: information sent to the Atom API is sent over HTTPS using HTTP Basic Auth.

As the blog type, select Atom Publishing Protocol, and as the service document enter https://blogs.warwick.ac.uk/blogbuilder/admin/api/atom.spr?forcebasic=true (the https is important here)

Windows Live Writer will then attempt to verify your settings, and make a test post to try and download the theme for your blog. This is a bit hit and miss, I’ve had it working on some blogs but not on others.

Et voilá! Now you’re all set up. Note that this doesn’t support Warwick Blogs-specific behaviour such as permissions (all entries will default to being viewable and commentable by anyone).

September 14, 2009

Using subsample averaging instead of scaling in JAI to get better results

I was looking over this press release about using parallel computing with Xboxes this morning and was struck by just how rubbish the resized images look in it. We use JAI to do image resizing in pure Java in our CMS, and obviously it’s not coming out very well. We’re turning a high quality source image into a very low quality thumbnail.

I tried fiddling with the interpolation on our operation, from Bilinear to Bicubic or Nearest-Neighbour but nothing seemed to make a noticable difference. In the end, however, I stumbled upon this which suggested using Subsample Averaging instead of Scaling as the operation in JAI. Success!

// We have sourceSS, a SeekableStream, and an OutputStream, out

// Load the image from a source stream
RenderedOp source = JAI.create("stream", sourceSS);

// scale the image
float width = source.getWidth();
float height = source.getHeight();

// assume no resizing at first
double scale = 1;

// if the image is too wide, scale down
if (shouldResizeWidth(source, maxWidth)) {
    scale = maxWidth / width;

// if the image is too hight, scale down
// IF that makes it smaller than maxWidth has done already
if (shouldResizeHeight(source, maxHeight)) {
    float heightScale = maxHeight / height;
    if (heightScale < scale) {
scale = heightScale;

ParameterBlock params = new ParameterBlock();
params.add(scale);// x scale factor
params.add(scale);// y scale factor
params.add(0.0F);// x translate
params.add(0.0F);// y translate

Map<RenderingHints.Key, Object> map = Maps.newHashMap();
map.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
map.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);

RenderingHints hints = new RenderingHints(map);


// Here's the important bit - use "SubsampleAverage" instead of "scale" 
RenderedOp alteredImage = JAI.create("SubsampleAverage", params, hints);

ImageEncoder encoder;

switch (fileType) {
    case gif:
    case jpg:
        // now re-encode
        JPEGEncodeParam jpegEncodeParam = new JPEGEncodeParam();
        // who knows what all this could possibly mean ?
        jpegEncodeParam.setHorizontalSubsampling(0, 1);
        jpegEncodeParam.setHorizontalSubsampling(1, 2);
        jpegEncodeParam.setHorizontalSubsampling(2, 2);
        jpegEncodeParam.setVerticalSubsampling(0, 1);
        jpegEncodeParam.setVerticalSubsampling(1, 1);
        jpegEncodeParam.setVerticalSubsampling(2, 1);
        final int restartInterval = 64;

        // done messing with the image. Send the bytes to the
        // outputstream.
        encoder = ImageCodec.createImageEncoder("JPEG", out, jpegEncodeParam);

    case png:
        PNGEncodeParam.RGB pngEncodeParam = new PNGEncodeParam.RGB();
        encoder = ImageCodec.createImageEncoder("PNG", out, pngEncodeParam);
        throw new IllegalArgumentException("Unrecognised image");

PlanarImage planarImage = alteredImage.getRendering();

The difference is actually pretty startling.

Resized using “scale” with bicubic interpolation Resized using “SubsampleAverage”

<about />


I’m a Web Developer in e-lab, part of IT Services at the University of Warwick.

<input type="search" />

<ol id="recentComments">

  • First commit was around 12 months ago, but there was a long period where it was put on the back burn… by Mathew Mannion on this entry
  • So, how long did it take?! by Phil Wilson on this entry
  • Hi Matthew, having a problem putting favourites into folders, it only seems to let me put them in on… by Rupert Elder on this entry
  • I wrote one entry in Chinese. It published the content as lots of questions marks. by Hongfeng Sun on this entry
  • I'm sure there's a setting somewhere that'd filter it out. by Nick on this entry

<ol id="archive">


Am I still fat?

Not signed in
Sign in

Powered by BlogBuilder