M255

My first sip of java with some object-oriented cakes.

This is the second part of this blog
part the first is here.

2010–01–25

the TMA is not away

Normally I avoid TMA deadline hell by [trying] to keep a wee bit ahead. I suppose that my normal submit time is two-to-three days before the deadline. But tonight is Monday and TMA two for this course is due by Wednesday noon. And still I’m hacking away at a word document.

I’ve done the coding, I’ve answered most of the questions—so why am I in this position? To which the answer is that it’s taken me far longer than I thought it would.

TMA two is almost exactly ninety-five percent coding, which should be catnip for me. But, and I’ve taken pretty good track of the time that I’ve spent, it has taken me nine hours [not counting pondering] so far. And, apart from around twenty minutes of hell when I misspelt[sic?] something in an abstract class I’ve not even had any great crises.

This bodes ill, both for the future and for the exam.But for tonight it’s off to the land of nod—tomorrow may be a bad day…

2010–01–27

the TMA away

I managed to get my TMA finished and submitted late last night. I’ve never submitted any work that late before [deadline was today noon]. I’ll better clarify that, I’ve often done last minute submissions, but, and it’s an important but, I had a previous submission already there.

That’s the odd thing about OU course work [as opposed to normal universities] you can submit it multiple times. So it pays to get something done, submit it, refine it, re-submit… That way you’re guaranteed at least some marks. So it has always been my policy to get something up early-doors. But it didn’t work out like that this time.

so what went wrong?

I’ve identified several factors that might be involved:

  • I’ve been working far too hard for far too long. Apart from a couple of days off over Christmas I haven’t had a holiday since last August. And, totting it up, I’ve only had two days off since the fifth of January. That’s got to hurt.
  • I can’t remember doing a TMA with such a large coding element, I was striving for perfection—not always a good thing.
  • I’ve been trying to get up-to-speed with my maths.

All very sound and solid reasons but they miss the essential point—I started way too late and, although I did work hard when I actually got down to it, I dithered. I have to be more organized—I need to set aside time for my OU work, time where I actually work. Too often work only gets done when I feel like it.

At some point soon I’m going to be doing two level three courses concurrently, lack of organization is not going to be an option. I’ve got away with slapdashedness up until now but things are going to get serious soon. I can’t rely on having a spare hour or two at the weekend or on a back-shift.

So this weekend I’m going to draw up a timetable for the next couple of months [for both courses]. And if I feel like doing some maths when I’m down for Java, well that’s just too bad—Java it is.

This isn’t how I normally [ever] do things and I’m probably not going to like it much. It may not even work for me, but it has to be tried.

Or am I just being hyper-analytical and trying to structure what already works well? I’ll sleep on it methinks.

2010–02–06

nadir, i hope

I wrote the first paragraph of this piece in the middle of the week, since then things seem a wee bit less dark. But I like it, so it stays!

It’s mid mid-winter, surely the worst time of the year. I have a nagging mid-grade cold, I’m [literally at times] snowed under at work and I don’t feel that I’ve done anything fun, or interesting, in ages. In short the world seems bleak. There are times, usually measured in months, that seem sent, specifically, to try the good [i.e. me]. January has been an exemplar of such a month.

So time for some light relief, ditch all thoughts of work and do something fun. And light relief/fun for me is JavaScript. I had the thought that I’d try to do some JavaScript in an object-oriented fashion—you have these thoughts. How did it go? Well here’s the initial attempt. [View source will get you the JavaSript and CSS—it’s in the <head /> section.]

Solution
 0123456
0
1
2
3 
4
5
6
  1. [1,3]→[3,3]
  2. [2,5]→[2,3]
  3. [0,4]→[2,4]
  4. [0,2]→[0,4]
  5. [3,4]→[1,4]
  6. [0,4]→[2,4]
  7. [5,4]→[3,4]
  8. [4,6]→[4,4]
  9. [2,6]→[4,6]
  10. [4,3]→[4,5]
  11. [4,6]→[4,4]
  12. [4,1]→[4,3]
  13. [6,2]→[4,2]
  14. [6,4]→[6,2]
  15. [3,2]→[5,2]
  16. [6,2]→[4,2]
  17. [1,2]→[3,2]
  18. [2,0]→[2,2]
  19. [4,0]→[2,0]
  20. [2,3]→[2,1]
  21. [2,0]→[2,2]
  22. [4,3]→[2,3]
  23. [2,3]→[2,1]
  24. [2,1]→[4,1]
  25. [4,1]→[4,3]
  26. [5,3]→[3,3]
  27. [3,4]→[1,4]
  28. [3,2]→[3,4]
  29. [4,4]→[2,4]
  30. [1,4]→[3,4]
  31. [3,5]→[3,3]

initial thoughts…

As usual I went at it in a half-arsed fashion—no spec, no overall plan, coding on-the-fly. But there are real problems coding JavaScipt in an O-O fashion:

  • JavaScipt uses prototypal inheritance, so at best you’re faking classical inheritance, and I’m not even sure that we should be doing that.
  • As soon as you attach an event listener to the DOM that uses a method [of a Class] the this keyword no longer points to the receiver. There are ways round this: various scope tricks [var that = this;], but it does feel like you are being tricky.
  • JavaScript lacks a lot of the features that make the O-O work—abstract classes, interfaces, access modifiers… Again all fakeable, but you have to ask yourself if it’s worth the effort.

So is it worth it? My internal jury is still out on that one. I’ve used classes in JavaScript before; mostly as a method of organizing code or as a way of encapsulating state [very O-O that!].

So I’m going to go away and have a think about it. The good news is that the process has got me interested, happier in myself and has re-sparked my interest in programming the ultimate Java solitaire machine. So all to the good.

2010–02–08

a change of plan

I had a restful weekend: messing around with maths, eating properly and sleeping a lot—I’m feeling a lot more chipper. I also had a good, long lie-in this morning [I’m on backshift] and a lazy half-hour in bed, watching the shadows move and pondering my, OU, plans. In particular my plans for this course.

Although I’m enjoying the course I’m not doing much real work—I’m reading the units [off and on], making notes and thinking much, but what I’m not doing is coding. I have to face facts—I’m never going to do any of the set exercises for any computer course. So unless I replace the exercises with something else I’m not going to get enough practice at the actual code-face.

You can, and I do, write code using pencil and paper, but without actually hacking code into the machine and subjecting it to the harsh judgement of the compiler you’re going to get things wrong without knowing it.

