putting Java to work

I don’t like the double-u word but I suppose that I’ll have to put up with it.


higher computing

I’ve just looked at the Scottish Higher Computing exam paper—usually this makes me angry—this time I’m just depressed.

Many a M257er has moaned about the course, and while I sort-of agree I’ve resisted joining them—this stuff is quite hard to examine fairly. But examiner difficulty may be pressed too far; there must be a balance. Too often it seems to be a test of our recall of something that you either don’t need to know or would look-up. This year’s Higher seemed to be that in spades.

What most worried me was there was little actual coding; are we considering computing to be about using computers now?

And when coding was mentioned I got worried. Consider the following
var a = 3; var b = 4; var c = a ? b; //c now is 34
What common operation is ?, what datatype must have been used for a, b, c? Answers on a postcard please, because all I can do is guess. I suspect that they mean concat. & string, but…

We need to re-think this—facts are now only a click away. The essential skills in the modern world are judging whether these facts are kosher and choosing/creating the algorithms that we crunch them with. Which is both hard to examine and even harder to teach.

Perhaps schools should return to teaching the essentials of computing—touch-typing and maths?


not revising

I should be, I intended that I would be, but I made the mistake of looking at Nilo’s site before I got down to it. He’d posted a couple of problems from the project Euler site. I’ve visited that site before and had resisted, but now that I’m revising the will has become weak. So here was the problem—

Add all the natural numbers below one thousand that are multiples of 3 or 5. I’m assuming that we don’t add numbers that are multiples of both 3 and 5 twice.

I suppose that I could have used Java but as my mind instantly went to recursion I plumped for JavaScript. So I started coding. Things happened:

  • I quickly noticed that I was very [JavaScript] rusty—I’ve forgotten all the basics. Not such a problem—that’s what online documentation is for.
  • I can’t remember how to use my own Library. A Library whose documentation is short of woeful by some way.
  • Parts of my Library are broken.
  • I miss having a compiler, I was making silly slips rather than gross errors. NetBeans has spoiled me.
  • I finally managed to get it to work; big numbers made the stack overflow. Well I know how to fix that.
  • Very large numbers [over 20000] caused a hang and eventually an unresponsive script dialog. I should know how to fix that but don’t.
  • [This is a corollary to the above.] I’ve forgotten a lot of the tricks that you can use in a [quasi-]functional language.
  • I’ve never done the CSS for forms on this site.

I need to do something about this, I think. Probably the something[s] are:

  • To learn Haskell properly, or Scheme, or something.
  • To get back my JavaScript-fu by writing a new Library, with proper documentation.
  • To write a proper test suite for my JavaScript.
  • To write a Java JavaScriptDoc application.
  • To spend some time fixing this site.

That’s a lot of plans, but I don’t have any courses between October and February, and no computer courses are lined-up in the near-future. So near-now is the time to get back into what originally pitched me into this study—messing around with code. I want to have some fun again.

Anyway here it is, the thingee. Be warned, it may hang your computer if you use moderate-size numbers, there’s no validation and I’ve only got some hit-and-miss testing as a proof that it works. Use with care.

sum some integers under…

Enter a comma separated list of the integers that you wish to be factors of the numbers that we are going to sum.

Beneath the ceiling… [ceiling isn’t used.]

Sum = 0
Maximum = 0

If the maximum is greater than the sum you’ve missed out at least one prime. [That prime may be 1, although it isn’t, strictly speaking a prime.]

For those of you interested in the code right-click → view source and look in the head. nja is the namespace of my Library which you can see here.

I might come back to this and attempt to do a proper job. I wouldn’t hold my breath.


tutorial horror

I suffered from this today. Not because the tutorial was bad—it wasn’t—but because I had back-to-back maths and computing tutorials. I started with maths at ten-thirty, popped out for a rushed fag and then it was back in for my computing tutorial. Three and a half hours of tutorials might be good practice for the exam, but it wasn’t something that I’d have chosen. It was a knackered neil who shambled home along the canal.

The tutorial was very useful—some of my many flaws were exposed, much ground was covered [we worked our way through last-year’s paper] and much good exam-advice was proffered. I feel a lot more confident of a result for this course than I did before the tutorial.

One interesting speculation was that the exam handbook might contain clues as to the exam contents—can we assume that all the methods we are going to be grilled upon will be in there? After all, we can hardly be expected commit the entire API to memory. Having looked through the thing, for the first time, I can answer yes to the latter but no to the former. Pity.

I posted my initial revision plan [↓] a while ago. Now, having been through an exam paper at the tutorial, glanced at the specimen and from posts in the fora I know what I have to do—I need to work my way through the unit books and make a copious précis. The reason?

Programming is a practical activity—hard to examine; the exam is going to be a test of our recall rather that a test of our programming ability. We’ll need to be able to regurgitate knowledge that, in practice, we neither need nor care about. This is sad, and not as I would wish it, but how else are we to be examined?

Scratch me hard enough and you’ll find a programmer, a programmer who doesn’t care what, exactly, happens when you initialize an object or what the default value of int is; the very knowledge that I’ll need if I want to pass this course. So I have to work in a different way, a way that’s alien to me. I hate that, but I understand the why and the why I have to do it. Once upon a time I’d have moaned big-time about this.

Five years with the OU have changed me—I’m willing to do the needful even if it isn’t fun. Or, at least, I’m willing to pretend that I will.


revision—the plan

Given that the exam is in…erm…twenty-three days time, it suggests bad planning on my part to still be at the revision-planning stage. However, a plan must be made, and not followed in any of its aspects—it is the tradition.

If nothing else was happening in my life and I was a different person forming such a plan would be easy. There are complications:

  • I’m busy at work—end of term is soon and much needs to be organized and done before it arrives
  • M208 is on-going and requires a lot of my my time and mind
  • I don’t want to do anything that might bore me

Somewhere below[↓] I made another plan. A plan which I attempted, a bit…I tried parsing the unit texts, it was boring and I’m not sure that anything was being gained—mostly I was writing down what I already knew. This may not have been the case if I’d persevered, but I was too bored to risk a bet on that outcome. Same thing with the matrix application, almost.

I have to accept the fact that any revision plans that I may for this course will only involve, ‘at the click-face’ coding. Which requires an app that I want, need and, most important of all, is a basis for the course. [Wee maths joke there!] The matrix diddler wasn’t quite fitting the bill. So step forward my long-promised maintenance/task management thingee.

It ticks all the boxes—way too ambitious, probably impossible, and will involve using everything that we’ve learned on the course, but best of all, it’s something that I mentioned in my last PDR[for manual workers]—so I can do it at work.

And I don’t actually need to do it.



I submitted my final TMA for this course last night—a near-run thing, the cut-off was noon today. What’s worse was that up until around six o’clock I didn’t have working code; never mind a formatted solution .doc. I was beginning to panic. A wee bit too much red bull had been drunk and the twitching had started.

Partly this potential [maybe actual?] failure was down to factors outside of my control [the below-mentioned missed week ], but mostly it was down to my laxity and disorganization. I didn’t start this TMA soon enough, I kept putting working on it off and I tackled it in wrong-sized time-chunks.

For all of my [two so far] Java courses the TMAs have required us to complete skeleton-code. Before this one, mostly, I spent some time familiarizing myself with the supplied code. This time because I that I was a ‘big boy’ and didn’t need special pants I skimped. Which resulted in me having a nightmare of debugging because I was doing something that someone else had done elsewhere. I had the damn thing working but a, single, spurious line of code was messing the whole thing up. Often the way.


Even if you don’t intend to learn these you should try to learn them, so…

  • Don’t procastinate—do it now!
  • Always assume that things will take longer than you think, even if you’ve taken into account that you know that things will take longer than you think
  • Do your groundwork, don’t charge in—read the question, the code and do it five times
  • Have a plan
  • Ditch bad plans
  • Make a better plan
  • An hour spent on something that requires two hours to do is a waste of an hour—you will spend four hours on it in the end

As I say: lessons not learnt.

Always remember that in a few months you will be in this same situation again and will be, fondly, dis-remembering this moment as one of your happy times.


interesting times

I’ve had an interesting week, interesting in the sense of the, “may you live in interesting times” typeof curse. A week where nothing has been accomplished. A week where, at the end of it, I’m further behind the starting-line than I was when it began.

For once not my fault. The Cooncil, in their wisdom, decided that our house needed a new heating system, [fair enough I suppose, it’s their house really]. I had to take a precious week’s holiday so that my wife and I could experience the joys of watching our house ripped apart. [Conventionally one mentions seams with ripping—but most of the bits ripped-upon weren’t what I’d consider the seams of our house.]

The tradesmen were excellent—they did a huge job quickly, did it well and were respectful to us. Not from my experience a normal combination, and I have twenty-five years of such experience—these guys were good. Still, however professional the execution, it’s difficult to even appear insouciant when, in every room, your carpets are bundled around your possessions, your floor-boards are stacked in their original kit-form upon your unit texts and people are tramping around toting heavy-duty Makita drills with four-foot-bits.

I’d planned to spend the week working on my M257 TMA—not a goer as plans go. Leaving aside the fact that it was a wee bit difficult to concentrate with all the drill/hammer/saw/banshee-tool noises, there was my wife’s sanity to consider. [At one point the two of us were marooned on about the only square-metre of floor left in the kitchen, bit unfair of me to lose myself on the computer.] So nothing got done.

