Shoes and Men Don’t Mix…

As Carrie Bradshaw would lament ‘A woman can never have enough shoes…’. In a feigning interest in fashion affairs, I hear the the wedge is in and the heel is out. As a man I don’t get it, what the hell are they talking about? Shoes are shoes, no? 

To fully explain my plight against this feminist underplot, I must first explain my hatred of Belgium. As an Erasmus student in the past year, I had the misfortune to live in Liege for a month, taking a detour to learn French, before the main piss-up arrived (oh how wrong I was). Right now, place a pencil in between your index fingers on the top, with your middle finger on the bottom side. Now think of a famous Belgian, if you thought of Jean Claude-Van Damme push your index fingers down. You may of noticed that his hurts, good.

The problem with the Belgians, is that they have no national identity or country esteem. Come on, how low does a countries esteem have to be, when it calls its national food after another country – ‘French Fries’ – you start wondering more about them. The fact they’re a tad arrogant as well annoys me, you see when the French do it, especially hot French women, it’s cute, and you get that little warm feeling that they’re doing the stereotype, so you feel less guilty when the Germans are marching in the shade. 

When the Belgians do it’s like genital herpes, but not cute when you’re first exposed to it, it’s bloody annoying, makes you wish someone should of done a proper job in the past. So shoes, my problem with shoes, and the women becoming more fashionable, is that it seems that this trend is catching on with men, and real men, rugby players – Gavin Henson, is rarely seen with a head of hair that Lawrence Llweliyn Bellend would be envious.

With skinny jeans, and skinny cardigans, pink adorning all, what is the future for the British gent around town, what was wrong with jeans and chino’s, instead we now have TKMaxx, Primark, Peacocks, and every-time I visit, there is a worrying amount of guys milling around, mixing styles, seeing what went with what and – not that I was paying that much attention – but avoiding from the general matra that had seemed to have done man well in the past. Walking into said midrange, midpriced fashion outlet, looking at what the mannequin is wearing, finding it in his size, then departing.

This demasculinity I blame on the femininity movement, we haven’t found the equilibrium, we’re gone past it, so I call on you all, men of the world, put down your cocktails, loft your brew into the air and declare, Mr Big dies in SATC: The Movie. Payback’s a bitch ain’t it?

Advertisements

Being Pablo Escobar

Being Pablo Escobar

 

With the student loan comes an immaculate bedroom, elections and exams, coupled a few concerts thrown in for good measure and of course a false sense of financial security. The concert in question involved a rather interesting ride to Freiburg-Im-Bresleau in Germany to see one of my favourite bands, Bishop Allen(.com). With a brilliant mix of melody, instrumental skill and lyrics they are an excellent indie band, though not so great for motorcycle riding, while ipoding and (shamelessly) singing along, I go to another place, not Mark’s happy place this time but almost the rear end of a lorry. In short they are a brilliant band and offer free music on the site, what do you have to loose? 

Plug over, what I would really like to know, and really answers to mi39@le.ac.uk please, is how to deal with stupid police officers when they stop you for drugs? Living in another country and wanting to make the most of it, I have been going around to other countries and different places as you do, and almost every time I cross a frontier I’m instantly pinged by a rozzer declaring “Excuse-moi monsieur, je suis une officer de la Douanes. Je voudrais cherchez-vous pour drogues et je voudrais voir votre identification”. Instantly producing my passport, driving licence, health card, library card and everything else that proves I’m me I always run into problems. 

The reasoning apparently is my appearance.  Gone is clean-shaven short black hair, in is a (proper, not bum-fluff) beard and a blonde afro mullet. In the eyes of my father I’ve been downgraded from “Student” to ‘Lefty work-shy layabout eco-mentalist save the Mongolian fruit bat fly hippie”, with the only lower grade being “Communist”. Seeing as your average beat bobby may have the same ideas and views as my old man I’m normally worried. This time however I had real problems, one of the big cheeses had decided to get some exercise (it was needed – sitting on his arse all day with cheap bratwursts on offer clearly hadn’t done him or his coronary tract favours) and like any middle management type that had dreams of grandeur and directorship, but ended up marshalling a group of people that “know what they’re doing and could do the job just as well if they were left to it”, I was in for a good ‘ol fashioned search. 

