All posts by Marcus

EU Ins and Outs

Sod it. Vote whichever way you want tomorrow, but make sure it’s a decision based on facts rather than which endorsement you prefer. Public services are stretched because George Osborne keeps cutting the funding, not because of immigration. I know there’s a long list of factory closures doing the rounds, each with “…with EU grant” tacked on the end, but James Dyson closed his factory and moved it to Malaysia without one. Votes for prisoners was decided by the European Court of Human Rights, a completely separate organization to the EU. Incidentally it was the European Convention on Human Rights (again separate) that led to the reopening of the Hillsborough Inquiry.

Yes, we do pay the EU for membership and get some of it back with conditions. However those conditions tend to be “you must spend this money on improving the environment” or “you must spend this money on reducing poverty”, or “this money is made available to charities to improve social conditions”. Stops George Osborne spending it on things like cutting higher rate taxes, or Boris on a vanity island and bridge. Two major funds are the European Social Fund and the European Regional Development Fund. I’m not convinced these would be replaced if we left.

It’s also true that the EU comes up with a lot of laws. However most of these enforce standards that are required for a functioning trade area, like making sure furniture doesn’t produce hydrogen cyanide gas when it catches fire. Quite a few of these standards are written by our own British Standards Institute. Even if we did leave, exporting products to the EU would still require them to meet these standards. Other trade blocs work the same way. Products exported to NAFTA countries must also meet specified standards. They aren’t too keen on toxic armchairs either.

One thing I’ve seen a lot of is a dislike of other countries interfering in our affairs. “Vote leave, take control,” as some say. It works both ways and we can interfere in theirs as well. That’s just what John Major did when he vetoed everything to protest against the export ban on British beef during the BSE crisis. Even if we left, any post-EU agreements would still need a certain amount of give and take. That’s how trading works. Being outside the bloc means we’d have less influence; we certainly wouldn’t be able to veto anything in the same way. Don’t worry about Turkey. There’s a list of rules they must follow before they can join. Even if they meet them, every country has a veto, including the UK. I can’t see Greece or Cyprus being too impressed.

The EU is also blamed for rising immigration, even for countries outside the EU. Migration from the Indian subcontinent in the 1960s? We weren’t a member back then, and that was Commonwealth immigration rules. “Bogus” asylum seekers not stopping in the first safe country? That’s because they pay a large fee to people traffickers who don’t tell them where they’re going and hide them in the back of a van. EU nationals taking “our” jobs? Nope. Employers choose to employ them, and the number of British nationals in work has also increased over the last few years. The strict rules on welfare mean that the immigrant who both takes a job and claims benefits is even less likely than it was. Reciprocal agreements on healthcare mean that NHS care is only available with an EHIC card, otherwise you have to pay for it. Even if you’re an EU national. You can get emergency care, but apart from that you’ll have to pony up the cash.

As for “we want our country back,” this is my country as well. Times change. Things move on. Even without being a member of the EU this country is very different to how it was in the past. Changes in society during the 50s and 60s were not caused by being a member of the (then) EEC. The oil shocks of the 70s were caused by Saudi Arabia. The Cold War ended at least partially due to the actions of Gorbachev in the 80s. The collapse of Yugoslavia in the 90s was one of the last Western(ish) European land wars. The War on Terror which began in 2001 had bigger consequences than being a member of the EU. The 2008 Credit Crunch started in the US. Leaving the EU will not reverse decades of social change.

Economies like stability and staying in is likely to be less unstable than leaving, given that no country has yet left the EU and no one knows what might happen. A stable economy is important because it helps long term planning. Most of us have some sort of long term financial commitment, such as a pension fund or a house or a student loan. It might be “our” instability but it’s also “our” pensions or house prices that would suffer in the meantime.

It’s probably obviously that I think we’re better off remaining, but if you do want to vote to leave, make sure your reasons for doing so are good ones. If you’re not sure, we can stay put for now and then review it if things don’t work out.

Death in Birstall

I was going to post something about the pros and cons about the EU, examining the issues and explaining why we’re better off staying. However, after the murder of Jo Cox MP, I want to address the festering undercurrent of xenophobia and right wing nationalism that has had tragic consequences. Whether or not the attacker shouted “Britain First” or has mental health issues is beside the point. Let’s wait until it comes to trial and we find out the full facts before jumping to conclusions in this case.

