Search This Blog

Showing posts with label technology. Show all posts
Showing posts with label technology. Show all posts

21 October 2008

Frantic Semantics: DOAP, FOAF, DOAC, SIOC and DC

This is the third and final post in a series on RDF and the Semantic Web. The first post is here and the second one here.

So far, we've looked at what RDF is for and how it works. In this post are details of some popular projects that use RDF.

FOAF

FOAF (standing for 'Friend of a Friend') is an RDF vocabulary that allows creators of RDF to describe themselves and the people they know. There are tags for providing your contact details - should you wish people to know them - expressing your interests, showing off your online accounts, establishing your social ties, recording your projects and even detailing where you work or go to school. FOAF is far and away the best supported and most developed-for RDF vocabulary for describing everything about you, so if nothing else it's the most sensible move.

DOAP

Description of a Project, or DOAP for short, is a method of describing projects, programmes and plans in RDF. It allows you to give some informational text on the project, specify its homepage and - where applicable - source code, and give credit where credit is due to those who develop and maintain it. It can also integrate seamlessly into FOAF, so you can show off all the wonderful things you work on within the comfort of your own profile document.

SIOC

The Semantically Interlinking Online Communities project, otherwise known as SIOC (pronounced 'shock'), is a project to establish a common RDF vocabulary for describing community sites such as blogs and forums that allows them to be linked together in new and exciting ways. Every Site can host several Forums, each of which can in turn contain a number of Posts written by various Users. Again, this vocabulary can be mixed with others such as FOAF to give additional information.

DOAC

DOAC stands for Description Of A Career, and is an RDF method of putting your CV online. It encompasses experience, education and language skills, and when combined with FOAF is compatible with Europass, an initiative by the European Commission to help EU citizens display their qualifications clearly and simply.

DC

The DC, or Dublin Core, is a vast collection of terms for providing general metadata about a resource. Alongside FOAF, it is one of the most popular RDF vocabularies around and covers just about everything relating to web resources you can think of. Extremely useful for large organisations with a lot of paperwork to deal with!

Further Reading:

Further Semantic Antics: XML and all that

This is the second part of a short series on RDF and the Semantic Web. The first part can be found here.

RDF is essentially a form of XML, but it isn't quite the same as other XML formats such as SVG or RSS 2.0. Let's take a look at a snippet of RDF code (I will assume you have a working knowledge of XML):

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:example="http://example.com/vocab/">
   <example:company rdf:about="http://acmeinc.com/ourcompany#us">
      <example:companyName>Acme Inc.</example:companyName>
      <example:hasEmployee>
         <example:person>
            <example:personName>John Smith</example:personName>
            <example:employeeID>385740</example:employeeID>
         </example:person>
      </example:hasEmployee>
   </example:company>
</rdf:RDF>

Confused yet? Let's go through it step by step:

  1. The first thing to notice about this document is the abundance of colons. This is thanks to XML Namespaces, which allow tags from different vocabularies to be used in the same document. (A vocabulary is a collection of tags used for a specific purpose.) The namespace is a URI with the last portion missing - otherwise known as the base URI - and when the name of the tag is appended a full URI is created that references that tag specifically. Instead of having to write out the base URI over and over again whenever you want to use a tag in a particular namespace, you can assign it a name. Now when you use a tag, you can write its URI as nameOfBaseURI:tagName. For example, if the base URI http://exampletwo.org/vocab/ has been assigned the name exampletwo, then the tag name exampletwo:thing represents the URI http://exampletwo.org/vocab/thing. If you were to visit that URI, it would probably give you a description of what the thing tag meant. Base URIs are assigned names in the outermost tag of the document, in this case the rdf:RDF tag, using the attribute xmlns:assignedName, where assignedName is substituted with whatever name you want to give to the base URI in question. In RDF, all tags must have a namespace.
  2. The second thing to point out is the way in which triples are represented. In the example above, the tag example:companyName is nested inside the example:company tag, meaning that company is the subject of that particular triple whilst companyName is the predicate. Inside the example:companyName tag is a 'string literal', in other words a plain bit of text rather than a URI, and this is the object of the triple. Therefore, this triple means: "There is a company with the name 'Acme Inc.'." The second triple is much the same, but this time the object is not a string literal but an example:person tag, so the triple means: "There is a company that employs an example:person." The example:person tag is itself the subject of a third and fourth triple, which give us the name and ID number of the employee respectively.