Now that the nightmare is over I have a, I must admit, wonderful heating system and a whole load of cleaning to do. And a tutorial tomorrow, two half-complete TMAs due in the next couple of weeks and, probably, some hellish-horror waiting my arrival at work on Monday morning. Ah, the joys…

Still I have a M257 tutorial tomorrow, perhaps a wee pint after and some on-the-edge coding. What I signed up for really.



For me an OU module has a predictable itinerary of emotions—the, ‘when is christmas?’, wait for the start; the joy of the books arriving; the initial rush of effort…through to the, ‘when will this all be over?’, end-game. The last emotion kicks-in when the final TMA is away and the revision begins.

As an avid reader of the blogs of others’ I know that I need to disrupt this schedule somehow. And as ever, I have a plan, what’s more it’s a two-part plan. Here is my M257 plan…

  1. For M255 I made a whole slew of notes that made revision easy—I had the course in my own words. I didn’t do the same for this course, the main part of my revision will consist of rectifying this omission.
  2. I’ve been shamefully lax at coding—I’ve done virtually none. That has to change, I have a project, I’m going to, start, building my own version of MathCad.

Let us concentrate on the complete stupidity of aspiration two. At first blanche it’s an idiocy of a type for which I am know. But. Think about it. If I can code my maths then I’m where I want to be. True, this might be impossible, but impossibility didn’t use to put me off and it has to be done.

We’ll, well I’ll, start with matrix-diddling methinks.


big think

Unless both players are so supine as to only aspire to a draw, at some point in every game of chess there will be a tipping point. A place where the game-balance will change, a place where you need to have the big think. Progress through the ranks will be measured by your ability to spot this moment; better players up-the-ante and send it back to their opponents, lesser players just try not to mess up too badly, lesser-lesser players lose because they didn’t notice that the moment had occurred.

I think that my OU studies have come to a point of this type—whence, and how, hence? I’ve decided, but, being a player of games, my short-term aims aren’t always a true guide to my long-term ambitions. So I thought that I’d detail my thinking.

Next year, except for a, potential, ten-pointer I won’t be doing any computer courses at all—have I’ve upped my maths game at the expense of computing? Exactly not.

Time for a wee aside.

It’s spring-clean season at anderson villas and I felt [was] compelled to pretend to play my part—during the process I found one of my old notebooks. Said notebook was pre-OU and contained, amongst other things, my plans for an Access/visual basic/XML/ASP/HTML/JavaScript asset-tracking application. I dimly remember the thing—a multi-layered monster that, although it, sort-of, worked, couldn’t be trusted or easily-fixed and got dumped. Today I probably wouldn’t even attempt such a thing, or if I did I’d write a mySQL database and, if I needed a user-friendly front end, a couple of PHP pages.

What struck me was that I…

  1. Had ambition [hubris?]—I didn’t let the fact that what I was trying to do was stupid stop me attempting it
  2. Took a joy from the process
  3. Thought that if I could produce something that worked that was the problem solved
  4. Didn’t have a proper methodology for tackling a project; any project
  5. Plan

Three, four and five are why I started my studies, have I lost one and two in the mix? Therein lies the rub—and that’s why I’m putting my computing studies on a, temporary, hold—I need to work on my own projects. I need to see where I want to go. I can only do that by starting to play again. I may have lost the joy. For too long now I’ve only coded when a TMA is due—hand-held all the way. I’m developing a comfort-zone—one where the marks are all that matters. That’s a bad place for me to be.

I want to be stretched, I want my head to hurt from thinking too much, I want the hard-road. Strangely the hard-road takes some getting onto…


slow-bumps on the road

I tackled the TMA, as we knew that I would, learning goes out the door when marks are on offer. But my learning had a shock—I spent the entire weekend toiling at writing the code for something that I’d thought would take me minutes. I eventually got it working, but I’m still fretting; still running my, mental, tongue over the broken tooth of my horrid code…

Writing right code is a difficult thing—especially if we don’t have a clean slate and we don’t know what it is that we want to do. Or is it? This is a question, couched in different terms, that has vexed many on this course. So I’ll ask another question—what are we meant to be learning here??

Java would be the obvious answer, but it would be the wrong one. Much type has been typed in the fora moaning about the fact that M257 doesn’t teach you Java. It’s not meant to. Despite the ‘Java’ in the title this course is really about, I think, an aspect of programming that is lightly taught—working with an existant code-base.

And perhaps that’s what M257 is really about.


This post was more-than-usually deranged so I’ve changed it. Not my normal policy but it was gibberish in the large. I’m not sure if it’s much better now, but a least there’s a chance that you might understand what I’m talking about.

And at some point I should have mentioned that knowing what it is that you want to achieve isn’t trivial…



My last couple of posts have been, shall we say…slightly disorganized, to say the least. Irrational might be a better word. But I do face a genuine dilemma—how should I tackle the last TMA for this course?

The temptation is to try something new or to not do anything at all. But we all know the tempting nature of temptations—they can lead you off the path of righteousness. I could just say, ‘sod it’—I’m not going to do that. How hard should I try? To what lengths should I go? If I decide on lengths that is.

Into this mix is thrown the fact that I have a tutorial that I may be able to attend [the last one was in Glasgow; where I will only go if Hampden is my destination—at this stage of my life]. This will introduce me to faces that I will wish to impress.

The sane thing to do would be to just code, to see what happens, to see how I you feel. Probably not only sane but right too. Sane and right have never been my fellow travellers—let’s see what cretinous edjitty I come up with, shall we? For I shall.


the plan

After a night and a day pondering upon the meat of my last post I downloaded the TMA today. It was the right thing to do. Still I fret and tittle, should I really not try something new?

A quick perusal of said beast [the TMA] assures me that we won’t be doing anything too difficult here. That’s another reason for frettage—am I missing something? Others are having problems and I haven’t dived in. Am I sure that I can do this? I think so…

It’s not that I think that this is easy—I don’t—I’ll have to work hard and long to get this one complete. At some point I’ll be whinging about the amount of time that I’ve spent/wasted. And work is not something that I normally do well. But I know me and I know what I’m good at, and what I’m good at is this.

I might be a pratt, an arrogant pratt, an insufferable arrogant pratt, but I know where my strengths lie. I don’t ever sell myself short [ha!]; I’m aware where I’m comfortable—I don’t ever let my [non-existent] modesty get in the way of self-analysis.

I treat me as the pratt that I am. I treat you as if you care.



It’s been nearly a month since my last post here, and nearly a month since I last opened up NetBeans. Is this bad? Almost surely. Not the not-posting bit, the not doing any course work bit is what might bite. [I should say that I haven’t open the unit books either].

Units eight to twelve are, almost certainly, exactly the units where I’m going to struggle. [Although units eleven and twelve—web-based case studies—are optional, and hence may—i.e. will be—skipped until after the course, or forever.] So what to do?

Normally I’d just start the TMA; that’s what I do for computer courses—use the stick of the TMA to get the me to chase the carrot of knowledge. But, perhaps, this time I should try something different. Why? Because this time there are some special circumstances:

  • I’ve, more-or-less, passed the course, and it doesn’t count towards my degree classification
  • I’m doing another course which does count towards my degree classification and which could do with my time.
  • It’s always worth trying to learn in a different fashion…
  • …Especially if it can only hurt your pride

So, something different then?

learning curves

I’ve been almost six years at this Open University lark, you’d think that I’d have tried just about every learning methodology that ever twas, wouldn’t you? I haven’t, and neither have you. I, as you probably do, work in the same way as I worked for my last course. Which seemed to do the trick, or not. But is the traditional way the best way? Yes, perhaps, it worked, but you still had that nagging feeling at the end of the course that you could have done better, didn’t you?. You felt that you could have learned more.

Do we owe it to ourselves, when the pressure is off, to at least pretend, to try a different approach?

Reading OU blogs you’re almost assaulted with learning techniques. There are whole courses about how people learn and the best way to facilitate this process. [What’s the best way to learn about how people learn?] The strange thing is that I’ve almost never come across anything that I’ve thought might be useful to me. Which is something of a worry.

I work in education, albeit as a drudge rather than as a teacher. I’m well aware of the fetish of the new, “computers must be integrated into the child-centred learning environment”. Really? For all children? Why is the ‘old’ automatically dismissed as bunkum? And dangerous bunkum that will harm ’your child’.

During the last HMIE of my school one of the teachers said something along the lines of, …it’s worked for thirty years…. This was considered as the grossest of gross faux-pax, [Which is why I got to hear of it], why? Because despite the fact that we’ve been teaching children for millennia nothing that we’ve learnt over this time matters as much as what some educationalist thought in the bath yesterday. Unfair of me—yes. But then so is calling anybody a stakeholder.

Argued myself into a corner again, haven’t I? Just do the TMA neil. Or maybe not


built-in stupidity

There are perils to being a diddy and a drunk—you do stupid things. Stupid things like uploading the wrong TMA to the server.

Fortunately I took the precaution of looking at what I’d submitted today. When I did I smelled a rat—me. For some reason I’d decided to re-submit TMA01. At least that’s what I hope that I’ve done, [I’m at work so I can’t fix this until I get home] hopefully I don’t have anything more sinister to deal with.

