The Slough of Despond

Like any pilgrim on a journey, I’ve seen some inspiring vistas and trudged through some pretty mirky swamps during my time on the Codeclan course. One of my colleagues has identified a pattern to the week – Hopeful Monday gives way to Terrible Tuesday, which leads to a distinctly Jaded Wednesday.


My typical Tuesday afternoon.

But Wednesday sees a climb up from from the slough of despond when we realise that we can find our way out of backwaters and dead ends and start to climb again. Quietly Satisfied Thursday is when everything for that week pulls together an we have a drink in the evening and congratulate each other on making it through another leg of the journey. Friday is more freeform with a weekend assignment and all day to work on it, or not. Last week we had a wee spontaneous study session in the afternoon to talk through some of the stickier points of the weekend homework.

So it’s up and down, and each Friday has seen us gain some ground, a little elevation with a better view of the lie of the land.


A Codeclan tutor puts me back on track.

Yesterday the cohort ahead of us gave presentations of some group projects they had put together in a week. It was impressive stuff. There were groups of four and five given a choice of briefs, and they had a week to plan and implement a working web application. Using vanilla Javascript, html, css and whatever APIs they could come up with.

There were two astronaut dashboards, a Munro bagging app and a disease tracker that had a nice little timeline to show the worlwide prevalence of four diseases over the centuries. Most of the data for that one had been either invented or extrapolated from less than fulsome sources. But it worked and it had a nice design, so hats off to them.

The Munro bagging app has potential to be marketable, if they can refine the local weather data a little. What’s true for the nearest weather station is seldom true at 3,000 feet, so a little cheery sun symbol could be misleading. But with some refinement they could have a nice little earner.

Our cohort has been working on getting Ruby, the scripting language we’ve been learning, to talk to a database. This is where it gets even more interesting as it’s where real-world applications can start to be envisioned.

I had some existential musings on my way to work this morning, about classes of things. Yesterday we had to create some wizards and magical items and map who has which items.

So, an instance of a class of Wizard is a person who is a wizard, in the case of my work it’s Harry Potter, Hermione Granger and Ron Weasley. But an instance of a class of MagicalItem (MI) isn’t an individual item, but a kind of an item, because there are lots of wands, broomsticks and deluminators. There are wands, broomsticks and time turners in the abstract which are instances of a larger abstract class, MagicalItems, but they are used by the wizards, which are not abstracts but individual. There is only one Harry, one Hermione, one Ron.

So what do we call an actual MI that is used by a particular wizard? I call it a “tool” so that I can have a third catgeory in my database that can refer to both an individual Wizard and a kind of MI.

For the purposes of this exercise this is a many to many relationship, in that one wizard can have many MIs and many instances of an MI can belong to many wizards. But would that only be appropriate if it was one individual MI that was shared out between many wizards? Like a class broom for example.

I know it sounds a bit silly but it shows the principals behind the exercise are tricky to think through.

So, onwards and upwards into the tornado.



The End of Week Two

So, it’s the end of week two.

I’ve given up my job at the University of Edinburgh and started a 16-week programming course at Codeclan in Edinburgh.

It’s been a bit of a leap in the dark for me. I worked at the University for 18 years so any change is bound to be personally daunting. But the opportunity presented itself to take voluntary severance, and with part of the settlement package I’ve invested in my future, so to speak.

I started the course on the 26th of September 2016, and as I write these words it is the 7th of October. End of the week two.

And it’s been hard. I knew it was going to be hard, but “knowing” what something will be like ahead of time is not the same as knowing it when you are in the middle of it. Don’t get me wrong, it’s a good kind of hard. The kind of hard when you use the parts of your brain that have lain dormant for a long time. Thinking critically. Analysing. Spotting patterns and recalling patterns. Working back from end product to process. The end back to the means.

I started training on a bicycle late last year in order to go on a 100 mile charity ride this summer past. It’s been sort of like that. You start small on rides of a few miles, and when you go ten miles you feel chuffed. Exhausted but chuffed. And the hills, sweet Jesus the hills. At first you think you’ll never make the top. You arrive there sweating, exhausted and questioning your own sanity. Why did I leave the comfort of my bed to put myself through this?

