M1ke

On The Beat

Towards the end of May I had the chance to go out on patrol with Greater Manchester Police around the Moss Side and Rusholme areas of South Manchester. It was part of their community reporter initiative, aiming to give local communities a clearer view of what local policing involves.

Like many other aspects of our society, peoples' view of the police can be subject to heavy bias from the media, and seems to be one of the hottest subjects to debate at 11pm in a pub. Whether it's being criticised for not taking action to remove people from the streets, or harrangued for taking a heavy handed approach to dealing with just kids it's hard to see where the truth might lie, and we can't just assume it's somewhere between the poles.

Police Reporter

Getting a chance to experience police work first hand and talk to officers as a member of the community they're tasked with protecting was, therefore, a unique experience that I couldn't pass up. Adding to that, they sent a photographer around with us so you get a visual idea of the journey, and I was allowed to tweet on the day, and to write this report, without putting it past the officers first, so I'm reporting what I saw and heard.

The day began at Longsight Police Station at 7am, where I met PC and PCSO Lee (two guys, same name, confusing) who went through what we'd be doing, how they usually begin the day and how to stay safe (just in case). As we sat in the large work room, with members of the force assigned to various parts of the local area, I was interested to see how much discussion went on between the teams, especially how many ongoing relationships with both troubled or supportive members of the local community there were. This began what would be the overarching theme for the day, a focus on really getting to know the area, and a heavily intelligence led form of policing. PC Lee referred to this as the new policing (paraphrasing):

You can't police on your own, you need to be involved with community, housing associations and councils. A growing conern in cities is anti-social behaviour, and that requires a whole new type of policing.

Our first visit was to a property experiencing consistent anti-social behaviour from a local gang. The group were known to the police and they were keeping tabs on their movements in order to prevent them causing harm to members of the community. In particular they had worked with local minority community leaders who knew members of the gang in order to get families or friends more involved with helping to resolve the situation. We also inspected a site in the garage of an apartment block with evidence that it was being used for sex or possibly prostitution; a dirtier side of inner city police work. Some people might find police time wasted in inspecting the darker corners of a parking garage for used condoms, but such activities don't often turn up alone, and another main role of the police locally is to protect vulnerable people from exploitation.

Meeting Moss CareMosscare is a local housing association backed by churches, local shareholders and in part staffed by volunteers. As part of their efforts to know and get involved with the community the police visit the organisation's offices, and staff can talk to police with concerns about residents at risk or who may have caused problems for other tenants. Whilst we were visiting the police were discussing attending an event in a local park over the bank holiday weekend, supporting the organisation whilst also getting more chances to connect with local people. The force allows officers to be flexible with their shifts to make sure they can attend local meetings when they feel it's important.

The second local organisation we visited was the Docherty Project, part of the Great Places housing association. This project focuses on supporting those with alcohol dependency, providing a supportive environment to live and recover with support from peers and professionals. As well as one large property they also have several houses for those more self-sufficient, around the Moss Side and Rusholme areas. The officers talked to me about how they got involved with the project, particularly in preventing vulnerable people resident at the house from being exploited or abused by people they often knew from before entering the project. Whilst at the centre I got to witness this first hand, as some people were knocking on the outside door asking for a resident, whom the police suspected they intended to lure away and rob. PC Lee went to speak to them, telling us to wait inside; they got a fright when a police officer opened the door but sadly it was unlikely to deter them for long - as we left later on we spotted them with a number of others known to the police loitering outside shops on the curry mile.

I can guess that there must be a part to the officers that wants to take some of these less solubrious individuals and get them off the streets permenantly, and I'd point this out to those who may criticise officers for not taking such actions. The thin blue line is trodden carefully these days, with increased scrutiny on police response. This scrutiny is warranted as the police force hardly has an untarnished reputation in the last decades, but the restraint and detachment officers have to excercise definitely has a risk of making them seem uncaring.

Inspecting Buildings for SquattersOur day ended with a final look into the anti social gang, inspecting a house that had been occupied by the youths in recent weeks. The police can force landlords to secure empty properties to prevent this, and when we went to check there hadn't been further break ins we found rubbish and evidence of a small fire in the yard, but no damage to the boarding. There can be a certain sympathy towards squatters when homes are perceived as empty for no reason, a rich person's property or just a bad landlord; but when people who have homes break in to a property and are reported as setting fires in the upper rooms no local community can support their actions. Whatever your view on property rights the actions of these people puts everyone on the street at risk; fires in buildings can spread quickly along terraces, and the police continued their stance that protection of the overall community was their top priority.

As we arrived back to the car a group of women walking down the street approached us. One was carrying a child and they knew the officers. Lee had a short chat with one of the women, who was thanking him for something, and saying that their son was doing better now. Once in the car I got to hear more of the story; the woman's son had fallen in with a gang, and had been turning from a reasonable teenager into a dangerous adolescent, who'd had a few run-ins with the police. Maybe at one time he'd have ended up in jail, or been hounded and driven further into the gang culture. In this case, thanks to help from the officers both with how they approached him and how they worked with his family he had managed to move away, free from the negative influence of the gangs and even managed to get himself employment, which would help set him on a different path for the future.

Inspecting FlatsWe need our police. Yes, we need them to be monitored, regulated and held to account. Yes, we're going to hear more stories of mistakes or corruption by a small number of them. But what we really need is for them to continue being involved with communities, working with integrity, seeking to understand why these problems happen. We need to work with them; let them know what we care about, how we view their efforts and also to hear their perspective. By building trusting cooperative communities we can make a difference and improve life in our society.

See more photos from the force photographer on Flickr

What Price to Serve Your Country

With large swathes of the country unemployed, welfare and benefits being cut or privatised and a growing sense of despair across the nation you wouldn't think MPs would decide to ask for a pay rise. But, of course, they have.

This isn't a rant against any particular party; the Tories are currently doing exactly as one could have predicted they would, turning poor workers against poor unemployed all whilst pulling the rug out from under both of them, Labour harp on about how they'd have done things differently despite the fact that 13 years of their government placed us in this mess and the Lib Dems have had the worst political decision making spree in history. All three have failed to actually get a grip on the situation, and yet aside from one exception most members seem to agree that their entitled to more money.

On average, Tories said their salary should be £96,740, while Lib Dems thought the right amount was £78,361 and Labour £77,322.

So to start with, the party that complains most about an entitlement culture thinks they deserve an increase of £20,000 more than the other parties are asking for. Good job for appearing contrary to the party's "rich boy" image guys! Huge portions of the country have to live on less than that amount per year and you want that as an "extra"? Even the increases demanded by members of the other parties put the income hike alone above the yearly wage of someone working as a cleaner in a school.

But, some might say, they work really hard and deserve these bonuses. In fact one MP states this very clearly:

"We frequently have to entertain people."

Really? Well you're entertaining us all right now, but mainly because we hope you're joking! I like to frequently entertain people; I quite enjoy it, but you're not talking about having some people round for spag bol, you're likely talking about meals at Jamie Oliver's or some other city centre restaurant - Wetherspoon's is right round the corner if you're feeling the pinch guys! This rather pathetic defense of why they should get a £20,000+ pay hike leads on to the more worrying underlying problem - they've confused why they have the job in the first place.

"A man or a woman who is very capable, doing well in their profession, with a family, are they going to be willing to take that paycut and look their children in the eye when it's Christmas and (say) 'you can't have what you would normally have because mummy or daddy wants to be an MP?'"

Yes! You should do exactly that! Being an MP isn't one of these modern day career choices, where you balance how much of your soul you want to sell against how much you like to buy shoes. If your children would react badly to this then they're already spoiled anyway and you'd be best giving them coal in the stocking next year, no matter how good or bad they've been.