I don’t now how many TMA/ECAs I’ve submitted by now [I suppose that I could count them, but I’m not going to] and I still got this wrong. A lesson if only to me.


This proto-debâclé has reinforced my intention to tackle TMA03 in an entirely new way. In the entirely new way that I have planned to tackle, at least, the past ten computing TMAs—test-driven. I’m going to write the unit-tests first.

I always mean to; but I always write them afterwards, if I write them at all. I’m an awful person. I suspect that I’m not alone in this. Good intentions are not enough, action is required.

M257 has been, so far, a great course for me: I’ve met great people [you nearly always do], my appetite for coding has been re-whetted and I’ve been introduced to many new ideas. I’m now approaching a point where I have to make a decision—am I going to take this seriously? By which I mean am I going to get organized about coding?

I have all the tools to hand, what may be lacking is the will. At heart I enjoy messing about without any clear plan, coding is a pastime for me. I could keep it so, but do I want to? My suspicion is that I don’t.

My next course will be M256 [and Topology—it’s the last one and I desire my mind to be blown-up from the inside], which keeps my options open. However this can’t be put off forever.

I started down the OU road to learn how to do things properly. And, yet, five years in, I’m still mucking about—I now now a bit about the proper way to do things, but I don’t do it that way. So am I any further forward?

I think so, but I’m not sure. Now may be the time to decide.


question three

I’ve spent an inordinate amount of time trying to get this TMA away. In fact I’ve spent an inordinate amount of time on this TMA in general. Why am I in this position? Because I’ve really enjoyed doing it and I’m reluctant to give it up is why. In this I’m not alone, it’s the settled opinion of the café that Q3 has been the best TMA question ever. Ever, that’s a long time.

It is question three that I’ve been spending my time on. It is question three that I’ve enjoyed. It is question three that will pass or fail me. Not that I care.

Usually, meaning up until now, TMA questions, for the Java courses anyway, are exercises in, ‘following the instructions’, not so this time—this time we have to come up with our own ideas. Within reason. We were given a code-skeleton, which we moaned about, and a specification, which we moaned about, but apart from that we were mostly off-the-leash.

We had to produce a drawing that moved, most of us seem to have programmed a game. Some of us, including me, have programmed more than one game.

I guess that I’ve spent about forty hours on this [that may be an under-guesstimate]—if I only get five per cent I’ll have spent my time wisely. I’ve learnt more about Java doing this one TMA question than I’ve learnt from all the M255/M257 questions put together so far. Albeit it’s a sub-set of Java—Javax.Swing/Java.awt. So why aren’t all TMA questions like this one?

For one thing, questions like these must be hellish to mark. As students we rarely care about the tortures our tutors go through, we see what we pay, we don’t ask how hard it is for our tutors. For another, you have to be quite a wee way down the Java road before you can be given ‘your head’ in this way. I’m not sure that we were ready for this before now. Some of us may still not be, and in that set I include me.

As stated above the settled opinion of the café is that this was a great question, that may not be the settled opinion of the cohort. Those who post are well in the minority. Could it be that others hated this question? I doubt it, but then I’m notorious for being wrong. Many may have only tufts of hair, or be opening their veins, or indulging in some other displacement activity.

Thankfully I’m not, yet, so up-myself that I equate me with the entire human-race. And, for twice, I don’t know what I feel about all this. But one can say—if it shuts me up, it has to be going in the right direction.

TMA away!


not been posting…

For a while, for various reasons, some of which I will list here…

  • I was beginning to think that I was wasting too much time writing this rubbish
  • I felt that I was running out of things to say
  • I’ve been a wee bit depressed about life [you get like that] and I didn’t want to poison the happiness of others
  • Everywhere I turned there seemed to be something more urgent to do

Basically I’d lost the will, the urge and, I thought, the time to blog. Did not blogging help? Not really, I found other ways to waste my time and the work that I’ve got done would probably have been done anyway. And I missed talking to me.

For, at bottom, that’s what you’re doing blogging—trying to make sense of your own existence. The fact that others can hear this conversation isn’t always that important. Although sometimes it is—you do have to keep in mind that other people can read what you write, and will have an opinion about it.

Actually I know what’s wrong, my cousin was found dead a week ago last Saturday. A death makes you think about life, specifically one life—your own. I’ve been thinking about my life too much for the last week or so. Introspection is bad for me.

But you can’t feel down all the time, at some point you will bounce back, at some point your appetite for the world, and all its strangenesses, will return. So…

The time has again come to write nonsense, to post my joys and sorrows, to spout tosh, to write of my life. To live a full life you have to be careless about the fact that you have one to lose—He who is brave is freeSeneca. [Nero forced him to commit suicide, so he may have been right.]

David would want me to do that, and my TMA is almost ready to be away…



I’ve been trying to come to terms with these. On the face of it pretty simple but take the following quotes:

  • For a computer a billion-to-one chance happens on average once a second.
  • For inexplicable reasons it is possible for threads to wake up even if notify() and notifyAll() has not been called.

Scary or what? We’re on the verge of beginning to not understand one of our most important machines!

It ties in with something that I’ve been thinking about recently.

One of the great things about the OU is that you have the opportunity to view the thoughts of your fellow students via the blogs. [True, you get to interact with your fellows in brick-universities too, but you tend to ‘clump’ into a peer-group I found.] One of the major beasts on this scene is Jonathan. And recently he’s been asking a question that has got me pondering—how do we cope with all this information?

I don’t have any answers, however I think that we’re approaching an important tipping-point in human existence—we’re going to have to treat information as we treat our gardens. We can plant, mulch, water and fertilize as much as we want, but in the end what grows isn’t down to us. Darwinian survival-of-the-fittest rules will apply.

There will be a complexity beyond any human understanding. At best we can selectively breed.

One of the major leaps in human culture was when we started to domesticate animals and grow crops. I think that we are approaching a similar leap, only this time it’s machines and information.

That’s enough philosophy for a Saturday morning methinks…



I had to go to the doctor’s today to be told that my bones are in the process of becoming shot. I knew that this was going to happen—my wee brother has this and we have similar pathologies. Still it’s a pest. Pills for the rest of our naturals…

There’s a big bit of me that thinks this is all very unfair—becoming a ceoliac, becoming brittle, having my wages frozen, being faced with redundancy. They say that, ‘a little rain must fall’, into any life, but must it fall all at once?

Then there’s another part of me that realizes that I’m a whining moaner—when we consider all the humans who ever were, I live in, what for six nines of them would have been unbelievable opulence. [Wee joke—things like servers’ up-time are generally measured as a percentage of nines. So six nines would be 99.9999%.]


painting in java

I’m beginning to get the hang of this. Or at least I think so.

Coming from, I suppose, a web background the way Java handles this feels odd. An oddness I’m still struggling to describe. And if you can’t describe something to yourself? I’m used to the parent of an object being the thing that contains it. But with Classes the superclass of a JButton is not the JPanel that the JButton has been added to. I’m used to just telling a node to change it’s appearance, without worrying about how this might affect any other nodes.

I’m, also, struggling with when, exactly, a paint() method is called—I’ve been reduced to writing System.out a lot. [Which at least made me realize that you, as a programmer, don’t have control of when it fires.]

I’ve developed a style, most times a good thing. My tutor will decide come TMA02 mark-time whether my style is a good style. The good things are that it seems to work and I can let the Classes do their own thing. Still I worry.

This course has been the first, computer, course where I’ve felt at sea. Normally I’m happy enough hacking away, this time I’m finding things a wee bit hard in places. That’s good—keeps me straight. For too long this has come too easily for me. I did this to learn, to be tested, to be stretched. Should I treat the other horrors of my life in the same way.

The more difficulties the better?


collision detection

For the last few days I’ve been ill, shoogly and, mostly, in my pit. Which hasn’t stopped me working, off-and-on, at TMA02. That work has been crap of the lowest order. I’m still writing code without a plan, in a fix-things-here-then-fix-the-things-you’ve-broken-there fashion. When I come up against a problem I just kludge my way around it—it’s almost scary how my good I am at doing that.

I’m not go into detail here—this is a TMA. But let us just say that we are half-way-off-the leash on this one [question three—which involves animating things], but not enough off-the…etc. for many of us. We’ve been given a skeleton Class structure that, some students, including me, don’t much like. Part of my kludgery I blame on others—I wanted to start from somewhere else. That’s all I’ll say on the matter.

Anyway, I’ve developed an interest in collisions—when do two things meet? I suppose that this is a continuation of my previous post, but there are some differences. Mostly because we need to know about extending the Thread Class. [Which is the next unit. Or may, by now, be the current unit.]

With Threads all bets are off, you go to sleep, tomorrow things might not be as they were yesterday; I look away—you might switch a piece off the board; you look away, I might walk away. One of us may require a lock on what’s true; when we both want to alter what’s true. That’s threading.

I’ve never worked with threads before, but I have worked with JavaScript setTimer() and setInterval() a lot, which although they aren’t the same share many of the same problems as Thread.sleep(int)—you might wake up to find that a [hard-]boundary has been crossed. At worst you’re going to get sponginess [something happens, seemingly, late], at worst you’re going to get crossing. The solution to this is, of course, a proper understanding of threads and threading. So why didn’t we tackle Threads before we tacked animation?