However, I know the EDL and Britain First have been having demonstrations around Birstall, Batley and Dewsbury for some time but they have largely been either pitied or ignored. I think we’ve got to a stage where their odious beliefs need to be challenged and the mainstream politicians who encouraged them need to think more carefully about what they’re doing. If you play with fire, don’t be surprised if it gets out of control.

Two wrongs do not make a right. One murder does not make another acceptable. Extremist views from one minority group do not need to be matched with extremist views from another. This is not about “them and us”. Regardless of race, religion or other background everyone has the same needs, to be fed, housed, to love and to be loved by others.

Yes, there are valid concerns about things like immigration, the globalization of labour, unfamiliar cultures, and the loss of national status as other countries become more successful. However these will not be addressed by turning the EU into a proxy for these fears, or by persecuting innocent people. Immigrants don’t “take” jobs: employers choose to employ them. Illegal immigration is already illegal. Making it more illegal is a nonsense. Intercepting illegal immigrants at the border shows that we do have border control. Just because millions can work in the UK, through EU or Commonwealth membership for example, doesn’t mean that they will.

The UK has always been a melting pot of different cultures: even the name United Kingdom reflects this. My own ancestry includes German, Irish, Scottish, Roman Catholic and Protestant. A consequence of wanting to be a world player is that people will want to come from all over the world to live and work here. Immigration to take up skilled jobs in public services was encouraged by people like Enoch Powell in the early 60s when he was Health Secretary. One thing that centuries of immigration into the UK shows is that people will integrate into society if given a chance. Let’s not forget the biggest cultural influence around: the mass media. What you buy, what you think, what you believe, or how you use language are all influenced by watch you watch on TV, read in the papers, or online. This has a far greater effect than a family down the road worshipping at a mosque or a synagogue instead of a C of E church. The media tends to concentrate on the more outrageous stories but it doesn’t mean that what’s being reported happens all the time.

It matters not that there are some who dislike “our” way of life. Always have been, always will be, but hating them back is not the answer. They want you to hate them. If you can’t ignore them you can isolate them. Make it clear that their hatred is not welcome. Talk to people with different cultures. Find out why they have those beliefs. Aim for mutual understanding even if you disagree. If you want them to integrate into British society, help them into it. Share a joke, ask how their family is doing, have a moan about the weather. It’s sometimes said that it’s best to talk to your neighbours before you need to talk to your neighbours. Even more so if they’re newly arrived and don’t know anyone. A friendly hello can help to avoid a lot of problems down the line.

The Brexit debate was supposed to be about whether or not to remain in the EU. Traditionally this is a very dry and boring subject. With all that’s been going on I think we need to take a few steps back and think about what sort of country we’re becoming. This isn’t just about the tragic events in Birstall. A society where everyone is suspicious of each other is dangerous. It takes time to unwind years of wariness so for now let’s ignore the extremists, whether from the EDL, Britain First, or whatever outfit Anjem Choudary is running these days, and try for just a bit of understanding and a bit of tolerance. That’s the type of country I want to live in.

10 Years On…

7th July 2005. I was at work when I heard the news. A “power surge” on a Tube train is not implausible, but my heart sank when I heard about the explosion on the bus because you don’t get power surges on those. One of the people on it was Giles Hart. I didn’t know him personally but he also worked for BT. He was also a Humanist, and chairman and treasurer of the Polish Solidarity Campaign during the 80s. A couple of weeks later I was travelling in to work when I noticed a whole block of Hyde Park (Leeds version) had been cordoned off and a police helicopter was overhead. This turned out to be part of the investigation and they were searching the flat where the bombs were made. It was only a couple of miles from where I lived at the time so there’s a real possibility I could have gone past the place or even seen the bombers on the street.