By which I don’t mean huge gaffs, I mean small, subtle errors that the compiler would catch. For example I’ve developed the annoying habit [and I can’t for the life of me work out why] of writing this.someMethod instead of the [correct] this.someMethod(). At the code-face I have a safety net, but in the exam I’m going to lose marks.

So a lot more coding then. Which means that I’m going to need something to code [of which more below].

Once I’d decided this something else fell into place—I’m going to have to rip up the course schedule. If I’m building something then I can’t let the fact that testing isn’t covered until unit thirteen stop me if I need it now.

I started this course fully intending to stick to the course schedule, I now realize that, for me, this isn’t a good way to do things. I managed it [just about] during the first eight units, when we were dealing with Object-Oriented concepts. However, now we’re getting down-and-dirty with Java itself I need to do it my way. And my way is to build something and to learn what I need as I go along. I’ll learn much more about filestreams by using them than I’ll ever do by reading about them.

But that is me.

so what to build?

Yes, you’ve guessed it—The Acmé Solitaire Machine®. I’m on version 3.0. It is getting better—I’m using abstract and comparable classes, the Collections interface is involved and the beast feels like it may be more like an API than an implimentation…yes, it’s a complete dog’s dinner. And, as-of-this-moment. it’s a dog’s dinner that would kill a dog. So I’m off to work on it.

2010–02–09

ha!

I did a couple of hours work on my Acmé Solitaire Machine® today—and it works! True, it’s a rubbish player, it generates moves randomly, but still—it plays. I’ve designed it so that it outputs an HTML list of moves [to the terminal] so that I can plug them into my Acmé Solitaire Playing Machine®.

It needs re-factoring, it needs testing, it lacks essential features—in short it’s a typical prototype. But here, for, my enjoyment mostly, is my Frankenstein’s first game:

Machine made
 0123456
0
1
2
3 
4
5
6
  1. [3,1]→[3,3]
  2. [5,2]→[3,2]
  3. [4,0]→[4,2]
  4. [3,2]→[5,2]
  5. [6,2]→[4,2]
  6. [1,2]→[3,2]
  7. [5,4]→[5,2]
  8. [4,2]→[2,2]
  9. [4,4]→[4,2]
  10. [1,4]→[1,2]
  11. [2,0]→[4,0]
  12. [3,4]→[3,2]
  13. [6,4]→[6,2]
  14. [2,2]→[2,0]
  15. [3,6]→[3,4]
  16. [0,2]→[2,2]
  17. [3,4]→[1,4]
  18. [0,4]→[0,2]
  19. [3,2]→[1,2]
  20. [4,6]→[4,4]
  21. [5,2]→[3,2]
  22. [0,2]→[2,2]
  23. [2,6]→[2,4]
  24. [3,2]→[1,2]
  25. [1,4]→[3,4]
  26. [4,4]→[2,4]
  27. [2,3]→[2,5]

What a diddy!

2010–02–11

hacking java

I’ve spent some hours over the last couple of days hacking my Acmé Solitaire Machine®. Trying [and mostly failing] to slap it into some kind of order. Things are progressing, but slowly, slowly. In fact I may be making things worse—I’m off the road-map, thrashing around and coding on-the-fly. Time to step back and think.

The thing may never work, in fact if I were a betting man [one of the few vices that I don’t have] I’d bet agin’ it. But it’s been a useful exercise, and a massive wake up call.

I don’t know how others learn a programming language, but I have to build something; large, small, stupid, useful—it doesn’t matter, it has to be built. For me there’s no other way.

I’d forgotten this, I’ve been lulled into the feeling, over the last couple of courses, that I can learn by reading. Not so. For example I read that to use Collections.sort(<T>) then <T> had to implement the Comparable interface, which meant it had to have a compareTo(Object obj) method. I’d even read that you had to cast obj to the class you were using. But when it came to it I didn’t remember. Only the compiler’s incessant warnings got me onto the right road. I need the compiler’s feedback to drill things into my brain.

The die has been cast—The Machine must grow.

update

Actually I was wrong here [what was it that I read?], you don’t cast in the compareTo() method, you use implements<T>. So although my point was valid my methods were wrong—as ever.

So is my way for everyone?

I’m going to cop out shockingly and say that it’s up to you. However, what are you doing a Java course for if you don’t actually want to build something [even eventually]? I understand that for a lot of students this is their first language, we all know how hard that is.

But No! Spit the meal from your mouth Neil, climb down from your fence—build, build, build. It’s not as if you’re designing accelerator peddles for a Toyota—you can’t do any harm and you might learn something. The world doesn’t need our crappy apps, but we need to build them.

2010–02–14

cascade of failure and Θ(n!)

I realize that I’m being unfair here and that, in fact, I’m wrong. However what I’m moaning about is an issue. We can always write bad code whatever structure we write it around.

It’s Sunday morning and I’ve been re-factoring the beast—and having problems. Problems that I’m, all too, familiar with but which I’d fondly hoped that using the O-O paradigm would shield me from. The fond hopes—

  1. That small changes wouldn’t have have big consequences.
  2. That complexity wouldn’t grow in a factorial fashion.

The fond hopes were stuffed.

Now, I know that there are people who believe that the entire concept of O-O is wrong but I, personally, have never been religious about the it. However, having dipped my extremities into the cold, cold sea, I’m beginning to have issues. It ain’t all that it’s cracked up to be. Perhaps it’s my fault, but perhaps not.

It’s hard not to introduce dependencies, despite your best intentions. That object that you’ve made a black-box of ain’t—strong-typing works against you. Let us take, for example, instance variables—we should be free to change the Type we store them as, right? But the getter returns a Type doesn’t it? In truth we’re only free to change the way we store private instance variables, anything declared public will cascade failure if we change its Type. So much for encapsulation.

Then there’s complexity—those classes do multiply don’t they? You always need just one more, a Cantoresque diagonal. However hard you plan things classes spawn like toads.

Or is it all my fault?

2010–02–16

OTT

I was probably a wee bit over-the-top in my last entry. On reflection I realize that the faults lay with me rather than with the Object-Oriented paradigm. As ever bad planning lay at the heart of the problem, it wasn’t that I hadn’t planned, it was that I hadn’t planned hard enough and I hadn’t realized that planning isn’t, ever, over. So two, fundamental, mistakes:

  1. I’d stored something as [it turns out] using the wrong Type. I was changing the way I stored it [from a List to an Array] but the main problem was that I was changing the Type.
  2. My planning was fine for my initial specification, I changed the specification—why did I then assume that I didn’t need to do the planning again?

I’m my own client, and I have problems with me in that role. Imagine what problems can be caused by a scatty client to a programming team! Is it any wonder that most software projects crash and die like a flock of drunken budgerigars?