Well, because Threading is hard to understand, there are whole courses on concurrency. But we should get used to hard and we should also get used to tackling units out-of-order if it suits our purposes, or if you need it for that breakout game that you’ve spent so long building…

So, more work…wouldn’t have it any other way.


boundaries, booleans and me

Bad code is easy enough to write but essentially all that ever goes wrong is that you don’t realize that a boundary has been crossed or that a boolean has changed. So coding is easy then? No, it’s horribly tangled. Simple rules can lead to unexpected complexity in unexpectedly complex ways.

You will have guessed by now that I, currently, have issues with my block-dropping game. Issues that I would be trying to fix if I hadn’t been a diddy and left my flash-drive plugged into my work machine. Yes I know. I have access to storage everywhere, I’m not a geek for nothing, if I put my mind to it I can do pretty much anything that can be done on the web, yet I still tote things around on something that I regularly lose or put in the washing machine. Sometimes I wonder if I’ll ever really learn anything.

Because I’ve been coding with nary a specification nor a thought it was inevitable that I’d end up with what I, internally, call a crossing problem. But even with proper planning and thought at some point all programmers are going to end up here—things move off the board when they’re not supposed to. A boundary gets crossed because the boolean you’re watching hasn’t changed. The matching problem, what I, again internally, call a scoobie [Scottish slang: from Scooby-Do—clue, in this sense it means stymied]; is that things stop before they’re supposed to.

We write unit tests to catch this kind of stuff, mostly after we’re sure that things are working. Still they catch us out. Because you’re usually not watching only one truth, so the middle is no longer excluded. That’s where things start to get complicated, take the following code—

if (someThing && someThingElse){ doSomething; } else { doSomethingElse; }

Simple enough eh? Alas all the options are not covered—there are four choices here, not two. I’ve been taught the tools for dealing with this, but I don’t, our didn’t in this case, use them. Because I’m too up myself. You just get things working. Juggling this stuff in the meat RAM is hard, and prone to failure. Thus, we should plan.

But never do.


some coding

This week I’ve been mostly coding. I made the conscious decision not to spend any time reading/posting in the forums and blogs, working the books or doing any maths. So I’ve spent about four hours a day hacking at the click-face olde stylee. By which I mean building something without any plan. I’ve now got a, mostly, working Tetrus-like falling block game. Which is nice.

The code is atrocious, a skien of kludges, and I’m not sure if I’ve learned much, but I did have fun and I’m beginning to develop a ‘feel’ for Java. I bore even myself about this emphasis on a ‘feel’ for a programming language, but I do think that it’s important. What do I mean by ‘feel’? I think I mean being in a place where you can think abstractly without having to stretch your mind to remember the basics—when you play football you don’t have to think about how to run.

And rather like learning to walk you have to take the small steps first. Which in coding terms means just coding without worrying about thinks like elegance and robustness. They are important, but they come later.

There are many levels to programming but you have to know the ‘words’ before can attempt to do anything beyond the basics. Actually that isn’t true—an architect doesn’t need to know how to fit a tap. But for us, the nuts-and-bolters, the M257ers, we do need to be familiar with the words and how they fit together. We are, after all, going to have to write them down under exam conditions. To be able to do this we are going to have to be fluent.

At some point you do have to move on—I once shared a flat with a German bloke who had a talent for languages but who had lost the ability to talk properly in any of them. Even German. An odd place to be, and a warning. He knew all the words but had little ability to string them together. You need to ‘think’ in the language that you’re using—and this ability only comes with practice, effort and thought.

So where am I? At the toddler stage—I often need to think about how to create and assign an Array for example. So, for me, more block dropping and another week of coding…



My realization that I don’t grok javax.swing and all the things involved in the building a Java user-interface has scared me into [mostly thinking-about] getting down to serious coding. And, what little, coding that has been done has scared me further. I need to really work at this. I don’t think I’ve ever been in this place [OU-wize] before—lost and behind.

I’ve got the weekend, mostly, and, as I’m on early shift next week, every night can be spent working at catching-up. Which may suffice. But I have the fear. Is this good? Yes.

My previous courses have lulled me into a neil-OU-rhythm, one that doesn’t involve me in being behind. It is unrealistic to pretend that this will always be so [and my present strait provides the example/counter-example of this]. So, Theorem 1.1:

At some point in any student’s life this, behindity, is going to be so.

Now is as good a time as any to see how I cope with this situation.

I know what my problem is—not enough time spent at the click-face actually coding. So I’m going to try a bad thing—I’m going to sit down with an idea and try to write the code from scratch without much preliminary thought. I know that this is wrong, but.

I posted in one of the fora [a post which I now can’t find] about the need to make mistakes when you’re learning a language. This may not be true for everybody but I think that it’s true for me, this time and about javax.swing.

So far I haven’t had much bother with Java: I’m familiar with the syntax; more than happy with the documentation and, for the small projects that I’ve attempted, haven’t had more than the usual hassle getting things done. But this has me baffled, I feel that I have no ‘feel’ for what’s going on.

I developed my JavaScript ‘feel’ by writing lots of atrocious code in a disorganized fashion, ergo—I should be able to do the same with Java.

I’m certain-sure that you can spot all the flaws in that argument, but it’s worth the attempt. A weekend’s worth of swearing stymied hacking may do the trick. If it doesn’t then there’s always the high-road.

So, off to code.


not behind, but getting there

I decided that I needed to do some coding today—that would be user-interface coding. I was shocked to find how useless I was at it. I could barely create the interface, never mind make it actually work. [A wee squint at the course web site suggests that I am behind—if I can’t do the above.]

Such things happen. And I’m certain sure that I can work my way out of this hole—if I have a mind to. However, I shouldn’t be here. I’ve become complaisant. Bad place to be, bad mind-set to have.

But bad places should not be a cause of utter despair, at times they could be considered good places. Often we give our best when things are at their darkest. Mostly not so, of course, but sometimes. We could always learn from them?

I often worry that my life has been too easy; should I have been tested harder? I moan constantly and resent the successes of others, [not other students, I want you to do well]. And in fact I don’t resent others’ success—I’m just annoyed about how they exploit it. Still. I moan.

Which isn’t terribly helpful, that’s just me. But there are a couple of important points here:

  • Know yourself, know your limitations, know what you are about and [worst thing] be honest.
  • Treat others as if they were human. [Far more difficult.]

The only test is yourself. [Still a failing test for me, but I’m working on my meatware.]


TMA…not away

What with all the festive duties and the arrival of the maths books the deadline for TMA01 has snuck up on me—it’s due in tomorrow so I have to submit tonight. Drat!

The thing is done [I think] but it’s never a pleasant feeling getting this close to the wire. I’d intended to knock-off the corners and get it submitted while at work today, but I forgot my flash drive. Double drat!

I’ve lost count of the number of online TMAs that I’ve now submitted but it’s never a nice time between the submission and the arrival of the marks. There’s always the nagging thought in the back of your head that some tragic error will occur and you’ll end up with zip.

The only bright side is that, as this TMA’s formative [ie the marks don’t count], it doesn’t really matter. Actually it does—it’s an important sighter on how this course is going to be marked. Not doing it would be the equivalent of shooting myself in the elbow—not fatal but a real pest.

I was going to choose the left elbow for emphasis, but for some reason I’m left-handed for a lot of things, so that wouldn’t work. Note that I’m not ambidextrous, It’s just that I’m just different-handed for different things. My Grandfather cried me cack-handed, and cack is probably a good adjective for any of my qualities.

too much to do

This year I’m doing eighty points, my highest OU workload ever, the spectre of time-trouble looms. Now, although I say this all the time, it may be time to get organized. There are some worrying signs:

  • I’ve found myself not doing anything a lot lately
  • It’s been difficult to concentrate
  • I find it hard to force myself to get down to work

My long-time readers will know these signs, and know what they mean—I’ve got too much to do. And if I’ve got too much to do now, before M208 kicks in…?

The answer, as always, is to make lists and get things ticked-off. I’ve been here before, I’ll be here again and so will you.


Perhaps I don’t need to get to this place quite so often?

I’ve recently been thinking quite a lot about how I learn, about how I go about things, about my approach… And it’s beginning to dawn on me that it may be time for a change. Both in the way I learn [and the tools that I use] and the way that I structure my life.

Essentially I’m chaotic—I do what I want when I want. Which sometimes leaves important things undone, or a rushed last-minute botch-job occurs.

I get away with this because I’m reasonably clever and I can work hard when I have to. I’m now approaching a place where this may not be enough.

So what should I do? I suppose that I could try to be more structured—certainly at work. But I find structure restrictive and I know that it’ll just add another level of stress, because I won’t do things when I’m meant to and I’ll just fret about that.

Actually I already know what to do—make lists and tick things off. I should force myself to do that. But all the systems-thinking blogs and all the n-tier architectures in the world will not force nelly to make-lists again.

Unless he wants to.


a bit more than half-way through this journey…

…of mine I find myself having a wee think.

Traditionally New Year is a time for reflection upon times past and for ponderings about one’s future plans. Normally I treat this tosh as it deserves—as a load of bollocks. A life too-much reflected upon is a life unlived. Too much thinking about yourself and your place in the grand-scheme results in not enough doing, I find.