There’s always been an undercurrent of people wanting to spread fear and hatred of other cultures. I noticed it with posters around campus for one of Anjem Choudary’s groups when I went to university in 1997, as well as with whatever AQI, ISIL, ISIS or IS are calling themselves these days. However I’ve also noticed it with groups like the BNP, EDL, Britain First and some of the fringes of UKIP. What all these groups have in common is wanting to make people suspicious of each other. Some do it through a constant stream of lies and untruths posted to social media, some are more murderous, like the 7/7 bombers or David Copeland (the Soho nail bomber). I don’t agree with the argument that a particular religion is inherently violent because its holy book says that unbelievers should be put to death. Even though the book says it should be done, billions ignore it, and rightly so. Holy books also say that the murder of innocents is forbidden, that only God can judge, and people should respect each other. I’m not religious but that’s more the sort of thing that I can agree with.

What the hate groups would like is either ghettos where people stay with their own kind, or a homogenized monoculture that never actually existed and where diversity is anathema. I don’t want to live in either of these twisted versions of society. As well as Giles Hart, other people killed in the Tavistock Square bus bombing came from all walks of life. A lot of them were on that bus because the Tube was closed and the sheer range of backgrounds reflects the type of country we actually have. As far as I’m concerned the best way to deal with the extremists (on the extreme Right as well as Islamists) is to challenge their poisonous vitriol, reject the dystopia that they want to create, and to understand and respect the views of people that you might not necessarily agree with.

(also posted to Facebook)

Stuck Up Nonsense

Back in 1997 when I started at uni it was quite exciting to see the difference between a small hippyish market town and a big city. Hebden Bridge wasn’t particularly cosmopolitan so moving to Manchester with lots of different cultures was quite a change. I liked being able to look around and find out more about what was going on. I’d lived in Harehills in Leeds until I was 5 so I was obviously aware of some of the differences, but we were all just kids so we didn’t pay that much attention. One of the less pleasant things about Manchester was seeing some pretty shocking posters around the uni campus. They were posted by Al Muhajiroun which was one of Anjem Choudary’s early outfits. It was pretty obvious that they were something of a joke and no one took them too seriously.

Al Muhajiroun and various other aliases became a lot more prominent after the terrorist attacks on the US and UK in the early to mid 00s. The groups were banned under the Terrorism Act but Choudary always seemed to get off with just a slap on the wrist regardless of how provocative his behaviour was. One of the most notable was setting fire to a Remembrance Day wreath on Remembrance Day itself a few years ago. I think it’s pretty obvious that he’s being used as an agent provocateur to flush out hot-headed but rather dim people who think they’re supporting his cause. They may not necessarily join whatever group he runs at the time, but they may be “inspired” by him. One of the biggest ways of making an impact is putting posters up saying basically “Your kind is not welcome here”. It might be something like “Shariah Law Zone” or, as in Cardiff last week, “Voting is not Islamic”. The thing with posters is that anyone can put them up anonymously. They don’t have to be members of a particular group and might even be put up by an opposing group just to wind people up.

What is pretty obvious is that these “Voting is not Islamic” posters certainly don’t speak for Islam in general. It’s a bit like saying the Westboro Baptist Church speaks for Christianity. I daresay whoever put them up did so with the intent of annoying people who are already suspicious of Islam. Whether it was some extremist Islamic group or someone else is neither here nor there. As with the old Al Muhajiroun posters, I think the best option is not to pay them too much attention. “But what are the Muzzies up to now?” I hear some say. They’re not up to anything. One may as well say “Aren’t the Crizzies daft?” whenever some bonkers televangelist opens his mouth.

I’m an atheist and I do have strong beliefs but I prefer them to come from a position of knowledge. I’ve been known to check bits of the Bible and I’m interested to know why people believe certain things. I think if more people took the time to understand what other belief systems say, they’d be less like to get wound up by some daft posters or other made up nonsense. It’s easy to cherry-pick or quote-mine, but pretty much all religions (and those of us who don’t follow any) have the central idea of respecting people for who they are.

At Long Last

Three years of bike training finally came to an end last week with me passing module 2 of the test. My last blog post about this was just after I resumed training after winter but now it’s all done. I did the theory test last year, which was pretty straightforward thanks to lots of practice from a DVD with questions and their own version of hazard perception clips. In the official version a couple of the hazards were sheep in the road. The quality of the videos was pretty dreadful: almost as if they’d been recorded by pointing a camera phone at a TV playing a VHS video.