2010–02–16

TMA process

Every so often I blog my TMA [tortures] technique—to discourage others from following it. So here is tonight’s episode of failure [written as was]:

6pm
Open up BlueJ, open TMA03_Project_Q1 and read the question. Initial thoughts?—decide to read the question again.
6:40pm
Finish writing my first method. Most of my time was spent understanding what, exactly was required, re-acquainting myself with String methods and testing. Still—surely that’s too long!
7pm
I [slowly] realize that I didn’t do the above operations correctly. So I do something obvious— go through question one and underline, in red the specification.
7:08pm
The penny drops—underlining nearly everything isn’t going to help. Should I write [M263 function type] specifications? I pop open my second ersatz red bull and decide not to.
7:30pm
Finished the first part of the question. It all seems to be working. Another red bull? An Absinthe? A dip into the conferences? The latter first methinks…nobody there—damn! An absinthe then and back to work.
8pm
Pushing on through, until I hit a block. Despite there being no loops in my code I seem to have hung the machine—would aaaargh be appropriate?
8:15pm
A fag and a think didn’t help—that’s desperate states for me—when the drugs don’t work. I’ve put the breakpoints in, but as ever useless. Time to start commenting stuff out, let’s see if I can find an offending line[es].
8:30pm
Still no joy. The problem seems to be with the supplied class—is there an errata? No, damn.
8:42pm
Can’t see it, used all the usual tricks—so time to give in for now—I’ll never see it if I stare at it.

Two and one-half hours to not finish twenty marks worth of a hundred point assignment. Way-to-go neil!

update

Doh!

I never explained what the doh was about and I should have—the OUDialog etc don’t work in BlueJ, you have to use the OUWorkspace.

2010–03–09

a refreshing holiday

Was planned, and was enjoyed. The computer was not touched [well maybe a wee bit], I only did maths that wasn’t course related [again maybe a wee bit] and I rested my mind. Was this a good idea? In the main I think yes. I was getting frazzled—work was hell and I was enjoying neither my maths or my Java. But it has left me with a little problem.

I returned to work yesterday to find the [expected] mountain of tasks, emails, complaints, problems…only the most basic of my jobs are done in my absence. And that’s not the end of it—my feed reader says that I have eight hundred and three unread articles [or whatever], the first class desktop is a forest of red, I’ve only peaked at the maths site and there’s this site. It would seem that I’ve shot myself in the arse.

I have a mountain of work work, a half-done TMA to complete in the next week and when I look through the tunnel I don’t see a silver lining.

but

I suppose that I should see it as a challenge—a rested neil versus a shit-load of troubles. But, you know, sometimes that’s hard. But three years in the OU trenches and half a lifetime’s jannying have hardened me against this kind of adversity. I have a plan, I’m not panicking, a list has been made. So off to tick off some items. Hopefully I’ll feel better tomorrow.

2010–03–10

TMA finished

In the sense that I’ve done the coding, as always the testing and formatting are ¾ of the battle. I’m not sure that I’ve got a lot to say about it. So…

yet another waste of my time

I hadn’t really thought about the personal blog[sic] that the OU offered me via my homepage. But. With the maths site going all Moodle I thought that I’d see what was on offer. And what was on offer for me were a couple of things—

  • I could link to this blog [and in so doing provide ersatz commenting for this site].
  • There was this [OU only I’m afraid]. All the bloggers in one place!

As I said another avenue of time wasting opened up. Isn’t that just great!

2010–03–13

a brush with junit

Having completed my TMA the other day, well the coding anyway, I had the idea that I might test my code using jUnit. So out with the unit thirteen book and a little light reading.

First thoughts? Interesting. I’ve only skimmed the basics so at present all I can do is create unit tests for methods that return. But a quick google reveals that there seems to be more to it than that. However, for now, small steps are in order.

My interest in [rigorous, systematic, planned—proper] testing started after my TT381 debacle—where there was the real possibility that I submitted flawed code. So I decided that I needed a testing regime, rather than the write a function, try a few values, if they work all well and good, if they don’t fix it methodology. I even went as far as writing a JavaScript test suite [which I’ve never used—in fact I don’t know where it lives, if indeed it still does]. But as the pain eased so did my fervour for testing. I’m more-or-less back where I started—sloppy, haphazard, slap-dash. Can I, like Darth Vader, return to the light side?

Hopeful of conversion, I created unit tests for all the methods that I could, which wasn’t too bad as I was learning about jUnit and, thus, my interest was piqued. The question is, am I going to make it part of my regular routine? I’d like to, but what I quickly realized that my unit tests were just the hard-code equivalent of the tests that I’d already done, so where is the point?

test driven

I’m sure that we’re all aware of TDD, but do any of us do it? I’ll bet that most of you reading this still test ad hoc. But herein may lie our carrot.

A carrot is a reward given for proper conduct. For example I’m supposed to test a fire alarm point every week, do I do it? Yes—I do it at five o’clock on a Friday. I find that it flushes out tardy staff so that I can go home! In the normal run of things I’d probably only do it now and again, but I find the pained faces of the recusants [they know that they should be gone] a spur.

As opposed to the stick. A useless device. To extend the above example what happens if I don’t test the fire alarms? Well potentially I’d get a verbal kicking when the fire inspector visits. And how would [s]he know that I hadn’t done the business? Why, [s]he’d check my records, that I could not possibly have falsified.

I forsee major benefits if I create the unit tests first:

  • I’ll have to think about what I’m going to do while writing code. I already do a lot a pre-code pencil work, but that isn’t quite the same. Thinking about coding when you aren’t isn’t the same as thinking about [other] coding when you are.
  • A unit test will fulfill the same purpose as my lists—we all love ticking things off.
  • When things get complicated it’s all too easy to break what we already have. How many times have you agonized about a piece of code that was flawless because you’d made a, thoughtless, can’t possibly change things alteration to some other function/method?

Of course this is all a mutton-pie in the sky—I’ll be here in a couple of years [hopefully] agonizing about exactly this, having, seen the light [again] for all of ten minutes.

doing it for real?

Although I’m feeling slightly better than I did at the beginning of the week nadir of black-doubt I’m still helplessly pissed off—is it time for a change? I’m old, set in my ways, but I’m good at this and I enjoy doing it. Should I try to get a job programming?

The answer is yes—but I know me and it won’t happen. I’m too shiftless.

2010–03–19

bad tidings

