number theory, logic
are you sure this is for you?
oh, yes!


grubby fingers

I have ten of these from the scratching of personal-runes onto a whiteboard using non-permanent pens. I’m heavily into solitaire mode at the moment and I have, half, a maths head on in my quest. My problem?

Let’s leave aside the egregious nonsense that I may have a single problem, think that I may have a singular one. Given?

Then the problem that I’m having great difficulty with is creating a hash function for a certain Object. OK it’s a board. I’m fine with the other objects but any hash function that I concepted is going to overflow the int limit, which it 232 - 1

This isn’t something too trivial, I’ve done enough group and number theory to see that there probably is an answer but the algorithm is eluding me.

What I’m saying is that there is a hash function, just not one that I can see at present. That’s because I was a lazy slacker when I did group theory. The very course that I need to resit.

Karma is a bastard.


still much work to be done…

I have been working, honest, but into the path of this staccato effort has stepped M256 [Software Development]. If I don’t watch myself very carefully I’ll get carried away with all things NetBeans et al and neglect my maths. Thankfully what would usually have been an unmitigated disaster has happened. What we might call a mitigated disaster, for once a bad thing will help keep me on track OUwise.

The replacement for the replacement for Danny [Billy] has been off for the last couple of days, and he wasn’t looking any too clever when I arrived at work today. I had a wee chat and sent him straight off home, why nobody else had…? Billy is always thirsty and has lost a lot of weight in the last few months…rather classic signs of diabetes methinks. I did a wee bit digging, told him to get himself to the doctor’s tomorrow morning and then sat with my head cradled in my hands for a while—again we were down to two bodies and hell-shifts.

I had noticed that Billy drank a lot of water but didn’t think too much about it—my own daily liquid intake [at work] is half a litre of ersatz red-bull, a litre of chocolate milk and a litre of whatever smoothie is cheapest in the local shops at the moment. So I hadn’t thought much about it; when he mentioned the weight-loss today the penny tumbled.

The reason that I know the symptoms of diabetes is that it’s a nap that I’m going to get it at some point. Then I’ll achieve the magic triple: vegetarian, celioac and diabetic. I’ll starve amidst plenty.

The up side, this time, is that although I can’t do any proper maths when I’m at work, I can do a lot of effective computer-type stuff. So, when it comes to a computer course, far too many back shifts aren’t such a problem, and I can use my weekends for maths. So I won’t mis-spend my weekends piddling around with software when I should be doing maths, because I know that I’ll have plenty of time for that during the week. I almost win by losing…

Some of you may be wondering, “how can neil do OU stuff at work?”. To which the answer is that I’m a security guard with a glorified title…much of the time. In the normal run there are times when I’m not really needed except in a customer relations sense. The difference is that I know what to do when we are off of the normal run, when the circumstances are exceptional. I do have other things to do but in most cases I can do that in half a shift. And when circumstances are exceptional, people, so far, have always been very glad that I was there. So if I care to study Fermat’s Little Theorem rather than read the Sun…?


no work done

As might have been predicted. When I didn’t have festive-season commitments I sat about reading rubbish, blogging even worse rubbish and drinking too much. So I, sort of, had fun but the new year is upon us and it’s time to get down to work. The bugger is the smegging groups course—I struggled fitting it in last time round, how am I going to manage it this time with another two courses on the go at the same time?

I haven’t made any firm decision about how to tackle this problem yet, a large part of me that just wants to say, “sod it”. But I get a free shot, I’ve glanced at the material and I’ve sat the exam before [that’s got to help?]. It’s got to be worth me making an attempt at the ugly thing? The problem is that I don’t want my spending any of my time on it to interfere with doing my other courses. Workload is an issue. Still I have some outs…

  • My computer course, while it overlaps with number theory, won’t get serious until the numbers are counted
  • The mathematical logic side of the course involves quite a lot of stuff that I already know
  • My other course is a computer course
  • I have a sneaky get-out clause

I have to finish my degree by the end of next year, but as of this moment I have two hundred and thirty points, I need another hundred and thirty for my degree. So if I don’t get the groups I can do a wee sprint course. I always knew that I had this option; I restricted my level one courses to one course for exactly this reason. I thought ahead.