The motorbike practical test comes in 2 sections: module 1 is off-road manoeuvres that consist of manual bike handling (push it from one parking bay to another), a slalom, a few figure 8s, a U turn, a cornering exercise at 30 kph, an emergency stop at 50 kph, and a hazard avoidance also at 50 kph. The two 50 kph exercises are done with a speed measurer to make sure you hit the minimum speed, and all of them are around coloured cones like the ones they use to mark out indoor football pitches in leisure centres. It took me 2 attempts to pass mod 1. The first time I failed because I went over the white lines for the U turn and because I locked the back wheel during the emergency stop. 2nd time I passed with 3 minor faults: during the hazard avoidance I only hit 49 kph, and when I moved off after stopping I stalled the bike and forgot to check observations. However I was so relieved to get through the emergency stop just before that I didn’t really care too much.

After that I was pretty exhausted and wasn’t entirely with it riding back to bike school so they told me I needed to do a bit more training before I could do mod 2. For this they had me using the Wakefield test centre (where I’d done mod 1) as a base so the instructors could show me round the test routes. After another 2 half days training they told me I was ready to do the test and  they’d get me an appointment booked as soon as they could. I had my last lesson on the Friday morning and they rang me that afternoon for a test on the following Tuesday. However this would be at the Bradford Thornbury test centre, not in Wakefield. Despite this I went for it anyway: good to get it out of the way if I passed, and there’s a 10 working day cooling off period if you fail, so the sooner the better. It’s not very far from where I live so I spent last weekend riding over to see where it was and finding out a bit more about the area. It’s part of the same Mid Point complex where the Leeds/Bradford Odeon cinema is and where there’s a very strange triangular roundabout. Because of that and a few other things Bradford Thornbury test centre has one of the lowest pass rates in the country. No pressure then!

Test day came and I made sure I got to bike school nice and early. We needed to get some petrol on the way and then we went up from Hunslet to the test centre via the outer ring road. Unfortunately we didn’t get full speed on the way there because the person who was leading us didn’t want to overtake a couple of slow lorries. Once we got there we went for a quick ride round, and then he had his test. I went out for another ride with our instructor, partly to get a bit more knowledge of the area and partly to give me something to do other than sit and wait. When we got back the first bloke had completed his test and was looking stony-faced because he’d failed. Bad luck: he’d locked his back wheel for a few inches when stopping and failed for not being under full control.

Then it was my turn. The examiner checked my documents and then led me out. I had to do an eyesight test (reading a numberplate from a distance) and answer 3 questions, about checking brakes and fluid levels, and what to do about pillions (“a local taxi number is…”). I told the examiner that I have dyspraxia and that I needed instructions to be clear and given in plenty of time, and he told me that they would be. The test is to see how good you are at riding, but normally when you’re out you know where you’re going, so I think this would count as a reasonable adaptation.

On the road and we rode around Bramley and Pudsey. I knew to expect  being asked to pull in for hill starts and behind parked cars so these weren’t a surprise. I’d also been warned about the examiner’s trick of waiting until something was coming and then telling you to pull away when it was safe, so I watched out for that well. During the independent riding bit (“turn left at the end and then follow signs to Bradford, then for Leeds”) I stalled when I was pulling away from some traffic lights, so I knew that would count as a minor. At one point I was waiting for lights to change at Dawson’s Corner roundabout where I could see from a clock on a building that the test was nearly over, and hoped I hadn’t made too many faults. Back on Stanningley Bypass, through Pudsey town centre, and back to the test centre.

Off the bike, back inside and waited for the examiner to finish off his paperwork. He took me and my instructor into a private room and then said “Congratulations: you’ve passed”. “Excellent!” I had 7 minors altogether: 3 for not pulling away smoothly and a couple for not checking observations. Earlier my instructor kept telling me to keep an eye out for unmarked crossroads so I was surprised that I’d seen one that the examiner hadn’t.  Anyway, it was done. I swapped my provisional licence for a certificate and I’ll get a full licence through in a couple of weeks.

As soon as we got back to bike school I took the L plates off my own bike and posed for the traditional photo:

Passed!

(Yes, I know I need to lose some weight)