I was sipping froth off the top of my second beer, perusing Euripedies’ Ion and contemplating a night of sloth when the bomb dropped—the person that I’d arranged to cover tonight’s overtime cried off. So I had to slog my way back into work to suffer the very worst that Scottish country music can throw at me. I started at six this morning, I’ll finish at twelve [midnight] and I’ll be back again at eight tomorrow. What year is this again? When is the European working time directive going to kick in? When is having to listen to fiddles/bagpipes going to be considered cruel and unusual?

The worst part of it [apart from the fucking music] is that I’m in St. Oswald’s [my annex] so I have to use a computer that isn’t set up as I’d wish it to be. It has some things—the usual suspects; a web server, loads of text/image editors and browsers galore. What it doesn’t have is BlueJ and MathCad. So although I’d like to be turning a bad thing into work that isn’t a viable option.

So I thought that I’d revisit something that I did a while ago, a sitemap creator. This beast was a php/XML/XSL monster that parsed the contents of a website into various flavored XML files. Did it work? …kind off. Was it good code? …No. What it was, however, was my first attempt to write php in an O-O fashion. So it was an interesting revisit.

the problems

Perhaps what follows should be a list, but I’m tired and uncaring!

My php is rusty. I don’t do much server-side coding and when I do it, it , mostly involves classic asp and Access.

I’d better explain that. I can’t use php/mySQL on my work server [well I can, but were talking version 3.x of php and a mySQL server that runs as root with no username/password. If you think that you can use that then…] I could use ASP.net but I hate it and other webmasters in my ‘group’ who use it have had—what I’ll term—issues with support.

On this site I don’t have to do anything server-side.

The upshot of the above is that I’m not aux fait with what I’m doing, so I write something like this->folders, or $this->$folders instead of $this->folders. When I get the usual unhelpful error message I’m lost. [Is it just me, or is this stoopid? Why the dropping of $ in a class?] Suffice to say syntax was hell.

Two hours of hacking convinced me that phpis just shite.

em…neil

What have you just said and why?

lemma: php encourages bad code

All computer languages have their problems and their strengths, but I’m going to suggest that php is just a mess.

From the above you’ve probably realized that my main problems are syntax, syntax and syntax. But it’s more than that—php lacks things [when compared to other computing languages] and doesn’t provide [compensating] features—e.g. we can’t have static methods/variables [as far as I’m aware]. I can fake these things with JavaScript, I also have the option to do it another way—I’m not disadvanted, I may have to do things differently but I still have choices.

There’s the problem; can’t do something in php? We’ll add it. It’ll be fake, but who cares? So eventually we’ll get closures, interfaces, class methods—the whole shitting sheebang tacked onto a language that wasn’t designed for it. Nail four legs onto a dog and—hey presto—we have an octopus!

Perhaps I’m just jaundiced, I’m certainly pissed, pissed off and I’m losing track of my argument [and the FUCKING music isn’t helping—until you’ve heard Marie’s Wedding played by twenty incompetent pipers you may not have considered suicide, I can’t ever go to that place again].

Ah, the eightsome reel…time for a dance.

2010–04–05

getting close

To the end of the course. Well close-ish might be a better word. The last TMA is due in May, the exam is in June and it’s only just April. But it feels like we’re nearing the end.

Part of my, fin-de-siècle, feeling is down to the fact that, to avoid any last-minute panics, I’ve started my last TMA. Actually last-minute panic isn’t my main motivation—for the last couple of weeks I’ve been struggling to get down to work and up from my bed. So I’m trying to get myself going. I’m not sure how the plan is working but the TMA is interesting.

TMA04—M255

Like its predecessors in TMA04 we’re being walked through coding various mini-applications [rather interesting ones!], but this time our hands aren’t being quite so tightly held. Personally I’ve noted a sharp rise in the difficulty factor. There’s been a couple of places [so far] where I’ve had to think.

I sound terribly up-myself there, and I suppose that I am. But when you’ve been messing with code for a few years you aren’t often at a loss for ideas, and once you’ve got something, however klunky, working you can usually make it better.

But difficulty aside what’s been the real revelation, for me, is how much creating unit tests has helped. Yes, for once I’ve taken my own advice—I built tests for all my objects/methods as I went along. Mostly they didn’t help me that much, but then a test spotted something odd. Something odd that I wouldn’t have spotted otherwise. I can’t say too much, we are talking a live TMA here, but I felt really good when I chased my flaw down. The fact that the problem was something that I should have been watching out for…

So I’m now a convert—create tests. What I’ve noticed, with Java, much more than I’ve ever noticed with any other language, is that complexity grows quickly. We need to tackle this at every level—architecture, planning, specification, testing, wherever. You can’t wing this stuff—tackle it properly or just don’t do it.

TMAs should be tackled properly too! So I’m going to give-over coding and pencil-and-paper what I plan to do…I could get by without this, but…

2010–04–13

last TMA

The plan is to finish my last TMA over the next couple of weeks so that I can settle down to some serious revision. I also plan to tackle this one in a completely different fashion from the way I tackled the previous three. I’m going to write all the code by hand, by which I mean sitting on the floor with a pencil and paper, without touching the computer, without net access, using only the software guide. Does this sound mad?

It may be. But there are some potential benefits—in a couple of months I’m going to have to do virtually this in the exam, why not get some practice in? However, my main reason is that I’ll get some practice in building an application in its entirety from scratch. Sort off.

The first three TMAs, essentially, walked us through the process of writing code, this one [as I said below] isn’t being as helpful as the others so I’m looking to be walked through something else if possible. I’m, now, fairly confident that I can write Java, where I have problems is in the planning and macro-organization of creating an application. This might be an opper-chancity to get some practice in. It won’t be real practice—but hopefully this TMA will be holding my hand in a different way entirely.

I’ve said it before, I’ll say it again and plenty of other people have said it—the problem isn’t writing the code, it’s in the specification, the planning and the maintenance. I had to give up on my solitaire machine [I will come back to it] because it writhed itself out of my [mental] grasp. And I’d spent a fair amount of time planning that beast. To be expected I suppose but still a wee bit gutting.

Other Java courses will address these issues and, despite the general direction nod that is unit fourteen, they aren’t really part of this course. So there’s no real necessity for me to do this but I think that it’ll be more fun and, potentially, more useful [in the learning sense] if I do it this way.

I’ve printed off the code, I’ve destroyed my initial attempt and I’ll let you know how it went. This is madness isn’t it!

2010–04–23

last TMA…again

