Sunlight

Sunlight at Belsay castle - Northumbria

Well, as I was feeling somewhat photogenic I thought it would be appropriate to share some of my own flickr photos with the world!

This is one of sunlight coming through the trees at Belsay castle. Well, I liked it 🙂 You can see more on the flickr pages.

Posted in Uncategorized

Naff sigs

It’s really hard to choose a decent sig. Anything anyone with taste might reasonably want has already well gone.All the same, there is little excuse for some of the ones I’ve seen recently.

MSN messenger provides emoticon images for sticking in your Msn messages, not for sticking hearts and smileys in a huge string as your user name. This is barely acceptable from kids. Anyone over the age of 16 had better have a good reason for it and I find it hard to think of one.

There is absolutely no excuse for a smiley face in your sig.

I’m not going to go on to a second point because there will be no stopping me. You know who you are.

I’m not claiming the moral high ground here. I  have rubbish user names for everything I do and I can never even remember them so I set them up and then can’t remember them to get back in to whatever i joined. All I can say is that I have never knowingly used any silly pictures or deliberately soppy names,

Posted in Uncategorized

Numb3rs

Sorry about this, it’s not ground-breakingly brilliant but it’s entertaining. There is something good about having a mathematician and his physicist not-quite girlfriend as the relatively glamourous heros of a cop show. This makes a change from scientists always being portrayed as total geeks.

There is an odd physicist as well – the short guy from Ally McBeal – but there are odd non-scientists – liek the man who used too be the central character in Taxi. The programme doesn’t necessarily assume that having mathematical skills makes you a social outcast, which is nice.

Posted in Uncategorized

ID cards – extra rant

How did I miss this?