This meant even my scared area, wasn’t that sacred that day, though fortunately one of the policemen knew English (his boss didn’t) so we had a little chit-chat on the evils of a 12 hour day and apologies on stopping me. While his boss, did a number on my petrol tank, drained my battery and found a gaffer tape sealed plastic bag. I have a respect and tolerance for the people doing their job, the muppet demanding to know why I have a beard then triumphantly finding and opening my bag was annoying, he should just sit behind his desk and mature on a fattish pay check. But if he wants to ‘go out into the field’ and find two day old Class A boxer shorts that’s his problem.

Guide To Adding Turn Based Restrictions in JOSM

 

As the new Open Street Map API 0.5/0.6 supports turn based restrictions in JOSM, this blog will show how to add these restrictions to the OSM database.

A turn based restriction is made up of two nodes/ways a, to value, from value and via node. Basically you will need to select which is the node/way with the restriction starts (the from value), the node/way where the restriction ends (to value) and the node/way where you could normally cross at (via).

JOSM

Open JOSM and click on the relations button at the bottom of the side bar (highlighted in green) and the relations bar appears in the bottom right pane (blue).

 

To create a new restriction (which is a relation) click new (Orange) where you will be presented with the screen below,

From here add the tag ‘restriction’ (orange) with the value of that restriction say a ‘no_left_turn’ or ‘no_right_turn’ (for a full list see here:   http://wiki.openstreetmap.org/index.php/Relation:restriction )

 

Then add the members (yellow) to the relation ie. the to, from and via segments. Click on the way/node where you want to add the member then enter, do this for all the ways and their assoiciated restrictions then click OK and then upload it to OSM.

Here is the web page of the relation that I uploaded from JOSM as part of this example… (The webpage is here: http://openstreetmap.org/browse/relation/22104)

From XML to XPath via Sax

The past week has been interesting, with breakneck speed in getting the initial DOM XML parsing working then when coming to selectively choosing information and needing XPath to query the XML file, it becomes a different kettle of fish. 

Installed with a sense of confidence from earlier XML success, it rapidly became apparent that the OSM data model wasn’t going to be compatible with a basic DOM parser, so moving onto XPath yesterday was a frank nightmare, with nothing going right, then in true fashion in 5 minutes I was up and compiling within 5 minutes of starting this morning using a SAX parser instead of my DOcument Model. 

The problem now is moving onto making the OSM data model fit with the XPath query language, possibly doing XLST transformations or at worst placing the data in a temporary SQL database and then pulling the data out then, time is of the essence!

For those interested here is the code to query XPath in Java…

import java.io.IOException;

import org.w3c.dom.*;

import org.xml.sax.SAXException;

import javax.xml.parsers.*;

import javax.xml.xpath.*;


public class XPathExample {


  public static void main(String[] args)  throws ParserConfigurationException, SAXException,  

          IOException, XPathExpressionException {


    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();

    domFactory.setNamespaceAware(true);

    DocumentBuilder builder = domFactory.newDocumentBuilder();

    Document doc = builder.parse(/*Name of XML Document*/);


    XPathFactory factory = XPathFactory.newInstance();

    XPath xpath = factory.newXPath();

    XPathExpression expr = xpath.compile(/*XPATH QUERY HERE*/);

 

    Object result = expr.evaluate(doc, XPathConstants.NODESET);

    NodeList nodes = (NodeList) result;

    for (int i = 0; i < nodes.getLength(); i++) {

        System.out.println(nodes.item(i).getNodeValue()); 

    }

  }

}

Beginning Routing with Dijkstra

ROSM – Routing with Open Street Map, at the moment the project is in a high gear, though is being brought together. For example routing across the different nodes is done by the algorithm by Dijstkra with a scope for A* and possibly D* (dependent on it’s implementation requirements)An XML Parser is inherent to the source, though needs to be integrated and changed to select relationships, not nodes. A UML Class diagram of the system is also included in the SVN repository.The system uses the JGrapht java graph library to model and simulate the graph, and on this we abstract the map from OSM data. What is handy about this approach, if it enables us to use a well defined (and open source) graphing solution.

The output from routing from the Montreal Place to Southampton Street

“The route from Montreal Place to Southampton Street is as follows…

[(Montreal Place : Strand), (Strand : Wellington Street), (Wellington Street : Tavistock Street), (Tavistock Street : Southampton Street)]

The routing algorithm is ‘Dijksta’s Algorithm’ and the next step will be to integrate my XML parser into selecting the ways and their intersections…

This is the junction at the Strand…

Routing from Montreal Place to Southampton Street
Routing from Montreal Place to Southampton Street