Always leave yourself wriggle room, don’t back yourself into any corners folks. Bad and unfortunate things happen along the road, the trick is to have a back-up plan[s] in place—you should never be left, bare-naked, with no decent options available.

The OU changed the their rules half-way through my particular course. This wasn’t what I signed up for and planned. Of course everything would have been sunny-happy if I had been any good at maths; alas that was not so. At least I had something held in reserve.

I don’t know your plan, my plan was to learn, somewhere along the line that plan got changed. But that can’t have been the whole plan for I seem to have another plan, that I wasn’t aware of, for when the first plan failed.

What an odd place to be.


bah humbug

Tis the season to be grumpy! I have issues with Christmas in the best of years and this year, where I’ve spent nearly all of December doing backshifts, been systematically robbed of everyone who might have been a helper or who I loved. Robbed from me in a fashion that struck me as calculated affront—we don’t care about you, you don’t deserve anything. So this is not, for me, the season to be jolly. This has been a bad year and I hate my life.

Working consecutive backshifts [and weekends] means that your body-clock goes wonky—I stay up until four or five o’clock in the night worrying about snow, and sleep until after mid-day. A schedule that wrecks any chance of a normal life, proper eating is off-menu [a bad thing for a ceoliac] or of getting any maths done.

However I lie to my own mind I’m behind. I’ve just about worked my way through unit two of the mathematical logic stream but I’m going to have to do a shedload of catching up during the holidays.

I’m enjoying the mathematical logic side of the course: I got nearly full marks on it for my TMA. There was one fail, one of my URM programmes borked. On an input I knew that it would. I guess that my tutor doesn’t get programming by contract, he spotted that my URM didn’t work for some values, nerd that I am I felt that I’d dealt with it this problem using pre-conditions. These mathos eh? Don’t read the pres and input crap. The rest of the TMA was its usual mish-mash of egregious error, faults, sloppy thinking and short-cuts.

This year has been shite.

Actually it hasn’t been my worst year ever—for all my failures, I have done some good and had much fun. Sitting under a blood-red sun with Danny [saving my wife], some of the best and happiest shared moments of my life, achieving some stuff that I’m truly proud of. I failed big time at I what wanted to, so what? I’m stupid, I always knew that. If I die in a ditch I don’t want to be asking if I didn’t try.


context switching

I suppose that one of our skills is realizing that you are in trouble—I’m in trouble. I have too many problems and their context has bled.

By which I mean that I’m starting to tackle work problems at home and home problems at work. Or rather I amn’t tackling any of my problems anywhere at all. I’ve been here before—where I get nothing done because I have too much to do. I lock-up. I’m at-the-where doing even one single-thing seems far too complex. I’ve known that I’ve had this particular problem for a while now and I’ve ignored me being afflicted. I know what to do but I can’t begin to begin to bring myself to do something about it. Today my boil of angst was thrown into a sharp chiaroscuro when I logged onto the course website and saw my mark for TMA01.

It wasn’t a bad mark, but it wasn’t in the zone that I’d predicted [my inability to forecast my marks is becoming a cause for concern], without seeing my tutor’s comments it is difficult to know where I went wrong but it was way out of the range of my normal sloppiness-tax. I got something badly wrong somewhere.

So tonight I made a decision—I need a holiday, so I’m going to take two weeks off at Christmas. This will hurt my work-work-life as I’ve been lying to myself that I’d catch up during the holidays. So there are definite, and real, horrors in the offing come the new year. For I may have skimped.

But sod it! This is my last maths course, the one I really wanted to do, I’m paying for it, why shouldn’t I be able to have a real go at it?



After my last post I re-wrote swathes of my TMA. This involved some effort and now, as I sit awaiting its return, trepidation. It was the right thing to do—I’m now at the stage, and on the course, where I have to be able to satisfy myself that what I am doing is right.

I used a slightly more formal approach to the one that I use when I initially tackle problems, my suspicion is that said approach will be judged sloppy. Fair enough. But I need to develop my style, maybe with rigour? Why? I’ll try to explain by talking about other things entirely.

Not much maths has been done for the last few days—mostly I’ve been messing around with JavaScript, trying to write a generalized primitive recursive function that would take two functions as arguments and return another primitive recursive function. I ran into problems, as you usually do. Again as ever, I woke up this morning with the solution [not implemented yet, which is why it isn’t here]. Something had gone wrong with my head; mostly it was me ‘painting a picture’ but much of the problem was down to me not wanting to tackle the problem in the way that I did. That way was the way that the unit texts do.