I haven’t finished this yet but progress has been made. I’m not entirely sure what progress—I haven’t typed a line of code into BlueJ, but I’ve completed it. Eh? Well let me explain how I went about this one:

  1. I printed off all the code for the supplied classes [yes, I know that this is evil]. I didn’t actually want the code, but I couldn’t find a way to print the interface.
  2. I wrote signatures, headers, pre- and post-conditions for all the supplied methods. [Shades of M263!]
  3. I did the same as above for the methods that I was required to write.
  4. I wrote the code for my methods.
  5. I decided what testing I should do.

Did this help? Well, we’ll see come results time won’t we? Where I do think that it helped was that it was good practice at writing code by hand, without benefit of compiler. Which was one of my reasons for tackling it this way in the first place. I’m probably going to attempt something of my own in the same fashion—a general IO class?

I’m not sure that it was of any use TMA-wize, but then I’m not sure that it hurt either. Standing back from the code made me think a wee bit more than I might usually have done. But apart from that I didn’t notice too much difference from the way that I’d have done it at the click-face. We’ll see what happens when I turn it into real code.

What did shock me was that I didn’t know my way around the course guide, the course guide that I’m going to have to take into the exam. Good to find this out now while I can still fix it!

The plan, now, is to write the test code and stub out all my methods. As ever, I’ll let you know how that goes…

2010–05–01

testing, again

My last TMA for M255 is finished and done but not yet submitted. Actually it isn’t completely ready, there’s some polishing to do, and one method needs a complete re-write as it contained a semantic error that my test-harness completely failed to pick up. But if push came to shove I could submit it now and it should get me over the eighty-five per cent mark for my OCAS.

But let’s back up a bit and consider that completely failed to pick up bit.

For this TMA I wanted to be more test driven, I wrote the tests before I wrote the methods. So it was a wee bit gutting that I only spotted above mistake when I was eye-balling a paper version of my code. Gutting but useful. I learnt a lesson, true it’s a lesson that I’ve been taught and forgot before, but still a lesson. Here’s what happened…

  1. I wrote a test for methodOne
  2. I wrote methodOne and tested it—pass
  3. I wrote a test for methodTwo
  4. I wrote methodTwo which used methodOne, tested, again pass.
  5. On re-reading the question I changed the code and post condition for methodOne
  6. I did not re-visit methodTwo

There’s [at least] a couple of mistakes there. I assumed when I wrote the test for methodTwo that methodOne was working—bad assumption. I should have written all the tests before I wrote the methods. The distinction is subtle, but because I had a working methodOne when I wrote the test for methodTwo I wasn’t defensive enough.

The underlying problem is that, because of code re-use, methods, and classes become coupled. So it’s easy to make a small change that ripples. That’s where the test-harness needs to be on its mettle. And mine wasn’t.

testing, yet again

I think that it was a useful exercise to attempt to write the tests first. I’m not totally sold on TDD yet, but what and how to test has to be part of the planning process. However, there are difficulties.

It’s easy enough to test methods that return, but how far do you go with state-changers? And Input/Output testing is very tricky.

It’s all to easy to fall into one of the errors that I made above—testing on the assumption that another part of the programme is working. In an ideal world you shouldn’t ever have to do this but that isn’t always possible. Sometimes you have to ‘wing it’.

For example I have a JavaScript function getWindowHeight that won’t work if you’re in quirksmode [it will if the function is inside the <body> tag]. I rely on it a lot, and I’ve tested it in every browser that I can get my mitts on, so I know that it works. But that didn’t stop me having six hours of hell debugging a perfectly working script that was failing in IE because I had
<?xml version="1.0" encoding="UTF-8"?>
at the top of the page. My entire defence against this happening again is a shouty capitals comment
//MUST NOT BE IN QUIRKSMODE!!
above the function. Not optimal.

But there isn’t any easy way to test if you are in quirksmode, in fact I don’t know of any. I suppose that I could pop up a dialog the first time the function is called issuing a dire warning. Can you see the problem with that? If you can’t then you aren’t getting the problem!

I guess what I’m saying is that a test-harness can never be the be-all-and-end-all. It’s part of the solution but it’s not something that we should rely upon completely.

That said I am going re-visit my TMA04 testing and attempt to cover everything, if only to get some practice in.

2010–05–04

examining the exam

I spent most of the weekend on my backside, drinking and wasting time. Well wasting time in the way that I now waste my time—reading about graph theory, brushing up on my determinants and re-re-re-planning my solitaire machine. Not actual work, but not complete fecklessness. The only definitely Open University work that I did was to have my first, good, look at the exam paper. It breaks down thusly—

  1. Part 1: Twenty multiple choice questions – 40%
  2. Part 2: Four variously weighted questions – 60%

It took me all of one minute to decide that I was going to tackle part 2 before part 1; time is a big factor in an exam and it’s far easier to be ticking boxes when the clock is ticking than it is to be writing code.

part 1

Is worryingly reminiscent of a CMA, the same labyrinthine logic, the same odd pedantry, the same feeling that it had been translated from English to Japanese and back again. There are a lot of marks to be lost here.

part 2

The questions are based on the four blocks, essentially they’re cut-down versions of the TMAs without the helpful step-by-step guides. They’re mostly coding so I should be OK, but I can see marks being lost for carelessness.

the plan

Is essentially one of revision. I should be able to get a good result for this course. There isn’t anything here that I can’t do, the question is can I do it under exam conditions and can I be accurate?

As I see it I think that I need to tackle three areas:

  1. The object-oriented paradigm itself. This means re-reading the course units and making notes and distilling them.
  2. The edge cases, the nut and bolts of Java. I need to know without thinking what happens, for example, here… double num1 = 2; int num2 = 5; num2 = num2 / num1; This means much work at the OUWorkspace face.
  3. I need to be writing lots of code by hand and submitting it to the compiler for arbitration to see where my weaknesses lie.

None of which I fancy, too much hard work, hard work that demands application and dedication. Not my forté. But I suppose that, at the very least, I should pretend to make the attempt.

2010–05–06

last TMA away

I finally got fed up and uploaded the thing. It could probably have done with more polishing/checking, but it was passing all the unit tests so I thought…hang it. It’s all too easy to get carried away in a search for perfection. There’s a strong argument for a measured approach—not exactly sloppy, but certainly not an endless round of anal tweaking. Do it, not exactly fast, but swift-ish and let your tutor dissect your flaws. That way you can see and work on the areas where you’re naturally weak. In the exam/real life your personal coding foibles are going to be writ large.

The trouble is that our marks are our yardstick—good marks == I understand. Mostly this is true but not always. For example in M263 I got an overall continuous assessment score of 97 but an overall examinable score of 78. I went into the exam thinking that I was a lot better prepared than I was. Under pressure my flaws were exposed. If I’d tackled the TMAs in a less “must get a hundred” fashion would I have been better prepared for the exam? Perhaps.