And yet as we approach the fag-end of the year I find myself doing just that. Perhaps it’s my age—I turned fifty this year— or being forbidden wheat, or whatever. Anyway I found myself doing it.

In part, I suppose, this navel gazing is down to the very real possibility that I’ll be made redundant/privatized in the coming year. I’m not sure how I feel about that—it may be good for me. A needful kick-up-the-butt to rouse me from my sloth. But mostly it’s about my OU future.

Before this course [M257] I’d planned my studies around the fact that I didn’t much like Java. That has changed, I’m enjoying coding in a way that I haven’t enjoyed it in ages—I’ve re-discovered the joy and joy of just writing code. I’ve also re-discovered my appetite to ‘know what I’m doing’. So I should change my plans, but in what way?

Money is an issue. Had I wads of the stuff I’d just pick all the courses that appealed—I’m not in that happy position. So some thought is required.

The essential difficulty is whether, or not, I do M256 and M363? [M362 is already decided upon, I think.] The problem comes down to dropping a maths course and not doing one of the other, tempting, level three computer courses. [not M359!] Do I want to do this?

The bugger is that the maths courses I really want to do are biennials and my degree now has a cut-off date. I’m feeling slightly hemmed in; or ‘kettled’ I suppose.

At this point you may be thinking, why is he worrying about this now? He has until next August to make this decision. A point with which I’d agree. But sometimes it helps to fret, and when I do have to make my choice this will be here to remind me that I once thought this way.

Sod it—I’ll write some code to make the choice for me…


the GUI

During the gaps in my festive obligations I’ve been trying to get to grips with units six & seven and to get TMA02 behind me. I often do this—use a TMA to learn/test my learning. It may not be the right way for everybody but it often works for me.

The other way to use a TMA is to learn ‘the books’ and then do the thing without reference to them—to see what’s gone in, to allow your tutor point out your flaws. [Perhaps, even, with a view to fixing them?] This method is somewhat chancy for any module that counts towards your degree classification and it’s alway hard to deliberately not strive for perfection. If you really want to learn rather than pass this is the way to go.

In a perfect world I’d prefer the later method, but this is problematic for computing courses—you need to have the [online] reference materials open and a quick google will happen without thought when the going gets tough. You might as well admit what’s going to happen and use the books. [Although in this case they were pretty useless.]

unit six

I haven’t had much trouble with this one, there are some slight oddnesses with the way that it’s done in places. But for someone with a bit of web-savvy, who understands the concept of nesting it isn’t too hard to grasp—you put one thing inside another.

unit seven

Here I ran into problems.

As a JavaScripter I’m familiar with the idea that elements can respond to user-input events via listeners, so up until section four I was happy enough. At which point I became unclear as to what was going on—we seemed to be passing around a non-concrete instance of an abstract class. We have the following methods: paint() , repaint(), update(), why [and where] are they different? When are they called? And what by? [Let’s leave aside the paintComponent() method for the time being…]

For once the, usually excellent, OU materials let me down—no matter how often I read them, no matter how many scratchings I made in the margins, no matter how often I re-wrote that code…I didn’t see the flow. There was something happening that I didn’t grok. Bad sign.

The worst thing about this was that I could still write working code. Bad, bad sign—if you can write working code without understanding why you have the worst type of temptation—not to work at it anymore. Especially if it isn’t at the centre of your, Java, focus. This is not a temptation that I want to succumb to, I may, but my intentions are good.

So out with the notebook and take some notes on the online painting stuff that I don’t understand.


MS221 result

Came today, I got a distinction—ninety percent for the exam and ninety-seven percent for the continuous assessment. So that would be a whoo-hoo then.

Once upon a time I was a wee bit diffident about revealing my marks. I suppose that this was a reaction to old FirstClass signatures—where people listed all their courses and results at the bottom of every post; which was border-line annoying. I’ve decided to change my policy. Partly because it may be important for you to know that I get distinctions and grade twos rather than grade fives in order to judge this tripe. But mostly it’s because I’m keenly prurient as to how others do and I imagine that you’re the same. So course results are now to be included here—although I’ll still draw the line at TMA marks.


Are a wee bit unfair. Some people who are better mathematicians than me will have scored less than I did. I have an advantage—I’ve been playing competitive chess since the age of twelve. It’s no great stretch for me to sit on my back-side, concentrating, for three hours straight and I’m accustomed to time pressure. In a perverse way I enjoy exams and in a strange way I dislike playing chess—thrawn. Others will not be so lucky. Is there a better way to judge us?

For the OU no. Without the exam there would be the potential for you to get a degree on the back of someone else’s work—how do they know that this is my work if it was all submitted by post/online? That’s why they make that whole song-and-dance about identification at the exam.

This may change, or it may not. Coding Horror had some cogent points to make about our online identities the other day. My feeling is that this is going to be something that will become more important over the next few years. If we don’t solve this problem whole swathes of our [online] lives may have to change.

Then there’s the mess of the computing exams. We have a whole raft of tools to stop us making mistakes: the complier, generics, strong typing online documentation, and yet we are supposed to write our answers in the exam. In a fit of optimism, engendered by a good result, I printed of the specimen exam for this course today. Did not like—some of the questions have a CMA cast to them! I fear horror.

But it’s too easy to moan, why don’t I come up with an alternate model? Because I can’t is why…


busy getting nothing done…

After I’d spent a dreary Saturday morning striking two-hundred-odd exam desks it was time to get down to work, M257 course work that is. [Or subjects pertaining, or abutting, to.] I was spoilt for choice when it came to options

  • Complete TMA01 and get it submitted
  • Create the UML documents for the shared solitaire project
  • Do some work on units six and seven
  • Read that, rather daunting, introduction to the Lambda Calculus document that I’d printed off from the www

As ever, when faced by choices, you dip into them all, and thus do not much, badly. As ever with my lists you’re going to get the what neil did next in the wrong order.

units six and seven

Surprisingly got a look in—a NetBeans project has been created; a play-pen where I can mess around with GUI things to my heart’s discontent. Not much has really been done so far and there’s a good chance that said project may wither through neglect…

lambda calculus

I’ve been here before. Still at sea. This really needs time and someone else’s mind thrown at it.

One of the reasons that I started down this maths trail of mine was that I realized that I didn’t have the intellectual tools to understand some the things that I wanted to understand. I’ve moved on a wee bit—I now realize just how far away from understanding I am. So I know to give this up, for now.

UML diagram

Phil found a UML plugin that Rob had to teach me to use. So my efforts were wasted, for which I’m utterly grateful, I was not having fun. Yet another lesson on approaching the task in the proper way—don’t start to produce the documentation half-way through a project. When will I learn these lessons?


This didn’t get off the ground. I knew that it wouldn’t, but I made an interesting decision, one that made me think—I’ll do it on the night of the school concert.

Every year the school has a Christmas Concert, and every year I seem to end up sitting there rushing to complete some piece of OU work. I did my tt380 ECA there, I did TMA01 for M263 there, I did TMA01 for M255 there and now I’m going to do the same for M257. I can’t exactly be [work] busy can I? So why am I there? It’s a risk assessment, one I make. I make?

Yes, risk assessment is something that generally comes down to me. [Not exactly, but for the purposes of this example we will gloss over some of the complexities of the process.] I have a lot of domain-specific knowledge and, more importantly, I’m willing carry-the-can. Unless I say something outrageous my word is generally taken as final.

In software terms I’m a black-box function, one without a proper specification and contract—I may do things to suit me rather than what’s best objectively. [Is there an acceptable level of risk that justifies saving the cost of me?] I don’t but I could. The reasons that I deem my presence necessary at the school concert and not the S1 Christmas party are rather subtle, but they could include that it’s a good time to get my OU work done.

One of the lessons that I’ve learnt from working together on the solitaire machine is that we all have different ideas about what a certain Class should do. Which means that one of us could change something that would break others’ code without realizing it. This doesn’t matter too much for the solitaire thingee—one of the reasons that we’re doing it is to learn these things. What is interesting is that something that I’ve learnt studying code is applicable to my work-life.

Now I have to apply some of the knowledge from my work-life to my code-life—don’t hand-off responsibility without a contract, a unit test and a specification.



Other students are starting to receive their results for the October exams, which make the waiting so much worse for the rest of us. My result is due on Friday 17th December—which usually means Wednesday, but doesn’t have to. Why do these things take so long?

This is my understanding of what’s going on, please do not take it as read.

It’s not the marking, which I understand is done reasonably quickly [although from a remark that one of my tutors made, I’ve a feeling that there may be a general coven, at some central point, of tutors to do the marking—such a thing may be hard to arrange]. But when that’s done, I assume, that there’s a lot of: “making sure that the marking was correct”; balancing the difficulty of the exam with the raw results of the cohort; making decisions on the border-line cases. One hundred and six decisions.

After that it needs to be externally assessed and then put before the…at which point I don’t know. But I’m guessing that there’s a rubber-stamping body somewhere in the mix. Is it any wonder that it all takes so long?

Still waiting is a bugger.


sunday am

Oh dear, it’s Sunday morning, I have a burning tree open in NetBeans, Bugzilla documentation to read, several UML documents to create, TMAs to do and the shameful mess of my last post to explain. Let nobody tell you that the road to geekdom is an easy one.