Piqued, I had a wee read about recursion. I can’t pretend that I understood the entire article but I think that I now know what’s gone wrong[er] with my head—I want to drill-down to a stop, the way that the course does it feels backwards to me. Hence I cocked-up.

Drill-down to a stop is the way that I’ve always done it, that’s how I want to do it, that’s my style. Right or wrong, for me it’s much more productive [and satisfying]. As an example here are two functions that I wrote in half-an-hour [and posted in the course forum like the Platonic form of a pratt]…

//squares x function sq(x){ return (function (y){ if(y == 1){ return x; } else{ return x + arguments.callee(y - 1); } })(x); } //x to the power of pwr function power(x, pwr){ if(pwr == 1){ return x; } else{ return x * power(x, pwr - 1); } }

There is more than a wee bit of me showing-off here, this could have been done in a much better way. In my defence I was trying to make a point, still I’m a massive tool in every other sense than I’d want to be one.

Once upon a time I played a lot of chess; at first I just played, when I got better I began to see the positions that I played well, I learned to head for the positions that I played well. I had to be able to play other positions but I began to play those with a thought to get back to the ’fields that I liked’. I began to put my personality into my game.

It’s not enough to just do this stuff, we ourselves must be in the mix too. So I’m going to re-write that primitive recursive function, my way.



Again I’m at work at the wrong time, again a minion has gone wonky, again I’m struggling away at a TMA last gasp style. Fortunately, for this one, there isn’t too much that hasn’t been grokked. There is one problem that is bothering me. I have a solution, where I know that I’m right but one which I don’t like. It doesn’t satisfy my taste-test—it isn’t elegant. It’s only five marks but it’s bugging me.

I’ve been getting more and more annoyed with myself, I can’t see a good idea. Tonight when I was shopping for, yet more, go-faster juice I asked myself a question, “does it satisfy you neil?” I’ve never asked myself that before. My sense of self-worth has always come from the reactions of others. It was disturbing to realize this.

I returned to my office and looked at my TMA, I lack confidence when it comes to maths, there were places where I could see the shadow of worry. There were places where I’d had a much more radical solution and got scared. Give me a programming task and I’ll just do it, I know that I can do anything, I have no fear.

I’m going to have to think about this—this isn’t trivial stuff. This is about who I really am and where I might go. I really need to do some serious computing, which means being sober and spending time. I hate that but if I don’t what was the point of all these years of effort?

It would be easy just to give up and admit my uselessness. The fuck is that I just can’t walk away.


thoughts on my results

I’ve had some time [twenty-four hours] to ponder on [fret about] these now. The main thing, it seems to me, is to come up with a sensible plan on how to proceed, regrets won’t help. What might help is an analysis of what went wrong:

  • For the groups course it was sheer distaste coupled with a laziness beyond the norm—I got behind early and work tailed off after that poor start. I was playing catch-up with something that I didn’t want to chase.
  • The groups were skimped because I struggled with the geometry
  • Laziness and brinkmanship were involved with the topology débâcle
  • What I’d thought had happened in the exam was clearly a mirage. I wasn’t even close with my predictions.
  • Procrastination and shilly-shallying. Too often my study time was spent, as it was this Sunday, perusing tripe [Napoleon’s Egyptian Campaign] rather than doing proper work. I wasn’t even wasting my time in a useful fashion

Quite a list. I think we can take a few things from it that will help me turn things around.


For now has to be short-term. This weekend I must finish the TMA that I’ve been threatening for ever. Get something done. Then, let’s get ahead with the number theory. If I am going to have to fit a new groups couse into my timetable then my timetable had better not be anything other than sparse.

For now.



Over two weeks before they were due the topology and groups results arrived today. Alas not an early Christmas present for me—I failed the groups course [I’ll get a resit] and I got a grade three for the topology course. Gutted? Weee…ll, I knew that I was on a shoggly peg.

Such things happen, I knew aforehand that last year was going to be hard, I knew that I hadn’t worked hard enough, I’d hoped that the bit of work that I’d done towards the end would have seen me through. Didn’t.