my M263 exam

For the education [and entertainment] of others and to remind myself what I need to be doing over the next month-or-so I’m going to re-visit what I did wrong.

I was totally unprepared for how difficult the exam was going to be. I hadn’t factored in the time pressure, indeed I remember thinking that I might get out early! I hadn’t practiced working to a time limit because I didn’t see it as an issue. You [I] need to work through questions to see how fast you can do them. And you need to decide in advance the type of questions that you are going to tackle [doesn’t matter for this particular course but…]. You also need to decide upon that questions that you aren’t going to tackle.

For the M263 exam I chose a database question that I did well, but it took me too long, I was left with only thirty minutes. I well remember the feeling as I looked at the clock—I’d drunk about a litre of ersatz red bull by that time but I still had a hopeless lack of energy/will moment. I was forced to do a logic question, that I would have been able to do if I’d have had the time, rather than the question [algorithm efficiency] that I wanted to attempt.

I also wasted a lot of time on a while loop proof—something that I knew I was bad at. I did give up in the end, far too late, the ten or so minutes that I lost could have got me through.

Time management, there’s the rub. Do what you can do first, come back to what you find difficult.

However there’s a dark side to time management—trying to be too fast.

In the M263 exam I lost a lot of marks for a question that I should have just aced. Here’s what happened; like a diddy I didn’t read the paper properly [I don’t care how often you’ve been through the process—read it!] and it wasn’t until question three that I realized that you needed to start a new question on a new page. So I had to rewrite my answers to questions one and two, which made me rush question three because I was in a bit of a panic. Result? Many lost marks.

I have a similar problem at my maths tutorials, because I’m a stupidly competitive wee bugger I always try to be first to the answer. I’m rarely first and I’m usually wrong. Fast means prone to sloppy.

funny…

As I’ve been writing this there has been an itch at the back of my mind—this is how I trained for chess. Once upon a time I played quite a lot of chess, not to any great standard, but I did try to train myself. There are some common themes: time pressure and there are positions that I know I play well/badly. Often I make judgements based on how comfortable I feel about a position in the given time rather than the objectively best move.

Which I suppose takes me back to the beginning of this piece. There’s more to this exam business than I thought.

2010–05–14

am i really ill?

I’ve had a rotten week. It started with a rubbish weekend; I was sloth-tired, bored and restless. No work was done, I didn’t even manage to waste my time in an effective fashion.

Then on Monday I felt so ill that I had to go home from work. Now I won’t say that I’ve never had a day off in my life—that would be a big lie—but in the last ten, or so, years I’ve probably only missed about ten days due to illness. And going home when I’m already at work? I managed to struggle back in the next day feeling a wee bit better but still less than sparkling.

Then I did something stupid—I weighed myself for the first time in years [literally]. Huge shock, I nearly soiled myself—I’m just over eight stone. I’m six foot tall, that can’t be right! Shite, I’m dying.

This isn’t quite as bad as you might think, my normal weight is nine and a half stone. I’ve weighed this since I’ve been eighteen—over thirty years. I’m meant to be light. Very light.

How come I didn’t notice that I was wasting away? Well [as you might imagine] I’m skin and bone, and my bones would have to shrink for my clothes to get loose.

panic mode

Set in as soon as the scales settled. I’ve never been a hypochondriac but I could still think of half-a-dozen reasons for sudden weight loss, none of them good. I resisted the temptation to trawl the web, at least I know that, while there might be good information out there, you’re more likely to mine the crap.

After the panic had ebbed a bit and I’d made a doctor’s appointment [two weeks from now!] I tried to think rationally. I can’t have lost this all at once, it must have been going on for a while. I do a physical job and I’ve have noticed a sudden weakness. What I have noticed is a loss of resilience—I don’t ‘bounce back’ as well as I used to. I’d been putting this down to age but now…

Illness isn’t the only scenario; one of the sneaky things that the OU does to you is to make you more efficient. Juggling work, life and studying isn’t easy, but after a few years you get good at it, you get good at it or you give up. And therein lies a problem—it’s easy to over-extend yourself for a goodly period of time without realizing it.

I work in a crapy job that’s hard work, a job where I’m daily stressed by others taking their stress out on me, I have a life [kind of] and then there’s all this OU stuff on the top. Is it any wonder that I get a wee bit run down now and then?

That’s my hope anyway. Knowing my luck I’ve got some horrid lurgy that means I’ll have to give up drink and fags. Now that thought does cause me to soil myself.

2010–05–24

the time comes…

I’ve nearly got my maths TMA completed so now it’s time to buckle down to some serious revision. I have twenty two days, which seems quite like a lot in one sense and desperately close in another. Three weeks. Time to devise a revision strategy.

I think that my analysis below of what the course has covered, and what we need to know, was essentially correct, but how am I going to use this knowledge. I have to factor-in what I can force myself to do. In an ideal world I could do my revision drinking, reading and lying on the couch [more-or-less what I did for M263] —not realistic.

I have quite a few areas of [and here I’m only talking about coding] weakness—

  • I haven’t spent enough time actually writing code. I only did it when I needed to complete a TMA or when I was hacking my Solitaire Machine.
  • The nuts and bolts of Java—the things that real coders need to know aren’t instinctive to me.
  • I’m too reliant on the internet being there when I’m coding. This is a good and normal thing in real life but this is an exam we’re talking about here.
  • I’m sloppy, without a compiler I’m lost.

I’ve decided that this [the coding deficit] is what needs to be tackled first. It’s a hard ask—doing in three weeks what you should have been learning over eight months. And I won’t work my way through the exercises. [Shades of Violet Elizabeth?] So what to do?

[yet another] piece of stupidity

My Acmé Solitaire Machine isn’t going to ride to the rescue this time, but I need to code something real—otherwise I’ll wander off-task. So I’ve plumped for a time management application. Won’t happen, won’t work, even a wee bit, and it will drive me to fucking despair. But it does fit the bill. The trouble with the solitaire thingy is that it doesn’t cover everything Java. The Acmé TimeTracker possibly shouldn’t cover it either, but I think I can see how it might have its arm twisted into my way of thinking.

Last night, after an afternoon fighting with MathCad, I fleshed out the classes. The Classes, sub-Classes, Abstract Classes, Interfaces, Static Classes……see!, see! it has it all. It shouldn’t, but it’ll be good practice. For both the exam and ultimate failure.

What do others think?