But then, something strange happens. After a month, the hill you thought would kill you becomes a doddle. You get to the top almost without thinking about it. Not without effort, but without the agony.

And something even stranger happens. You start looking out for tougher hills to challenge. Because that first hill did you a favour. It gave you confidence and self-belief. And you want more because you know now it won’t kill you, and you know the reward of going up a hill is going down the other side.

The first week of the Codeclan course eased us into the world of Ruby progamming. Like going on a mildly challenging ride of 20 miles or so. Little hills to challenge and let you get a feel for what lies ahead. By the end of the week my head was full of code : functions, methods, variable, for and while loops.

We were given pre-course work to do so some of this was not entirely unfamiliar.

Anyway, I was going to go into more detail about what exactly we got up to, but it’s late Friday night, and that’s enough for one week. Besides, I’ve got homework to think about, can’t spend any more time on non-coding activities! We’re building a karaoke bar, if you must know…

Screen Shot 2016-10-07 at 22.54.47.png

Thank you

Dear Reader, I made it to Dumfries.

(Sorry about all that not updating the blog business.)

I got £1,463.30 worth of donations through my JustGiving page, so to all of you who contributed, thanks.

It was one of the hardest physical things I’ve ever done, but it had a legacy of me being fitter than I’ve ever been and taking up cycling in a more enjoyable fashion. If you aren’t undergoing gruelling self-imposed training, riding a bicycle can be quite fun.

Training or exploring?

I was disappointed Sunday – I was so sure my training ride was longer than the previous week’s, but in fact it was a couple of miles shorter. On a map it looks longer, but last week I went a bit further towards Haddington then doubled back and that must have added a couple of miles on. In any case, this is the ride:

This is a Stava thing in case you didn’t know. I started using it as a way of keeping track of times and distances for training. It turns out a fair few of the other guys on the Man Power ride use it and have a Strava group, so I’ve joined that, because I just don’t feel inadequate enough.

The astute will notice that the ride ends in Dunbar don’t match up – that’s because I forgot to start recording until I was about half a mile or so into the ride. Although I’d like to pretend it means I can add a significant amount onto the recorded time/distance, even I’m not that dishonest. Yet.

I can see already what my problem with training is going to be. Riding the byways of East Lothian is just too interesting and I want to stop or follow an unscheduled road to see what’s down it. It doesn’t make for training gains.

I called my Strava ride today the “Auction Mart Circuit” because I stopped by the old Auction Mart in East Linton that is on the cards for redevelopment along with the old Auction grounds it sits on, near the railway line where the station used to be:

East Linton Auction Mart

Eight-sided Auction Mart in East Linton, in a state of dilapidation.

The reason it’s an “Auction Mart Circuit” is because I also went by the entrance to the East Fortune Sunday Auction. Tenuous, I know, but I like giving my rides some kind of name other than “Morning ride”.

I wanted to have my picture taken to show off my new helmet and overshoes, but when I got home I completely forgot to ask Eileen to take one of me, even though she was standing right there when I rolled in.

I bought a helmet because the ride requires I wear one, and I thought I needed a few months to get used to wearing one, as I haven’t for years. It was okay, the way helmets fit have come a long way since the last one I bought, and this one doesn’t feel so chokey, so it stays. I didn’t feel any more or less safe, but funnily enough I felt like other cyclists out and about were a bit friendlier than when I was just out in my warm beanie. That could very well be a figment of my imagination though.

The other bit of kit I got was a pair of overshoes, as my feet had been really freezing on previous rides. They did their job in keeping the wind and water off my trainers, but my feet were still pretty cold – not frostbite cold, but cold. Having said that I had reverted to a rather narrow-toed trainer, which is going to let the cold in no matter what, so I think I need now to look at thinner thermal socks instead of the bulky wool socks I wore on Sunday.

Back to the ride. This week I was on busier roads that previously. I rode mainly on the roadside shared-use path from Thistly Cross roundabout to East Linton and then again on the path to the top of Pencraig Hill and just beyond.


The view from the rest stop at the top of Pencraig Hill. The snowy hills in the distance are the Lammermuirs and the mountain in the middle distance is Traprain Law.