When bad things happen you can’t just hunker down into the wells of self-pity, you have to put on an up-song[ish] and resolve to do better next time. However, there are a couple of things that worry me:

  1. I’d thought that I’d done better in the exams than I did. At my most pessimistic I’d predicted a grade above where I ended up for both courses
  2. I now have to factor in doing a resit for the groups—I need those thirty points

One above I’ll have to tackle during my current courses; there’s something about the way that I learn that isn’t working. I know that I’m slap-dash when it comes to maths but my sheer slap-dashedness must be greater than I’d realized. Or was my failure, of understanding?

Two is just an annoyance, perhaps one that I need? At the very least I can write about how it feels to do a resit here.

For too often I’ve ran away from learning because I was scared that I wouldn’t understand, and that people who did understand would mock me. Worse when I was at school I pretended to be stupid, because clever was a good way to be beaten up.

Ha! I’ve ran away from learning because I worry that I won’t be smarter than you.

I’ve run out of excuses for not learning. There will be excuses for other things.

This is totally my fault and only I can fix it.


wasted week

Not much has been done course-wise this week. I have the TMA rough-copy finished, I’ll do the fair copy this weekend, still; I’ve been posting in the forums and thinking about stuff, although no unit texts have been perused. I really need to crack-on next week. Which is a problem as I’m on back shift. I know that I struggle to do any real work when I’m on back shift.

The good news is that this course is getting under my skin, it’s where I want to be. It’s starting to, and will eventually, answer some of the questions that I wanted to answer when I started down this journey.

Often, in the hurly-burly of work, life and the OU I forget why I started down this road. I came to computing late—a series of accidents started me down the programmer’s road. It was likewise with maths, it was likewise with the OU. With every course I understand my ignorance more and I feel the need to do more courses to correct this.

I grokk my ignorance, I know that I’ll never know. All I can do is travel. Which is fair enougth, it was all that I wanted to do. I just wanted to know.

The problem is that I am a small-minded person with big ideas about me. There’s the big part of me who see’s this as a joke. But why can’t I be special?

As soon as I think about myself I know that I’m utterly wrong.


tma 01

The last couple of nights I’ve been hacking away at this, I have fifteen marks to get and one lovely solution on paper. A Solution over which I sweated blood. For once I’m well ahead. So I’ve had some time to piss around with some neglected projects.

Which led me to a realization—I need to be much further ahead. When I start to mess around I am lost to the normal world, deadlines recede like the hairlines of my friends and I become incapable of doing anything else. I need to make time.

A couple of nights ago I was messing with a JavaScript, I saw that I needed a proper test suite, so I started to write one…

Once upon a time I just wrote stuff, now I agonize before I even think about writing stuff. So nothing get’s done. Or does it?

I’m in the process of migrating the school’s web site to a different server. I built the thing part-way through the web apps, I havn’t really thought about how it works since [except in a webmaster sense]. I built that really well. It’s five years old [which is ancient in web terms] and still it doesn’t fall on its bottom.

Hundreds of hours of pain so that my future wasn’t blighted. That was a good bargain.

I cannot spend the rest of my OU life on the cusp of a time crisis. I want to be pissing around, hence I must be finished what is due in three months now.



Well I have half the first TMA done, the required units read and about two weeks to spare, so I suppose that I am ahead. The problem is that I seem to have developed a wee side-interest—designing the ultimate URM emulator. I’ve been involved with this type of self-induced madness before. I should know better.

The revision for this year’s exam cycle taught me three things about myself—

  1. I can work hard
  2. I need to work harder
  3. I must work everyday

Number one I knew, what I didn’t know was that I could force myself to work hard for an extended period when I didn’t really want to. Two and three are discipline issues, for the last couple of years I’ve been trying to tackle courses in a half-arsed staccato fashion. That has to stop.

Three is not saying that I must do course work every day but I must be doing something of-the-mind that’s somewhat related to my course. Which is why I’ve found myself hacking JavaScript for the last few days. In an utterly cretinous fashion.

I’m doing a computing degree, I’ve been taught that you don’t just fire-in and write code. Which is precisely what I’ve been doing. Granted JavaScripting, to me, is a guilty pleasure, my recreational drug of choice if you will. The realization gradually dawned that I was coding a horror.