Last things first. What I was struggling to say is that doing something that you like as a job may not be much fun at all. I imagine that restaurant critics get fed up with food, that prostitutes…well, you catch my drift.

version 1.0

Of the solitaire machine is now complete thanks to much hard work by Rob. And as I type this Phil is doing a refactor to remove dependencies. [Kenai has chat rooms so that you can talk to one another when you’re working and see commits as they happen.] So my burning tree issue is moot—at some point I’ll pull and merge, or revert. Actually I’ve just tried this and I can’t pull Output: [abort: unresolved merge conflicts (see hg resolve)]. I’m going to have to revert some more… Managed a pull but still got a burning tree—forced update required methinks.

Still got a burning tree, but as Phil is beavering away I’ll leave it for a while.

As I said in my last post working with others is an education. I’ve learnt more about organizing a project in the last couple of days than I have in the last couple of years. I can code, but I’m learning that it has always been in an incoherent fashion. I suppose that I knew this but working on the solitaire project has heightened my sense of ignorance. Always a good thing.

sunday pm

I took a sudden yen for a bowl of stew, which meant a trip into town for some soya chunks. Sometimes it’s a pain being a vegetarian—some of the stuff you need isn’t available in the corner shop.

So the plan for the day is to make the stew, read the Bugzilla documentation and work on the project’s issue tracker. That seems to be enough to be getting on with. For the rest of the week it’s finish TMA01 and get it submitted and create the UML documents. Which doesn’t sound like much but will probably take me forever.

Then there’s the nagging thought that I haven’t done any maths in a while…



There’s been a long week because of said white-stuff falling in Edinburgh. It had an upside—I got Monday and Tuesday off as the schools were closed. Wednesday, Thursday and Friday were a bugger though—the schools weren’t closed.

For most people snow brings two issues: transportation—people can’t get to-and-from work as easily as they might like; child-care—their local school is closed so they can’t offload their offspring. I don’t have kids and the weather would have to be specially awful for me not to manage the mile and a half walk to work. I have other issues with the shite-stuff.

I’m the person that has to ensure that offspring can be dumped safely. I’m the one who has to shovel the stuff. I’m the oneS upon whom the blame falls for the failure of ‘the cooncil’ to ensure that, after a foot of snow, thing aren’t as they are on a balmy mid-summer’s day. Which involves me interfacing with snow rather more intimately than I’d like.

What most people don’t understand is the difference between amateur fun and professional horror. When you get paid to do something and your job is on-the-line if you don’t, your attitude to the task is different. Clearing your garden path on a Sunday ’morn is one thing, you can stop for a beer, there’s no real time-crunch—your kids can go hungry, you can walk to the pub. But what if you had to clear every garden path in your street and do it fast? Different prospect. On Wednesday I started work at 05:30am, by 08:30am I’d cut clear paths to every entrance in the school. I shovelled huge lumps of foot-thick ice and snow for three hours straight. What I hadn’t done is clear the car park [an impossibility even with the machinery that we don’t have]. Can you guess what people complained about?

In Edinburgh, the Council had the buses running, most schools opened [even if partially], school meals going [again partial], the main routes cleared by Wednesday. A lot of people worked very-very hard to achieve that, our thanks?


Shoveller I might be but there’s another side to my life; the amateur coder. A couple of extra days off were just the ticket there, they allowed me to dig into the shared project[s]. That’s right there are now two: the OUCalculator refactored as a MVC and our solitaire project [yes it’s is now our].

I don’t know about the others, but I’ve never worked as part of a [distributed, or indeed any kind of] team before and it’s been a real eye-opener. There have been issues everywhere, at least for me. What has been fascinating is seeing how others approach, either their, or my, code. If the only thing that we take from the process is seeing how others tackle problems then I think that the activity has paid its way. [Phil is giving us a master-class in test-driven development that has even shut me up!] But I think that we’ll get more out of it than that—we’re learning how to use the software that we are going to use to build our software.

For example: this week I ‘lost’ the ability to push to the team server. Actually I hadn’t—what I had was a merge issue and I wasn’t watching the Mercurial output window. There was no alert, all I had was the cryptic—abort: multiple heads [just out of sight]. At which point you need to pull & merge, resolve any issues [there may be none: if there are you’ll get red files in NetBeans] and again push. It took me two days to find that out. My duff but…

It was at this point that I realized that I didn’t have a clue, as to…everything.


Using my powers, as, self-appointed, administrator, I assigned all the programming tasks to Rob. And all the learning about how-to stuff to me. Arbitary, but correct. We’ve [that would be I] have messed this up in almost every sense—design of the objects [William & Phil have pointed out glaring flaws in my concieit], coding—I gave Rob a wrong code-base to start from, and aministration—I didn’t know what I was doing. We need to re-factor us.

There was a point to all this, but it’s now escaped me, some tortuous metaphor about shovelling I assume. But very, very drunk indeed, no longer comparable, post and wake tomorrow @ 2 with the same fucked-up feeling that you’ve always had neil.

Don’t worry about me! I may moan, but that’s my right, but I am attuned to the asolute wonder of this world—prime numbers.


the world is white

It’s eight-thirty-ish and I’m at work—shovelling snow. Still there are compensations. It’s not the worst thing in the world—being out in the snow-scape, under a robin’s egg sky, with the half moon shining bright, just you and the wagtails. In fact it’s one of the best


hacking code

Is what I’ve been at this week. And I’ve been enjoying myself—sometimes I do! [Well there’s been some work-related hellishness but we’ll leave that to one side.]

I’ve even been learning stuff—I beginning to grok the Mercurial work-flow, I’ve managed to get a project going on kenai [notice that the word working is not used here] and my NetBeans wrangling skills are coming on. So, all-in-all, not too bad a week’s effort.

It’s been so long since I indulged in a protracted bout of coding that I’ve forgotten when I last did one. That’s bad. I’m doing a computing degree; true it’s a maths/computing science one that isn’t primarily focused on actual programming, but still.

At heart I want to programme and I want to do it well; somehow, it seems, that I’d forgotten this. It is one of my main motivations for doing this degree. Being an OU student, shirking at work, being a drunk—it all eats up time. That doesn’t mean that I shouldn’t make time to have fun.

…that’s odd—this course requires me to programme, but because I’ve been having fun doing it I hadn’t seen it as coursework until I wrote this. Interesting.

you don’t learn…

From experience, or at least I don’t. There were points during the week when I experienced despair; the despair of the diddy who doesn’t read the documentation, of the arrogant arse, of the fool who knows to press F1 at moments of stress [and castigates others for not doing so] but still never does it.

I’ve been through all of this before—learning a new application, a new programming language, [downloading &] installing new software. And yet every time I hit that molehill on the road there is the same frenzied response—search the www→change things in a random fashion→unistal [or something like that]. The frenzied response that I know doesn’t work, the one that’s, in-fact, counter-productive and causes additional problems. So why is it always my default response?

It’s a defective mind-set—I want to do something on/with my computer, I’m good with computers, ergo I know how to do it. I don’t have said mind-set with maths, I don’t have it at work. Where I do have it is with electrical appliances—it’s only when smoke is issuing from the beast and the smell of ozone is over-powering that I consult the instructions. That, and what my wife always says, should be telling me something—don’t do things unless you know how to do it, or you’ve read, or at least scanned, the how-to stuff.

You know that I’ll be here again, don’t you?


oh what a tangled mess…

I achieve when ever I struggle to achieve.

During my last maths course [M221] much good work was done and much good fun was had in the shared activities. [Before moodle we didn’t have such things, and if we got nothing else from moodle it would be worth its while for these alone.] So, thus enthused, I decided to start my own shared activity for M257—one dedicated to sharing code-projects with other M257ers. That’s when my problems started—how do you share code?

I don’t contribute muchly to the maths activities/fora. I’m a wee bit diffident; I know I’m ignorant. Not so on the computer courses, where I’m like a rash when it comes to opinionatedness. I may be as ignorant there, but it’s harder for people to catch me out—hopefully. Opinions aren’t the same as equations.

So far I’ve tried sourceforge, google code and project kenai. Not one working repository has been created [despite Marcin’s help] and it’s beginning to dawn on me that I’ve cocked-up the way I’m using Mercurial. So what to do?

Team working in distributed environments

Would seem to be the place to go if I’m serious about wanting to do this. But it, the course, has a reputation, and not one of the good kind. It’s also not something that was in the plan. But the plan was always crap and it may be time to rethink it.

What I do know is that I’m going to have to read some documentation, for once.


it’s about this time…

On a course—a couple of months in—when I usually start developing plans. This course has not been an exception to the general rule. So what are my M257 plans? Well in the short-term we have the following—

  1. The CMAs must be done, and done, in a Lady MacBeth fashion—quickly
  2. TMA01 must be completed and submitted
  3. TMA02 must be completed soon

One is done—I submitted CMA05 today. Possibly I’m being stupid here, perhaps I should have pondered-upon a wee bit more. But, I, and I think most students, find CMAs to be an utter pain. They seem focused on your understanding of what the question-putters meant, rather than a genuine test of knowledge. They provoke extreme, busy-busy, what-does-this-mean? threads in the conferences every time.

