Blog

A PHP snippet to calculate your age

MyAge is a code snippet that calculates your age. I hadn't bothered posting it, as it's fairly trivial, but someone asked for it in an IRC channel last night so I thought it might be more useful to people than I realised.

<?php /** * MyAge by Alex Pounds <alex@alexpounds.com> * A small script to calculate my age, instead of updating a webpage once a year. */ // Edit the numbers below to match your birthdate. $birthyear=1982; $birthmonth=4; $birthday=23; $nowyear=date("Y"); $nowmonth=date("m"); $nowday=date("d"); if($nowmonth > $birthmonth) { //Age is simply the difference in years. print $nowyear - $birthyear; return; } else if($nowmonth == $birthmonth) { if($nowday < $birthday) { print $nowyear - $birthyear - 1; return; } else { print $nowyear - $birthyear; return; } } else { print $nowyear - $birthyear - 1; return; } ?>

Button-up Flies

It is a good thing for my employers, my degree, and my website that I have the standards of personal hygiene that I do. I find I solve a vast amount of problems in the shower. All of my algorithms go down the plughole clockwise, and most of my pieces of coursework hold a faint odour of shower gel.

Of course I jest, but I do find that a lot of my technical thinking is done during my morning ablutions. On reflection, this is hardly surprising - it's a block of time where I'm mostly acting on autopilot and have very little competing for my attention. It's the perfect time to figure out the intricacies of a bit of code, or let my mind churn over something I'm stuck on.

I'm not proud to admit this next bit, but here goes: I find my bathroom breaks during the day have a similar, although lesser, effect. Again, it's a couple of minutes in a hectic life where it is quiet, serene, and very little thought is involved. But whenever I wear my blue denim jeans my little islands of mental processing are destroyed, and my productivity falls away sharply. You see, these jeans have button-up flies.

Back in the 1800s I'm sure button-up flies were a fantastic invention. And it's entirely possible they are very fashionable today. In a way, they're quite sexy - grip the top of the trouser, pull the part with buttonholes away from my body, and the material parts like badly-hung wallpaper. Alas, I find myself peeing far more often than I find my pants being removed in a time-constrained frenzy of lust and so this fringe benefit is negated by the need to stand in front of a urinal, fiddling with my crotch in a suspicious fashion, for anything up to a minute after I've finished peeing.

One can deal with that, though. This is only part of the torment, though - as soon as I have unbuttoned my trousers (an effort in itself, if you just want to open an orifice in the trousers, not unfasten them entirely), my mind enters a tight loop of panic. "Oh no, I'm going to have to do them back up, and that's always a struggle," I find myself thinking. "What if someone comes in while I'm doing them up? What if someone comes in before I'm doing them up, starts peeing, and then I button it in the wrong buttonhole and have to spend time correcting it?". You get the idea. Any chance of thinking about something else - fluid dynamics, say - is obliterated.

I wouldn't mind so much if it weren't for the way that they're just so unnecessary. We live in a world of zip fasteners, and I think that as it was invented in 1851, it's high time we got with the programme and used them across all trousers. I'm not sure if the designers of this particular pair had a vehement dislike of paying royalties on the zip. Perhaps he thought that it was somewhat stylish, even though anyone paying enough attention to my crotch to notice is likely to need further convincing of my allure. Maybe he was embittered and twisted by years in the fashion industry, and vowed to wreak havoc on the unsuspecting consumers by this subtle act of sabotage. I doubt humanity will ever find the answer to this one.

The Goverment

The current UK Government scares me.

I wish I could say that I was exaggerating, but alas I can't. Simplifying, maybe, but certainly not exaggerating.

Parliament House I'm a big proponent of democracy. Having seen processes at work, both on a small level (student politics) and on a larger level (national politics), I've come to appreciate them for what they should be. I'm not a fan of beaurocracy, but people tend to confuse the two. Democracy is representative; it's a way for everyone to have their say, and to have their opinion given equal weighting. The needs of the many outweigh the needs of the few, and the majority view goes. You can't please all of the people all of the time, but you can please most of them.

But recent events have caused me to lose my faith in the UK Government. As a rule, I'm quite apolitical. I don't get involved or follow national politics that closely and I'm not affiliated to any political party. I'm moderately well-informed about things, though, and every now and again I dip my toe in the waters of national politics.

As I write (2004-04-08), last Wednesday the new Higher Education Bill passed its 3rd reading. This was the bill regarding the infamous top-up fees. I was in the Strangers' Gallery - the balcony just above the House of Commons - and got to watch the final debate and vote. And despite the protests, despite the opposition, despite the flaws and lack of consultation the bill passed. It was at this moment that I really lost faith. The constituents came out and lobbied the Government, and they went ahead anyway.