The forums [I refuse to type foria, or whatever] are getting busy. I won’t go into any detail here [either you’re privy to them or you can read [what I’ll dub] my summary of what I thought later]. Suffice to say that there are interesting things [panic?] going on. At present we’re in past paper hell. They give us the papers without the answers. What’s that all about?

am I ill?

I’ll tell you tomorrow after I’ve been to the Doctor. Or not…

2010–05–27

@ the doctor’s

The beggar took, what seemed to me, to be an inordinate amount of blood, at one point he even stepped out of the room to fetch yet another receptacle. I don’t know if you’ve ever been left on your own with a needle stuck into your arm, but you can take it from me that it ain’t pleasant.

This blood will be gone over [or possibly supped] to see what, if anything, is awry with me. They’re going too find out that I drink too much aren’t they? I’ll have a liver function that’ll make, at least, the local news. I’ve also got to go for a chest X-ray bearing a card with smokes 20++ a day written, in heavy black ink, on it. I lied twenty, he should have taken my lie at face value shouldn’t he? Why the ‘++’? He might as well have tattooed ‘satan’ on my forehead.

I’m, desperately, hoping that I have something non-self-inflicted, the prospect of being lectured on my lifestyle does not appeal. It doesn’t appeal to the extent that I’m considering rescinding my ban on poking pencils into others’ eye-sockets. As ever I’ll get back to you…

2010–06–03

revision

I finally managed to finish off my maths TMA, it took me forever to write out the fair copy. Anyway, it’s done and I can get down to some serious revision.

With this thought in mind I decided to tackle the multiple choice section of the past paper. It took me about forty minutes, which is fairly good. However, I have looked a some of the questions before, I don’t know if my answers were right and I wasn’t suffering from real exam stress [I was lying on the couch drinking beer]. About the best I can say is that I got an idea of what type of questions I have trouble with.

My revision plan is substantially the same as I outlined in a previous post—except for one thing. The TimeTracker app was, I decided, too grandiose even for me, so it was back to the solitaire machine. I’m certain sure that there will be a big-mark question on IO in the exam, so that’s what I decided to tackle. A static class that wrote/read/serialized objects/games/moves. Leaving aside the solitaire nonsense [of which you could not care less] I noticed some interesting things:

  1. A static class was exactly right for what I was attempting to do—it’s a function library.
  2. My natural coding style is iterative; write a bit, test, stub it out, compile, test, write a bit more…
  3. I rely heavily on online documentation.

Two and three are interesting and worrying. In the real world I’m doing it right; in the exam world I have a problem. In the exam I need to write code full-formed and that isn’t the way I do things. In the exam I’ll only have the software guide. In the exam I’ll not have the comforting presence of the compiler to keep me straight. Should I try to train myself for the exam?

Yes…and no. For the exam I need to teach myself to write, pencil & paper style, code. That doesn’t mean I should change the way I do things at the click-face. BlueJ work isn’t for that—it’s to familiarize myself with Java. It’s not the place to develop a coding style that isn’t appropriate for real life. I can work on a pencil & paper style elsewhere. The couch?

This weekend I’m working—‘be there’ work rather than ‘do stuff’ work—a perfect opportunity for some extensive quality-time with the beast that is BlueJ. I don’t fancy it much to be truthful, but time is getting short so I’m going to force myself for once.

2010–06–05

higher things [redux]

I stole a copy of the SQA Higher Computing exam paper the other day; I’ve moaned about this before, but I can never get enough moaning so… Suffice to say that I though that it was a piece of flagrant buggery. There was one place where the were out-and-out wrong, consider this HTML [I won’t quote exactly because it’ll be ©idiots]

<html> <head> <body> </body> </html>

Weird, but not wrong, they said HTML, not XHTML, so unclosed tags are allowed. We’re in quirksmode here, the browser expects shite.

In fact it’s a perfect example of where I think the problem with the whole paper lies—understanding what the <DOCTYPE> means is so much more important than missing the odd closing tag. The exam seems to be a test of memory rather than of important understanding.

It’s easy to carp, the question is how would I change things? Well, aside from teaching pupils to touch-type [something that once was teached but, now that it’s more important for everybody, isn’t], I’m at wee bit of a loss. That won’t stop me opining of course.

I think that they’re trying to teach too broad a syllabus—there needs to be a more focused depth. But where to focus? That rather depends on what it is that they, the compo-edu-Druids, want pupils to learn. So I’m going to make an assumption that they are trying to improve me. This might not be optimum—I’m in an odd place on the geek/nerd/twat triple point diagram, but we have to start somewhere. And the somewhere is a functional programming language.

Got the outrageousness of that? If you haven’t browse away from this page, if you have consider the difficulties:

  • After four years of study I can barely [ie can’t] programme in a functional fashion
  • I doubt that there are many teachers out there that are up to it
  • It’s esoteric on the largest scale and useful for nothing, unless you are really, really good*

But it might teach us to think rather than earn, which seems to be the modern way.

I’ve just had a brilliant game of chess with a young laddie called Ben. He’s under twelve and he roundly beat me to a pulp in a sharp Sicilian, I see a great future for him—he didn’t panic when I threw my pieces at him and he mated me nicely. So the young are learning and it’s just me getting old./p>[sic—see it don’t matter]

As said, outrageous, but maybe we need to introduce ‘young adults’ [stress on first syllable] to nonsense/bad/difficult/dangerous/boring things. I think we owe it to our children to try to seriously fuck with their minds,

* This was a rhetorical aside, I know the point of functional languages.

2010–06–06

dull, dreich and despond

It’s Sunday afternoon, cold, grey and damp. I’m at work, at work [hacking Java], tired, bored and itchy. [The last ’ll be hayfever.] I’ve spent most of the morning messing around with my solitaire nightmare—stoopid game. I did manage to get the IO class working and there were a couple of ‘punch the thin air–yes!’ moments. But I’m still feeling low & flat. This is a bad place to be just over a week away from an exam.

I can’t seem to get myself moving, motivated or up off my backside; I sit on my arse, pencil behind ear, unit text and notes to-hand and then I do nothing. Well, maybe not nothing, task-avoidance kicks in—I write this blog, I cook my tea, I…get really drunk. So drunk that I [and I think that there are statistics to back me up on this] am the only heterosexual man on the entire planet that can watch the Eurovision Song Contest in its entirety and enjoy it. Other men who enjoy it are either gay or in the closet.

All of which leads me to a rather important question…

have i enjoyed this course?

To which I would answer—yes, yes and yes. The parts I haven’t enjoyed are me-specific. What haven’t I enjoyed?

  • The course went on for too long, I’d have been happy for it to be a twelve-weeker.

And that’s it.