If you wanted to express this RDF document in English, you would get something along the lines of:

There is a company with the name 'Acme Inc.' and with an employee with the name 'John Smith' and the employee ID 385740.

And so now you know the way RDF works. In the next post I'll talk about some popular RDF vocabularies.

Antics in Semantics: What exactly is the Semantic Web?

A long time ago, you may remember me talking about Microformats. Just to fill you in on the details, Microformats are little nuggets of code that can slip unobtrusively into any piece of XHTML and inform software of what everything actually means: that one piece of the document is an address whilst another is a resume, or that one piece is an event whilst another is a review. Once the software can see the data on the page in a format it recognises, it can do a number of clever things with it, such as finding an address on Google Maps or adding an event to your calendar program.

That is Microformats in a nutshell, but this post isn't about them. Instead I'm going to be delving into the secrets of the bigger, more versatile, and altogether much stranger web language that is RDF.

RDF stands for Resource Description Framework, which just about sums up its raison d'être: describing resources. Resources aren't just web documents, though; anything can be a resource, regardless of whether or not it exists on the web or even in the real world. To identify a resource, the most common practice is to give it a URI (Uniform Resource Identifier). A URI is similar to a URL, except the former need not lead to an actual web document when typed into your browser. Since an address that doesn't lead anywhere isn't very helpful, it is recommended that any resource URIs you use in your RDF do represent an actual location on the web that can be visited for information on the resource.

So that's what RDF does, but how does it do it? The answer is triples, a concept whereby all information is separated into three-part statements containing a subject, predicate and object. The subject is always a resource, the object can be a resource or a piece of data such as a string, and the predicate is a property - represented by a resource - that links the subject and object together. An example of a triple in the English language would be: "Acme Inc. has John Smith as an employee." Here, 'Acme Inc.' is the subject, 'John Smith' is the object and the ownership of an employee is the predicate. But how do we express this in RDF? Find out in the next exciting instalment, coming out as soon as I've finished writing it!

28 September 2008

My favourite: Drawing programs

Art isn't one of my strongest points, it has to be said, but when I do feel like scribbling, scrawling or doodling it helps to have some good programs at my disposal. This is a handful of the ones I use most often, and the good news is that they're all free.

Inkscape

Vector imaging is such a devilishly simple concept that you can't help but wonder why no-one thought of it sooner. Instead of telling the computer where to put pixels, why not tell it where to put shapes? When you zoom in on JPGs or PNGs, the resolution decreases; but when you do the same with SVGs - a vector image format - the picture simply gets redrawn without any loss of quality.

Inkscape allows you to draw images in vector format, and comes with a dazzling array of tools to help with the task. You can draw rectangles, ellipses, stars and much more with a few mouse clicks, and then perform any one of an enormous array of operations on them with a few more. If you're not convinced yet, then taking a look at some of the works of art produced on Inkscape is sure to change your mind. A highly recommended piece of software.

Art of Illusion

Despite sounding like it ought to have something to do with magicians, Art of Illusion is in fact a program for producing 3D models and graphics. It allows you to draw basic shapes such as cuboids and ellipsoids, and more complex objects can also be drawn using the comprehensive selection of functions at your disposal, such as triangle meshes. You can also apply textures and materials to your shapes to add realism, and render your drawing to produce a 2D 'photograph' of it from any angle you choose and with whatever lighting effects you want. Art of Illusion files can also be converted for use in rapid prototyping machines such as the RepRap.

02 September 2008

BEAM Robotics: Innovation on a Shoestring

Here's the situation: You're an amateur electronics enthusiast, and you've had a sudden irrepressible urge to build something awesome. Something that moves, something that thinks, something that feeds, something that lives. In other words, a robot.

But there's a snag. From what you've seen on television and read in the news, most robotics projects take many months of work - years, even - and obscene amounts of funding just to get off the ground. You don't have that kind of money, or enough spare time. You could buy a robot kit from a hobby shop, but it wouldn't offer nearly as much satisfaction as starting from scratch and you wouldn't actually learn anything.