Protesters marching against top-up fees But let's play devil's advocate, and say that those protesting against top-up fees are just a bunch of smelly students. The other big issue recently was the war in Iraq. Something like 70% of people were against it, from all age groups and professions, and we went ahead and attacked anyway (please bear in mind it's possible to be anti-war and anti-Saddam before emailing me about this). And over the past few days compulsory ID cards have leapt to the fore as an issue. But not even as an issue - they're being described as an inevitability. With no studies to show whether or not it is a viable, cost-effective method of combatting terrorism, it seems a bit crazy to throw vast sums of money at it.

The scariest thing of all is that there's no real opposition. New Labour have pissed on the will of the people by going to war, broken promises that got them elected ("We will not introduce top-up fees and have legislated to prevent them" was a manifesto pledge), and now make moves to continue the march towards a police state. The Conservatives still haven't managed to organise themselves into a decent opposition, and people either see them as bigoted, prejudiced, or simply tainted from Thatcher, Major, et al. And nobody takes the Liberal Democrats seriously, despite them having quite a few policies that seem like a good idea to me. If the Lib Dems can't get a look in, then no-one else will either. With no viable alternatives to vote for and a lack of "No Suitable Candidate" on the ballot slips democracy falls apart as people stop voting on the basis of "Who's best?" and start voting on the basis of "Who's least worst?".

Statue of Oliver Cromwell Put it all together, and it scares me. We're reaching a situation where there's no viable alternative to a government that ignores the electorate. The populace stand up and say "We don't want you to do this!" and the Government say "Lalalala, we're not listening, we're doing it anyway". People are running scared and handing over their freedoms whilst they're being sold an illusion of security and safety from the threat of terrorism. I just don't have the faith in the Government to be 100% benign, 100% honest, and 100% safe.

Autonomy and the NUS LGB Campaign

I spent one and a half years involved with the LGBT scene at University. I'm away on my year in industry at the moment, so can't be so involved, but I'd still consider myself an interested party. One of the things I experienced was the NUS LGB liberation campaign and so got a unique insight into the joys of autonomy.

The NUS has some odd ideas. It's a very strange organisation, due to the way it's evolved over the years. One of the things it gets off on is calling things "liberation campaigns". The other is this concept called autonomy. Certainly sounds like a good idea, doesn't it? You'd think an autonomous campaign is one that runs itself, with no outside intervention. In its own way, it is - you see, autonomy really means that only those who seek to be liberated can take part. In the case of the LGB campaign, this means that only those who self-define as LGB.

Let me lay my cards on the table: I am very comfortable with my sexuality. Unfortunately for the LGB campaign, I am straight. This means that I cannot attend NUS LGB conference, be involved with the liberation campaign, or attend training for LGB representatives. While autonomy seems like a good idea, I believe that it's deeply flawed. Here's why:

  1. It's undemocractic.

    One of the central tenets to NUS is its democracy. Scratch the surface, however, and you soon find that it's just a veneer. Because I* am not LGB, I cannot stand for election as LGB officer, nor serve on its Executive Committee - the constitution forbids it. I take the view that it's up to the members to decide who represents them, not the rules of the organisation themself.

    Likewise with training and the conference. If the students of my Union elect me as their LGB officer, I wouldn't be able to go to conference. Even though I've been chosen democratically I would not be allowed to attend, and nor would I be welcome at the training.

    I am not sure why my sexuality is of any relevance at conference, either. If I'm attending, I'm acting as a representative of the students at my parent organisation. My own position should be irrelevant.

  2. It's hypocritical.

    "We want to be accepted for who we are, and not discriminated against based on our sexuality! We want to be seen as equals because we are!"
    "Sounds great, I want to help out and be involved!"
    "Err... Sorry, you can't be involved. It's because of your sexuality. You're not gay enough."

    When one of your main campaign goals is to stop people being excluded based on their sexuality, I would have thought the last thing you should do is exclude people from your campaign based on their sexuality.

  3. It's counterproductive.

    By excluding a broad swathe of the population, you're throwing away a large proportion of the thoughts, skills, and sheer manpower available to you. I am not sure why my skills as an organiser, web designer, campaigner, or placard-waver are less useful because I happen to be straight. The involvement of non-LGB people would help the campaign - "This is not just an issue that concerns LGB people," and so on.

  4. It's exclusionary.

    I thought that student politics was all about getting involved, doing what you can to change the world for the better (I'm a naïve optimist, I know). By acting as a closed shop, people who want to get involved and change things are being tripped at the first hurdle.

  5. It's offensive.

    The main argument employed by those for autonomy is that because I'm not LGB, I haven't got the required perspective to be a part of the movement. I would disagree. While I can appreciate that I probably would not be the best "leader" of the movement the idea that my opinions are completely invalid is very offensive. Homophobia affects us all. It affects the society we live in, I've seen my friends come across it, and I've encountered it when people leap to conclusions about me. Furthermore, I don't believe that you need to have direct experience of something to hold a valid opinion about it. I am not a citizen of the US, but I hold an opinion about their politics. I am not a woman, but I would campaign and support the battle for equality of the sexes. I will not be affected by top-up fees myself, but I have protested against them and lobbied against them. My opinion is not rendered invalid and my skills made irrelevant simply because I am not directly affected. The weighting given to my opinions and skills might be reduced, but it does not invalidate them.

  6. It encourages heterophobia.

    Heterophobia is a weird thing that sounds very theoretical, but it's out there. Through a variety of mistakes, I have been on an NUS training event. It was a closed (ie. LGB people only) event, but the person in charge of organising it didn't realise that when they invited me. It was a real culture shock to be dropped into such hostile waters.

    The University of Kent's LGBT Society is open to anyone, regardless of sexuality. This seems like A Good Thing™ to me. Turns out a lot of LGB societies don't have this in their constitutions, though. A lot of societies exclude non-LGB(T) people from attending, as I found out:

    "So, do you have any straight members of your [LGB] society?"
    "Oh, no no no no no. We don't allow it. I would be most uncomfortable to have any straight people attending our meetings."

    I listened to this, and in the back of my mind there's a voice saying, "Shit, I'm a committee member. They would lynch me if they knew."

    "Does your Union have an equal opportunities policy?"
    "Of course. We take it very seriously."
    "And yet you exclude people from your society based on their sexuality?"
    "Err... Well, when you put it like that..."

    Point is, heterophobia is just as bad as homophobia. Encourage a heterophobic mindset, and you do your movement harm. All that happens is that it becomes its own little insular group, seperate from the rest of society - the exact opposite of what it's trying to achieve.

  7. It's not necessary.

    The other main argument used by those in favour of autonomy is that if the LGB campaign was open to non-LGB students, then they would instantly be deluged with bigots and homophobes denouncing them. Or - horror of horrors - the bigots could take over the movement!

    Well, it just wouldn't happen. For a start, the delegates would have to be elected by the students at the University. Even if the homophobic candidate managed to get elected, (s)he is just one person, and would most likely be voted out at the next election once their true agenda became known. For homophobes and fascists to take over the campaign, they would have to be elected in hundreds of universities across the country simultaneously. And if that looked like it would happen, you can bet that every students' union across the country would mobilise to raise awareness and campaign against it, and balance would be restored. If anything, such a move would work in the favour of the campaign - it's these little shake-ups that motivate fresh people to get involved and take a stand.

So, in summary, I am very much against the autonomy of the NUS LGB campaign. I believe it's doing more harm than good and is in need of a radical rethink. However, as the Buddhists might say, change must come from within. So by default nothing will happen, and given the sheer lumbering inertia of NUS beaurocracy it wouldn't happen for years. Convenient, that, isn't it?


* This is the first time in my listed points that I've used the word "I". I'm going to be using it a lot, I'm afraid. Whenever you see a reference to myself, please be aware that I'm just using myself as a convenient example. All my points extrapolate out to refer to anyone who wants to be involved with the NUS LGB movement, but explaining that every time would soon get clunky.

Basically, I'm not just whining about my tough luck.

Return to main text

Catering for me

So you want to cook me a meal, for some reason or another. I'm sure you have your reasons. Anyway, to try and ease this difficult time for you, I thought I'd do a page of help.

  1. Do not panic

    I'm not that difficult, really. You won't have to learn anything new. Well, maybe you might have to learn a little bit more about where your food comes from, and what's in it, but that's about it.

  2. Don't forget the staples

    There's loads of stuff you can already cook that's vegan. Baked potatoes and beans. Salads. Pasta (not egg pasta, obviously). Vegetable curry. Vegetable chilli. Chips. Beans on toast. If your ultimate goal is to stop me dying of starvation, rather than providing my tastebuds with a lapdance, then you've got nothing to worry about.

  3. Use the net, Luke

    MrFalafel's posts on alt.food.vegan are legendary in terms of being fantastic recipes. There's also loads on the internet.

  4. I'm not picky

    I'm not a picky eater, and if you've gone to the effort of cooking it for me I'm going to eat it and I'm going to enjoy it.