As I said me-specific—what’s to my taste isn’t the right way. There are people doing M255 who haven’t done any programming before, for them the pace might be too fast. As some chap in a very tall hat once said you can’t do nuffin’ write[sic].

I’ve lost the will to write, so I suppose that it’s back to solitaire…

2010–06–10

re-vision

Lots of people are having past-paper fun in the forums. I’m not. Mainly because I’ve only got the paper that you can print off from the web site; I can’t really afford to buy any more. I’m not sure even if I had a whole wodge of them that I’d be contributing—I can’t even force myself to do the one that I’ve got, despite my best intentions.

My revision consists of working my way through the unit texts in tandem with my notes. I’m a bit surprised about how useful my notes are. I made them mainly as an aid to getting knowledge into my meatware, I didn’t realize what a help they’d be when it came to revision. I’m also well-chuffed that I got, much, better at making notes as the course went on.

So I suppose that, for once, I got something right, not there yet though—I hadn’t even realized that the was an OU revision guide until today. And I’m certainly not going to read it!

However I’m feeling a lot cheerier, I’m almost looking forward to the exam, and an intensive weekend of intensive BlueJ fiddling is planned. So Saturday morning you’ll find me typing mournful tripe into the computer I suppose. Back to work.

2010–06–11

blood

I came home last night to a letter from my doctor—my blood is fine apparently, apart from raised random glucose levels. So I have to fast one morning, go into the doctor’s, drink a measured amount of Lucozade and go back a couple of hours later to see how my body handles sugar. I’m sensing type two diabetes. Which is fair enough—you can’t get away with getting ninety per cent of your daily calorific input from coca-cola, chocolate, ersatz red bull and alcohol forever I suppose. If only fags were a food.

I still have to have a chest X-ray, so I’m not out of the near-death woods yet.

panic

For now I’ll have to settle for approaching-exam panic. I was working my way through unit six last night when I had the sudden thought—there isn’t that many days to go, am I going to get this done in time? To which the answer is a definite maybe.

I’ve a big weekend planned and I have Tuesday off, so it is, just, possible. But that rather relies on me actually doing the work. My regular reader [me?] will know how things like this have panned out before.

2010–06–13

dithering

I’ve spent some time this morning pissing around with the latest incarnation of the Solitaire Machine®—it’s not going well. My unit tests are cascading failure and I’m becoming despondent. Once upon a time I’d have been thrashing around and thick-fingered-typing like the loon. [That’s a seriously stupid simile—we duck-type, ducks don’t type.] But, being a veteran [almost] coder, I know what to do—walk away.

Sound thinking but, perhaps, not optimal in this case. I’m hacking the beast because it’s a part of my revision strategy, so walking away == stopping revision.

Therein lies my problem; I’ve been hacking code for [about ten to fifteen–I can’t remember] years now—I know the tricks, I know the behaviours required, I know what works for me. What I know isn’t going to cut it for the exam. For that I need a different skillset. That skillset isn’t the one that I want to have.

It’s nice to pass exams, but it ain’t the be-all and end-all. Sometimes, like when you’re coding, you have to step back and attempt to see. And when I step back I see that, while I might do badly in the exam and I’ll never code for real I need to keep my tics.

But, enough of me, the world is large and wonderful— the spanner got a visit from Brendan Eich [an unbearded-guru]—Kansas—we have a contact problem.

Only serious JavaScripters will get this reference so I’ll attempt to put it another way—Socrates commented on your philosophy blog.

Writing this should have been away enough?

Am I gay? Why the Judy Garland reference?

While I’ve been writing this I’ve been listening to the football in the background of my mind. Not from any great interest but from shear inertia. I’ve decided to add the commentators to my Set of fucks who will be up-against-the wall come the revolution: Set<Fuck> fucks = new HashSet<Fuck>(); fucks.add(new Fuck("Alan Hanson")); fucks.add(new Fuck("Crisp Mongering Bastard"));

2010–06–14

shouldn’t?

I shouldn’t be doing this, blogging that is—I have an exam in a couple of days, shouldn’t I be revising? No, that time has passed. Time to zonk, time to rest, time for coffee in bed.

I suspect that I haven’t done anything like the work required, the should-have and what-if brothers have set up home in my head. I shall ignore them—I’ve done what I’ve done—tomorrow is a lazy, drink-less, day.

Tonight I’m doing a bit of blogging, some trolling in the forums and having a wee soupçon. You need to be relaxed to give of your best under pressure. Well that’s my take anyway—we’ll see how I feel when the marks drop through the letter-box [posted on the course website that is].

But for tonight, and until after the exam, it’s time to close this tripe. I’ll report back after and I’ll do the review soon. For now I must focus on not letting a soupçon become a vat.

Luck to all us examinees.

2010–06–18

exam

I sat the exam Wednesday. I toddled down the road, in bright sunshine, to the Gorgie Suite in Tynecastle Park. Tynecastle, where I spent much of my youth chasing another kind of dream entirely [as a spectator I hasten to add]. It was a nice place—iced water, carpeted floor, big desks and at points of stress you could watch the sprinklers playing across the emerald pitch. Enough setting the scene neil—what was the exam like?

I though fair, and from the comments that I’ve read in the forums most other students thought so to. The consensus was that while some of the multiple choice questions were harder than in other years, the ‘big’ questions were easier. I’d go along with that, although I only have one past paper for reference. So exam over, there are three questions:

  1. How do I think I did?
  2. What did I think of the course?
  3. Where to next?

Two I’ll answer elsewhere, in my M255 course review. Here I’ll tackle one and three in reverse order.

This one is easy—M257, it’s a required course for my degree so I can decide if I want to carry on down the Java road after I’ve finished that.

One isn’t so easy to answer. I finished with five minutes to spare, tackled all the questions and the after exam in-head analysis didn’t throw up any major blunders. So it’s a question of how many marks I lost through carelessness, inaccuracy and plain bad penmanship. I’m in with a shout of a distinction but a grade 2 would be more realistic and satisfactory.

update

Having printed off the, now available, question paper I’ve identified at least five dropped points. Perhaps the most gutting error was the logic question. It was the last question that I tackled [I knew it was tricky and it was deliberately thus] but my preparation was flawed. What had I missed?

bounds >= 10 ≡ ¬ bounds < 10

Bugger.

how do i feel?

Curiously flat. As always, I feel that I should have worked harder, but, do you know, in the end I don’t think that it would have made any difference. I’m neither satisfied nor dis-satisfied with my performance. Strange. So, it’s that time again for another course:

svn commit m255 -m "last blog post"

enter