Getting rid of the Ls means I can ride on motorways. A 125cc bike isn’t really up to a long journey at 70 mph but I’ve since done the length of the M606, and it’s quite handy being able to use the Leeds Inner Ring Road instead of the zillion traffic lights on the Leeds Loop Road. Some time fairly soon I’ll be upgrading to something a bit bigger. I’ve had a look around and something like the Honda CBR, or Yamaha XJ or FZ6 series seem OK as long as they’re not too expensive to insure.

So, that’s it for the mandatory training. There are various schemes like the Enhanced Rider Scheme and the police Bikesafe scheme that are designed to improve your riding style once you’ve passed, but I don’t have to do any more training unless I want to. I found it hard work getting on with a car with gears so I never got round to taking a car test. It also took me a while to get the hang of bike gears, but at least I could get my own low powered bike and get in plenty of practice. It’ll be interesting to see what I get up to once I’ve got a bigger biker that can cope with motorways,  but I’ve already found that not having to rely on public transport means it’s easier to go where I want rather than where the bus or train goes. Pudsey and Headingley really aren’t far from Horsforth, but you wouldn’t know it if you had to catch a bus there.

Bikes (cont…)

Now that work has calmed down a bit, the weather has got better and I’ve got some spare cash, I’ve restarted my bike training. The motorbike licence classes changed just over a year ago so there are now four different ones:

  • AM – lets you ride a moped with a top speed of 45 kph (for people 16+)
  • A1 – 125cc with max power of 11 kW and power/weight ratio no more than 0.1 kW/kg (for people 17+)
  • A2 – 35kW max power and power/weight ratio no more than 0.2 kW/kg. You can ride a restricted bike but the power of the derestricted version must not be more than double the restricted version. The test should be take on a bike of 395cc or higher, and a maximum power of 35 kW (for people 19+ or people with 2 years experience on an A1 bike)
  • A – lets you ride any bike, but must do the test on a minimum 595cc bike with at least 15 kW power (open to people over 24, or over 21s who have held an A2 licence for 2 years)

Complicated! The other change was that you can no longer move from one class to another by holding a licence for 2 years. If you want to upgrade from A1 to A2, or A2 to A, you must do another practical test on a bike for the category you want to move up to.

Personally I’m doing direct access for a full A class licence. I’m getting plenty of miles in on my current bike but I’m starting to outgrow it. As I get more experienced I’m getting more confident at riding at higher speeds. My bike tops out at about 60mph on the flat, or 45 – 50 ish mph going up hills. That’s OK on smaller roads but there are plenty of national speed limit roads that I use regularly. It can be excruciating being stuck behind someone that won’t go over 50 mph on a 70 mph dual carriageway and I can’t overtake them because I don’t have enough speed. I’ve tried it a couple of times and it can be embarrassing, not to mention potentially risky when I move back to the left hand lane and I don’t have enough space to leave a safe gap. At bike school they’ve got me learning on a Suzuki SV650. It’s about the same weight as my current bike, but at 55kW it’s 5 times more powerful:

Suzuki SV650

As for the bike training, I’ve done a day and a half since I resumed this year. You do a day or half a day at a time, more like an intense car driving course than the traditional couple of hours a week of car lessons. Of course there’s no such thing as a dual control bike: instead the instructor rides behind you with a radio on a separate bike. A day’s training usually consists of a mixture of manoeuvres at the training centre followed by on road training. Because the instructor can’t control the bike they won’t let you on the road until they’re happy with your handling.

My bike school is just behind the Crown Point Centre in Leeds so you have to go more or less straight on to the somewhat meandering roads around the M621 in south Leeds to go anywhere else (of course learners aren’t allowed on the motorways themselves). I understand the training routes are intended to teach you how to deal with things like fiddly junctions and other awkward bits, but it does feel a bit odd going out without knowing where you’re going, and suddenly turning off the main road to go down a side street and emerge from a junction that no one in their right mind would use unless they had to. The A61 is a nice easy way to get from Wakefield to Leeds and goes past the bike school, so naturally we turned off a little early so we could go through Belle Isle and along its main road, which looks like where Leeds council decided to use all the spare paint they had left for traffic calming.

During one of the lessons we rode over to the test centre in Wakefield. If you look at the diagrams for the mod 1 test it looks pretty small, but on the ground it’s a lot bigger.

