Unifying the Look

During the saga of getting Print from My PC working, I had to build some pages to help people set the whole thing up. Predictably, this included clobbering some HTML and CSS around (and for the record, I still hate ASP with a burning passion).

Online Services already has an online ‘look’ which is visible on the Gateway, which seems to be used wherever possible. The trouble is, the entire layout and design is based on some very old HTML and CSS (and an inexplicable reliance on JavaScript, which I’ll ignore for now). Each individual subset of the online services provided by the University has a subtly different stylesheet and a different way of doing things, so for Print for My PC I decided to mostly scrap the existing code and start from scratch.

The result is visually almost identical, although in a few places it sports crisper lines and cleaner finishes. However, behind the scenes the CSS is smaller, faster, slicker, more standards compliant, provides better support for assistive technologies, makes greater use of flexible positioning and so on. There’s a ‘standard’ stylesheet to provide the unified look, and then an individual ‘tweaks’ stylesheet for some PFMPC specific colour adjustments. Finally, PFMPC makes use of some common JavaScript scripts to handle the nice lightbox effect for popup images.

Why am I blogging about this? Well, firstly this is a blog which in part aims to let you look behind the scenes at what’s happening. Secondly and most importantly, however, the code is specifically designed to be incredibly portable between various services. I envision there being yet another subdomain (sorry!) such as common.lincoln.ac.uk, which exists purely to store objects shared by all services. The stylesheets, the images, the scripts. The result once properly implemented would be ultimately beneficial – it would improve caching, reducing hits to services. It would enforce consistent appearance. Applying a code or styling fix would need to be done once and would be replicated to all services using it. Finally and most importantly, it would get people into the mindset of “data should only exist once” which is a key part of the Web 2.0 way.

Still, mindless code changes for such a minor improvement would be senseless. Which is why I’m going to suggest the following: create common.lincoln.ac.uk, add the resources to it, and when new services are created or services are updated make them use the common resources. It’ll be slow, but it’ll be worth it.

Seriously? Permission Fail.

I’ve just been flicking through the Daily Alerts for my staff account (It’s almost as mind numbing as the one for Students, but sometimes contains information which has a use outside of the land of marketing).

Today I decided to make use of the link telling me to find out what was going to be on the menu in the Atrium this week. I duly clicked the link and was whisked off to Portal and prompted to log in. At this point my devious mind went “hold up a second, will this work if I’m a student?”. Being the investigative sort, I plugged in my student account details to see what would happen and was promptly refused access. My staff account works fine, and will happily tell me what I can enjoy for dessert this week.

From this I can only guess that the information on the menu is so highly secretive that students aren’t permitted to see it lest they go wild with desire for the honey glazed pork steak (Wednesday), the lemon Bakewell (Tuesday) or the Thai fishcake with sweet chilli sauce (Thursday). Or they could stand outside the servery and just read the entire menu for the week on the board. Go look, it’s on a bit of orange paper.

As a side note, the link which actually came through the email included some elements specifying that I should be in edit mode. Thankfully Portal has the sense to ignore this if I don’t have permission to edit, but can people please remember to sanitise links before sharing them?

Update: Thanks to Dave, all students can now enjoy reading about the full range of meals on offer.

Windows Doesn’t Do It Right

It turns out that the Windows implementation of IPP lacks a crucial component in relaying its status to the client – it doesn’t tell it when printing has been done. Instead it replies with the technical equivalent of “I don’t understand what you just said”.

This is all well and good, except that the clever client will then go “Oh, OK” and file the print job away to be tried again later. In the case of Ubuntu this is an automatic retrying, sending the page to the printer every so often. The printer receives and prints the page, but once again cannot tell the client it’s done. Into the queue once more, to be retried yet again.

If you don’t manually remove the print job from the queue this will go on forever. Clearly not good when you print your file from home and forget about it, foolishly logging into SafeCom and hitting “Print All Documents” then wondering why it’s producing 500 copies of that witty sign for your room door and using all your credit.

Evidently, this is not the correct way to be going about printing. I’ll get to work on a solution, probably involving a weird hybrid of CUPS, IPP, SMB and LPR authenticating against an LDAP/AD mashup.