Being an MP means you have a desire to change your country, to lead it in a positive direction and there's a certain amount of self sacrifice required to put yourself in partial control of 62 million peoples' lives. The commercialisation of Christmas is something for another rant (and one I've missed out this year) but honestly if that's how you view taking a job with a salary of over £60,000 and a place leading what we're told is one of the world's most powerful countries then you're in it for the wrong reasons.

So far it looks like, fortunately, we won't be seeing these increases any time soon. But worryingly amidst the many recent scandals and resignations we're told:

The watchdog did bow to pressure by agreeing to reopen the subject of "golden goodbyes"

Now what this means for the rest of us is that now, even if your MP is a lying scumbag who's screwed their constituents, they can hop out the door, open the golden parachute and float to freedom with a sack of cash whilst the plane crashes and burns. I'm all for giving people incentives to succeed, but this seems like the inverse - oops you made a mistake, best resign, cost us money for a re-election and then buy a yacht with your winnings. I'd like to see quite the opposite - if you resign before the end of your term, excepting on doctors' orders, you pay the salary of your replacement until the next election. Sadly we're never going to get that through (weird how MPs won't vote for that kind of measure, kind of suggests they're worried about it catching them out?) but let's not give them a financial reason to leave us drowning the next time it hits the fan.

To any MP that thinks they deserve more - if you want money for old rope then use your array of middle class contacts and get yourself a job as a consultant, so you can sell jargon and empty words to rich CEOs. The people you claim to want to lead will be better off without you.

The Dark Side of San Francisco

You may think of it as the world's capital of technology, a center of innovation, surrounded by exciting landscapes and looking through the spectacle of the Golden Gate Bridge out over the Pacific ocean. Many things spring to mind considering the city and its wider metropolitain area, home to Google, Facebook and 7.6 million people; many of these things were on my mind as on the last day of my recent business trip to America my plan was to spend an afternoon and evening exploring its steep streets, eating some quality Mexican food and having a drink with some other tech startup types. What I got was not the view most people have of this famous city.

My journey seemed condemned to failure when my flight to North California from Minneapolis took almost 6 hours to take off, due in small part to snow and in larger part to the airline's lack of preparation for such a yearly event - showcased as every other plane still seemed to be taking off. The delays meant we arrived into San Francisco not in the afternoon as planned, but in the evening. 11pm is hardly an ideal time to be sightseeing but after the trip I'd had, and bearing in mind the big city I'd just arrived in, I decided to go and see what sights I could by street and moon light.

Unlike some US airports it's fairly easy to see how to get into town from SFO; the city's BART light rail system leaves from the central departures area of the terminal, and an $8 ticket later I was on a quick under/over grounds tram into town. My desintation was the Mission District, recommended by a friend for it's authentic atmosphere and Mexican food. That authenticity proved to be more than I was expecting; as I emerged from the subterranean station at 16th Street I entered into what could have been mistaken as some sort of informal meeting of local homeless, but in fact this was more like their adopted reception room. Every bench or flat surface around the small gardens encircling the subway exit was occupied by someone sleeping or a few sitting talking. A number had large suitcases or posessions in a shopping trolley, many hadn't managed to scrape a bench and were next to a wall, in a corner or behind a bin under a duvet. I'm no stranger to cities and the harsh realities of life but I think standing by that crossroads I saw more homeless people in 360 degrees than I have in any week in Manchester.

Looking around at the locals I was nervous about continuing to try and find a place to eat or drink, but gave it a go. Walking down one of the streets I immediately noticed someone was following me, and a guy across the road was shouting something at me. I progressed for a very short while longer when I realised that the road ahead had large patches of unlit street and that the doorways nearby still had people sleeping in them. Crossing the road to avoid the person following me, I wandered casually back to the station and hurried inside. Most likely I over-reacted here. I was judging when I possibly shouldn't have and jumping at shadows; however I wasn't prepared for what I saw and the fight or flight reaction was quite predictible. Deciding I wouldn't give up I went back to the platform and headed further into town.

Emerging once more from the underground, this time at the central/civic centre stop I was relieved to see a wide pedestrianised boulevard, a big Christmas tree and relatively quiet streets. This difference didn't last long however; rounding the next corner once again the street, this time surrounding an on-road bus terminal, was again occupied with homeless people, along with groups of youths who may or may not have been homeless themselves. At night in a UK town I might have been worried about a group of drunk lads, but there was no party atmosphere here - in fact I couldn't even see any bars, open or otherwise. Resigning myself to maybe not seeing quite what I wanted I headed into a large fast food burrito bar on the corner to get some food all the same.

Having asked the security guard if he knew any open restaurants in the area (he didn't) I got some food and sat down, across the aisle from a woman who just seemed to be sitting there. She struck up a conversation, asking where I was from; I told her the UK and she said she'd like to visit some day - not quite considering her circumstance I rather foolishly piped up with "you should definitely go on holiday there some time" but she seemed to find it amusing. We began talking about how she'd ended up homeless - everyone has their story. Hers was one of abuse by her husband and friends, abandonment by children & family, and what may have been a corrupt judiciary siding with her husband, and their friend, as they presided over the subsequent divorce. She'd been left further south in California with nothing, and had headed to San Francisco to try and find work, as she was a trained nurse. She'd had no luck and resorted to living on the streets with occasional nights in homeless shelters, though she'd experienced violence in some of those too. She spoke about homelessness, the weird sort of half trusting half fearful community of people, some of whom looked out for each other, others who tried to get ahead - sort of like any community I guess.

Most strikingly her next place she'd like to visit after the UK was Israel and I found she was a Christian - truly amazing in light of all that had happened to her. She'd been to a church before her troubles had started, and very disappointingly they seemed to have done little to help. Fortunately she'd found a church recently in SF who were aiming to help homeless people, and I pray that they'll be able to do something for her. She also spoke about talking to other's in shelters or on the street about her faith, and whilst some had hostile reactions many were encouraged by what she had to say - and to see that trust in spite of her situation, that she'd even continue to tell others about her faith, is a brilliant example and encouragement for all Christians in the west. I'd hope that anyone, hearing her story, would think twice the next time they complained about not being able to afford a new TV.

We spoke for over an hour in all, even going over a few passages from the Bible together, before she headed off to find somewhere to sleep and I decided to continue my mission to see SF by night. Strangely after talking with her I no longer felt scared about the streets and the people on them any more. Obviously I felt pity from the beginning but now I had a better understanding of what should have been obvious - that these people were really just like me. Sure maybe some got into drink, drugs or gambling and ended up that way, but so many will have been let down by employers, family, the government or even grew up on those streets after their parents ended up the same way. I resolved that rather than being afraid I'd try and talk to anyone who might otherwise have made me nervous - though as it as now much later most people I encountered from then were asleep.

Following that I walked for nearly an hour north from the city centre, ending up on the famous Lombard Street, the steep road which from the top has a view all the way to the pacific coast, and the famous windy Russian Road coming down the east side from its highest point. From there I headed to the docks at Fisherman's Wharf where I finally found bars and restaurants - but all shut and the streets all but deserted at this point.

So it was that I ended up in the most surreal of situations, sitting on a kerb, my feet resting on a sandy beach, looking over a dark bay at the lit up Golden Gate bridge, the only sounds that of lapping water and nearby but unseen seals calling to each other, thankful that I'd taken this weird trip around town to have my eyes well and truly opened. Those with money, the corporations and the governments may wish that these issues would remain in darkness, unseen by the populace, but turning a blind eye won't fix them; pretty soon they'll be too big for the night to hide.

An Explosion of Community

One of my main focusses in Manchester since moving here a year and a half ago has been the community in Moss Side. Through a series of random chances I came upon a community that, in honesty, I never expected to be involved in and I've enjoyed having my initial perceptions of the area shattered. Despite outside views of the area, what's inside is a broad cross section of society and a huge amount of hope to improve the area they call home.

From door knocking and weekly pub meets to residents' associations and allotments the community has a wealth of ways to bring members together and bring their collective voices to the council and bodies with access to funding. These external bodies definitely have a part to play in the regeneration of an area, and money is always a necessary tool in such efforts, but Moss Side is a great example of how small societies can grow, function and improve their area.

This was nicely illustrated this week as my plans to attend Manchester Council's large, and very well attended, firework display at Platt fields were subverted by a small display in a small gravel patch over in Moss Side. Arriving and slightly uncertain whether we'd found the event or a few cold people who were creatively disposing of some left over palletes we went over to introduce ourselves. Drawing closer we found a table of barbecue accompaniments along with a man heating vimto over an already lit fire; we were there and it was already looking good.

Having collected some drink (with obligatory brandy added in) I deposited a pack of sausages for the communal meal as a stream of locals arrived, members of the residents' association putting on the event as well as surrounding streets. A real benefit to small community events is that children are much more evident, and a small fireworks display is no exception, especially when they're equipped with sparklers. One crucial part of building local communities is creating space and provision for children to interact and make friends locally, especially in multicultural areas; events like this provide a great opportunity and it was inspiring to see so many parents bringing the kids along and letting them have fun together.

Spending a short time at the bonfire, and even before the fireworks started, I decided I was going to forego the larger event at Platt. Being able to attend events in a community like this and see how people are putting in effort to build relationships in their local area is a real privillege - the big council events get a lot of people involved but just think how much stronger those social bonds could be if each group of ~50-100 people were gathering in the streets around their own homes.

As I write this I'm watching coverage of the US Presidential Election, which makes me aware of the differences and struggles facing our own political system. With last night's bonfire still in mind I'm certain that whatever the politicians decide the best changes to our country are going to come from small local groups like this, people enjoying where they live and able to help and provide when their neighbours face difficulties would reflect in every other aspect of modern life, and like a firework accidentally shot low over a terraced house it may make you nervous at first, but the results are pretty amazing.

How to Code Yourself into Hallucination

Short version: The hackathon was a great experience, especially as someone who usually works alone. I got to write tests for other people to work on, use a language I'm still learning and experience a new way of databasing. The way people worked together, even across teams, to solve problems and how other products outside of challenges were thought up and developed showed the strength of the tech community. Winning a Raspberry Pi on top of it all just made it even better - I'll be back next time!

On the 27th October 100 programmers from around the country (and even from abroad) descended on the emerging tech capital of the UK, Manchester, for a gruelling contest of coding skill, team work and caffeine tolerance. Hosted by the amazing folk at Manchester Museum of Science and Industry, still my first memories of the city as a child, the premise was simple: form teams of 1-4 developers, designers or "other" and take on a development challenge set by one of the event's sponsors.

I began on a team with my friend Ben, and whilst we'd had a few ideas regarding the challenges we could take on we took the chance offered to us by Shaf to get introduced to two other developers, Jack and Tom from the BBC. The main event organiser, the ever present Gemma gave an intro, following which the challenges, and their related prizes, got introduced by the sponsor companies. Then at 5pm development kicked off, with our team appropriately having no idea what we'd be working on for the next 24 hours.

After some time discussing our options we decided that we'd target the challenge which we had the most innovative idea for. The team at Intechnica had set a challenge based on Google's recent development of a search easter egg to identify any actor's Bacon number. Provided with data from IMDb the challenge was to achieve a similar function, only faster. Unfortunately IMDb don't exactly provide their data in the friendliest of formats; rather than some useful JSON or even a vaguely useable CSV file they provide a list with various data items about the contents incoherently spaced around them, along with a readme containing references to Acorn and Amiga systems. As we joked about other items of film related data we could analyse we happened on our eventual product, a system to calculate the largest birthday party possible on a film set, by looking at the actors featuring in each film and finding those with the same or similar birthdays.

For some reason we then named our team Monkey Diver and the product Bacon Diver. Our challenge had begun.

It was my first experience working so closely with a team; with such a short time to work we'd need to develop our own components simultaneously and build them together into the final product. Over the last year I've learned the technique of Test Driven Development, something missed out from my original programming education but something I've been working into my projects since my my initial introduction to it. TDD proved extremely useful in this context, as it allowed me to write the end processing system which would analyse our database to extract the birthday information without having that data available, and just a basic idea of how it would be structured.

At the same time Ben was working on our next information problem, finding all the actors' birthdays. Using his hobby, and favourite, language of Python he was able to write a screen scraper, rapidly collecting the data from websites which provided it. He also decided to use the NoSQL database MongoDB for the first time, as it seemed most appropriate for the data extraction we'd be performing later. Tom was researching other data sources to link actors with films and Jack was using his existing knowledge of Amazon's web services to set up web and database servers to process and serve our data.

During the early parts of the evening the MOSI team served an excellent meal of hot pot - certainly an ideal chance to introduce some southerners to it! - and necessary fuel to keep the programming going. After the meal our next "milestone" became the prospect of bacon butties at 8am, and we were into the long night.

Describing the rest of the night isn't a task I'd envy, and if you want to see a room full of programmers experience a roller coaster of caffeine, failing tests, creative features, broken compilers and blearly pair programming I'd suggest you wait until the videos from the live stream are released. Some went and slept at home, others in a draughty back room and others avoided anything less than sitting bolt upright, hands on keyboard. I got a chance for respite when in the early hours I questioned why my commits weren't appearing on the live feed and was told that the hook in use didn't work on Windows; with some pointers from Sean and some digging on Stack Overflow I found a decent solution that nearly worked.

As the dawn broke I felt that a mid-day lapse would be incoming if I didn't manage some shut-eye, so retreated to one of the side rooms. Having a choice between one of snoring and one rather cold I opted for quiet, though coupled with the shut down of the body's heat regulation that results from a long night it meant rather more shivering than sleep to start with. Eventually I'd managed around 40 minutes of dozing and decided it was time to return to the challenge.

Bacon safely (if slightly late) on board and developers arriving back from their visits home to sleep the pace stepped up and we had the vestiges of an application in front of us. We spent a stressful few hours facing our actor and film datasets not matching (highlighted when Brad Pitt failed to appear in Fight club, and it says something about my mental state that I kept searching for that film). Eventually discovering a linking set relating actors and films through the characters they played we were back on track, but time was now looming for all the teams.

Skipping forward to the end and unfortunately we hadn't managed to finish our application; we could return an actor's birthday on demand and calculate a final result from a made up sample but the middle hadn't happened because of issues with accessing the database. As the final whistle blew a fair few harsh words were said about our database of choice, but as the dust cleared I realised we'd put forward a very good effort - developers from quite different backgrounds introduced to each other just 24 hours earlier, using 4 different languages, three operating systems, cloud based servers and NoSQL databases to produce an answer to a frankly ridiculous question.

Following a well deserved break the closing awards ceremony celebrated the many achievements of the programmers in attendance; all the presented items were impressive but the star of the show were the team who's attempt at a digital Rube Goldberg machine (passing a string through as many languages using as many protocols as possible) managed to involve a QR code printer, an electronic music pad and a live tracking app just for show. We were very happy that despite the project's failure to run the team that set the challenge decided that our efforts and interesting take on the task merrited winning their prize, and we walked away with a Raspberry Pi each.

Thanks a lot to the organisers and see you next year!

Missing Uncle Ho

We had 2 nights, again, in Ha Noi, the capital city and if anything even more mental than Ho Chi Minh. We stayed in the Old Quarter, popular with backpackers and dense with motorbikes and people drinking on the streets on every corner. We did some touring around the city, but the habit of closing everywhere early meant we missed the chance to see the mausoleum of Ho Chi Minh and the attached museum.

We left on the third morning for our trip around Ha Long Bay.

Tailor Made

We visited Hoi An, the market town of central Vietnam, for 2 days, looking around the French inspired architecture of the Old Town, wandering around the lamp lit streets at night, and getting some clothes tailor made - for very reasonable prices! It was the calmest place we'd visited, and also the most different from all the other cities on the trip.

On the third day we got a bus up to Da Nang and flew to Ha Noi.

A Pleasant Hue

We stayed 2 nights in Hue, the old imperial capital of Vietnam. We saw the huge imperial citadel and a large pagoda/temple complex, as well as making friends in the small but growing backpackers' district there.

We got a bus on the second morning to Hoi An, over a very bumpy mountain pass - good views but a bit sickly!

Light at the end of the Tunnel

Now a list of further oddities and amusements from the train:

  • Dave had a book next to him as he was trying to sleep sitting up. The local opposite saw this and having failed to sleep himself, decided that the book would make a good pillow, casually picking it off the seat, placing it on the table and proceeding to mould his head into the cover. Dave, confused and annoyed but still British tapped the man shortly after he looked like he'd finally nodded off and asked "I'd like to read that please".
  • We may bring a bag on a train, maybe a suitcase, maybe a bike. Here, anything goes. We had one woman who may have been moving house - one by one she moved a series of cardboard boxes onto the train, stacking them in the aisle and squashing some into the bag racks with no embarassment. I've already mentioned the sacks of grass and there was fruit as well, and I swore I heard birds singing from one case as it passed me.
  • A stylish looking local with a briefcase was sat opposite us using a Blackberry. He'd chosen the Windows XP statup sound for his text tone, a choice as bemusing as it is irritating.
  • Face masks; I've seen them before over here but never on the train was their ridiculousness more exposed. Here we have an enclosed space, full of 80 people (per carriage, 9 in total) sitting, chatting, sleeping, eating, even changing babies. We have a toilet which is a hole in the base of the train, open windows and insects flying in at each stop, dirty water from a machine to drink or from a tap to wash (no soap observed). Despite this, a large proportion of the women still wore their face masks, with the older ones still wearing their hats, giving the pre-described ninja look.
  • The naked baby. I'm unsure how this kid kept getting out of his clothes, or if there were multiples I couldn't tell apart. All I know is that every time he appeared, he'd be in front of Dave. First as Dave sat down the kid was on the seat, actually rubbing against him as his mother tried leaning over to pick him up; then a number of times whilst trying to sleep the kid would run past. The best time he missed it entirely, but as he stood washing his hands, who should appear behind him but the baby, entirely naked, standing as if waiting until just by chance he heard his mother call and ran the opposite direction, Dave turning to see me in fits of laughter at his near predicament.

Training Day

Screw. That. Train.

I'd say it in harsher terms but I hope the following story will make my sentiments clear without the need for what some might consider coarse langauge. All that really need to be said are two things. The first is to book trains in advance of you can, and the second is that if you arrive at a booking office to find that the sleeping carriages are booked up, and especially if that train is described as a "hard sleeper", Do. Not. Take it.

Wednesday morning was given over to sorting future flights, hotels and transport. If only we had been less confident about the transport for Wednesday evening. Following our planning and booking session we visited Pho 24, a noodle bar with a sort of fast food vibe, but still with waiter service and proper locally cooked food. Apparetnly a chain there are even rumours they plan to franchise in London; if this ever makes it to Manchester call it my new breakfast spot - Mi Xao Bo (noodles with beef) or Ga (chicken) is a brilliant breakfast, add in their iced white tea and even the full English will seem slightly less high on its pedestal.

The rest of the day involved relaxing on the beach or in beach bars, along with bouts of photography. We tried to hire sea kayaks from people with a big board advertising that they hired out sea kayaks, but were told "can not", which is Vietnamese for "there may or may not be a reason we won't do this; we almost certainly can so might not want to stand up, not want to go out in the sun, have already reached our target sales for the day or never had sea kayaks to begin with". To prepare for the evenings train we decided to have a hearty Vietnamese meal, so were conused when we ended up sat in a Texas BBQ restaurant with a big man from Memphis, Tenesse (he says no Vietnamese have heard of Memphis, hence the name of his restaurant) selling us Mexican food. I was happy to be off script this time and mudered a burrito and refried beans. After a quick trip to a store to pick up food and water supplies we made our way to the station in good time.

After queing at the station (actually the Vietnamese don't queue and don't understand the concept, so to enforce one without crash barriers the station give out tickets like you might find at Argos or the council office) we were told that the night train was fully booked for sleeping. It wasn't great but we agreed to take normal seats. I felt not too unhappy at the time - sure we were looking at a train timetabled for 16 hours overnight, but I've slept on many a train before without a bed, and assumed that some sleeping customers might not sleep 16 hours, maybe we could do shifts?

As we waited on the platform, playing Magic on my coat on the floor, I started to get a bit nervous, noticing that the other trains looked a little old, full of people, kids, luggage and even animals anywhere, and with bars across the windows. It was then that we were told the haunting truth "you know these are wooden seats right?" WRONG. Who thought of these wooden seats? Maybe in the 1800s it was fine, but we've had trains for a little while now, does some foam and some cloth really cost that much? The apprehension worsened as the train approached and we joined the mob (no sign of a queue) trying to get on whilst naturally a similar (but forced by the train aisles to roughly queue) mob valiantly fought their way off. Arriving at our allocated seats we encountered, a number of bags containing various fruits, a large amount of crockery, some with water in it, and a kettle. We nervously cleared stuff out of the way, crossed our fingers that our travelling baggage would fit on the racks (it did) and sat down on the hard wooden slats that were ours for the next 16+ hours. It seemed quite bad but we were trying to put a brave face on it. Then the man opposite us began to smoke. Then the baby next to us, naked from the waist down as it was, began to cry.

We steeled ourselves for the worst; at each step things had seemed to depreciate further, but surely now, in the depths, we had to get thrown a few bones? Fortunately, we did. I'm not sure why; maybe it was our anxious faces, the strained way we were talking, the forced laughter and thoughts of distant beds and enormous but totally justified taxi fares. Whatever it was, one by one the locals sitting opposite us withdrew to other parts of the train; first the smoking man, then the coughing man and finally the woman with the wailing baby. Drawing inspiration from this minor return, Rosie and I decided to grin and bear it, even deciding to keep hourly updates of how we were feeling - from positive down to whereever.

The Kindle was undoubtedly a life saver; knowing I could read far longer than the length of the journey let me avoid the worry of endless boredom, and allowed the minutes until shortly after midnight to proceed better than expected. During this time it became clear that though we may not be in a sleeping carriage, the locals still all intended to get a night's sleep. They went under the benches, they went down the aisles, they scrunched up on a bench or lay with their legs vertically up a wall. Two children even seemed to be sleeping in what looked like a supply cupboard at the end of the carriage. Chris and then Dave tried sleeping on the floor, with reasonable success. Rosie managed to sleep on a bench. I gave up my seat, found a small plastic chair to place just outside the seating area of the carriage, by the sink, and read whilst keeping watch on the bags.

Despite shifting position a thousant times, despite the long stops to let other trains pass on Vietnam's single track railway line, despite the occasional passer by up or down the carriage we got through to 3am, halfway where I rewarded myself with a ham & cheese sandwich from our supplies, a taste of home on a dark train in the middle of nowhere. As 5am drew closer though I felt the painful pull of the half sleep you get when your head hits the desk on an all nighter. Without a way to lie, without quiet or dark and with continued disturbance of people passing to go to the toilet I spent maybe an hour in that jolting, sinking sleep which isn't quite right, leaving myself feeling tireder than before these attempts as the sun rose.

Passing through Da Nang at 7am though and this long slow slog turned into a tense waiting game. As the hours ticked down they seemed to go slower, not helped by the Kindle finally making good on its promises the night through and packing in about 8am, and brought to breaking point as we lingered 30 minutes in one stop in the hills as masked women in hats (like slightly withered ninjas) prowled round the barred windows trying incessantly to sell mostly fish and a few other bad smelling home cooked treats. I guess the hopefullness of the sellers has to be admired as much as their persistance is an annoyance; trying to read, sleep or talk as yet another face screams something in Vietnamese through the bars over a train window is probably a psychological trigger for some people - Chris was suggesting things that one could do in the remaining 4 hours and I suggested "murder everyone on the train?" to add some British black humour to the situation.

Then finally, as every stop I desperately checked the clock, knowing we were late for arrival in Hue, a Vietnamese man who had joined us to watch a game of Blackjack said "this is Hue" and we feverishly packed our bags and prepared to disembark. Like one final cruel trick we were stuck in this final limbo for a further 15 minutes as the train crawled towards the station; tense as I was I could probably have beaten it in a sprint. These final minutes were made a little easier as my new seat placed me opposite the wailing baby from the night before and, whereas in the night our white faces brought him to more tears every time he spied us, even down the other end of the carriage, this time he offered me both his food and drink, a kind offer though politely rebuffed.

Then here we were, the push to get out started, one woman seemed to be transporting a huge sack of grass, but we were breathing open air again, striding towards a taxi and on our way to the hotel. We made it, 19 hours since leaving our hotel in Nha Trang, frayed, tired, sweaty and skirting regrets, but we made it.

Water, Soil & Mud

First let's pretend I'm writing this from the lobby of our nice hotel (Indochina, Nha Trang) before our train to Hue on Wednesday evening.

The scooter ride to the Ba Ho waterfalls was, as seems to be the trend, the most fun yet. Nha Trang's exit road is far wider than Mui Ne's, and within minutes we were cruising up and down Highway 1 as it wound round the cost to the north. The Ba Ho waterfalls were an almost unknown tourist site a few years ago but are becoming more popular now; despite this we still had to ask a local in a nearby fishing village to show us to the correct road until a sign announced the turn off onto a dirt track in the jungle. When I say jungle we're not quite talking Amazon, but compared to the forests of England this place is crazy - insects, snakes and maybe larger animals, a good proportion of which could do serious harm or even kill an unway traveller. We tried to look wary.

As we arrived a tour bus pulled up, so we wasted no time in setting off up the trail, keen to savour the secluded spot between the four of us for at least a little while. Soon we got to the entrance of the waterfall bed, where one path lead onto the smooth rocks of the small river itself, the other quickly rising into dense jungle. Having previously found the jungle track offered more seclusion Chris suggested we take it, and waving away the nearby guides we strode on fearless. The climb got steeper and the humidity pressed in around us, bus after 15 minutes walking and occasionally scrambling we could hear the distant falls which spurred us on, and the shouts of children below us which indicated the tour was moving too.

We had picked up by now that we were following the traditional "down" leg of the route, encountering marks on rocks and trees left by the guides in order to keep the path worn (without use I doubt it would last a few months). This worn path gave us good confidence, though all nearly went out the window when I spotted the first snake of the day, a long black creature that was there and then rapidly slithering into the undergrowth as our noisy feet disturbed it. After bouying the confidence of the others, that the snake was clearly frightened of us, we made our way ahead, with maybe a keener eye on where we stepped. Another roadblock nearly turned us back as one particular rock formation didn't seem to have an arrow indicating the way out (or way in for those following the correct route) but a quick jump ahead got us back on track, minutes later emerging into the clearing at the very top of the falls.

The view was amazing, a bright turquoise pool surrounded by huge smoothly curved rocks descending from the higher jungle above, turning into some small rapids before dropping over the edge of the next pool, out of site but into the wash of the waterfall below. After the obligatory photos from every angle Dave and Chris decided it was swimming time; after some more rock scrambling and a (what I considered) daring jump over the rapids I joined in, followed by Rosie as Chris took the role of photographer. The water was not immedlately warm and the bottom occasionally sharp and rocky, but a minute or so in and it felt perfect, swimming around our own private lagooon, the sounds of others in the area drowned by the falls which now separated us. We swum for maybe 20 minutes before climbing out and drying off on the warm rocks, a truly brilliant experience.

Packed up we decided to continue the trail in reverse, but as the first of the tour group crested the waterfall we realised to our dismay that the only way to where the route continued was to swim again; deciding we were more in need of food and water than another 20 minutes working out how to get our equipment (phones, cameras, etc) safely across we moved back down the jungle path. The route was snakeless this time and what's more we spotted a route through to the base of the waterfall, finding outself just a leap of faith away from the different route down. Once across we got to watch the tour leaping from high rocks into the water with their guides - maybe next time! The climb down the rocks around the river bed was fun and not too difficult; we returned to the base and encountered a number of people from the tour who'd decided to return early, passing us as we took photos. They were local tourists but spoke some English, pressing into our hands some cans of beer which the men were enjoying and cheersing us with the traditional chant "Mok, Hi, Ba, YO!" (litterally 1, 2, 3, yo, but it seems to have more meaning than that). We couldn't really say no and sipped the warm cans grinning, but a 30 minute scooter ride on unfamiliar roads awaited us and after saying our goodbyes the beers had to go.

The ride back contained yet more exploration of the cornering behaviour of the scooters, though the engine this time wasn't as good as what I had in Mui Ne, and the front brake almost no existant above town speeds. Nevertheless we made it back to town and pulled in at the first beach restaurant; I ordered what sounded like a local dish but turned out to be steak and chips - hard to hide being British!

Despite the cool waters we were already hot and sweaty again, so decided there was just time to head into the local areas of the city and visit the Nha Trang Mudbaths. After a kind girl on a push bike agreed to lead us round the few complexities of local streets we made our way to the spa, joining mostly locals for a late afternoon soak in what I'd describe more as slurry than mud. I had few expectations so what the bath actually felt like was completely unexpected; when moving your body through it the mud felt like slightly thicker water (and was the perfect outside temperature) but a hand over your arm and you felt the slippy texture of the mud itself. Interestingly (though obviously) it also caused us to float, which with four of us sharing a tub kept getting quite amusing, as any shift in weight and people would drift to new equilibriums, desired or otherwise. The mud was followed by a bath in a hot spring, then various swimming pools, ending in a cool mineral water pool where we managed just a few lengths as night was falling (at the uniform time of 6pm) and the centre was closing.

We left in the dark which proved our undoing, as after a turn onto a particularly busy street I had lost Chris and Dave, leaving myself and Rosie to head straight for what we realised was far too long before concluding we were lost. Scrabbling for what to do I realised we only needed to find the coast, but with buildings hiding where the sun might have set and the narrow streets of the Nha Trang suburbs confusing my sense of direction we had to try and find someone who understood the words "sea", "beach" or "coast". The first person we asked, after a few tries, seemed to get it and gave us directions, a minute in however and we reached a railway track, one we knew we hadn't crossed on the way in. Turning back and starting to worry I realised that one particular taxi company had drivers who mostly knew English and tried to spot one of their cabs. Fortunately it wasn't long before one showed up and I was able to ask the driver for directions, confirming them in the Vietnamese Chris had taught me to ensure we were on track. Soon enough we were back by the coast, and in due time returned to find the others at the hotel.

After a tiring day we decided just to visit the Louisianne Brewhouse, a New Zealand bar who brew their own beer on site - hardly local but still something far from home. We tried their speciality, a beer made with local grown passion fruit which quickly beat any other fruit beer I've tasted into submission. Making another English fail of food ordering I ended up with a veal wrap, the noodles or rice with every other option feeling like too many carbs in a diet heavily based on them. Finally succumbing to the day's adventures we headed back to the hotel looking forward to the day on the beach to follow.

Nha Nha, Nha Nha, Nhaa

First let's pretend I'm writing this from the lobby of our nice hotel (Indochina, Nha Trang) before setting off on our scooters Tuesday morning.

Where Mui Ne was the quaint resort town, consisting mainly of a single "strip" along the coast and a couple of adjoining roads for local people to live, Nha Trang is a town without the sprawling appearance of Ho Chi Minh (whose border is fluid and may extend anywhere from 10 miles to 30 radially) but with the characteristic menagerie of shops, a million replications of the same cafes, street traders, tourist offices (which may or may not actually be able to book you on something) and hotels. It's easy to see how a tourist could become lost here, but fortunately we both had an expat guide and the knowledge that each town has a carefully cultivated backpacker area, where the English skills are that bit better and the people less likely to try it on. First, we had to get there.

I'm not sure how I imagined a sleeper coach, but what we got was like something out of a steampunk or anime world. A single decker bus with rows of half bunk/half chair creations, some poesssing the ability to sit more up right than others, some with leg room, others with weird "leg boxes" under the next person's seat and some clearly not designed for the height of Westerners! The air conditioning was weak and the pillows darkly comical, with weird cartoon characters as if stolen from (or maybe just got rid of by) a children's ward. It was the back seats which were most interesting, alternating as they did between seat at the rear of a row with a leg box, and seat at the end of an aisle.

After trying one broken seat and another uncomfortable one on the top deck I eventually gave in and moved below into the enclosure formed by the top 5 seats, where I had a strange alcove of 5 such seats to myself. Despite there being barely enough room to sit up here I had the most fun, as the rear windows could open, I had a camera and we spent a good 3 hours driving past amazing mountainous scenery in beautiful late afternoon sunlight. Rolling from side to side as we turned corners and new sights appeared, sticking my head out of the window for the right shot, as if a commando on a mission (dark) and occasionally having to pull it back in as we edged just a little too close to a lorry the driver had chosen to overtake.

The driving. Ah yes. I mentioned previously that the roads of Ho Chi Minh are governed by size, tenacity and the use of one's horn; our driver decided they were governed by him and even more liberal use of his horn. I doubt barely a minute went by without it sounding, such that for the first hour we were on tenterhooks, as a few times we would swing back into our lane and (from our limited vantage point on the top deck) just catch sight of an approaching lorry, a second before it would have hit us. Chicken has never been played with more conviction by large vehicles. Upon moving to the bottom and between bouts of photography I sat in a seat which let me see directly out the front of the bus, like some theme park ride of near miss road accidents. Recording the sounds only, a constant interplay of different car horns, would give even the craziest joy rider the chills.

Nevertheless we made it to Nha Trang safely if slightly unnerved, and it wouldn't stop me taking the same bus again - I'll just bring a sound recorder.

Once checked into our hotel we agreed we all needed a stiff drink and wandered to the beach, happening upon the beach side entrance of a lavish complex combining a Vietnamese, Indian and Western restaurant. Shunning the western menus we were handed we chose a good selection of dishes, with mine probably coming out the lucky winner with roasted pork, spring rolls and noodles in a red sauce. For $1 a beer we stayed around a little too, not least because the front entrance off the road were now charging people to enter, a rare thing in Vietnam. Eventually ditching the glamorous surrounds we made our way to Why Not Bar, a name which wouldn't be out of place in Manchester's Northern Quarter - we were browsing but the free doubles on entry may have made our minds up! Another Ozzie bar, this one full of backpackers from all around the world we sampled their "Why Not" cocktail buckets, the name's themselves being our only justification, though the addendum to their entry on the menu "Free headache included" might have helped too. Still a little tired from the journey we headed to the hotel.

This morning we visited probably the best breakfast spot in town and I suspect the best we'll encounter on our travels, as we ate on the roof of a nearby hotel, who served a variety of local pancakes and fruits - though I was intrigued to see their take on French toast. It was accompanied by the now obligatory Ca Phue Sua Da and stunning views of the mountains separating Nha Trang's coastal plains from the central highlands and it's neighbouring city Da Lat.

Now we've hired some bikes so are off road tripping for a day of water based excitement!

On Your Bike

People seem very trusting here, so it was that yesterday we paid 3 men $5 each and took liberty of their 110cc Honda Wave scooters for the day, on the promise "we see you here, 5pm." Having filled them with petrol from a man with a hand pump ($2 per tank) we had our first experience of 'Nam roads, a slightly nervous Rosie on the back of mine, and a Dave being brave and going it alone.

After a shaky first few minutes and some heavy bus traffic I got the hang of things, my gear changes (automatic clutch) became less jerky and the ride got really fun! We headed out of Mui Ne, our destination the white sand dunes, 33km away. We passed for a while through small villages interspersed with coast line, then eventually headed inland and up some wide steep roads, who's long straights and banked corners allowed me to see how much I could push the scooter. It maxed out around 80km/h, and could corner near to that although the front rattled menacingly. On open roads with no enforced limit I'd have loved to be on my SV650 but in a t-shirt, trousers, gloves and small hard hat I felt sufficiently endangered on the scooter.

After close to an hour on the road we pulled off onto a dirt/sand track, which provided a new experience. Shortly down the track we encountered a herd of buffalo, with the others pulling back I decided to ride close and let them pass around us; they rewarded us by mostly ignoring us, and two found our presence so boring they decided to try mating whilst on the move.

Some minor skids on deeper sand later we arrived at the dunes. After rehydrating we had our first sand dune experience, ostrich riding. The birds looked rather cheerful for all they had to have a human sit on them and be run around an enclosure. The ride was surprisingly smooth and they accelerate quickly, though I did think it could have been longer and worried that maybe the birds didn't get much free roam - such is unfortunately the way of things here.

The next activity on the itinery was sand boarding, and we paid a small fee to some kids for use of the large bendy sheets of plastic they carried (with handles on one end) and trekked into the dunes themselves. It was at this point that we felt transported from the slightly mroe familiar Vietnamese outback to the deserts of Egypt, or somewhere similarly far flung - look out into the dunes and you could be anywhere. Photos, the obligatory "these aren't the Droids you're looking for" and an entertaining scene as Dave chased a wind-caught 20,000vnd note ($1) quickly ensued. Sadly the sand boarding was a bit of a let down; whilst it was hot it was also humid, and beneath the top inch or less of powder sand the stuff was thicker and damp, still wet from the torrential rains of two days previous (which should in fact be daily at this time of the year). Having trekked to some steeper dunes and still been unsuccesful we returned, though took a brief detour round the lake for some photos before getting back on the bikes.

The ride back was more fun than the ride there; no worry of missing our way, and I decided to push the scooter to its limit, leaving a good 5 minute gap before the others caught us up after a downhill twisty section - once again I longed for my Suzuki! After returning later and hungrier than planned we visited a small sea front cafe, proudly displaying today's catch in little pools outside, fresh as you can get. We decided to go for more traditional Vietnamese villager food though, ordering noodles with strips of fried beef and soy sauce; I tried iced white coffee, Vietnamese style, which has since been a daily drink with breakfast, and may well return to England with me.

Whilst the others returned to the hotel I took advantage of the 30 minutes left on the scooter hire and rode out of Mui Ne to the south, visiting the more ordered beach front and taking some photos of the coast as sunset began. In the evening we visited a local restaurant where, in a twist of irony, I ordered BBQ ostrich kebabs; following this we visited a beach club with its own swimming pool, wonderfully lit with changing colours, then an Australian expat's bar where I managed to sample an Ozzie stout, and play a quick game of fusball (2-3).

I write this as we're preparing to take our 5 hour coach up to the larger beach town of Nha Trang, via what appears to be a rather weird sort of sleeper bus; see you 150 miles further north! (updated 9/08/12)

Living Like Kings

After my blog post yesterday we took a coach through the stiffling traffic of HCMC out to the Chu Chi tunnels, a former stronghold of the Vietcong during the war. We got to watch a (nowadays rather amusing) propaganda film about the fighters there, and taken round various examples of their lifestyle, from how they cooked without drawing attention to how they turned unexploded bombs into mines. Part way through we arrived at a firing range (which had provided a very authentic sound track for the rest of the walk) and bought 10 rounds for the AK47, each taking a few shots. The kick was less than I expected but despite knowing how to fire a rifle I'm not sure I hit the targets. After this we headed to the main attraction, crawling through the tunnels themselves. Getting progressively narrower and deeper it was an exciting experience, though too much for some who left during the crawl at various "get out" points. We persisted and were rewarded by emerging in a bunker which, weirdly, had a very nice tea set.

I intended to get on the web yesterday afternoon but jet lag caught up with us all and we spent the afternoon asleep. In the evening we proceeded to a Thai restaurant for some amazing noodles and chicken, with one rather deceptive chili - fortunately I also had a coconut full of milk which quenched the flames. All this for about $3 as well! Then we visited a local bar where you get given free iced tea for the duration of your stay, which is an interesting touch. On then into town where we visited a number of the top night spots, our handy exchange rate meaning that for the price of a normal night in Manchester we were partying with the movers and shakers, visiting a range of club/bar combos including a Spanish place with a live band, a famous backpackers' club where lots of people were watching the Olympics on a big screen, and ending in a lively street side bar.

We're now back in the coach station waiting for our trip to Mui Ne, from there up the coast to Nha Trang. See you later!

First Day in Ho Chi Minh

On arrival in HCMC I was very quickly subjected to the harrowing nature of the city's road network. Oh my! There's one rule here - "Out of my way!" Cars drive with seeming impunity through the street whilst bikes swarm everywhere, seldom stopping for the minor inconveniences of a red light or bus in the way. I first observed this from a bus, but shortly got to ride on the back of a scooter taxi as we searched for a currency exchange.

Time is short so I'll leave that as the fist story from yesterday for now; we're currently waiting in a tour centre for a bus to the Chu Chi caves, to learn about the jungle fighting in the war, explore some tunnels and then let off steam by shooting some machine guns!

Arrival in China

So here we are in China. The 11 hour flight wasn't too bad, though I need to learn to time my sleeping with when they turn lights on/off. They served food twice, which was unexpected, and whilst not amazing it was tasty and filling.

The view over the flight was also interesting, though the on flight map was broken (amusingly returning an ASP error). It became more so as the sun went down and we left Europe, with the sparseness of population indicated by the occasional visible lights. We went over a few isolated airfields and what looked like a few tribal settlements, all the lights in a circle. After blogging I will be trying to trace our route for sure.

The in flight movie selection was also decent, I watched Wolverine, a film I've somehow missed until now, and Kick Ass, for some light relief. I intended only to watch one, but a child two seats away decided to practice screaming for 3 hours; at times I feared he may actually detonate.

Guangzou (no idea if that's spelt right) seems like a sprawling city. We flew right over on the way in, huge buildings for miles and very few single houses or estates like we're used to. Within minutes of walking off the plane my hair was already damp with the humidity, but the terminal is big and air conditioned. It also sounds tropical as there's a very loud bird flying around, so far evading my attempts to photograph him.

I'm currently in a coffee shop, to use their WiFi I grudgingly paid $9 for tea, but have been given a whole pot so don't feel so bad. It's very nicely done up for an airport coffee shop too. My flight to Ho Chi Minh is in 3 hours, so I'll take further advantage of the Kindle I've been lent and finish reading Asimov's Foundation series.

Stay tuned for further updates; I'm the furthest I've been from home and finally excited for this trip - my wallet may hate me but I think I'll be doing more of this Travelling thing!

Common Sense & Traffic Lights

I have a lot of opinions about traffic lights, mostly relating to the highway code and cycling. However this is a small point that I've considered for a while. To me it makes an interesting point about common sense developing an illogical system; interestingly should someone provide evidence in the comments against my point it proves that logical overthinking of a system produced by common sense could be equally misleading.

Consider traffic lights at a pedestrian crossing. The following series of events occurs:

  • A pedestrian intending to cross the road presses the button at the crossing.
  • After a (seemingly random) length of time the traffic light cycle begins for the cars:
    • The green light switches off as the yellow light switches on
    • There is a pause to allow for cars too close to stop
    • The yellow light switches off and the red light switches on
    • There is another pause to allow for idiots to run the lights [link removed, you know what I'm talking about]
    • The red man switches off and the green man switches on
  • After another length of time, or after cameras detect that nobody has decided to sleep in the middle of the crossing, the process reverses, except with a flashing yellow light.
  • Should the crossing be activated again an extra delay may occur before cycling to allow for a sensible traffic flow.

The process seems obvious and safe but it leaves me with one question: why does there need to be a delay between a pedestrian requesting the crossing and the light cycle beginning?

Of course, obvious answer - if the lights changed straight away cars wouldn't have time to slow down. But no; re-read the process again and you'll see that this purpose is already served, by the transition to the yellow light. Regardless of a delay, the first indication cars get that they need to take action is that the light changes to yellow; this is instantaneous - at a certain point there's a state change and that is what necessitates their slowing down.

In fact, having a pedestrian stood at a crossing with no activity on the lights is detrimental to slowing cars down - people approaching on the road may see the pedestrian and actually speed up slightly, knowing that any moment (but not in which moment) the lights will change and they will be forced to stop. So, the initial delay cannot serve the purpose of slowing cars down, and in fact could go against this.

Another answer - if the lights changed immediately people could prevent the traffic flow. Less pertinent and more obvious to disprove; there's already an extra time built into crossings to allow for this; if the initial delay was removed, this could simply be increased.

A few other possibilities come to mind, but they are dismissable:

  • Instant changing could be used with malicious intent - someone who wants to cause trouble will find a way, making traffic lights less effective for pedestrians does not help this.
  • Seeing a pedestrian waiting should slow many drivers down - in both the highway code and driving tests drivers are taught to always slow down when approaching any crossing, junction or other hazard. Looking for people at a crossing is distracting, and furthermore the idea that if there is nobody visible the area is safe is counter-productive, when there's every chance that even when looking you won't spot someone.

In, rather brief, conclusion then, why does this situation exist? I can only assume it is because of the common sense fallacy in the first answer - that this delay is to slow down drivers, missing the delayed-instantaneous nature of the light's state change. Alternatively I've missed something obvious and I'd like to know why I'm the idiot here instead. Asnwers in the comments please!

You're Crap at Driving

Unemployment is up, levels of literacy and numeracy are down and yet the number of people on the roads has never been greater. Cars and motor vehicles in general seem like an aspect of the fabric of modern life, but stop to actually think of how complex they are in operation, how intricate they are in engineering and how dangerous they are careering through a housing estate at 40mph between parked cars round 4pm and you should get a bit more nervous about their prevalence. Since a young age my main means of transport around where I've lived has been my push bike, along with the mix of danger, animosity and health benefits that it entails.

The health benefits of cycling are fairly obvious, and if you've ever been out on a busy road you'll have probably seen the animosity too, as normally well mannered individuals turn into slavering rage-beasts impotent with jealousy that you can pass by the traffic jam which they paid £1000s in material, tax, insurance and fuel to be part of. I could easily spend an article just pointing out the idiocy of a large number of drivers on the road, wrapped up in the idea that they pay road tax when really there's no such thing, and their attitudes but there's little point, as they all know the stats that cyclists cause 1.2 million road deaths per year, whereas cars cause none.

Woah! So, I misattributed that stat - it's obviously actually motor vehicles that cause 1.2 million deaths per year, but that's a pretty staggering figure. Road traffic accidents are the one cause of death that make it into the World Health Organisation's top 10 worldwide causes of death, alongside various medical conditions. So whilst our doctors and scientists fight through the extraordinary array of diseases both infectious and degenerative, we've managed to create something which, should those other disease death rates start to fall, will keep on wiping us out anyway? I'm just going to come out and say; that's f**king stupid.

So, why do we have to have these motor vehicles? That's an easier question surely? The modern world depends on this availability of transport, of people commuting, travelling, visiting others. There's no doubt that motor vehicles have changed the way we do things, and enabled a lot of amazing things that would not previously have been possible. And yes, they have also benefitted our quality of life - we can shop, we can explore, we get to the hospital faster when we contract cause of death 1-9. But all that's kind of useless if we leave hospital and get mowed down by number 10.

Remember that intricate vehicle we talked about earlier? Remember the inumerate teenager who's driving it? Do you really trust someone who can't do basic math to operate a complex and highly dangerous piece of machinery? Then again, what about the mild mannered computer programmer who's busy swearing at a cyclist for being in their way when they wanted to turn left without indicating? Or the experienced driver of 40 years who just happened to drop his map and is fishing around for it on the floor? The reality is that no level of intelligence or experience really makes us safe in a motor vehicle. At best the regulations hold back the flood, but sooner or later something goes wrong.

There are maybe a few solutions to allow humans to become better drivers, but most seem unlikely. A parent with two children in the back will happily race through their own estate, risking the untimely death of a friend's child with little consideration for how they'd feel if they knew their kids were being put in similar peril by those same friends. A taxi driver who's very livelihood is dependant on their continuing permission to drive will speed, run lights and attempt to scare their passengers to make a few extra pounds. Today a bus on Oxford Road decided that trying to overtake me metres before a bus stop and then pull in as he was passing was a smart thing to do. He probably went home to his family and complained about me - would he have been so eager to complain had his actions placed me in a coma?

No, whilst there's reason maybe to allow driving by humans outside of towns and cities, within the tight streets, around playing children and pedestrians and in front of peoples' homes few humans can be trusted with a car. So it is with great relief that I (surely along with many A&E nurses) have followed the progress of Google's driverless car as it pioneers what will hopefully be the salvation from this dire situation which we've got ourselves into. Their new car uses a combination of video, radar and laser range finding to monitor the road in ways humans can only dream of. They've been testing the car in Nevada, US and have recently been granted a license within that state to have the car drive without a trained "takeover" driver present in case something goes wrong. Other car companies are seeking similar licenses (Google use a Toyota Prius) and hopefully the cars will slowly spread across the states; once enough states permit it the technology will surely begin to be rolled out on commercial vehicles - it may even be that existing modern cars can be refitted.

I have no idea how long this process will take, but the number of possibilities these cars open up will be huge - traffic jams eliminated as every car can set off at the same time at a set of lights, and maneouvre through narrow lanes with ease, even taking into account surface hazards like water or oil. I would hope that within a few years of these cars coming into service plans will be put in place, maybe over a decade or more, to gradually restrict human driven cars from entering built up areas. Eventually any inner city or even minor town area would be self-drive only, with humans able to take over outside if necassery for enforcement reasons. Whether motorways would be self-drive or human driven could change - motorways can actually be safer, but with self-drive cars speed limits could be hugely increased when the roads are well maintained.

Of course the arguments will come, people questioning whether they'd "trust" a machine, and doubltess accidents will still happen when an unforseen circumstance arises. Though is that really a detriment, balanced with the fact that never again will someone lose their life because a driver decided the road was an ideal place to put their make up on?

Find Failure Faster

Computers are powerful tools, and learning how to harness them is a useful and maybe even essential skill. Unfortunately whilst a computer should be pretty much infallible, even the best of developers can't guarantee that they've thought of every possibility, accounted for every way a user could make mistakes or just used the right variable or function names. When things go wrong we tend to call it a bug (a term dating back way before computers, although there is a story of an actual bug - a moth - being found in a Harvard computer in 1947) but this trivialises the issue.

Whilst we accept that bugs are a fact of life in development we should be looking for every possible way to eliminate them - and fortunately the last decade and the development of agile programming has significantly improved things. It's a misconception, of course, that software projects end up over time or budget because of bugs - even a junior developer can account for time spent fixing things. Similarly the idea that producing code with bugs is bad is ridiculous - if you're a good developer you should be running code often enough that it's constantly breaking and you're constantly fixing it. In fact one of the main methodologies of agile that I've only been exposed to in the last 8 months is Test Driven Development.

TDD is something which I wish I'd known about back when I learned how to code. There's nothing wrong with being self-taught, but somehow almost every tutorial I've read from back in 2005 learning simple principles right up to 2011 developing complex data systems managed not to mention this wonderful concept. TDD takes the idea in the last paragraph that you have to break something before you can make it work, and turns it into a hard and fast rule. In TDD you write tests for how your code behaves before you even write the code; this helps in writing the code but also means that once it is written you have a way of proving that it works.

Get a bug report? If your tests are passing then there's a situation you didn't anticipate, but it's OK because you can write a test and guarantee that will never go wrong again. If you know someone who's coding with any intention of actually making a product (as opposed to random hacking) then insist that they learn TDD before they go any further - I'm slowly building tests for old projects but it's going to take a while! That said, just having tests won't solve everything; twice already I've mentioned that bug reports come through which aren't because of bad code but because of unforseen actions or scenarios. How can we solve problems we don't even know about?

Because of the stigma attached to "buggy code" it can be quite easy as a developer to fall into the trap of hiding the bugs and error messages away. Whilst there are also security benefits to having a web server configured to hide errors, users presented with a blank screen or clicking a button that does nothing are more likely just to go somewhere else than provide you with useful debuging information. In the case of back-end (e.g. PHP) errors we can read those server logs afterwards and whilst we don't quite have the context often the error message is enough to help us, but the errors that always seem to get through for me are those with JavaScript.

With JS reacting to user actions in a browser it can be quite regular for the unexpected to happen - they'll press a key which has a certain action in their browser, or an event that you don't expect fires on an action you didn't predict. Unfortunately these errors often have the most subtle ways of getting past the user - an undeclared property on a class that's been accessed by an object that should have been hidden will throw a nice error in the console, but the user just sees a loading bar that goes on forever, blaming their internet connection or your server instead of helping you identify the problem. jQuery in particular has a high level of risk for errors - often if a variable doesn't exist the return type of a method changes, leaving the page broken but with no obvious reason in the code as to why.

Recently the majority of bug reports I was getting from a system were of this sort, and as there's a way to go before my tests for it will be finished I decided to take a bold step. Learning about JavaScript's window.onerror method (incidentally I've also stopped using function name() declarations in JS, switching everything to window methods to remind me what I'm actually writing) I wrote a function to pop up a box (a subtle fade in box in a corner) each time an error was detected, along with a link to email me the error. For the first day or so I had a huge rush of these errors, but despite knowing that the client's must have been confused, and despite the vague hit to my pride of seeing these problems I was impressed by how many I could fix in one day. A couple of days later and the system was still under regular use but the reports had already stopped - a true win for making failure obvious and reportable rather than hiding it away.

Whether you're in a team developing for a client or working for a company themselves you could do a lot worse than make your site fail with whistles and bells rather than sneaking out the back. It may cause an initial loss of confidence or confuse a few visitors, but in a short amount of time you'll have a system that works better and involves your users in testing, rather than waiting for them to get annoyed and leave as a loading bar taunts them for five minutes.

Social Arms Race

Social media. It's a phenomenon, the hottest product of the last couple of years, essential for any business and an insutry worth billions. With it, your company can get more engagement, more conversions, more uniques. Without it, you're not even worth bothering with - unless the person doing the bothering happens to be a so-called social media expert who wants you to pay them to spend the day on Facebook, something which would result in dismissal from any other job. Therein lies the first of our problems. Are all those over-hyper superlatives at the beginning of this paragraph just marketing of a more classical nature?

On the surface it does seem apparent that social media is part of a revolution in marketing; no longer does marketing just happen on billboards, or passive segments of television, or alongside our inbox. Now it's found its way into our social groups and our friends are even sending it to us with the promise of free kippers from the company who's products are being advertised. However the subsequent fact that things like this bring into existence new possible avenues to market seems a bit far fetched. Sure, we've seen this marketing have positive impacts on items that have used it, but not a significant departure from what we had before. Coke are still the biggest soft drink producer, McDonalds are still the largest cause of obesity and Carling/Fosters/Stella still all continue to make and sell s**t beer in enormous quantities. In fact that only brands that I can really think of that have surfaced over the past few years are Facebook, Twitter and LinkedIn - the social networks themselves.

Well, you may say, what about viral marketing, surely that works? To which I say consider it's name - viral. Not exactly a good word is it? Viruses spread maliciously and without concern for what's around them, which doesn't exactly make you feel amicable towards them. For every product that "goes viral" and gets a bucket load of users there are a few hundred that just mulch around in a petri dish and what people are quickly realising is that the ones who's use of "viral" marketing succeeds are ones which were good anyway. That is to say we can't prove they'd have succeeded without "viral" marketing but it's damn sure they'd still have done better than the one's that failed even with attempts at the "viral" effect. For the most part "viral" is just another annoyance, encouraging me to de-friend people who share every last freebie post in the hope of winning a year's worth of free kippers.

So finally on the marketing side we have that word engagement which roughly translated means "now you're aware that all your customers are bitching about you and have a life line to sort yourself out". I have only engaged with companies on social networks to complain about them; that isn't to say I do it a lot, but why the hell else would I (unless they're offering free kippers)? The fact that a company has a Twitter account means I can slag them off and someone sees pretty darn quickly - which is great from a consumer point of view, but it just rights a wrong that's gone on for far too long anyway. On that, unfortunately companies will eventually realise that just like letters appearing in Which? or on BBC Breakfast, it doesn't hurt their sales too much anyway and just stop bothering.

Worse are the companies that, generally on the advice of someone who's seen chance for a fast buck, decide their purpose in life is to post other websites' news stories in the vague hope of getting followers. The fact that people then actually follow these accounts does mystify me (if your Twitter account exists to post links to blog articles with only a summary of the headline I will unfollow it) but even if they do they will certainly not be "engaging" with you - they'll be off reading someone else's content.

The truth is that at best social media is an arms race; the companies that got their first got a short term benefit because they had an uncontested marketing space, but now that everyone's there it's the same old same old - tons of ads vying for your headspace and all you want to do is watch a video of your friends' baby toppling over. Just how we manage to watch thousands of hours of TV without rushing out every 5 minutes to purchase Bird's Eye's latest excuse to put a creepy polar bear on your screen we'll eventually resist sharing photos of a fat man doing a wheelie for the reward of free engine degreaser. Just like companies wanting better SEO are far better off just having a clean website with decent content, companies wanting to benefit from social media would be better off producing a product or service that people actually want to talk about, and shoving the free kippers up their a***.

Communes Aren't For Crazies

The word commune isn't used a huge amount in the UK; I first heard it in an episode of the brilliant US TV series, Veronica Mars where Kristen Bell's character is asked to "rescue" a rich boy who's run away to join a commune. She suspects a cult, designed to lure away impresionable kids to fund some form of dodgy venture, but discovers people who just want to leave peacfully in their own sustainable society, and ends up shamed at her attempts to find wrongdoings behind their "pleasant facade". When I left Aidan's college in Durham I found myself pining for the life I had there. It wasn't the lack of "real world pressures" or the cheap beer, or even the friends (thankfully we meet up a lot). It was the fact that the college environment was a genuine and close community, where even if you didn't know someone you probably knew their face, and the shared sense of belonging made personal connections far easier to form.

Of course in the real world things are different; I had a conversation with someone where this was pointed out to me - the college life was a bubble, insulated and separate from society. Because of this nature it could run at its own pace, albeit with a steady turnover of members, and not have to interact with entities outside itself. Whilst in some cases I'm sure this argument could be made I wasn't satisfied at that - in my opinion college did have big interactions with the outside world, both with other colleges, the unversity and the local community. Those weren't always beneficial but to think we were isolated would be to take a distant view of things. The other argument was that even with the yearly churn, new members were aware that their stay would, generally, be at least three years - that sort of future knowledge helps with commitment true, but I was most commited in the final 6 months, even when I knew I wouldn't be staying longer. So it didn't sit right with me that this life was past - the word commune had gained greater meaning for me.

The difficulty from there was how exactly does one go about recreating that kind of communal spirit? College had people packed in tight, and a structure of social events right through to ensure that people met and mingled and got involved. Looking around my street in Bury I realised I didn't know a single neighbour, and the reasons why it was difficult for this to exist in the real world were more obvious - people come and go these days, living in different areas or even cities, a wide variety of ages, races, religions, hobbies, kids etc. This was the reason why the communal spirit didn't exist - everyone had their own things to deal with, their own friends and didn't need it. Still, something wasn't quite right - this shouldn't be an impossible dream.

Fast forward over a year later and I think I'm on to something. Towards the end of last June I met, by chance, a group of people in a pub in Moss Side who, bit by bit, are helping fashion a discernible focussed community out of the melting pot of people and cultures in that area of Manchester. Through a variety of methods and with a variety of reasons (including sustainability, economical, political and environmental reasons as well as social) existing groups of people are finding out about each other and coming together to grow and expand their community. In the same way that people at college had this shared sense of belonging, the simple fact of living in an area has become for people a reason to socialise and get involved with projects affecting the area. Of course for some the involvement in the projects would have come anyway, with social aspects to follow, but for many I think it's that sense of belonging that spurs action. This should hardly be surprising, but today far too many people see things in local communities as I did in Bury - there's no point trying because it'll be hard/you'll move out/you already have friends. What I've seen is hopefully just the beginning - not only is this kind of community building good for people's social lives and local projects but I see it as a precursor to a much larger change in politics and business. I'll write about them soon, but for now let's hear it for the small society!

PHP Library Error when run from Shell

There's a well documented problem of searching for answers on the internet, which is that people find interesting workarounds to problems but don't comment on the forums or blog posts where the original answer came from. Places like StackOverflow address this problem somewhat, but I think good practice for every developer should be to make note online of problems encountered, along with how they solved it. Now that I have a blog it seems ideal that I follow my own advice.

I encountered the following error whilst running one of my website scripts from shell (which I was doing to test how it would run from Crontab).

error while loading shared libraries: libdb-4.3.so: cannot open shared object file: Error 23

My server in this case is hosted by 1&1 and runs CentOS 5.6. I found a thread on LinuxQuestions which had a few suggestions. It turned out that I didn't have the libdb files installed so running

$ yum install db4

Was all that was needed to solve the problem. You can run $ /usr/lib/libdb-4.3.so if you want to check if the files are already present. If they are, just replace install with reinstall in the yum command above.

What a Git

It was bound to happen eventually; I just had a major problem as a result of a simple git mistake. I was developing add-ons to an application in one branch, and continuing bug fixing and minor improvements to the master branch. Every now and then I would merge changes from the master into the development branch, copying over the bug fixes. However at some point I must have been in the wrong branch when I merged (or I don't quite understand merging) because suddenly these new features (incomplete ones) appeared in the production version, and had removed an existing feautre. What makes it worse is that one of the bug fixes had gone live, taking with it the incomplete new functions, removing the working function and causing complaints from the client.

On realising the mistake I found that somehow my regular merges had made my repo a tangled web, and none of the commits would let me revert. After panicking, checking out, and trying to remerge about 5 different branches I eventually discovered the option to cherry-pick commits, reverted to the last master commit before the branch had been made and then went through each commit carefully to make sure I cherry-picked the right ones. So now I have a totally screwed master branch, a development branch that's going to need some checking over and a "save-my-ass" branch that seems to be the bug-fixed version of the master without any new additions.

So a) be really careful with git merging on development; some times it seemed the merge just pulled in changes, but at least once it actually combined the two branches. B) if you know git, what actions should I take now to turn the "save-my-ass" branch into my master branch, with the same history of the working commits, and ditch the corrupted master branch to avoid accidentally using it at some point?

The Third Way

If a job's worth doing, it's worth doing well.

A subject common to peoples' conversations, newspapers and mad rantings at present is that of unemployment. In particular youth unemployment, and student unemployment. We're sending record numbers of people to higher education institutes yet it seems that far too many students come out with a piece of paper, a hangover and no prospects. At the same time there's constant wrangling over benefits, what people who are unemployed should be given, who's scamming the system, unpaid work experience and on and on and on. Add to that the frothing masses shouting about how foreigners are coming over here and taking "our" jobs and you have quite a melting pot.

For that reason it would be facetious of me to suggest I suddenly have an answer, but there are a few points that seem to get missed in many discussions and it would be nice if they were brought up more often. We were having exactly one of the conversations described above in the pub the other night (where else) and decided that the two most often traded quips about the jobs/unemployment situation were:

  • People won't do jobs that seem beneath them; everyone is too picky, demanding that they get their dream job without necessarily having experience or anything else one usually associates with employability.
  • Employers are increasingly skeptical about who they hire; degrees or other qualifications are no longer worthwhile, they need to see experience, extra-curicular involvement, a willingness to work over time without increased pay and more.

Combine these two factors and you'll see a big rift between those who want to work and those who want to employ.

The solutions to these problems are also fairly simple to see; in the first case people looking for jobs need to accept that they can't get their ideal career straight away, they need to take a lower paid or less interesting job and work their way up. For employers, they need to accept that they may have to take on staff who want more free time, or who have to learn on the job.

In the same way that these solutions are obvious they are also less than ideal. Whilst according to employers you're not beneath a certain job, that doesn't make it easier to do a job you hate day in day out; there seems an inherent unfairness, especially if you've worked for qualifications, in having to accept a lower standard of working life. At the same time many companies just can't afford the risk of hiring someone who hasn't already proven themselves; even if you acknowledge the hit on time that comes from on-the-job training you could end up with someone who really can't do the job, and a difficult case on your hands if you want to let them go.

So if these problems exist and their obvious solutions don't really make things any better what else can we do? The first way is one of unemployment, stunted growth and growing distrust; the second way is one of lowering standards, taking risks and relying on precarious mutual disadvantage.

For the third way we have to turn back to that old saying up there. Old sayings can be clichés, but the reason they've survived is that they still hold true. This is as valid for a job you're employing someone to do as a job you're doing yourself. Therefore any job that requires an employee is worth doing well; it follows then that there should be no bad jobs. No jobs that require people to lower their standards, or that require an employer to take on someone who could be a liability. If employers want a job done right then they need to make the value of that job inherent to it, such that it's clear to those taking it on; and if the job is worth doing then this shouldn't be a problem. Similarly when a worker gets a job their first task, before arranging their transport or buying a new shirt, should be to comit themselves to the value that has been placed on that job.

One of the examples that brought this idea to the fore (and let's face it, making jobs not be crap is hardly original) was hearing people in a call centre talk about their work. They were cold calling on behalf of a company to carry out surveys about media consumption - TV channels watched, papers read etc. But the way they had to do it was to call someone, ask if they'd take part and then basically read out a long list of options waiting for a yes or no answer. That isn't valuable human work, that's a machine's job. At the same time when we call one of these centres ourselves we have to spend 5 minutes slowly navigating a painful menu system or mash star to try and speak to someone - that's a job that could be done far quicker with a human on the line. For that human answering & redirecting calls would surely be far more enjoyable, and seem to have greater importance, than reciting a list of 10 obscure local papers for 8 hours.

If neither an employer nor their employee can see the value in a job then should that job even exist? This solution still leans on the employer more than the employee, but as the employer should have more to gain from placing the job this seems fair. Work is necessary for the modern world to continue functioning, but that necessity needs to be communicated to both sides of the employment market; without this, we'll be left with unemployment, risk and dissatisfaction; with it we'll grow an economy of happy motivated workers, whatever the work happens to be.

Date Specific Database Testing

I posted earlier on Twitter:

Testing a DB which has records by today's date. Is there a more elegant way to test than by removing the "WHERE date=" on dev branch?

To elaborate on this a bit more I'm working on an application which allows a user to specify that a resource is available on a set date. Therefore we have an availability table as follows:

  • available_date
  • resource_id
  • claimed?

Each time a search is done, e.g. a search for 18/04/2012 the site will list all available resources:

SELECT resource_id FROM available WHERE available_date='2012-04-18' and claimed=0

During development I have a few example resources, however each new day I test the search there are no available records for that day. So I'd either have to log in as the owner of each resource and set them as available, log in as an admin and make all available and do something a bit more tricky on the back end.

For example

SELECT resource_id FROM available WHERE ".($dev?"":"available_date='2012-04-18'")." and claimed=0 GROUP BY resource_id

However this adds processing to the live version, not much at all, but it still feels like adding bloat. I've now come up with an alternative, which is a stored procedure in SQL:

CREATE TEMPORARY TABLE available_temp ENGINE=MEMORY SELECT * FROM available GROUP BY resource_id;

UPDATE available_temp SET available_id='',available_date=CURDATE();

INSERT INTO available SELECT * FROM available_temp;

DROP TABLE available_temp;

This will effectively duplicate one record per resource each time it is run. If it runs twice in a day it will produce two sets of available records for that day, which could be confusing if the "claimed" value differs, but that can be avoided by logging it in my build script.

Can you think of a more elegant way to do this?

Come Join the Emotional Bandwagon

A few weeks ago the footballer Fabrice Muamba collapsed due to a cardiac arrest during a Bolton Wanderers football match. This event was naturally big news, but the wave of apparent support, solidarity and well wishes that followed was unprecedented. Now, firstly there's an entirely separate article yet to write about a society which considers itself secular spreading the power of prayer via Twitter. That's going to be a rather more positive article, because this one isn't.

The weekend just past, Liverpool FC fans have been remembering Hilsborough, though there's been a bit of controversy there too. The Hilsborough disaster was obviously even more alarming than Muamba's heart attack, with 96 fans dieing in a severe crowd control incident. Like any such disaster it has been rightly remembered ever since. But there is a difference between respectful rememberance and a desire for selfish inclusion.

Observing a minute's silence is respectful. Wishing death upon someone who disagrees with a team refusing to play a football match is despicable. Being aware of, and even including in prayer, a footballer in hospital is respectful. Flooding social networks with ever more overblown superlatives about just how anxious and distraught you are seems a little insincere. I have no problem with people being upset or supportive; however the feelings and support of those who genuinely have them are belittled by clamouring masses eager to be seen as part of something.

What I'm making there is obviously a sweeping statement. Just look at the facts though; when millions of people take to social networks with the latest hashtag of mourning, how many of them flick over to YouTube straight after to watch "world's most deadly car crashes", or how many swipe to the next app on their phone and draw a picture of a camel for their friend to guess. The minute's silence favoured by many large scale rememberance events gives you a full minute to reflect on things, but, November 11th aside, how many people spend the minute wondering whether the guy next to them bought his shoes from Primark?

Of course the second level of this problem is perfectly framed by what happened to Alan Davies. After a remark which, to all intents and purposes seemed reasonable (other football clubs play on the anniversay of tragedies, why shouldn't Liverpool) he was subjected to huge levels of hatred, abuse and public defamation. In other words these massed groups of tearful mourners are quite happy to sully the memories of those who actually died by slinging insults in their name. The idea that the more aggressively you defend something the more you care is usually used to defend a savage dog, not a YouTube commenter. The reality is that these people don't care; they want to feel a part of something and just like the mental images it raises, the mob mentality can sometimes be a bit vicious.

This emotional bandwagon isn't just restricted to pale reflections of sad events though. A month ago a charity called Invisible Children released their astonishingly succesful video as part of their campaign to sell t-shirts bring someone to justice and the internet went mad for it. This tugged on those heart strings and with minimal effort you could give to the chairty or put a scary man's face in your window in case he happens to be selling door-to-door or something. It's cynical to suggest that the people behind this campaign were in it for their own ends, so I'll leave that part out. What it did indicate again was that people are all too happy to jump the emotional bandwagon, tweet, shout and then go stalk their ex on Facebook. With the speed it was shared you'd think the whole internet was well informed and out for justice, but do just a little research and you'd have found what soon became the cornerstone of the official backlash - that the man everyone was after probably wasn't even in the country they said he was in, that the current government are also corrupt and that sending them weapons was, astonishingly, a really bad idea. A friend of mine termed this slacktivism and I like that and will continue to use it and pretend I came up with it.

I could ruffle through millions of tweets, shared items on Facebook, old emails about bonsai kittens etc. to show the twinned worlds of emotional bandwagons and those all too ready to prey on the gullible with scams and hoaxes. Even without the extra risk of getting scammed, even without the second level violent mob mentality I feel it's a bad thing for people to be joining in with these emotional outpourings. As mentioned it belittles the feelings of those who actually care, but even more it puts you in a boy who cried wolf situation in your own life; we all have our own things to care and get upset about, and trying to push them aside in favour of the latest group tragedy is, well; tragic.

World Web Worth

I had a phone call today with an interesting question:

How many visitors do you think the Starbucks website gets per day?

Whilst I'd agree that someone who knew me might be well served in calling me to ask a question about the web, I haven't had this one before. The number of visitors a website gets is usually shrouded in mystery, a value often unavailable in its truest sense even to the owners of the site. Nevertheless, hits, visitors and users are often used as quick metrics to measure the success of a website.

This is an obvious scenario. The core feature of every website is that people, actual real people with brains, opinions and, crucially, wallets, visit them. So, assuming you're able to sort the bots and random traffic from real people, you can look at these numbers then grin as they increase, gaze with vague consternation as they stay level and rant about SEO & diversification when they drop. Hits and views are important - without them you're just a server being cached by bots - but what do these numbers actually tell you?

Except in the rare cases that your entire site revenue model is directly priced pay-per-view adverts these metrics don't really tell you much. It's perfectly possible for a site with 10 visitors per day to be making £1000s per week if 1 in 10 buys some plant machinery from you; in the same way 2000 visitors might be losing you the same amount if each is downloading a 30 second HD video. Any website can throw money at Google or other PPC ads and score record traffic. Whether that traffic actually makes you any money is another matter. Even the much coveted email address sign up field is useless unless your only intention is to sell it to spam networks; in which case the unending blight on your soul is probably a bigger worry than website traffic.

The simple answer to "how many hits does your website get?" should either be "enough" or "not enough". If it's the former, keep iterating to keep them up, if it's the latter then your site needs to make more use of it's current visitors, or be a place that more people want to visit. If your boss just wants to know "how many hits are we getting?" what they're really saying is "what the hell is this web thing anyway?"

Users != $$

With the recent purchase of Instagram by Facebook still resounding across multiple social networks the question of how much a user is worth has once again been brought to the forefront. The general assumption is that a user is someone a bit more involved or invested than another faceless hit. As well as giving you precious personal details users might be providing you with content, sharing your content or even paying for your services. Therefore the far more common metric in real web businesses is users, not hits.

But really, users offer that same undefinable value that hits do. For a start, users are always a more consistent drain on your resources. They're using your site and sapping at your bandwidth and nobody gets that for free. The real and harsh reality is that the majority of your users are probably costing you money, and the minority are making it. Sites that don't realise this churn funding until they finally work out a method, or they go bust.

I'm a big user of Facebook. I've been on it since October 2006, I've got a ton of photos and videos there, 600+ friends and over 2000 tagged photos. Aside from not using apps or playing games on there I'm fairly high up in terms of use. However despite this I can recall only a single time, in nearly 6 years, that I've clicked an advert. Now no matter how you swing it, I've costed Facebook money. Whatever arbitrary value the site's valuation places on my existence within (apparently $118) there's no way they're going to see that from me.

Of course I'm not saying here that Facebook don't make money. Their profit this year was $1bn on the dot, which is damned impressive and like every other kid who wrote a website for his friends, I wish I'd done it. But even Facebook, this super enigma of the social web, has been making losses for more than half its existence. They got $240 million from Microsoft for 1.6%; with a $1bn profit Microsoft would have just made $16 million were it not for the upcoming valuation. Hardly a return on the investment just yet.

My worry with the current trend of huge valuations, massive acquisitions and overnight success stories is that we're heading into dangerous territories (again). The internet is really cool and amazing and has rockets and lasers and stuff, but the value we associate with it is starting to become wildly abstracted from the world which it enhances and sustains. Those rockets don't maintain themselves you know.

Code, Wizardry and Roxanne

Any sufficiently advanced technology is indistinguishable from magic.

- Arthur C. Clarke (1961)

When Clarke, the famous science fiction author, wrote Profiles of The Future he made a lasting observation, though interestingly one that necessitates a society to have developed a concept of false magic before progressing to develop suitably advanced technologies. Nevertheless he's completely correct; turn up in the Roman forum with an iPhone and people would barely believe it possible - maybe to the extent that they would outright refuse, destroy the item and feed you to the lions. We deal with each new technology as it makes a sensible progression from the last.

Whilst we remain amazed at each new thing that scientists and engineers come up with, this gradual feel means we rarely get this magic moment. Sure the internet is amazing, but we've watched it grow over decades, and for the majority of them it was a bit crap and disappointing to the average person. However one area where I think we still see magic on a regular basis is in the world of programming.

This entire article was sparked by the reaction of a man called Ian, who works in our office. He's used to computers and is involved in search marketing, but when he came over a few weeks ago and looked at what I was working on he declared "what wizardry is this!" as he viewed my code. No doubt it can seem like wizardry to many; whilst the motorcar is a hugely impressive invention we can take it apart, see bits moving and roughly work out where things go. Even a circuit board makes some sort of visual sense - you'll see wires, batteries, pins, things you associate with electronics.

In code, however, we turn words, characters, tortured examples of the human (usually English) language into working things. Things which can save lives, replace jobs or let you send a small drawing to a friend. Obviously a lot goes in to making this magic happen; we have our circuit boards, our gears and wheels and they've been developed over many decades as well. However the immediacy of coding is where the beauty lies. With a computer already present, the correct compilers or interpreters installed, we can write a few sentences and tell someone how many leap years they've lived through, or discover the number of people with pallindromic surnames living in East London. Coding lets us drill down from the top level, our ideas and understanding of simple logical steps, to a complex electronic system capable of extraordinary things.

It really is magic, more than many other technologies, and the most important part is that anyone can do it. This isn't the Magic Circle, or some arcane sect of shadowy figures hiding behind society. The magic of yesteryear was confined to select practitioners, but in the western world today nearly everyone has access to this. Sadly most of them aren't aware.

So what?

There's been a lot of talk lately about teaching programming to kids. A fellow PHP developer (and someone I'm proud to say I had lunch with once) Andy Young made a brilliant case for this in the Kernel Magazine earlier this year. So fortunately I don't need to. But I will develop my thoughts round to that angle.

If coding is like magic and kids love Harry Potter, isn't it pretty much a no brainer that we should introduce the two to each other? Put more simply, having an understanding of programming should be as fundamental as basic science, and only marginally less so than basic literacy and numeracy. Being able to program isn't only the realm of computer geeks, in the same way that drawing a picture of a dog isn't only the realm of artists in the Tate.

The ability to program not only provides a decent future career path, but provides essential skills for further learning, skills that are really hard to teach in any other sort of quantitative way. Skills like system analysis, logical progression, thinking efficiency - things that probably don't appear in a Primary Teaching PGCE, but the kids that somehow acquire those skills anyway are bound to be the top achievers when they move on to high school. When the teacher comes to explain algebra to kids he should be saying "so, these are like the variables in your code", as opposed to a Computing teacher explaining variables as "like algebra but you're storing stuff instead of solving equations".

Furthermore, if you are going to introduce kids to program, for goodness sake don't give them a reason to dislike it. Whilst coding has that magic aspect the flip side of this is when things go wrong. Compiler errors, dependency issues, libraries crashing. Abandon C and Java and get them writing Python or Ruby (or even CoffeeScript), with a relaxed syntax and convenience built in. Let them enjoy how easily they can do things with these languages, and those that really get into programming can move on to the hard stuff in due course.

If possible don't take too long to add in Test Driven Development and Version Control either. The former, especially, isn't a barrier if introduced early enough, and even gets that instant gold star effect that so helps in encouraging learning. Version Control should be part of any computer workflow, coding or not, but might be best left until the first time they've overwritten an important file - lessons learned and all that.

Not Just Kids

Remember when I mentioned Harry Potter? Well, who loved Harry Potter just as much as kids? That's right, adults. Aduts currently have a higher level of technophobia (a word I really hate actually, people throw it around when I'd hazard it's almost a more serious impedment than many of the other common phobias these days) than kids, but to that I say get them programming; just like with kids, that experience of magic, of creating something could do more wonders for an adult nervous about technology than any series of courses on how to use Microsoft Office down at the local library.

Once again setup is the hurdle to get past; if we want to progress with adult education in code we need ways to get the right tools onto their computers as painlessly as possible. Some websites are sidestepping this entirely, offering interpreted code right inside the browser. An excellent method, and currently the simplest we have. However people should never be able to miss the point that this is real, not just another game on a website.

You There!

So if you are an adult reading this and aren't a programmer, what are you waiting for? Don't you want to experience some wizardry? That moment when a few keystrokes can tell you just exactly how many times the phrase "red light" is used in Roxanne? Because if lexographical analysis of New Wave hits from the 70s isn't magic enough for you, I don't know what is.

Phing Conditional Builds

Back in June at the monthly meeting of PHP North West, Jeremy of Magma Digital spoke about Phing, a build tool for PHP projects, based on Apache Ant and written in PHP. It took me 6 months before I actually committed the time to change all my projects to use Phing for deployment, but it has been a game changing experience. It has allowed me to streamline processes, avoid forgetting to upload updated libraries or new versions of my framework when deploying projects and add in steps such as PHP Lint and JS Minifying to my deployment process.

In the past month I've also finally begun using SASS, a way to build style sheets with variables functions and all sorts of other useful time saving tools, making stylesheets easier to write and maintain, whilst compiling it into compressed CSS that renders in any browser. Add to this the simply Ruby program JS-Preprocessor to compile multiple JavaScript dependencies into a single file and you've got a great tool set for being able to structure your build environment any way you like, whilst having your output in the most efficient form possible, and all automated by Phing.

What I'd like now is to be able to have Phing not only run these pre-processors on my other output, but be able to do the same with my actual PHP code. The theory is fairly simple; at present, like many developers, I construct or use applications to fit specfic purposes. Because these are often used across multiple clients, each may need to have slightly different interface options, data processing etc. There are 3 conventional ways of doing this directly inside PHP. All require including additional files for each client using the application:

  • The PHP function function_exists() can be used in a page of the application as so:

    if ( function_exists( 'do_more_stuff_here ') ) do_more_stuff_here( $parameters);

  • Or the same method but with a fallback:

    // app.php

    do_something_here( $parameters );

    // client_funcs.php

    function do_something_here () { }

    // default_funcs.php

    if ( ! function_exists( 'do_something_here' ) ) function do_something_here() { }

  • If we're doing stuff inside an object we can obviously extend the object:

    // app.php

    $myObject->doStuff();

    // default_class.php

    class regularObject { function doStuff() {

    if (method_exists( $this ,'doMoreStuff' )) $this->doMoreStuff();

    else { }

    }

    // client_class.php

    class clientObject extends regularObject { function doMoreStuff(); }

    Or various other methods

However all of those require some level of overhead in the program, whether its checking for functions or even just requiring files - especially if require_once has to be used. The main reason for the existence of these methods in PHP is for dynamically themeable sites, things like Wordpress where a user can change the entire site theme, plugins and widgets directly from their browser. However in complex applications, the user generally has less control over these base functions and themes, in preference to a more solid interface experience. Plugins and the like are sandboxed into specific areas, whilst the normal pages that make up the interface can be streamlined and as quick as possible.

So what I'd like is to do away with the dynamic features and simply write my PHP like this

$var = standard_function();

// if ($CLIENT== business1)

$var = more_advanced_function( $var );

// else if ($CLIENT == business2)

$var = different_function ( $var );

// END

$var = another_function($var);

Then upon running my Phing build, the lines not relevant to whichever CLIENT is set would be removed as the project is deployed (to staging, live or wherever). This way when constructing the application it becomes very easy to see what happens to different clients' interface/data as the script runs, as well as very easily port certain features between clients or (as has often been the case) make a client specific feature a common part of the system. It would also remove the need to constantly rewrite functions as I add new variables or change the previous flow of code.

This seems somewhat of a weird move in a programming language, but with the sudden freedom that SASS and JSPP have added to mix and customise different builds of my front-end code it would be at least a great experiment to see how portable this method was to back-end code.

Disruption in a Ceilidh

On Saturday evening I attended a ceilidh as part of Chorlton's Big Green Festival. Aside from being great fun (I went to plenty of ceilidhs during my university years and was missing them) it allowed an interesting level of systems observation.

For the uninitiated a ceilidh is a traditional dance, most often associated with Scotland but generally any folk dancing could be refferred as such. Each dance fits a specific rhythm though not a specific tune, and consists of series' of moves performed with partners or in groups. Different moves can alternate group size, and some dances will at points involved the entire room. It's an obvious point to make that the more people involved in a dance the greater chance of the system being disrupted.

During one of the dances involving everyone, couples were numbered 1 and 2 all round the circle. At the beginning of the dance the even numbered couples stood back (men facing out, women facing in) and the odd numbered couples, hand in hand, gallopped between the two lines, round in a circle. They did this for half a measure, and then gallopped back to their original place. At this point they stood aside, and the even couples performed the same action, returning to the opposite side of the couple they started next to (i.e. moving around one place). At this point an odd and even numbered couple would join into a 4 and dance around with each other before moving back into the circle and the dance starting again.

It is apparent that the exact distance any one couple moves inside the circle at this point isn't fixed, but will be constrained by the couple ahead of them, and their own agility/speed of movement. One couple in particular wasn't great in either of these areas; they caused a roadblock to all the couples following them each time. After a few goes round this led to them arriving back on the wrong side of the couple they were meant to be dancing with, therefore dancing with the couple to the other side, leaving two couples either side of this group with nobody to dance with. Each of these couples was aware of the problem - they could both see that this other couple had made a mistake.

What followed is the interesting bit. The dance then proceeded, with the problem couple managing not to mess up again. However the disruption they had left continued moving around the circle, each time resulting in couples having nobody to dance with. In the initial instance the couples affected were aware of where the problem came from, but as the dance progressed the actual problem got further and further from its source, each time reducing the likelihood that it would be corrected, as nobody was quite sure why it was happening.

A simple loop of processes gradually became unresolvable as people accepted the problem as inherent to the system, despite the fact that it was actually as simple to solve at any future point as when it first occurred.

Additional

Talking on Twitter about this I brought up the point that I was on the left side of the problem couple when the error occurred. This meant that my dance partner and I were the first and second to experience the issue, happening as it did either side of the problem origin.

On the second run through I'd realised the problem and attempted to fix it by repeating the mistake, turning to the wrong couple to form into a 4 and gesturing at the people we should have been dancing with to move back to the problem couple, which would have solved the problem. However in the fast movement and noise of the dance I could only try gesturing to these two separate groups to inform them of what I was doing, and when they didn't catch on I returned to the people we should have been with, in case I actually exacerbated the problem.

This could illustrate how difficulty of communication can prevent a simple fix being implemented by the people who first experience a problem. I only had one chance as the disruption moved away in the next phase of the dance, so as my attempt failed I was then powerless to affect it any further, without risking propagating further disruptions through the system.

The Day I Saw a Dead Body

This is not a pleasant post to write and it will, I suspect, not be particularly pleasant to read. I began this new blog less than a week ago to write about happenings in my life, and by sad chance the first major happening was one of tragedy. Nevertheless I will write about it; things like this cannot just be swept under a carpet of superficial happiness. In respect for the deceased and those who knew her I will be omitting certain descriptions from my post.

This incident will certainly make me think about the way I operate a motor vehicle, and I would defy anyone to hear me describe what happened in true detail and not consider if their own conduct couldn't be improved. Please only read on if you are assured that hearing about this will not unduly upset you.

On the morning of Thursday 29th March I was taking my usual cycle route to work in the centre of Manchester. The route leaves Victoria Park opposite Daisy Bank road, turning onto Upper Brook Street and shortly to the cross roads with Hathersage Road. Thanks to Google Latitude I have almost exact timings for when I was at specific points. At 9:58am I crossed the lights before the long stretch along the side of Manchester Royal Infirmary; as I crossed the lights I noticed a pair of gloves just on the line, and straight after noticed a black handbag lying almost in the centre of the cross roads. My first thought was to pick it up, but as I slowed down the lights began to change and I cycled on.

Immediately after the lights two busses were stopped. As I pulled out to overtake the rear bus, a StageCoach bus began to indicate to move off. I sped up slightly, and only as I passed the driver did I look up to see that all the cars ahead of me were swerving out to avoid... something in the road. From this distance it was not immediately clear what it was, but the first idea my mind went to turned out to be true. In typical fashion as soon as I first thought of what it could be a hundred alternatives replaced it; in some form of immediate self denial I ignored the other items of evidence lying on the road and followed the line of cars, pulling out past the object.

As I passed I was forced to recognise the awful truth. She was wearing a wrist watch.

Still in some form of denial I busied myself wondering what the large crowd of people were looking at, then with annoyance at that bus that had started to pull out, and then with the state of the road. I was about 100 metres away when I had to pull in. The enormity began to hit me. Over and over in my head I tried to reason what I could have seen. To describe the alternatives would be to give too much detail, but the crowd of onlookers didn't bode well. I began scrabling for something to cling to, some form of personal contact.

Up the road were some builders drinking tea. Tea. Very normal. People wouldn't be drinking tea if something like what I thought I'd seen was actually present. Well, they would if they had no idea, if as seemed apparent from the investigation that was to come it had happened so quickly that nobody was actually certain what had transpired. Still at a loss I turned and saw another cyclist pass the scene. He seemed to cycle normally, maybe it was imagined after all. I pulled out shortly before he passed and tried to match my speed. He slowed behind me and we came to the next set of lights where we stopped. I turned to find him looking around somewhat in confusion. Heart sinking I just asked "was that?" before his slow nod told me that we weren't sharing some joint hallucination, this was real.

The rest of the journey into town is a bit blurred. I'm not sure I usually cycle that fast but it seemed incredibly important that I talk to someone. Anyone. I stopped under Mancunian Way and considered posting on Twitter. But what do you post? Especially when you're still not sure what you saw. Who's going to come and chat to you over that? So I continued to the office, barely sitting in my seat before announcing to Jake and Owen (who's desk I work at) "there's a dead body in the road on Upper Brook Street".

I don't know what people are supposed to do in reaction to that, but credit to both of them for being rational and understanding. Also apologies to them for interrupting their morning with such news. At that point I did go on Twitter, saying the only thing I could think

Shortly after this the internet began to explode with news. I tweeted at the @gmpolice account and got a reply fairly quickly stating that officers had attended. Soon afterwards I got a call from someone at the Manchester Evening News. It was difficult to relate what had happened but I felt that if anyone else had half seen the incident they'd be looking for information, so anything the press could tell them was better than nothing. By the time I got back to my desk there was already an article online, quoting my tweet.

The rest of the day wasn't particularly great for work. Whilst trying to get on with things I was hooked on Twitter, hoping for some news. During the day a man was arrested, then released and images of the deceased prior to the accident were released. Various rumours came out about what had happened, from the horrific (the body was dropped from a van) to the eventual truth, a road traffic accident. On my way home I visited officers at the crime scene to make sure they had the information about the hand bag; I expected that they would but found on the news later that they were still looking for it.

On the evening I attended both a Bible study in Levenshulme and our regular Thursday pub meet up in Moss Side. At both gatherings my friends were very understanding, and tolerant to my need to talk about what had happened. I went to sleep Thursday afraid that the day's events would not do me well overnight, but I got a good sleep in, and was able to resume a more normal pattern on the Friday, though still keeping a watch on incoming news.

It is now a few days since the incident (I've played with the post time). Tomorrow I will go and place some flowers with the few that have already appeared at the scene. I'm not sure I'll ever forget what I saw, but I'm not sure it would be good to. Death is something we must all face, and we will do so multiple times in our lives. God willing it will be in far less tragic circumstances than the poor woman on Upper Brook Street.

Oh look, a blog, how original!

It may seem like I'm arriving 8 years late kicking off a blog in spring 2012. However this is more like a long awaited resurrection of my blog run from 2005 to late 2008, which tracked my progress not only through my later education but also of my programming, as it was consistently developed, redeveloped and reskinned as I learned more about the exciting world of making websites.

So here we are back again. I agonised over using Wordpress, or maybe even being a bit more modern and starting a Tumblr or Posterous account. With already being very active on Twitter, and to a lesser extent Facebook, I decided that I'd throw caution and basic sense to the wind, electing to use my own platform and retain some control over my data. So far it's proving good, having set this up over an episode of Green Wing and a cup of tea with my grandparents.

As with any stereotypical blogger I'm intending to post numerous articles with my opinions on life, the universe and other clichés. I'm also intending to go and try importing some of my old blog posts as some are probably still interesting, and of course get this cross posting onto a few million various social networks. I will not follow the basic template of not writing and apologising for it - you don't care and I don't either. I'll get Disqus set up to sort out my comments too.

Here we go again!