This month, NO2ID and a growing number of other organisations* ask that you renew your passport… Did you know that, from October of this year, as preparation for the ID scheme, ALL first-time passport applicants will have background checks and be interviewed by officials at one of the government’s 69 new ‘enrolment centres’? This will include your children as they reach 16 (http://www.no2id.net/ 7 May 2006) At the moment, existing passport holders are not included in this but they will be.

Granted this means coming up with £51 now, but the ID style one will cost at least £93, according to no2ID. And will get you stuck in the sytem for life.

Posted in Uncategorized

Overdue for another ID card rant

Anti-ID rants have been a bit lacking here for a few weeks, so I thought I’d better do some web searching about the current state of the inexorable march of ID. I found this excellent quote on http://www.no2id.net/ :

“I’ve read Orwell’s ‘1984’ – I don’t want my kids to live in it.” Andy..

There is an interesting article on the excellent no2id.net site that refers to the plan to merge the Office of National Statistics’ Citizen Information Project with the iD database, at even greater expense but allegedly saving millions after 2021. (Hmm. If anyone knows of a database that has stayed in the same format on the same hardware for more than 5 years, please tell me. Not to mention, if anyone has the capacity to calculate costs in a decade and a half’s time)

The same article links to an article in the Times that refers to a plan to add medical information to the ID database, allegedly to save lives in emergency situations while at the same time helping to prevent people without valid cards from accessing NHS resources. It brings up a quite disturbing image of doctors turning away sick and injured people who haven’t got the right ID.

And, I don’t know about you, but I find the idea of plague carriers remaining untreated personally threatening. In “The Gift Relationship,” Richard Titmuss argued years ago that Britishtransfusion service blood was far safer than US blood because it was donated out of altruism rather than a need for money. i.e Altruism in health care is more profitable for public health than selfishness.

I think this principle can be extended to the illegal immigrants gaining access to the NHS. I would much rather pay my NHS contribution and accept that the occasional person who hasn’t paid gets treated than rigorously exclude everyone who hasn’t paid their stamp and risk dying of TB or AIDS.

I am totally distressed to see that David Cameron said on May 3 that he would stop the ID fiasco. http://www.no2id.net/news/newsblog/index.php Distressed because it’s dispiriting to see that I am agreeing with a Tory leader on an issue of public security for the first time in my life. Old age is creeping up on me it appears.

By the way, http://www.no2id.net/ sells good-looking t-shirts that say NO ID. I have to get some.

Posted in Uncategorized

Attenborough’s 80th birthday

The wonderful David Attenborough is 80. When most octogenarians are lucky if they aren’t in a grim care home, Attenborough is still actively promoting his concerns for the environment. (http://news.bbc.co.uk/1/hi/magazine/4976552.stm) He must be the best-ever presenter/creator of science and nature programmes. Every year, he brings amazing new content to remind us of the fragile diversity of life on Earth.

Attenborough has had a wonderful life, having seen so many of the fragile marvels of the world. He personifies all the positive qualities of an ideal of aristocratic Englishness – adventurousness, intelligence, wit,  moral worth, charm, willingness to endure hardships and joys with equal stoicism – that were rarely found in reality rather than ideology. 

Digital channels have been showing his programmes from throughout the past decades.  These are almost always brilliant. In his BBC radio interview, he is careful to credit the cameramen as the real creators of the stunning footage that we associate with Attenborough.  However, it is his majestic and much parodied  delivery that makes so many of these programmes unforgettable.

The BBC site says that he got his first presentation job by chance, despite the misgivings of an administrator over the size of his teeth. This suggests that a modern Attenborough would be unlikely to get near the screen. Present day tv presenters tend to be either comedy “mad scientist” stereotypes or perfectly groomed forgettable clones. Attenborough is certainly distinctive without ever being a hysterical mad scientist. His delivery is  perfectly judged. His voice is unmistakable, with its odd tendency to whisper for greater effect.  He approaches the viewer as someone like himself, with all the aristocratic virtues.

If ever there was a 50s “Boys Own” hero in the real world, David Attenborough comes close.

Posted in Uncategorized

Warwick Castle

Warwick Castle 01

Warwick Castle 01,
originally uploaded by jj_mac.

An excellent photo catching Warwick Castle from an amazing angle. In this picture you can clearly see the well designed, and well laid out, gardens that surround the castle.

The distance in the photo is implied by the fact the castle (which is reasonably large) looks like a toy model!

Posted in Uncategorized

evening sky over reculver

evening sky over reculver evening sky over reculver,
originally uploaded by adrians_art.

This is also a photo I couldnt help but add to the blog 🙂 This is the evening sky over Reculver Roman fort.

For info – the fort was originally built as part of the Saxon Shore defences and, after falling into disuse, found a new life as both a Saxon settlement (ironically) and then a medieval stronghold.

Posted in Uncategorized

Scotney Castle

Scotney Castle

Scotney Castle,
originally uploaded by Bri Williams.

Gorgeous photo here – very nice colours and so cute it is unbearable! 🙂

Couldnt resist sharing this with every one.

Posted in Uncategorized

Content Negotiation – Mirrored Post

As mentioned in the last post, there is an excellent article available at http://www.autisticcuckoo.net/archive.php?id=2004/ 11/03/ content-negotiation, but sadly the author of this article has expressed his disinterest in continuing with his blog. While it is possible that he will continue to pay his hosting fees and continue to re-register the domain name, this is not certain so, to try and at least retain this article we have copied it (verbatim) below.

Original Source – http://www.autisticcuckoo.net/archive.php?id=2004/11/03/content-negotiation

We have, for some time, tried to inform people about the fact that there is no point whatsoever in using XHTML as long as you serve the documents with a text/html media type. For those who still want to use XHTML and gain at least something for some

users, we have recommended content negotiation. On several occasions people have asked us to publish a write-up on how to do that, but there hasn’t been time to sit down and write it. Now, finally, we have tried to whip something together that we hope can serve as a guide.

What Is Content Negotiation?

Content negotiation means that the server in one way or another
negotiates with a user agent (browser, search engine, etc) that requests a document. The negotiation means that the user agent announces which media types (also called content type or MIME type) it can handle and, optionally, which one it prefers. The server then serves the document in the way that best suits the user agent.

The user agent announces which media types it can handle through a header in the HTTP request it sends to the server. The header is called Accept and can look something like this:

Accept: text/xml, application/xml, application/xhtml+xml, text/html;q=0.9, text/plain;q=0.8, image/png, image/jpeg, image/gif;q=0.2, */*;q=0.1

The example is what our instance of Mozilla sends. (We have inserted blanks between the media types so that the text will wrap.) Our interest now lies with application/xhtml+xml and

text/html;q=0.9. The part after the semi-colon, q=0.9, is called a quality value and is a value between 0 and 1, inclusive, with up to three decimal places. The higher the quality value, the more the user agent prefers that media type. If no quality value is specified for a particular media type, it means q=1.0. The example thus shows that Mozilla prefers application/xhtml+xml to text/html.

The usual meaning of content negotiation is that the HTTP server itself decides which media type the user agent prefers, and then automatically chooses between a number of different documents. Normally the file suffix is used to associate to different media types, so the server might choose between

index.xhtml and index.html.

This article describes another type of content negotiation; one that is performed through a server-side script. Most web hosts offer some kind of server-side scripting, usually PHP or ASP. Our example uses PHP, since it is available for more platforms and is open source, while ASP is Microsoft-specific. We don’t delve into the finer details here, but presume that you are sufficiently familiar with PHP.

To round off this explanation of what content negotiation means, we want to emphasise that it’s not merely an issue of deciding which media type to send. When you have chosen a media type, you should also serve the document with a content that corresponds to the chosen media type. You either serve XHTML as application/xhtml+xml, or you serve HTML as text/html.

About the Examples

The code samples in this article are written for PHP 4.1.0 or higher. For older versions you need to replace $_SERVER with $HTTP_SERVER_VARS. If the code is executed in a function, you then need to declare the array as a global (global $HTTP_SERVER_VARS;).

This article presumes that the document’s content is marked up as XHTML 1.1, and that it doesn’t contain anything that cannot be converted into HTML 4.01 Strict, for instance element from other XML namespaces, or CDATA sections.

Parsing the Accept Header

First of all we need to find out whether or not the user agent supports the application/xhtml+xml media type and, if so, whether it prefers that to text/html.

  1. $xhtml = false;
  2. if (preg_match('/application\/xhtml\+xml(;q=(\d+\.\d+))?/i', $_SERVER['HTTP_ACCEPT'], $matches)) {
  3. $xhtmlQ = isset($matches[2]) ? $matches[2] : 1;
  4. if (preg_match('/text\/html(;q=(\d+\.\d+))?/i', $_SERVER['HTTP_ACCEPT'], $matches)) {
  5. $htmlQ = isset($matches[2]) ? $matches[2] : 1;
  6. $xhtml = ($xhtmlQ >= $htmlQ);
  7. } else {
  8. $xhtml = true;
  9. }
  10. }

The $xhtml variable indicates whether or not we will serve the document as XHTML. The initial value is false, since many older browsers lack support for XHTML.

On line 2 we check whether the Accept header contains
application/xhtml+xml plus an optional quality value. This regular expression isn’t 100% fool-proof, since it doesn’t limit the value range to [0,1], nor does it limit the number of decimal places to 3. For all intents and purposes, however, it doesn’t matter.

On line 3 we extract the quality value, if present. If not, we set the quality value for application/xhtml+xml to 1.

On lines 4 and 5 we perform the corresponding check for text/html. Line 6 compares the quality values and sets $xhtml=true if the user agent prefers application/xhtml+xml to text/html. Line 8 handles the case of a user agent that specifies application/xhtml+xml in the

Accept header, but not text/html.

After these lines of code we thus have a Boolean variable, $xhtml, which indicates whether the document will be served as XHTML.

Prepare HTML Conversion

If the user agent doesn’t support XHTML, or if it prefers HTML, we have to convert the document’s content from XHTML 1.1 to HTML 4.01. We do this with a simple function:

  1. function xml2html($buffer)
  2. {
  3. $xml = array('/>', 'xml:lang=');
  4. $html = array('>', 'lang=');
  5. return str_replace($xml, $html, $buffer);
  6. }

Lines 3 and 4 declare two arrays, where the elements in the $xml array will be replaced by the corresponding element in the $html array.

On line 5 each occurrence of /> is replaced by > in the $buffer string. At the same time, each occurrence of xml:lang is replaced by lang.

And Finally…

Only a few details now remain. If the $xhtml variable is true, we need to write the document type declaration for XHTML 1.1 and a <html> element with the proper XML namespace. Most likely we also want to start with an XML

declaration, and link to our style sheets through processing instructions.

If the user agent doesn’t want XHTML, we need to write a document type declaration for HTML 4.01 Strict and a <html> element without an XML namespace. Style sheets should be linked through ordinary <link> elements (or be imported in a <style> element). Furthermore, we need to instruct the PHP interpreter to buffer all output to the response stream, and to call our conversion function on the result before sending it back to the user agent.

Before we write anything at all, however, we must send a couple of HTTP headers: one that says which media type we use, and one that informs proxy servers that content negotiation has taken place so that they can consider that in their caching algorithms.

  1. if ($xhtml) {
  2. header('Content-Type: application/xhtml+xml; charset=utf-8');
  3. header('Vary: Accept');
  4. echo '<?xml version="1.0" encoding="utf-8"?>', "\n";
  5. echo '<?xml-stylesheet type="text/css" xhref="/css/screen.css" media="screen"?>', "\n";
  6. echo '<?xml-stylesheet type="text/css" xhref="/css/print.css" media="print"?>', "\n";
  7. echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', "\n";
  8. echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">', "\n";
  9. } else {
  10. header('Content-Type: text/html; charset=utf-8');
  11. header('Vary: Accept');
  12. ob_start('xml2html');
  13. echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', "\n";
  14. echo '<html lang="en">', "\n";
  15. }

Don’t forget to link to the style sheets in the <head> if the document is served as HTML.

There is a blatant shortcoming in the example shown in this article: the W3C validator. It doesn’t send application/xhtml+xml in its Accept

header, so it’s impossible to validate the document as XHTML. It is trivial to let a query parameter control the choice of media type, but that is left as an exercise for the reader.

(note: We are aware of some possible copyright issues, and we have attempted to contact the original owner to get permission to repost it verbatim here. At the time of this post, no replies had been received and we can only assume the original source is no longer on line. If you are the original source and would like this post removed please contact us and we will take this post down immediately)

Posted in Uncategorized

CSS Links and resoursces

Well, the ongoing quest for excellence continues 🙂 Here are some web sites relating to CSS I have been looking at today. All quite interesting and well worth checking out:

You may have already found some, but these are interesting enough to be worth looking at. If you have any others – let me know.

Posted in Uncategorized

Ethereal and Voice over IP

I often watch my network traffic in an idly interested way, networks being more or less incomprehensible to me. (I can watch the network actiivity and identify various bits of it, even enjoying picking my own passwords out of the ether.  I can reproduce the 7-layer model perfectly adequately. I don’t have a mental model of how they connect together. I sometimes almost grasp it but, half a minute later, it’s like knitting fog.)

I have recently noticed lots of packets with “bogus IP headers” or “malformed” or zero length packets, according to Ethereal. From my limited knowledge this tends to indicate a Trojan attack – no novelty to me, who appears to be Helen with regard to Trojans.

In the past few days, I’ve also noticed loads of packets that say “packet cable lawful intercept.”  It turns out that this is due to Ethereal confusing VOIP traffic with “lawful intercept” traffic. 

The concept interested me so I did some research. In case you don’t know what “lawful intercept” is, it seems that it means that your traffic has to be open to surveillance. It’s not the easiest thing in the world to understand. In fact it’s not even within loudhailer shouting distance of the easiest thing in the world to understand. That’s my excuse for not explaining it here.

Try googling http://www.google.co.uk/search?hl=en&q=packet+cable+lawful+intercept&meta= if you think you’ll be able to make head or tale of it. It disturbs me, but then I’m  probably just clinging to an outdated view that personal privacy was supposed to be one of the benefits of not living in a totalitarian state…..

Posted in Uncategorized

Magazine Redemption…?

Ok, following recent months we, here at Why Dont You have been quick to berate the various PC / Internet magazines available in the UK.

Whilst remote, there is a chance that this month things have changed. The latest .net magazine has arrived and (very) early indications are it is an improvement over previous poor showings.

This will be backed up with some more depth over the next couple of days as each bit is put to the test, but from the early scans it actually seems like a useful edition of the magazine.

Dont be too complacent though, there is a LOT of fluff in it – like several pages re-hashing old info in the guise of 150th issue celebrations. It is sad when a “cutting edge” magazine has to dedicate so much space to history…

Posted in Uncategorized