There is a plan afoot to upgrade this path between Dunbar and Haddington, and there are some bits of it that are very good, but too much is roughly surfaced or deteriorated pavement, or corrugated hand-rolled surface, and most of it is about a meter too narrow. If they could build a consistent 3-meter wide high-quality surface the whole way, that would go a long way to attracting cyclists off the carriageway and onto a more relaxing ride. The A198 is the old A1 trunk road and is of sufficient width to easily lose a meter along its length.

But I had to get back onto the busy roads when I turned north off towards East Fortune. Top tip: if you pull off to let a line of cars get back, and if where you pull off is at the bottom of a hill that rises sharply again, make sure you are in a suitably low gear instead of the high gear you were powering down the hill in. A rookie mistake and lesson learnt.

So up to East Fortune and turning east to head back to East Linton (lots of easts in this sentence) cycling into a brisk, biting east (!) wind.

At East Linton I took the Tyninghame road with the intention of cutting down to the ford behind Knowes farm and getting on the old A1 that way, staying off the busy A198 road from North Berwick and Whitekirk.

On the way I checked the ford to see if it was passable:


Not looking good.

So I took the bridge:



Yep, I was right about that ford.

It was a straight shot back on the cycle path on the old A1, through West Barns and Belhaven behind the hospital and through what used to be fields around my house and is now an expanding housing estate/building site.

The weather this coming weekend looks horrendous, but I’ll do my best to get out at least once.

Gearing up for the ride of my life

I’ve signed up for a 94 mile charity bike ride on 28 June, from Glasgow to Dumfries. It’s part of a longer Glasgow to London multi-day event, but I don’t think I’m quite up to that one yet.

It’s all in aid of Ovarian Cancer Action. My wife Eileen has ovarian cancer and I’m keen to do what I can to help research and find some ways of mitigating this insidious disease. I’ve never been a big fundraising person or particularly outgoing or in the limelight kind of guy, but I know I have generous friends who will support us given the chance. This is that chance.

I’ve been on a couple of training rides so far, 24 miles at the longest, and I recognise that I’m going to have to step that up if I have any hope at all of even finishing the ride in June, much less maintaining some kind of respectable pace. I have been averaging 10 miles an hour, but that’s not going to be good enough because the day entails a few rest/lunch breaks and I won’t want to be trailing so far behind the others. Hopefully I can get some friends/family to go along with me so I won’t be a weedy granddad amongst a bunch of beefy strangers.

Oh, this ride is called “Man Power” because it’s all about Men Doing Stuff for their Women, which I can get behind for a good cause.

Why I’ll be voting Green in 2015

I get tactical voting and I understand my Green friends who say they’ll be voting SNP in the upcoming UK General Election on 7 May 2015. In the wake of the 2014 Scottish Independence Referendum there was a strong feeling that only a strong block of SNP MPs at Westminster could keep up the momentum for independence.

But given that the SNP have taken independence off the manifesto for this election and are working for a strong Scottish voice in Westminster for progressive politics across the UK, what are the arguments against voting for the Scottish Green Party?

If the focus is to have a strong Pro-Scottish, Pro-Independence block working on a UK-wide basis for both UK-wide progressive politics AND a strong voice for more powers for Scotland, then Scottish Greens more than fit that bill.

I don’t agree with much of the SNP manifesto, particularly their policies on energy and the environment. The Greens have a much stronger vision of how to move away from fossil fuels, as we must, towards not only developing renewable electricity generation but using less electricity and energy overall. Anyone who talks about mitigating climate change and move away from fossil fuels that does not have a plan for decreasing our use of energy as a society is just not serious about it. Only the Greens are tackling this head-on. We are going to have to move in this direction, it is a fact that we can’t keep using fossil fuels, and the sooner we make that move, the less difficult it will be. (Note I don’t say “easier”. We have long passed the point of making this transition easy. But we can and we must mitigate the worst effects of what damage we have already done.)

And the Greens have much stronger policies on local government reform to break the governance lock the Scottish parliament has on all aspects of civic life in Scotland. That has to change, and would in and of itself put me firmly in the Green camp.