That's where BEAM robotics comes in. Invented by Mark Tilden, BEAM uses only basic electronic components such as transistors, capacitors, diodes and resistors to achieve complex behaviour traditionally associated with custom processors and lengthy programs. In fact, the only 'unusual' parts that turn up are voltage detectors and some assorted ICs.

The amount of BEAM information on the internet is a little limited, and many of the sites on the subject that do exist are quite old, but there are plenty of tutorials and explanations nonetheless. Here are some places I have found useful:

  • Solarbotics.net - A site offering lots of information on every aspect of BEAM. Features a circuit library, detailed descriptions of how it all works, and a gallery of robots. Any BEAM enthusiasts wanting web hosting can get their own site here as well.
  • BEAM Online - Calling itself 'The Yahoo of BEAM', this site offers a great portal into the world of BEAM. There are plenty of pictures and snippets of information available, and a few links to other helpful sites too.
  • Solarbotics Ltd. - A popular BEAM parts vendor, stocking all manner of components and kits. Although I've never bought from them (and, assuming I don't move to America, never will), many BEAMers recommend them should you be having trouble finding what you need. They provide the web space for Solarbotics.net, which explains the similarities between their names.

If you've ever felt the need to dominate the world with mechanical monstrosities but aren't prepared to fork out very much for the privilege, then these sites are for you. Happy BEAMing!

P.S: Eton starts tomorrow... aaaaargh!

10 February 2008

Nets 'n' Codes and Microformats

Not long after my last post, I noticed a couple of things. Firstly, I think I may have gone a bit mushy on you, for which I apologise (unless you like mushy, of course). Secondly, I managed to slip the words 'vEvent Microformat' into there somewhere without explaining what that's supposed to mean.

Let's start with Microformats. A Microformat is something that, using nothing more than standard, clean HTML, can tell your computer as much about a web page as the text itself tells you. For example, if the creator of a page has put their contact details at the bottom of it, then any human of modest intelligence can say to themselves: 'Hey, those are contact details!' Fair enough. But if the creator has added a Microformat to the address, then any program that understands how the Microformats system works can also say 'Hey, those could be used in an address book/email/map program! I'll tell my user.' How nice.

There are lots of different Microformat specifications for everything you could possibly need, and a few programs that can deal with them. I, for instance, use the very nifty Operator, a Firefox extension that picks them up and puts them in a menu bar for my delectation. The whole thing works on the mutual understanding that users of the specification will use their HTML elements in a certain way and that a suitable program will recognise them as Microformats. A little like language, perhaps. I could write down whatever letters, numbers and punctuation I liked in this blog, but as it happens I choose to arrange them in such a way that they make English. Similarly, you could choose not to recognise English, but - thank goodness - you decide against it. It's the same for a lot of things, including Microformats.

But I digress. The point is that technologies such as this are the next big step in intelligent automation. It may not be long before your browser can send notifications of an event to those listed as attendees, or can find people - not just on one site but around the internet - who share interests, hobbies, affiliations and anything else besides. Scary, but amazing.

P.S: My mother doesn't think I was particularly mushy in my last post, so I apologise to those who think likewise. I would also like to take this moment to apologise for the extortionate number of apologies I've made. On second thoughts, I apologise for that...

P.P.S: I just realised that, when you're enthusing about something on the Internet, it's always nice to have a link to that something. So...

01 February 2008

And then...

...there was a new post! Not the longest or most interesting post, I’m afraid, as I only have until 11:30 or whenever the supervising member of staff leaves. It’s not that they don’t trust us (well actually it is, but let’s pretend otherwise), it’s just that the temptation to wander from the legal path is always there (or so we are led to believe). Talking of supervision, I have to go now. But I’ll be back!

I'm back! Did you miss me? This email posting lark isn't as straightforward as I imagined. Or rather, Microsoft Outlook has a way of making it so. Let me run through the basic stages I have undergone thus far.

  1. Open Outlook.
  2. Create a new message.
  3. Experiment with available editing options.
  4. Discover that there is no mode for editing raw HTML.
  5. Lessons.
  6. Write my post in WordPad and pray that the resultant HTML file can be turned into a message.
  7. Curse all things Microsoft.