CMA05 was my twenty-fifth CMA, about the best that I can say about them was that they, occasionally, made me do some work. The worst I can say is not fit for exposure here.

Two is done, three is started. [That would be coding-wise; half the battle is getting your code into that Word document. [Give yourself a couple of days for that.]

why am i doing this?

Because I’m enjoying myself—I’m keen to code and I’m keen to work. Experience has taught me to milk this feeling.

And there are other projects on the go…


changes to courses

I got an email from the OU the other day about changes to the computing course structure. At first I didn’t pay too much attention; mostly these things are purely semantic and as the link I was given didn’t work, it was difficult to get too excited. Then articles started popping up in the blogs and we got a working link.

If you’re inside the system then you should, now, be able to judge for yourselves. If you are outside then Simon of A BSC for me! has made a good summary. [Much better than I could do.]

what do these changes mean?

They seem to be offering nearly the same things in a ‘streamlined’ format. A format that will reduce, to my mind, the flexibility of the current degrees. For example, my degree—Mathematics and Computing Sciences [now called Computing, IT and Mathematics], will have two strands—computing and maths.

The maths strand is much the same as is, but the computer strand has been greatly changed. And not changed in a way that I like:

  1. The new TU100 [My digital life] sixty pointer, the one that’s replacing M150 [Data, computing and information] and T175 [Networked living: exploring information and communication technologies], is compulsory.
  2. At level two we have four more strands: software development, ICT, vendor certificates and solutions development. I can only speak to my strand—but no putting Java to Work, no Building Blocks?
  3. At level-three things are much the same, but TM470 [The computing Project] is now compulsory. So only one of the many other goodies on offer can be taken.

On my current degree I can drop a level one course, and as the M257 [Putting Java to Work] is only twenty points, I can slot in an extra couple of thirty pointers. I can not do the computing project and do two [or three] level-three computer courses, or an extra maths one. In short I can fine-tune my degree to suit my interests.

This no longer looks possible.

does all this matter?

Probably not to me—I’ll now have to finish my degree by 2014—but that was planned anyway. But it does put a clock on me—my wriggle-room has been reduced. I can cope with that.

What I do think, after a wee bit of pondering, is that the Open University is re-aligning itself to provide courses for an entirely new type of student—youths. With tuition fees being such an issue I think that there’ll be an appetite for school leavers to get a job—any job—and do their degree and pay their tuition in bits. If they can get the right job they may even get their tuition fees paid for them. We may be looking at the genesis of an apprenticeship model for information age.

Of course this isn’t new, we’ve had day-release schemes forever, but it was [I think] more common for hands-on subjects. Now with the cost of a ‘normal’ degree sky-rocketing, and their mired-in-debt graduates desperate for cash, I think that it is possible that it could become the norm for say, computing. Rather than hiring an expensive graduate, companies will hire bright school-leavers with an eye to training them up.

I think that this may already be happening—I’m seeing a lot of bright young things about the blogs.

how do i feel about this?

[Pre-supposing that I’m correct in my above analysis.]

I’m slightly torn, I mourn the death of a free-to-all University system. But what was supportable for ten percent of the population is not going to be supportable for one hundred percent—and that is what we should be aiming at. I don’t want the rich to be able to buy a better education, but that will always happen unless we change the world. So, maybe, what we have here is a workable compromise?

It needs thought, it needs providers to be open about what it is that they are trying to do and it may need dilettante students like me, who are essentially doing this for fun, to put our wants behind us.

That said, it may work for students like me—if the OU can corner this market, could they subsidize the more esoteric courses…?



And I don’t mean Object Oriented Programming. Tiredness, slackness and a series of wrong decisions led to an article that is almost completely wrong about my part of the process, I fear repercussions. I said all those words—but I didn’t mean that. To set the record straight the family approached us, and us being useless, we archived their contact details—i.e. effectively lost them. It was a last minute thought—the thing is blue-tacked to the memorial—but that doesn’t mean that it wasn’t seriously meant.

The Remembrance Service is taken pretty seriously by all at Boroughmuir, especially by me. So in penance for my errors I’m going to do an unpaid double shift and complete, what I should have done years ago, our Rolls of Honour.

Then there’s the nagging thought that since World War Two other Boroughmuir pupils have shed their lifeblood. They need remembering too. People are still dying, Pro Patria More, in Afghanistan, in Iraq, there’s always a war. Somewhere.

My Grandfather didn’t play golf for the duration WW2, we don’t play golf when men are dying, he said. I’m my Grandfather’s grandson. Surely it’s the least that we can do to think about those that are risking their lives for what the political class would wheak from under our feet in an instant—freedom.

The Queen sends her kids to wars, in this she is alone among our rulers.


I spoke to a family member today [2010–11–15], she took my incompetence pretty well all things considered. However, I did find out that we’d [we’d this time] messed up even more than I realized; I know why this happened—the person who should have talked to the family was me. I was the one who was going to do the ‘tell the world’ work. There was a lot of information that I should have known. I’m not sure whether we, collectively, had this information, but I was the one who would have asked the questions.

This is something to be thought about in software development—if you delegate responsibility you are no longer allowed to manage the details. For example I was thinking about a library to cope with reading/writing to file, but who was responsible for ensuring that things got cleaned up properly? I couldn’t come up with a good answer. It should be the library code—but I couldn’t think of a way to ensue that close() got called on that BufferedReader by anything other than the calling Class.

So all I was doing was abstracting away a few lines of code, and risking forgetting to release resources. Into the bin with that plan.


having fun…?

Yes—I’ve spent the last couple of nights hacking code and being reminded of why I want to. I started off with my MatrixManipulation library, but the thought dawned that this was a wee bit boring [given the level of my current knowledge of matrices—one day I’ll know enough for it to be complicated], so I decided to return to my solitaire machine. Partly this was down to an attempt to learn how to use NetBeans and partly to familiarise myself with the Javax.swing library. Worthy reasons, but I got sidetracked.

Subversion was proving to be a pure bastard—[gloss] that would be me, being incompetent. I’ve always used Subversion from the command line, so I messed it up when I tried to integrate it with NetBeans; everything was ending up in the wrong places. There followed, the ritual, panicked-thrashing in search of a fix [I even uninstalled both apps. at one point], then sense returned. I could use a different version control application. So I decided upon Mercurial, Joel rates it highly and it’s integrated with NetBeans. Sound.

So I got the thing installed, and so far I like. I haven’t tested anything serious yet [no branch, no tag, no revert] but for a stand-alone, non-shared it seems to be the mustard. We’ll see.

so how’s that solitaire thingee coming along?

I’d say slowly but it’s a bit slower than that. As stated above, my reasons for re-visiting this abhorrence are educationally based, so I’m more focused on NetBeans rather than the actual app. And NetBeans is complicated. Perhaps not in itself but in what it’s able to do; lots of the menu commands [and some of the menus] are a mystery to me. Time to read the documentation methinks. Know myself—won’t do.

The problem with my solitaire project is that, despite the hours I’ve lavished on it, there’s nada in the document sense. I didn’t create a UML diagram, I didn’t create a specification and I didn’t create any internal decisions documentation. Well, you might say, I’m a student—I don’t have to be serious about these things. Yes I bloody do, this is where I came in and what I wanted to change. If you’re going to code at least have the decency to do it properly.

The solitaire thing has it’s Class/Package structure mapped out, the Classes stubbed and [most of] the unit tests are written. So the foolery begins…

On a personal note

[Being careful here] I received a letter from my employer yesterday saying that I was entitled to a long-service award for twenty-five years service. Various nasty pieces of glassware are now mine, and I can go to what’s described as a, “drinks and entertainment’, bash at headquarters. I got drunk last night and when I woke up this morning someone had inscribed ‘fuck off’ many, many, many times on the acceptance form. Alas, no glassware, drinks or entertainment for me.

Bad move, my wife informs me that you can sell tatt on eBay, who knew?


TMAs, subversion and vectors


I spent the weekend doing the first, formative, TMA. [Formative would mean that it attracts no marks.] I think that I had fun, sometimes when you’re coding it can be hard to tell what it is that you’re feeling. What I did notice was that I had the coding equivalent of rust.

Once upon a time I spent large swathes of my life having fun hacking away at [piss-poor] code—it’s the reason that I’m in this self-imposed OU strait. Now I don’t go in for it so largely; one of the perils of learning [a bit] about what you’re doing is that much of the newbie-joy gets whittled out of the process. So I don’t code as much as I once did, hence I’ve rusted. Which is something that I need to tackle—code more neil.

The TMA itself was a wee bit odd—code-design-wise—well that was the settled opinion of the forums. This is always one of the problems with TMAs—the are designed to spot-light the flaws in our knowledge-uptake rather than to promote good code. Supposedly, I suppose, this is addressed by student discussion in the forums, but we can’t really talk about TMAs while they’re live and we generally lose interest when the marks are back.

But code, and best-practises are subjective—show me n coders and I’ll show you Pn opinions. One person’s optimization is another’s WTF; can good coding ever be taught?


Having problems with this, I’m not sure that I wasn’t a complete idiot to even head down this road. I’ve always run subversion from the command-line but I decided that I’d install VisualSVN and try to integrate that with NetBeans. Don’t try to learn two, new, applications you’ve coupled, is something that I should have said in my head.

Part of me says ‘diddy’, part of me says ‘now is the time to make mistakes’.


For once, I have success to report, granted not success with a full test-harness. And I’d planned to code this, as if for real. Bugger, not a success…



As always—my digestion is shot, I’ve been working too hard, I’ve worked fourteen days in a row, I’m tired and fagged out after too much maths… All true but crap reasons for giving up. So I decided to stop whingeing and get down to some coding. I’ve been planning, in a desultory fashion, a matrix manipulation library for a week or so, but I thought that it would be better to tackle the first, formative, TMA first.

So I started on it, then I stopped. I stopped because I decided that as NetBeans has versioning built in [well it has a drop-down menu] I’d take advantage of that. [You know what’s coming next don’t you.] Yes, that’s right—download, install-failure hellishness—two hours of swearing and panicked thrashing. As ever, eventually you get the thing done, we’re geeks for a reason, but it does leave you with a nagging sense of failure.

During this depressing process I made the decision to use NetBeans 6.9.1 a far superior beast to the provided 4.1. [My tutor has said we can use whatever version]. Which got me asking myself why the OU provides software on disc rather than pointing us to where we can download it? In some cases this isn’t practical, but NetBeans?


Because I haven’t been doing a computer course, or any real coding, since June I’d forgotten how important words are. Couple that with the fact that we’ve got five CMAs with their attendant nonsense and I’m having a wee bit of a culture shock—I’ve been losing marks big time.

I’m not panicking yet—the big TMAs as some way ahead. I’ll try to muddle my way through the CMAs somehow; If I average seventy-five I’ll be happy.

the plan

For the next week is a heavy one. Deliberately so—I need to get myself moving again or my mind will rust unto dust. This lazing around vegetating is neither useful nor fun. So…

  1. complete CMA43
  2. complete TMA01
  3. re-read my book on graph theory
  4. do some work on my matrix library

I’m on day shift, I’m too poor to drink much, I have nothing else to do—it can be done. So time to search up some on-line matrix materials…



There has been much chit-chat in the forums about netBeans. Mostly about which version we are allowed to use [the OU provided us with and old one], but people have been having trouble installing it and accessing all the functionality.

This is a wee bit worrying: we’re doing a second level computing course here, we’re all au fait with installing software and we have knowledgable tutors/students on tap—what happens in non-computing courses?


Remain very busy, which is great. We seem to have a nice mix of Java knowledge and the mods. are doing a sterling job—allowing me adequate time to parade my ignorance before swooping in to point out my errors.

Of great interest to me is that Keith E., tt381’s resident PHP guru, is on board for this one. He’s his usual incisive self and as he hasn’t done any Java before he’s coming to this with ‘fresh’ eyes. What will an experienced programmer make of Java? Actually what are we all going to make of M257?

From a thread in the chat forum [what used to be the café before we had modules instead of courses and FirstClass instead of Moodle] I’ve a feeling that for a lot of students M255 is their only Java experience. Lot’s of us have coded in other languages but I suspect that for, at least a few, this is our first experience of industrial scale programming.

I foresee an interesting, fun, brain-testing ride. However, for now I need to spend a weekend doing some maths…



I should be studying for my maths exam, or I should be familiarizing myself with NetBeans, or I should… etc., what I shouldn’t be doing is building and programming robots. Still, I’m very glad that I am.

Sometimes I [we?] forget what all this learning is stuff is for—to enable me to waste my life in a fun, pointless and geek-related fashion, programming robots surely falls into these categories? True, my current Lego™ Mindstorms IDE is aimed squarely at ten-year-olds, but I’ve found the Java crack cocaine of MindStorms. Once the initial learning process has been completed we’ll be downloading that. So it is course-related? I suppose that I could pretend that it was…

It isn’t, but whatever I do with my ’bots they have already repaid the money that my parents spent on them [they were a a birthday present]—I’ve recalled, yet again, why I do OU courses. Which is something that I, and I’m guessing you dear reader, often forget.

is the OU fun?

I suppose that I should also ask, is it meant to be?

I’ll answer the second question first—yes, if it isn’t what is it for? True, it’s a qualification that may get you a better wage, but if you’re doing a course for that [only] then I think you might be in a wrong place. Learning is, supposedly, its own reward, aye? Not really, if it isn’t a fun process and if the only thing that you get out of it is more money and a load of facts then you’ve wasted the precious hours of your existence. There are better ways to get rich, stealing things or being a Banker spring to mind, and if what you’ve learnt is useless to you? No, if you aren’t doing this to enjoy and use it it then you shouldn’t be doing it.

True, there should be an end in sight, and you can’t enjoy anything all the time, but at least some of your progress should give you a decent amount of, ‘gee-golly-gosh’ moments. I was beginning to forget this—getting a degree was building a momentum—the why was becoming obscure.

My robot gave me a big ‘gee-golly-gosh’ moment; we all need that wee lift sometimes and the realization that four[?] years of study had put me in a position where I could properly appreciate a box of Lego made me so happy. It was if the years had fallen away and I was a neo in my first FirstClass Forum. That’s a feeling I want to keep; the open-eyed awe of the infinite.

Remember, as long as you pay, the books will continue to arrive, there will be new forums, there will be new course-mates to meet; support and lean upon, there will always be something to learn. Don’t lose sight of the fact that this [the OU] should be a joy and that it’s not an end in itself.

[Gone programming my robogator]


course forum is live

And it’s busy, great! For my last few computer courses the FirstClass fora have been dead. Which was a sadness to me, a lot of my fun, on courses, comes from sharing my ignorance with others. Actually it’s a wee bit more important than that—often you need to talk about things to get them clear in your mind, and there aren’t [m]any people in my regular life willing to discuss the pros and cons of interfaces versus abstract classes.

So, hopefully, I’m no longer in the position of trying to button-hole poor bastards who think that I blink too much and talk a foreign language—I can now discuss these things with my course-mates.

first brush with netbeans

In an effort to stop myself reading all the unit texts I decided to tackle the NetBeans Guide. Which meant installing the course software; a potential problem as I’d already installed NetBeans 6.X on all the machines that I use. [Not that I’ve ever opened the thing.] The OU’s version is 4.1, experience told me that this was going to be fraught. However, everything went well, which is a worry in itself as this hardly ever happens does it? I should have had to spend the weekend nursing a sick machines back to health; it’s as if I’d cured my cancer using homeopathy—relieved but suspicious.

I did take the precaution of un-installing NetBeans on my Windows7 machine, I read a few posts in various places that suggested problems.

Anyway, once installed, I started off quite well, on task, working my way through the book, doing the exercises and opening the required files, until about page thirty-eight when I lost it, I need to build something!

I suppose that I knew that this was going to happen, it’s probably an impossibility for me to do a course how it should be done.

So, yes, I’m afraid it was back to that bloody solitaire machine of mine. Partly I’m doing this because I never got the thing working, but mostly I’m doing it because it is a familiar project with which to learn a new IDE. And there-in lies a rub—IDE.

me and IDEs

Have never got on. This is my fault—I don’t like code writing my code for me. I first noticed this distaste when I was trying to learn ASP.net, the bugger kept writing JavaScript for me. I tried to stop it doing that, I tried to persevere in the face of computer cheek, but it got too much—it was me or it. I had other options, I could write PHP, and I didn’t have a working ASP.net server anyway.

I have to write in classic ASP for my work site—it’s the only way that I can be confident that it’s, half-way, secure. Yes I know not to roll-my-own security, but you should see the holes in the server. It’s as if they’ve taken the default configuration and deliberately softened it. Gray’s Law? [Any sufficiently advanced incompetence is indistinguishable from malice.]

NetBeans ain’t too bad, it doesn’t get too in-your-face, except when it comes to GUI stuff. There it generated code that seemed…I don’t know describe it…strange? I had a glance through the relevant unit text, I forget which, and what it contained didn’t seem to have any relation to what Beans was writing. So we’re going to have to be careful with the NetBeans chappy.


After M255 I thought that I and Java were never going to get along. This course hasn’t officially started yet and already I’m getting excited—I should be revising for my MS221 exam but I’m messing around with Java. This is to the good, I love maths and I will revise —but if this course didn’t interest me I’d be stuffed.

At this point a large box lands on my door-step, it’s my Lego™ Mindstorms kit. Oh well, I tried.

[Gone building robots]


the books arrive

And I’m curiously flat. I came home last night to find the M257 brown-box-of-goodness nestling at the bottom of my stairs. It had been a hard day, it has been a hard week—to be frank I’ve had a hellish September.

To set the [box arrival] scene, I was on back-shift, it was eleven at night, I was tired and hungry. I still opened that box and took its contents bed with me. And this morning, as I perused unit five in the bath, I began to dream again—in the sketch-pad of my head I began to draw…

I haven’t been coding/programming to any effect for too long now. That must stop. The time has again come to fail to produce anything that works, to spend hours on a fragile constructs, the time has come for arrogant stupidity.

So, a good start.


signed up

As off a wee while ago. Start date is sometime in October, the books arrive in September. I have to admit that I’m not gagging for this course to start—we’ll see if that changes when the books get signed for.

But, until the books arrive I don’t have anything relevant to say … so I won’t.