So yesterday I stopped hacking and took stock. I re-read the process of creating a primitive recursive function from two [other] functions; something that I thought was a bit fiddley, if do-able. On re-reading I saw that I’d missed the important point. This was a proof. A proof of a kind that I hadn’t seen before.

Even if I didn’t know that we were going somewhere I’d sense the approach of an elephant. Soon we are going to have to deal with something that will go against everything which our mind’s judges as reasonable, something that approaches a faith, something that we proved and will argue about the meaning of forever.

I’m going to have to tackle this in a different way.

The JavaScript needs to be organized in an entirely different fashion—URMs should be objects. I write that and I see that I’m again falling into my own trap—I always want to build from the bottom up, what I need to do is build from the top down.

All that said, I’m going to script a proper URM object before I do anything else. This weekend’s plan is to work-work Saturday day, JavaScript the night away and do so TMA stuff Sunday. Tonight I lie in my bath bladdered reading the next unit text.


flat and tired

For the first time in a long while I’m ahead of the OU game, it brings me no joy. I feel flat and tired, what’s the point of all this studying? Even if I get a first I’ll remain a low-wage drone with nothing to look forward to but poverty and slow a painful death because I can’t afford to heat my house.

I shouldn’t feel like this—I’m JavaScripting again, I’m messing around with Prolog and I’m doing my maths. Am I ill?

Don’t think so. Having suffered all-too-many bouts of depression I’m pretty careful to inspect the contents of my meatware on a regular basis. Actually…

I am ill.

The point of me is to be a contradiction. I should explain that. I work in a school as a nothing, nobody thinks I’m worth anything. So why is it that when computers break, or code goes wrong, or they need an analysis beyond ‘surely’ I’m called for? It’s because most people can’t think properly and they realize, in the guts of their hearts, that I can.

So. I exist to frighten the complacent, the lazy, the way I dress is a calculated affront. For this to work I must be angry and active.

I’m always angry but I’ve stopped being active. And if I’m not active, in the sense of making the lives of others less self-serving, then I am indeed ill.


first look at the numbers

After all the exam stress it was nice to have a leisurely look at the unit texts for the numbers course. On first inspection I like! This is what I signed on for. It’s nice that my last maths course, for the degree, there will be other maths courses!, is about something that I like and am interested in.

I worked my way through half of unit 1—foundations, when the mental itching started, “I could just take a peek at the computability unit, just a glance…”.

So that was my yesterday, writing little programmes for Unlimited Register Machines.

I soon noticed that my programmes weren’t the same as the answers given in the unit. I tended to write little bits of general code, what I call functions in my head, and tack these together rather than tackle the problem in-hand directly. The other thing that I did was to comment, lots, and I put in pre and post conditions. For example—

//multiply by 2 //pre: r1 //post: r1 = 2 × r1, r2 & r3 zeroed //ρ(P) = 3 1 C(1,2) 2 Z(3) //just in case ;-) 3 J(2,3,7) //while loop condition 4 S(1) 5 S(3) 6 J(1,1,3) //loop 7 Z(2) 8 Z(3) //clear up

I suspect that this is just a personal tic, one that I have because I’m used to writing programmes: I dislike side-effects, I like a contract and I want to see the flow. Or perhaps, more importantly I want others [who use my stuff] to see the flow. I like to break things into wee bits, because I know that this makes it easier for me to model the process and I can use these wee bits elsewhere.

I’ll have to watch out that I don’t get too addicted to writing these things.

Then it came to primitive recursive functions. Now, I grok recursion, you really have to if you are a scripter, never mind a programmer. But the way that it was put caused me some difficulties. I had to work through many examples. I saw it eventually but…it might be that I’m used to recursion and I just trust it.

Whatever, I’m inside my comfort zone again, no messy concepts to get between me and the integers. If I don’t get a one for this course I’ll have to shoot myself multiple times with a gun that I don’t yet possess. There’s a hostage to fortune for you.

Gone writing Prolog…


the books approach…

According to the course web site the books are on their way. Having been shocked this year by the difficulty of doing two third-level maths courses at the same time I’m a wee bit trepidatious. Is this, another, potential disaster?

From what I can garner the consensus about this course is that it’s hard but not immpossible. I should be comfortable with the logic side of things but number theory? That’s known to be tough.

We’ll see.