The next day...

I think I've finally worked this out. By creating an HTML file externally, opening it in Internet Explorer (which, let the record show, I am not very fond of either) and finally selecting the option that allows me to email the page to that magic address. So here it is!

And the moral of the story is... never trust a Windows program unless you're sure you can.

27 January 2008

The Dreaded Pictures

Are you in the mood for pictures? I certainly am. I've included some photo data on these ones as well in case anyone's interested in that sort of thing. Enjoy!

A typical Portuguese seafront Taken: 11:55 2008-01-09 Focal length: 9.6000004 Exposure time: 0.00125

A beach board walk Taken: 2008-01-09 Focal length: 15.8 Exposure time: 0.0020000001

A birdwatcher's paradise Taken: 14:27 2008-01-09 Focal length: 51.799999 Exposure time: 0.00125

My sister by the pool Taken: 2008-01-06 Focal length: 13.1 Exposure time: 0.0040000002

No, I do not know how the camera has managed to measure these statistics to sub-atomic accuracy. Nor do I have any idea what units it has so precisely measured them with. At a wild stab, the focal length is in millimetres and the exposure time in seconds. If anyone knows the real answer, I would be intrigued to find out. Although to be honest, I just like taking pictures.

24 December 2007

The Perils of the Internet

Yes, perils. Small innocuous-looking web pages and features that, within milliseconds, have reduced your browser to a heap of smouldering code. Basically, what I'm trying to say in a rather roundabout and vastly exaggerated way is that I have, on this very day, been a 'victim' of a minor peril of my own. From this site, no less! Before I begin, I think I ought to say that I bear a grudge against neither Google nor Blogger. It would take somebody saving my life (or possibly paying a large amount of money into my bank account) to push either of them off the top of my 'people I didn't know about until they made a fairly large impact on my life' list. But I digress. On with the story! Actually, there's not that much to be said. For a few minutes, Blogger had a little panic and decided that the great evil hacker hordes had swept down on me and converted me into a super-fast, super-intelligent and undeniably evil piece of malware. Google soon cottoned on to this however. With the great, automated hand of Internet justice, they redirected me to their specially set-up apology site where I could view the aforementioned information but do no harm to the peaceful, law-abiding citizens of Google-ville. Eventually their system let me back on, none the wiser. Like all good stories, there is a moral to this cautionary tale. If a site doesn't like you:

  1. It's probably not personal (although you never know).
  2. If you wait, the problem may pass.
  3. There are plenty of other places to go, if all else fails.

19 November 2007

More pictures

Here's some more photos for your consumption. These are from a family trip to London: The London Eye A boat, as seen from the Eye A squirrel A small bird on the Eye The pictures are much better quality now, because they were taken with my new camera. I'm very pleased with them, and I hope you like them too.

28 October 2007

Some photos

I think it's time we had some pictures here. These are some that I took on a visit to my grandparents. A lone cow. The local poplar plantation (one of many). A lone sheep. I would make these pictures bigger, but Blogger doesn't like me uploading them any larger than 'small'. It's probably for the best, as the camera used for these shots is getting fairly old (for a camera). Anyway, enjoy!

The marvels of technology

As people go, I'm quite good at hoarding the most ridiculous pieces of junk ever seen by man.* One of them, however, has become rather a favourite of mine. In essence, it is an ancient static electricity generator. By pumping the handle on it as hard and fast as you can, you are supposed to be able to generate a very pleasing spark between two pieces of wire quite close to each other. For reasons unknown, it no longer works, but for reasons even less known you can still get a fair zap out of a strange and presumably meaningless piece of protruding metal that I swear wasn't there before. It will quite happily give a mild jolt to anything vaguely conductive which, to my not-entirely-pleasant surprise, includes me. With a bit of hard work I found that I could create a most satisfactory arc between the metal and my finger, albeit quite painful on my part. Although it's all very well being able to charge yourself up from time to time, I wouldn't recommend it. Not of course, that everyone has a pump-handle-spark 'n' shock-generator. * Or woman, for that matter.