To get some practice in I’m going out riding by myself as well. These rides are a fair distance, up to about 50 miles. I live just by the Leeds outer ring road so that’s a good place to start. Unlike the training routes these do have some kind of logic, even if they are just loops. One I did last week was out to Shipley, Keighley and Skipton, and then back home along the A65 through Addingham, Ilkley, Guiseley and Yeadon. Another was along the northern part of the outer ring road to Garforth, and then back through Woodlesford to Hunslet, along to Armley and home along the southern part of the outer ring road. I’m familiar with Squires bikers’ cafe in Sherburn in Elmet and I’ll almost certainly be stopping off there at some point over Easter.

These ride outs also give me a chance to get the hang of longer rides so I can do more than just buzz around Leeds. Over the May Day bank holiday weekend I’ll be riding over to a rally just outside Market Weighton on a bike fully laden with camping gear. That’s about 50 miles from me. Having just a CBT certificate means I’m not allowed on motorways so I have to investigate other ways to get to places. In a lot of cases the old pre-motorway trunk routes are still there but are a lot quieter than they used to be. No one in a hurry would use the A62 to get from Leeds to Manchester, especially the weird bits through Huddersfield and Oldham, but there’s nothing to stop you and I’ve done it a couple of times. Upgrading the A1 to motorway standards meant having to leave parallel roads for non-motorway traffic. It follows the route of the old Roman roads of Ermine Street and Dere Street so in places it was the only road around.

What happens next with the bike training is that I go back to the Wakefield test centre on a Saturday to practice the techniques for module 1. Now I’ve seen where it will take place I know what to expect. This session is booked for the 10th of May, and if that goes OK there’s a slot available for me to do the actual mod 1 test on the 12th. Mod 2 comes after that and is the traditional on road driving test, but there’s no point booking it until I’ve passed mod 1. Hopefully I’ll get through it all before the end of May.

Live By The Code

Rather scarily I worked out last week that I’ve been using “curly brace” languages for 20 years. I started off with Borland Turbo C++ when I was still at school in 1994 and I’ve gone through Perl, PHP and most recently C# which I use for enterprise grade stuff at work. Before that I played with BBC Basic in the 80s on an Acorn Electron and later QBASIC and QuickBASIC for DOS. In 1997 I did a BEng degree in software engineering, got a job as a software developer, and I’m in the process of applying for promotion to senior or lead grade, and hoping to be sponsored to do an Open University MSc in Computer Science with Software Engineering.

With that kind of background, naturally I was interested to see what the Year of Code initiative was about. According to the website, “Code is the language we use
to instruct computers. We use code to build websites and apps, design clothes, publish books, make games and music, and to get the most from technology. Getting to know code is really important. It means you can be creative with computers, start your own business or boost your earning potential. It is really simple to learn and anyone can do it – not just rocket scientists.” Oh dear. Nothing like a collection of vacuous buzzwords to get things started. In theory you can use “code” to publish books (see LaTeX or Postscript for example), but  I daresay most people would use a word processor or DTP package to do it. My final degree project involved writing a MIDI sequencer, but I think a keyboard or a copy of Garage Band might be a bit easier for making music.

Let’s look at the sentence “It is really simple to learn and anyone can do it – not just rocket scientists,” in some more detail. As I say, I have a degree and over 20 years experience so I like to think I know a bit about programming (let’s not call it “coding”). I also know that there’s a lot that I don’t know.  Starting off, what exactly is programming? As far as I’m concerned, it’s the task of designing, implementing and testing a set of instructions that tell a computer what to do. Not a particularly complex definition but it excludes quite a lot of things that some might call “coding”. An HTML web page is just a text file so that doesn’t really count. Using a design package to draw something is just a high tech alternative to using a pencil and paper. Difficult? It can be. Programming? No.

There are lots of different ways to approach programming but most of them agree that simply sitting in front of a computer with the programming environment open is not a good way to start. A common misconception that Lottie Dexter seems to make is that the software development process is like this:

  1. Come up with a vague idea of what you want to do
  2. Magic happens
  3. A complete and finished program appears

However what really happens, especially for big projects, is more like this:

  1. Specification agreed with customer
  2. Detailed design work takes place including deciding what technologies to use
  3. Initial draft of code is written
  4. Review and do further development if needed
  5. Test
  6. Review test results. Recode and carry out further testing if required
  7. Hand over to customer who may want to carry out their own testing
  8. Release