I’ve always voted positively for progressive parties, I’ve never voted tactically in my life and I don’t intend to start now. I’d rather use my vote as a positive affirmation of what I believe and to help move society in the direction I want it to go, than use it as a negative choice for the least worst option. In East Lothian we haven’t had the luxury recently of being given the choice of a credible Green candidate, and now that we have one in the more-than-credible Jason Rose, I won’t pass up the chance to make my voice heard.

If Jason were to win the seat, would he be any less pro-Scottish, pro-Independence, progressive, anti-Tory, anti-austerity, than the SNP candidate? No, he wouldn’t. He would join the growing progressive movement that the UK is crying out for, and work hard to further the aims of ordinary people in lobbying for an increased minimum wage, the scrapping of Trident, progressive tax policies, land reform, renewable energy security, the phasing out of fossil fuels across the board, urban and rural people-friendly transport policies – the list goes on.

If he were to lose, but gain a substantial share of the vote, he would still be sending a shock-wave through East Lothian politics that until now has been entrenched in the SNP/Labour power-swapping paradigm for too long now. He would make future Green candidates more credible. He would give a voice to those of us who are sick of politics as usual. He would put people and planet and the future at the top of the political agenda.

And he wouldn’t lose his deposit – not a trivial reason to do well in these straitened times!

One reason my SNP-voting Green chums will give for tactical voting will be to not split the anti-Labour vote. For them, getting Labour out of Scottish politics altogether has become almost an article of faith. But I wouldn’t pull my hair out if our local Labour MP were returned. Fiona O’Donnell is actually pretty sound politically, given the context of her party’s history and the sickness of the Westminster system. A small rump of Scottish Labour MPs would be forced to re-think their position in Scottish politics and just might come out the other side better for it. I think a real old-school Labour party in Scotland would only be good for the body politic. Not necessarily a popular opinion, I know but one I’ll stand by. An unassailable SNP hegemony would, eventually, be as destructive in the long-run as the Labour one has been until now.

But I can understand, and do not criticise those who, for this election, think an overwhelming SNP presence is necessary. I just don’t happen to agree, when we have alternatives that will stand with them but distinctively apart in a politically progressive alliance.

I urge those of you who whole-heartedly support Scottish Green Party policies to vote for your local Green candidate in May. I know I will.

Up the Junction

In his post “Surrey’s Failed Roundabouts“, Bez said “It’s a well-known fact that over two-thirds of collisions involving cyclists occur at junctions…”

While not knowing the exact figures (and if anyone does know them I’d be interested to see them), that makes sense to me. When paths cross, interaction gets complicated and mistakes get made, often with tragic consequences.

So my question to traffic planners is, “Why don’t you START designing cycling infrastructure at junctions, and work back from there?”

I know the real answer is that it’s just easier to paint some cycle lanes on the tarmac and maybe an Advanced Stopping Line (ASL) at the lights, and let everyone take their chances from there.

An  Edinburgh junction with cycle lanes and ASLs

A typical Edinburgh Junction (image © Google)

This Edinburgh junction near where I work uses the, what seems to me to be, inherently dangerous method of running a painted cycle lane between the straight ahead lane and the left turning lane to lead on to the ASL. A design that was tried and discarded as unsafe in the Netherlands years ago (according to the video below).

As a side note, this comprises part of what the City of Edinburgh calls a “Quality Bike Corridor”, which I have since learned just means it’s been given a certain priority in planning rather than, well, a statement of quality. And the QBC consists entirely of painted lines on the carriageway. As we know from the recent coroner’s inquest about Brian Dorling’s death on the Bow Roundabout in London, these “quality” lanes are just bits of paint with dubious (if any) standing in law. A suggestion rather than protection.

So again, I ask, can we start now planning from the junctions and working back from there?

The junction above is, in fact, a simple crossroads, with a mix of right-hand and left-hand turning lanes in addition to the straight-ahead ones. There is nothing AT ALL preventing the use of the Dutch model as outlined by Mark Wagenbuur in this instructive YouTube video. I must have watched this video half a dozen times now, and I don’t see the catch. I don’t see why this is not being rolled out at all busy junction in cities everywhere. (This video is about American streets, but the same principles apply here in the UK, with right/left swapped over).

From this you can then decide how to extend the cycle paths into and out of the junction, but at least the most problematic part of the street, the junction, would have been made as safe as it could be, given cars, cyclists and pedestrians all using the same area.