On small projects (like the classic “hello world” program) some of these steps may be missed out but you still want to make sure the thing behaves correctly and is robust enough to handle what gets thrown at it. Why does it matter? Here’s a basic C program that asks the user to enter their name. Unfortunately it has a pretty major security flaw.

#include <stdio.h>

int main (void)
{
	char Name[30];

	printf ("Please enter your name:");
	gets (Name);
	printf ("Hello %s", Name);

	return 0;
}

What could go wrong here? There’s space to store a name of up to 30 characters (actually 29 because of the way C stores strings), but what happens if someone enters 31 characters? It overwrites part of the program’s memory. Depending on who does it, they could put something in there that makes the program do something it wasn’t originally designed to do. This is called a buffer overrun vulnerability and is a major source of malware. Making the code just a little more complex will make it a lot more secure:

#include 

int main (void)
{
	char Name[30];

	printf ("Please enter your name:");
	fgets (Name, sizeof(Name), stdin);
	printf ("Hello %s", Name);

	return 0;
}

This might confuse the Year of Code crowd but it shows how a subtle change can have massive consequences. Computers do exactly what they’re told, even if it can be dangerous. There are safeguards: my compiler refused to compile the first program with the dangerous gets() call. However not all problems are as easy to catch, which is why you need to know what you’re doing. On a personal computer this might be inconvenient if it crashes, but on a big system like a banking database it could be very expensive if someone breaks into customer records and steals lots of money.

A large part of programming is algorithms. Techniques for things like sorting and finding data, reading and writing files, or using memory have been around for a long time. A lot of them come from mathematical concepts, especially areas like formal logic, functions, formulas and matrix arithmetic. It might not be rocket science but it is a complex science of its own. When you record music, it uses a formula to convert into something suitable for storing on disk. When you move a shape around on screen, ultimately this is done through a set of matrix transformations. There are libraries that will do a lot of the work for you, but you do need to understand how they work to get the most out of them.

One thing I’ve seen in some of the code I maintain is stuff that’s badly hacked together. Rather than stop an error from occurring in the first place, let it happen anyway and just ignore it if it’s not important. Forget coming up with useful names for things. Just have things called “x” or “zotz”. If you’ve been brought in as a contractor, don’t bother documenting what you’re doing. Source code might not physically decay in the same way that a steel bridge might, but technologies cease to be supported and other parts of a system might change. I know offshore developers are popular in certain places, but that’s because they’re cheap, and they’re cheap for a reason.

Bearing all this in mind, how would I teach programming? Start off getting the principles right:

  1. Define what you’re going to do
  2. Break it down into logical steps
  3. Decide how you know if it’s working properly
  4. Select appropriate technologies and techniques
  5. Write the code
  6. Test it
  7. Fix any bugs and test it again
  8. If it works correctly, release/deploy/publish it

These principles are actually a major part of engineering so they’d carry over pretty well into other subjects. Putting together a flat pack wardrobe? Following a recipe? Building a suspension bridge? You get the idea. Technologies change, so the turtle graphics in Logo that I did at school wouldn’t really cut it now and it wasn’t exactly riveting back then either. Programming is a creative task so I’d leave some room for originality.

As for what language, I like the idea of something that’s graphically appealing and which is based on something that is used commercially. I spent quite a lot of time playing around with the graphics libraries in Borland Turbo C++ for DOS when I was first getting started in the mid 90s. These days I’d probably suggest one of the .Net Express languages on Windows, or something with a graphical IDE and based on C or Java on other platforms. The important bit is learning generic principles rather than any particular language. If you can understand program flow and some of the ideas behind things like object oriented programming in one language, it’s easy to transfer them to another

Later I might suggest Java for an Android emulator if people wanted to get into mobile phone apps. I wouldn’t expect learners to write the next Angry Birds, but again, the aim is to understand the principles and to have something to show at the end of it. I know there are teaching languages like Scratch and MS Small Basic available, but I’d prefer people to get started with something that they don’t have to unlearn later.

It’s definitely worth at least mentioning some of the laws and politics behind certain technologies. Open vs closed source would obviously be a key point when it comes to choice of technologies. Keeping data secure is another important point: both stopping bad people getting in, and understanding why, just because you have the technical capability to do something, it isn’t necessarily a good idea. DRM and copyright laws are also a topic worth discussing, but I’d go for a more balanced approach than just “copyright theft is a crime” (which of course it isn’t). As a programmer you’re creating intellectual property that you might want to share under something like the Creative Commons or Gnu licences.

All this might be a very different approach to the team of non-technical venture capitalists and “entrepreneurs” in charge of the Year of Code program, but as someone who works with very large systems where secure and reliable programming is required, I like to think I have a few ideas of my own. Farming the nasty techy stuff out to somewhere that can do it cheaply is all well and good, but you still need to be able to understand what they’re doing and provide guidance to make sure they get it right.

Comments

I’ve changed the commenting system on this site to use WordPress/Jetpack instead of Facebook comments. Gives me a bit more control, and automatically closes comments after a certain period so I don’t get people replying to old posts. The Facebook comments system didn’t notify that anyone had replied, so I was surprised to see quite a discussion happening on some of the politics posts when I checked a while back.

This being a personal website means there’s no obligation for me to provide a commenting system at all. If it gets filled up with spammers, I always have the option of switching it off.

Riding On

Been a while since I last mentioned anything about bikes (or posted at all!). That was at the end of August when I’d just got the new bike. Since then I’ve done about 1500 km over various rides including the A62 to Manchester and the A64 to York. I’m still on a provisional licence so motorways are still out, but the dualled bits of the A64 between the A1(M) junction and York itself are probably pretty similar. A couple of weeks after I got the bike I also rode over to Squires bikers’ cafe on a sunny Bank Holiday Monday. Visiting my mum and introducing her to both the bike and the one piece suit was fun:

Bike and suit

Most of my riding is around Leeds, and I have to say that the inner loop road is a serious pain at times. The inner ring road has motorway regulations despite having a 40 mph speed limit so I’m not allowed on there. The inner loop is designed for clockwise travel, which is fine if you want to go that way round but not ideal if you want to go the other way. There are bits where you can go anticlockwise, but I’m sure they were designed by whoever did the store layouts at Ikea where it’s mandatory to go past a surfeit of tealights and couples having slow motion arguments about soft furnishings regardless of where you actually want to go.

Bike training is now on hold until Spring when there’s more daylight and I’ve got a bit more money to pay for lessons. At £160/day it’s not cheap, but at least I’m now on 600cc bikes.

Apart from getting used to the thing on the road, there’s also the biking culture to get into. I got involved with Leeds MAG because I used their website to find out about bike parking spots and I thought it made sense to get to know them and meet people who know far more about bikes then I ever will. Since I joined in July I’ve been to a few socials, both organized by MAG and by some of the other local bike clubs. (There’s a big difference between MCC clubs and MC ones. The MC clubs are the outlaw ones like the Hells Angels, Outlaws and Blue Angels. MCCs are bike clubs that are open to more or less anyone, but like most clubs they do have procedures and entry requirements).

I’m at a very early stage so I’m just getting to know people and find out what’s what. I can tell already just how important the bike scene can be to people’s lives. It’s very similar to the combat sports/martial arts scene (which I’ve been somewhat neglecting) but hopefully with less of the physical violence. A contraption that can go at high speeds with only a tiny point of contact on the ground is inherently dangerous so it’s not surprising that most bikers (me included) know people who have been killed or injured in accidents.

The next MAG event is a charity toy run. The idea is pretty simple: meet up at a central location, ride as a group, and then disburse toys at a local charity. This will be my first group ride so it will be interesting to see how it goes. I’m sure I’ll be fine but it’s just the thing of doing something for the first time. Finding toys has been tricky as most stuff I’ve found for girls features lots of pink plastic and words like “princess”. I know I’d probably be knee-capped if I gave most of the people I know presents like that, so it’ll probably be something like Lego or a jigsaw. There’s quite a few toy shops near me so it should be pretty easy to get something appropriate.

Next couple of MAG events after that are the fortnightly meeting (with cake! But you’ve got to bake it first. I’m thinking some sort of banana loaf, and a coffee and walnut cake) and then a couple of days later a band at a pub in town probably followed by a curry. Sounds like a good way to end the year before xmas.