M255

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

This being the first part of the blog that I kept during this course. You can find the second part here.

2009–07–14

signed up

I still have to send off the forms to the OUSBA people so that I can pay for the course, but I’m not the last-minute Larry that I was last year. Could I have learned something from my past failures?

I must admit that I can’t wait for the course to start—I’ve got plenty of work to do [in fact too much] but I’m missing my course work big time.

I won’t be posting here again until either the course books arrive or something goes horribly wrong. So for the moment, signed up, sorted out and raring for the off.

2009–09–16

The books are coming!

Oh, no they’re not. For most of the summer the date for the course books to be posted has been showing as September the eleventh, but when I looked today [to see why I hadn’t yet got them] this had been changed to the eighteenth. Damn!

I’d hoped to get started this week—if for no other reason than that I’m bored. Well, bored in the sense that I’m missing my OU stuff. Hopefully they will arrive next week, I’m keen for the off. Not that I haven’t got other things to do…

my other work

Alas, is piling up big time—I haven’t had time to do any personal stuff in ages [hence the lack of new content on this site]. So, given this overload, why the mighty yen to get stuck in to M225 you ask? Because the OU isn’t really work I answer. I’d better explain that, because it sounds like rubbish [and may be].

My OU experiences will, of course, be different from others’—but I’ve never really never really struggled to keep up with my course-work. Sure, there have been occasions when things got a wee bit fraught, but on the whole I seemed to have plenty of time.

Partly this is because much of it can be done in the interstices of life: in the bath, in bed, walking to work, at work[!]… during times where you couldn’t be doing anything else anyway.

Indeed one of the things that I’ve, strongly, taken from the OU is the amount of time that I used to waste doing nothing much in particular. For example this morning I spent an hour or so messing around with a unit circle doing some trig identities. What would I have been doing otherwise? Watching Jeremy Kyle? True, I was half listening to the sad parade of failure that is Kyle, but at least I was doing something useful at the same time.

But mostly I’m champing at the bit because learning at the OU is fun—I miss not having a course to do. Roll on October!

2009–09–19

the books are here!

I arrived home the other night to find that the big brown box of ‘urgent educational materials’ was sitting at the bottom of the stairs. So I grabbed a bottle of Stella and settled down to see what I’d got. The contents:

  • A CD with lots of software [it took about half an hour to load it all].
  • Fourteen unit books
  • The course handbook

What’s not there are the TMAs and study calendar, we get those when the course forum goes live.

first thoughts

From a quick perusal of units one and two it looks like I’m going to be covering some old ground. Not too much of a surprise I suppose, you can’t really do any programming/scripting these days without picking up some object-orientated concepts.

I also had a quick flick through some of the later units—there doesn’t seem to be a thermocline [a point where the course suddenly gets hard] like there was for M263. But maybe I’m just not seeing it.

I’ve not had a chance to play with Java yet but I don’t foresee too many problems—the syntax is familiar and [from what I can see] I’m not going to have to learn any new concepts.

I suspect that the main difference I’ll find from my normal script-kiddie life is that the programmes will be bigger and spread over many files. I’ll have to get organized I’m afraid.

the plan…

Is to read all the course books over the next couple of weeks, then go back and read them properly at the right time. I’m not sure that this is a good idea, it might be better to delve deeply into each unit without knowing what’s coming next, but I’m not going to be able to stop myself.

Anyway off for a weekend of lying on the couch, drinking beer and reading…what fun.

2009–09–21

a first look at java

As promised I spent the weekend slumped, I managed to get through the course-books. True, I skimped through much, but I think that, on balance, for me, it was a good idea to get an overview.

So, my first thoughts?

  • Java ain’t a scripting language—it’s for building real stuff.
  • I’m strongly reminded of my experiences of learning Haskell this summer.
  • I, might like Java.

But I amn’t going to talk about any of that, it’s an overview, don’t you expect an overview? Anyway that’s all I’'m good for isn’t it…

an overview then

What I really took away, so far, is that this course isn’t about Java—it’s about object-oriented programming. And it seems to do that well. For example I’ve always used method overloading [because it’s useful] without one whit of understanding of what I was actually doing. Take a look at the following [pseudo-code] pattern:

function f(node, string){ if(typeof node == string){ //just the string arg //blah } else{ //given a node arg[?] //blah, blah } }

I use something like this, lots, in Javascript; it’s implicit overloading, isn’t it? And I’ve used something like it in many places, because it’s, as I’ve said, useful behaviour. Thankfully Java allows explicit overloading dependent on signature. This course is the first place where it has been properly explained to me.

other things

So what else did I notice? Mostly that we aren’t going to be using Java in anger here. We’re not going to be required to work fully functional code. There won’t be multiple files, difficult imports and a working knowledge of how java.swing works is not going to be required.

Without seeing the TMAs it’s difficult to tell how difficult this course is going to be—but my suspicion is that understanding object-oriented concepts is going to be more important than an in-depth recall of any Java class.

As ever, a weasel ending—well see…

2009–10–02

the icons and the website

The M255 course site went live yesterday and a couple of new icons appeared on my first-class desktop. So things are now real—I’m actually studying a course again.

Bit of an oddness with the main course conference, [well I’m assuming that it’s the main conference], there are two sub-conferences: north and south, neither of which I have post rights to. I can read, I just can’t reply. Yes, it’s killing me—all those people that I could be arguing with, sitting there, having thoughts….

Hopefully this is just a glitch. Since the TTs I’ve found the course forums a wee bit quiet, it doesn’t seem to make any sense to make them quieter still. Besides why should where I live restrict my rights to slaver at, harangue and confuse my fellow students?

However, there is a conference for my tutor group, in which I was first to post—result!

got ahead of myself

Despite my best intentions, i.e. not learning Java before the course started, I’ve bolted from the trap—I’ve read the course units twice. I have the sneaking suspicion that this will come back to bite me in the soft parts—as I said before pace is important on these courses. Anyway, I’m now resolved to stick to the study calendar. Hopefully I will suffer no lasting harm.

building some stuff

It comes to me that I’m going to have to revive an old tradition—building something functional, this time using Java. During the TTs I was always working on something related to what I was studying. But, given that we weren’t working with a real language, there wasn’t the same opportunities on M263. Not so now.

But what to build? I don’t want something so trivial as to be useless, on the other hand I don’t want to be so hubristically ambitious that I do something [more] stupid [than usual].

The obvious thing to do is to do is to create something to handle the school’s maintenance, it was mentioned that I’d promised exactly this by my line-manager during my recent Professional Development Review [discipline lite]. I could cobble something together using a CSV file couldn’t I? That way the excel using crew [who look so big in the sun] would be happy.

still

The weekend is nearly here and, as I slogged my bottom off working during the festival [for which I recently got paid for] and autumn is here, I’d promised myself a weekend of mushroom risotto, TVP stew, and a bottle [or two] of port. If there is a single drop of rain, or a breath of wind, tomorrow morning you’ll find me sipping weak tea, munching toast and marmalade, squinting wistfully out the window and planning an evening of twitching drunkenness on the couch.

Happy studying!

2009–10–10

kicking things off

I finally managed to get a couple of posts up on the course forums—I’d been trying to post in the wrong place. Typical ineptitude on my part.

The forums are nicely busy, plenty people saying hello. Hopefully this isn’t just initial enthusiasm and we’ll have a busy forum all the way through the course—a busy forum is a happy course. [Gawd, did I just write that?]

learning to learn

One of the first posts in the main conference was from a tutor [mod?] suggesting that we begin making revision notes now. He also suggested something about mind maps. Well I’m not sure about the maps, but making notes is a staggeringly obvious idea and one which had never occurred to me.

Which is a bit embarrassing considering that I’ve been studying with the OU for over three years and I’m well aware of the importance of getting your hands [and any any other senses/body parts] involved when you’re learning.

Coincidentally Geoff Chandler was recently banging on about the importance of book, board and bedroom when learning to play chess; I remember it well. It’s been many years since I had to learn an opening, or analyse a game, but I know that the only way to do it is at the board, with your hands. But while I was sagely nodding my agreement I was ignoring the fact that I wasn’t applying the lesson to myself.

The sad fact is that I’ve never taken advantage of any of the many resources available to improve my learning skills. For example the first time I visited the skills for study pages was today, and that was just so that I could link here.

I suppose that this, lack of interest in study-skills, arises because, while high marks are nice the main focus of my OU studies is on learning stuff. The ability to regurgitate my knowledge for an exam or a TMA is of secondary importance for me. Well, that’s what I’ve been telling myself anyway.

The truth is that I’m a stupid, arrogant little sod.

Computing [so far] has always come pretty easily to me, so I think that I don’t need to do any of the things that mere mortals have to do. I never do exercises/activities, I didn’t do the specimen M263 exam paper under exam conditions, I only used the course software to do the TMAs. In short I’m a hopeless student.

Interestingly I don’t have the same failings when it comes to maths—I buy second-hand maths books to get as many exercises as I can.

So when things get hard, which they will, I won’t have the study-skills available to ease the pain. As I said stupid, arrogant little sod.

This has to change. So the plan is…

  • To read the study skills section of the OU site.
  • To see what other resources are available.
  • To make revision notes for units one and two—this weekend neil.
  • Not to dismiss mind maps out-of-hand.

But since I’m analysing my faults here we have to factor in the fact that I’m a great one for making resolves/plans and then subsequently doing bugger all about it.

2009–10–12

study notes

I spent a large part of the weekend making notes for units one and two of the course. Results? Pretty good I think—it did feel like things were ‘going in’ better. I did, however, encounter a few wee problems.

I’d rather assumed that since I’d been to a school and attended a [very few] lectures at university, that making/taking notes was a part of my skillset. Alas not so, indeed making legible notes doesn’t seem to be in there either. I found it quite taxing, the major problems?

Selection
I found it very hard to decide what to include, and what to leave out. There was a temptation to just précis the entire thing, but perhaps what’s required is a series of bullet points? Or something in-between these poles?
Intention
What am I making these notes for? For revision? To cement my knowledge? Or just to facilitate learning?
When to make notes
Should I read an entire section and then make notes? Or should I make them as I read?
Detail
This may be a sub-species of selection, but I feel that it’s slightly different—I may know that I need to include something, but I don’t know the level of detail required.

However, I did feel that my focus and concentration were better purely because I was thinking about taking notes. And there were a couple of places where I discovered myself to have been in error through reading alone—I thought that bytecode was dynamically-interpreted by the JVM.

I’m going to have to experiment to find out what, exactly, works for me. For unit three I’m going to make marginal notes in the unit text, summarize each section and then compare these with the learning points at the end of each unit. I’ll try something else [to be decided…] for unit four. So hopefully by the time I get to the later units I’ll be a note-taking diva.

strangely

My wife chivvied me into tidying that bomb-blast in a library that is my bedroom on Sunday, there are a few books on the floor, causing me to find my tt280 folder. Inside was a whole section on writing reports. A whole section which I don’t even remember reading—could this be why I routinely stuffed-up my tt reports?

Four years into my OU years and I start to get interest in study skills? I’m a really hopeless student!

2009–10–13

what to build with java?

I was messing about on my school site today when I realized that it is way beyond time to do something that I’ve been putting off far too long—some maintenance programming of the ASP pages. I hate maintenance, I need some incentive. So I’m going to build a bug tracking application using Java.

Let us look at the reasons why this is just stupid:

  1. I have to build something before I fix any of the many bugs.
  2. It’s re-inventing the wheel.
  3. It’s way beyond my skills—pushing the evil day mentioned in one above even further in the future.
  4. I could easily create an Access [or mySQL] database to fulfil the specification in about an hour. But this way I’ll be sucked into some arrant stupidity, such as [failing] to code my own database using Java.

On the plus side I’ll enjoy myself and may learn something about Java. I suspect that the gods may intend my destruction.

2009–10–20

TMA away…

Ah yes, that old standby of the OU blog—TMA away. In this case it was the first part of of the first TMA; the ‘baby’ one to get you used to the system.

One part of this was to post a wee bit about yourself to the tutor-group forum. Which brought into sharp focus something which, I suppose, has been in my mind for a while—I may meet people who have read this.

I didn’t get along to many tutorials for my last courses, way less than I would have liked. One of the down-sides to being a janny is that you have to work odd, tutorial unfriendly, hours. But since I now have a full janitorial team, for the first time in years, I’ve resolved to get along to a lot more this time round. More opportunities to encounter ‘my readers’.

I don’t know how other bloggers feel, but it never really occurs to me that anyone reads this tripe. Indeed there’s a chance that nobody does. So I feel free to say more-or-less what I want. There are obvious dangers in this, particularly if what you’re trying to achieve is a warts-and-all portrait of what it feels like to be an Open University student.

But in real-life [this isn’t?] it never really occurs to me that people have any interest in me. I don’t mean that I’m boring, although I may be, but I just assume… well I’m not sure what I assume. When I try to think about it it’s like trying to analyze what it feels like to fall asleep whilst in the process of doing so. Is that odd?

To sum up, I’m not going to let the fact that I might meet people who have gotten to know me via this site put me off serving up the usual rubbish.

a realization

If you’d asked me how I wrote javascript before I started learning Haskell I’d have said, in a functional style. [Or something similarly pompous]. I now realize that I just string together a lot of functions procedurally. I had a similar moment when I started to think about how I might build the bug tracking application mentioned below—I can’t think in an Object-Oriented fashion. Not don’t, can’t.

When I see data I start to think about databases—global data, which I’ll interact with using another application layer. So what I’d build, with Java, would be a database with a layer of Java objects tacked on top. Not much use for learning about Object-Oriented programming.

I still want to build something, but I’m going to have to think a lot harder about it’s going to be. It needs to be something that helps me come to terms with Object-Oriented programming rather than a cobbled-together piece of junk that I made because I could.

So for now I’m going to, try, to stick to working my way through the course activities and making notes. Which is going to be hard because I heartily sick of frogs!

2009–10–22

work/[OU] life balance

One of the difficulties you face as an OU student, as opposed to a regular vanilla one, is that you have a job. Well, I suppose that nowadays that’s no longer strictly true—the difference, now, is that we [OU students] have to fit our studies around our jobs and ‘normal’ students have to fit their jobs around their studies.

This week I felt the particular pain of being an fully-employed student. I won’t bore you with the details, but let’s just say that my work-life has been getting in the way of my studies. Couple this with the fact that I’m feeling run-down and old and you have a common student nightmare—the nagging feeling that I’m falling behind.

I’m not, I don’t think, but it feels like I may be. Obviously this isn’t too much of a problem at the start of the course, but as we all know, real life, the bad stuff, has a way of intruding itself right at the wrong moment. So the questions are: how do we cope with this? And when should we start to panic?

panic and overload

At some point these will occur. You can’t avoid them; you should expect them. And they will come at the worst possible time along with the armies of flappy black birds, long-lost aquaintenances, and troubles and woes. Here are some of my strategies for dealing with these unwelcome guests.

Don’t panic
Easier said than done, but panic never helps. Nearly every, right-thinking, organization tries to train the panic response out of its employees. There’s a good reason for this—panic is dangerous, it gets in the way.
Do something else
This sounds odd—shouldn’t you be trying to catch up? I’m going to say no. In my experience mood is a major factor in learning—do something that you enjoy, lift your mood, you’ll can’t learn if you’re stressed. [You can regurgitate what you know under stress, but you can’t learn.]
Make to-do lists
And get something ticked off. One of the major blocks to dealing with overload is the edifice of the task-surface itself [jings!]. Taken as a whole, ‘what you have to do’ is often a too terrifying a prospect—the ultimate granny knot. Where to get started? Be object-oriented and chop it into reasonable pieces and tackle these pieces piecemeal.
Think of the reward
I don’t know why you’re studying for your OU course, for me it’s mainly personal development, apparently, but there are times when I forget that learning should be fun. If it ain’t fun then why am I putting myself in learning [fuel, health, dentistry, opportunity, beauty…] poverty?

That said there are two major caveats:

  1. You are you, you must cope with this in your own manner—what works for me may not be catnip for you.
  2. You’re going to take advice for me!? I’m not the large hadron collider, I may not be time-locked and immune to error.

and tomorrow

Ah, now we get to the meat of my moaning…

Tomorrow I have to stand on the top of an eighteen-foot wobbly-ladder to replace some swingy six-foot-fluorescent lights. So, alas, I will miss the scheduled ‘safe working at heights’ course; the one that never runs; the one that was never intended to run; the one that is only there so that they can say that they offered it.

I know that this isn’t safe—for me; heights are ok if you aren’t scared, but the truth is that I’m shit-scared.

I’ll live, happy studying.

2009–10–27

the others

I haven’t been able to do much course work in the last few days, a combination of feeling crap and can’t be bothered being the culprits. So I thought that, as a distraction, I’d Google—M255 open university blogs. The Result? Well, most of the usual suspects, including myself [way down the list rat it!]. However there were a couple of newbies.

In particular I liked wabbit42’s take on the subject of the first TMA which was…um…most interesting. I shall watch his progress with interest. I’m glad that he ain’t in my tutor group—I’ll bet that he has scary eyes!

I’ll admit to admiring his honesty—it’s easy to be candid about yourself, or after the course. But to, potentially, antagonize the course-team, or your tutor, before we’ve even really got started? As I say, with interest, will I follow him.

2009–11–02

bloody frogs

I’ve been struggling, really struggling, to work my way through the BlueJ exercises from units three to five. I’m trying to turn over a new leaf: to make notes; to do the exercises; to be a good boy, but… I’m bored. And when I get bored I fall back into my old bad habits.

One of my [many] weaknesses, which once upon a time I considered a strength, is that I’m over-interested in code. What do I mean by that? Well here are a couple of examples…

  1. I found myself thinking about digging into the code for the OUAnimatedObject class—exactly what you’re not supposed to do. Other people’s objects are black-boxes; you get the public protocol—you know the methods, you know what they do. You aren’t supposed to be interested in how an object is implemented.
  2. I wandered off-topic several times to do something like: Frog frog1, frog2; frog1 = new Frog(); frog2 = new Frog(); frog1.equals(frog2); //false So equals doesn’t work properly for frogs. Who cares? Perhaps we have to implement it ourselves later in the course.

I waste too much time messing around with stuff like this. I should concentrate on what I’m supposed to be doing.

That said the frogs really are boring.

on another note

I’ve now made notes for units one to five; I’ve got about fifteen pages of scrawl to show for my efforts. I’m going to have to tidy them up at some point.

What I have noticed is that the course [and hence my notes] aren’t organized in the way that I’d like. Which, I suppose, is inevitable given that the it’s trying to teach object-oriented programming and Java at the same time to an audience that may include non-programmers. I want to separate the Java stuff from the object-oriented material. I realize that a complete separation is going to be impossible but a present my notes feel very jumbled-up.

This shouldn’t be too difficult and may help me learn. However there are two questions: when and how to do this?

The, logical, when is now, when I’ve completed block one, but looking ahead a wee bit I think that the course breaks better at unit eight. I suppose my worry is that if I do it now I may have to do it again at the end of unit eight.

For the how I’m going to use a version of the card-sort that I use for websites—out with the scissors and onto to floor. I may even use glue!

2009–11–05

a slight problem

My plan to rationalize my notes using a physical cut n’ paste hit something of a roadblock—I’ve written on both sides of the page. So time for a new plan perhaps?

Bizarre. I just popped out into the playground for a fag [I’m writing this at work]. While I was puffing away, staring into space and pondering life something rubbed up against my legs. I assumed cat [this happens, the area is rotten with them]. But when looked it was a fox! The beast seemed completely tame. I thought about trying to stroke it, for the ten seconds it took me to realize that it might bite me.

the course

I’ve spent the last couple of nights scanning the course units to try to get an overview of how the course breaks down. Here’s my take on how things are organized:

  • Units 1–8
  • Units 9–11
    • Java collections
  • Unit 12
    • Input/Output [impureness!]
  • Unit 13
    • Testing
  • Unit 14
    • Software Development

Leaving the later units for later, it makes sense to me to take units one to eight as a three-part piece. That’s how I’m going to organize my notes anyway. So for the time being I’ll continue chipping away at the first draught.

One thing I do notice is that there is no UI material at all. [Apart from a few OUDialog thingees]. Probably wise—it looks like it deserves an entire thirty-point course all of its own.

code and the TMA

The first TMA isn’t exactly due but it is on the horizon. So time to get down to it? Probably not, I’m a long way from being ready to tackle a TMA.

The problem is that I haven’t done much actual writing of code. Partly this is due to laziness, partly because I’m not a herpetologist but mostly I can’t work up any relish for it. I’d like to learn by building something, but I’m a long way off being ready for that too.

I suppose I could build a ‘sketch’ of something to be going on with, but… I’m going to have to tackle the frogs amn’t I?

2009–11–14

not working

Haven’t done any work for the course this week. A combination of busy at work and Mathematics Diary getting me interested in group theory meant that [again] BlueJ remained unopened and no frogs were dancing. However…

a slight breakthrough

I’m my school’s unofficial archivist. This is a semi-self-imposed position that fell to me [rather like the webmaster position] because I looked for something once. This was spotted and all future requests came to me—no good deed goes unpunished.

Anyway, I was rooting through some records the other day, trying to find some material for Remembrance Day, all the while muttering about getting things organized properly when I had a thought—am I an object? Suddenly a few things fell into place.

I’ve noticed that a library is often used as an example when the object-oriented paradigm is being discussed and I think I’m beginning to see why. Books, or magazines, or newspapers are good examples of objects that share common attributes and behaviours but aren’t the same. But my lightbulb moment was the realization that the way a library is organized is also a good example of object-oriented behaviour when you factor in a couple of not-so-obvious objects—the librarian and the classification system.

I’m quite comfortable with individual objects [kind-of], where I’m having trouble is in mapping the problem domain using objects. Is this because I’m missing some pieces of the jigsaw?

So this weekend’s tasks are to drink a lot of beer and try to create a structure that I might use for a database of the school’s archives. Not that I intend to code the thing! [Yet].

2009–11–19

lack of a switch

I’ve been pretty busy lately and this horrible state-of-affairs will, probably, continue for some time. So it’s important that I manage my time well. But I’ve noticed an odd thing—sometimes it’s good to have something else to do. Let me explain that–or rather let me posit my theories:

  1. It’s best to be busy, if you have plenty of time things will be done badly and at the last minute.
  2. When you have lots to do ensure that you tackle one task at a time—trying to do several jobs at once will result in nothing being done.
  3. Make lists and tick things off. Yes, I know that you think that you can do this in your head, trust me you can’t.

Two above is particularly important, I call it context-switching and the problem is that other people will try to switch your context. I’m very sensitive to this; as a janny I only venture out my lair for two reasons—to have a fag, or if I’m actually doing something. Once out of said lair people will attempt to provide me with another job. [My name seems to be oh’neil.] I try not to be rude, but unless it’s something that, to my mind [things are always urgent to the mind that doesn’t have to do them], is vital they’ll get an email me response. Schools go over-budget because distracted headteachers agree to things proposed on the stairs.

So you’d think that I’d be happy that I’ve only got one course on the go at the moment.

but…

I’ve been noticing the miss of a maths course. I’ve been unable to buckle down to this course for a couple of weeks—this won’t last, been here before, my interest will return. But I’d like to be doing something OU–esque in the interim. That would be a maths course.

Yes, I could be doing my own maths work, and to a certain extent I have been, but it doesn’t feel the same—I want to be doing coursework.

So am I missing an OU context-switch? Yes, I think that I am. So another neil posit:

  1. Always have at least two OU courses on the go at the same time.

I’ve got a tutorial this Saturday which, at the current, I’m going to get to. So hopefully I’ll be re-enthused about M255. [It’s almost a given.]

2009–11–25

first tutorial

I had my first computing course tutorial on Saturday [I didn’t get along to any during M263]. It was, on the whole, a very enjoyable experience. What didn’t I enjoy? My own twatage.

As ever I manage to strew obstacles in the path of all my endeavours. This time it was physically getting to the tutorial. The first heads up of trouble was when I realized, during a conversation with my business manager Bruce, that I’d been planning to visit the wrong campus.

Then, because I went to school near the venue and had developed a view on where the front of the building was, I approached an empty car park and a locked building. Fortunately I persevered and eventually found the real front of the building.

Once inside I was faced with an impressive empty vastness and no clue as to where I should go. Being a janny I knew exactly what to do—find a janny! The found janny directed me to an inconspicuous, A4, piece of paper, I was reminded of: It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying ‘Beware of the Leopard’.

But in the end I did get there.

the enjoyable bit

The tutorial group were a very nice group of people, with a wide range of programming experience. This is good—if we’re all coming from different places we’ll all ask different questions and come up with different ideas. Better for learning.

For example, someone came up with an excellent idea [I know that it’s a good idea because I had a “why didn’t I think of that?” moment] of downloading the unit PDFs so that you can search them. Brilliant.

One problem with such a group is keeping everyone interested, I thought that our tutor made an excellent job of this. It can’t be easy, especially when you consider the fact that the group contained an off-task edjit like me.

One thing that I did notice was that several people had computers with them, which they used for taking notes. Yet another idea that I hadn’t thought of—have I ever had a thought? However this isn’t an idea that’s going to work for me—once on the computer I’m lost to the world.

Anyway, an all-round pleasurable experience and one that I’m going to try my best to repeat.

2009–11–28

writing code

Enthused by my tutorial I decided to tackle question three of the up-coming TMA. This involved writing my first, significant, piece of Java. How did it go? Pretty well I think. Essentially the question ‘walks’ us through coding an object, an interesting idea and one that, for me, worked well.

After I’d finished [it took me about an hour] I had a wee think about how I would have coded it unaided. It would have been different and not as good, maybe even very bad. Which reinforced a nagging feeling that I’ve been having for a few weeks now—there’s something that I don’t quite grok going on here. There’s something about Java, and the object-oriented paradigm, that I’m missing.

The horrendously precocious James is also learning Java at the moment and, like me, he’s a JavaScript nutter, so I’m interested in how he’s getting on. And he doesn’t seem to feel the same swim as me. Swim: the feeling of at-seaness when learning a programming language

So, are my instincts deceiving me? Perhaps, but when it comes to programming I’ve learnt to analyse my instincts. Not to trust them mind, but definitely not to ignore them. So we’ll see, perhaps the rest of the TMA will enlighten me.

2009–11–30

TMA due

Well, in about ten days time to be exact. I’ve got it [mostly] finished, all that I really need to do is to get it into a word document—the boring bit. Hopefully it won’t be the horrible business that it was during M263, where every other character was a symbol.

The big annoyance that I’m facing is that my memory sticks have been through the wash one time too many [and are therefore ex], so I can’t, comfortably, move files between my home and work computers. I can move them, but it involves online storage, not entirely happy with that—not a big fan of the cloud me. I suppose that I should shame my tightwaddeness and just go out and buy one.

how to tackle TMAs

I’m still unsure how to treat TMAs—to see them as ‘sighters’ for the exam or to strive for perfection. There are arguments on both sides. For this first one I’m going to strive for perfection. The idea being that a good mark will allow me make a less risky choice later.

speaking of choice…

I was reading an open university blog (not official!) today when I realized that I might have course-choice options to think about too. Do I want to do the February presentation of M257? There are pros and cons. The main con, as usual, being the spondoolicks [the lack thereof].

Unless something goes terribly wrong during MS221 I’ll be doing M208 as of January 2011. But I’ll want a computer course as leaven. M257 had originally been pencilled in for the job, but M256 is also a good-looking prospect—it has an October start, which means that I won’t have the hiatus between courses that I had, and hated, this summer. In which case I’d like to have M257 in my pocket.

So along with a ten day TMA deadline I’ve also got a sixteen day course choice decision to make.

2009–12–03

pissing around…and finding stuff

Utterly nothing done TMA-wise since my last post. I’ve developed a serious solitaire/group theory obsession, so all my free time is spent drinking beer, reading about group theory [at a very basic level], playing solitaire and scratching scrawl into my notebook.

Today I hit on the idea of considering a solitaire board as a series of numbers, somewhat like so:
|1 2 3 4 … … … … 30 31 32 33|
Making a move would involve a permutation, so from the start position you have four options:
(5 17) (15 17) (19 17) (29 17).
[I’m using peg-from peg-to as the order.]

What? What do you mean you, can’t visualize it? Oh very well…

The solitaire board
 1234567
1123
2456
378910111213
414151617181920
521222324252627
6282930
7313233

At this point I can tell what you are thinking—what has this to do with M255? Well, as I suspect that you can immediately see, this isn’t the type of thing you want to actually write down. Way too brain-rotting, forest-destroying and error prone. Besides, what I’m interested in are patterns—which means many games—and that needs some form of automation.

So, enter the computer. Normally I’d build this using JavaScript [and probably not in an object-oriented fashion], but Java seemed to be appropriate this time. Not least because I’m supposed to be learning it.

How did I get on? Interesting exercise and one that is still ongoing. As usual I dived straight in to the code without thought one—when will I learn? A bit of hacking around and online research and I’d got a Board class working. It created a thirty-three slot Array, I could feed it two ‘holes’ that I wanted swopped and I could use System.out.print() in a loop to get the ‘state’ of the board.

At which point I stopped and thought about what it was that I was trying to do. As ever neil—far too late! But when I did start thinking I realized that I’d serendipitously stumbled-upon what I’ve been searching for—something to build using Java.

The basic problem is subtle in itself, if I move (5 17) there are now no pegs on 5 or 10, that has to be stored somehow—what are the legal moves on the board? And there are lots of options as to how far this madness will take me—randomly generated games, stored games, watched games… We all like something basic that can be endlessly upgraded.

So I’ve found something that I can, potentially, achieve using Java, but something that isn’t so trivial as to be boring and not so difficult as to be impossible [for me]. The plan—to teach a computer to play solitaire.

So time to stop coding, get out the pencil and paper and do some planning, sober up and do my TMA. Erm…two-out-of-three anyone?


Jim over on Mathematics Diary got me into this group theory stuff—he clearly shares my obsession, he’s planning his OU studies around it. If you’re interested in group theory and don’t fear addiction this is the best introduction to group theory that I’ve found.

2009–12–08

i was a good boy…

I buckled down and did my TMA over the weekend. I’d have rather been messing around with maths/solitaire but the cut-off date was approaching so it had to be faced.

I suspect that we all have different approaches to doing TMAs, here’s mine [for computing courses]…

  1. Initial pencil & paper reconnaissance—try to answer all the questions that don’t involve any actual coding.
  2. Do the coding.
  3. Get everything into the solution document.
  4. Print off the solution document and the code and go through them with a red pen in hand.
  5. Wait a couple of days.
  6. Go through the [printed] solution document again.
  7. Make any corrections.
  8. Submit and forget.

Five above is particularly important. I don’t know why exactly, probably a variant of programmer’s picture-painting problem—not seeing what’s actually there, but some mistakes are impossible to spot until you come back later.

So, TMA away and time to get back to my solitaire programme.

learning curve

I’m still working on this—scope-creep has entered the building—but it’s been an eye-opener so far. Aside from the useful experience of writing Java I’ve learnt some object-oriented lessons:

  • You don’t have to use inheritance. Because it’s a large part of the paradigm it’s easy to assume that it’s necessary in every project.
  • You really need to think hard about what an object does and what it should know. I finally settled on three classes—Board, Move and Game. Initially I had the makeMove() method as part of the Move code. The assumption being that a move alters the board. But when I came to do the coding I realized that I’ either have to have a Board as an instance variable of a Move or I’d have to pass an instance of Board to the Move. Neither seemed right so I put the method in Game.
  • I constantly found myself ‘hiving-off’ new methods as I went along. Take for example the generateMove() method [of Game], it needed to find all the empty ‘holes’—emptyHoles(); then I needed to see if I could move a peg into that ‘hole’—legalMoves(); legalMoves() needed to check up/down/left/right moves—rightMove(), leftMove()

so what have i learnt?

Although I spent quite a lot of time on the specification and high-level implementation I still found I was ‘inventing’ too much when I was coding. So I need an in-between phase—a low-level implementation specification. So, again, time to stop coding and time to start thinking.

2009–12–15

my first java app.

And it works! Well, I say it that works but I’m not that confident that it does. Before I get into the reasons for my lack of confidence in the beast let me state [and explain] a general axiom of computing—you can run before you can walk.

By which I mean that it’s nearly always possible to build a working application without any, real, understanding of what you’re doing. This will be an application that is going to cause you, and possibly others, guaranteed future problems, but it will ‘work’.

Watch a pre-toddler to see what I mean—they stand, they lose their balance, they take a step, they run into the coffee table. Running is dangerous unless you know how to walk.

The whole impetus behind my OU studies was just this realization—I needed to learn what I was doing. I was at the point where I could code stuff [that sort-of worked] but…

  • It was hard to maintain.
  • It was brittle—it broke at odd times, in odd places and in odd ways.
  • When I re-visited the code I often couldn’t make head-nor-tail of it. Not, just, because it wasn’t properly commented [although sometimes it wasn’t].
  • I detested working on it.

In short all I could do was to code my very own piece of hell.

so, what went wrong with the solitaire programme?

In all probability what went wrong was that I even attempted it. I wanted a solitaire programme for other reasons and it was just too tempting to build it using Java. I’m not really up to it yet, but, as I say, you can build stuff…

My main problems were logic errors where I didn't expect them. My, preferred, way of working is to create a lot of functions [that I can test individually], but what I found myself doing was constantly [as stated below] ‘hiving-off’ new methods as I went along. I didn’t test these properly. Which led to objects interacting in ways that I hadn’t predicted—I found myself looking for the problems in the wrong places.

I have learned some things over the years:

  1. I didn’t just ‘dive-in’, there was a good deal of thought and pre-planning involved.
  2. I wrote a specification, for both the application and the classes that I was going to use. [But I didn’t write specifications for every method—need to do that methinks.]
  3. When I realized that scope was beginning to creep I squashed down on it.
  4. When I saw that I was trying to code my way out of problems, rather than think my way out of them, I stepped back.

All very worthy, but last night I still found myself with twenty Firefox tabs open cutting n’ pasting others’ code. A sure sign that something had gone badly wrong! I should have stepped back at that point but I was soooo… close.

In the end it seems to work. But I feel dirty about the process that got it there. A day of sober reflection has led me to proffer the following excuses:

  • I’m out of practice—I haven’t written any ‘serious’ code in ages. True, I’ve dabbled extensively, but I’m out of practice when it comes to creating anything non-trivial.
  • My knowledge of Java is skin-deep—I was using some of the collection classes without having looked at them in any detail.
  • It’s not that bad for a first attempt.

So why don’t I trust it?

In a way I do, but something [the cat of uncertainty?] is scratching at the back of my head—you can’t be sure because you don’t understand.

And said cat, if it is indeed a cat, is correct—I still don’t understand the following:

  1. The object-oriented paradigm
  2. Java, the language
  3. How to plan and organize a non-trivial programme

M255 will not help me with three, but I need to buckle down and work through the units so that one and two are grokked. So out with, another, notebook and make the scratches that will learn me my craft.

2009–12–17

in the bleak mid-winter

Nightmare journey into work today: snow, slush, wet, slippery, cold, yes it’s that time of the year again—late December. To most people, I suppose, this conjures up images of the coming yule tide fiasco. Not so for us OUers; for us it means something entirely different.

For October short-coursers it means last minute ECA hell—the cut-off date is uncomfortably close to Christmas party season. For January, February long-coursers it means results.

So I’ve spent the last couple of days flitting around the web to see how the OU bloggers have done [not many short-coursers blog their ECA deadline hell although I was one who did].

And they’ve done very well indeed! This is to be expected, keeping a blog while doing an OU course is a bit like being a sparrow who keeps singing when it’s being chased by its namesake hawk—you have to be pretty bloody confident that you’re going to get off with it. Although in our cases our lives aren’t, really, on the line.

Pride of place goes to blog.whatever();—a degree and a 2:1—well done! But well done all.

so…

How to celebrate? Well coupling the facts that I’m embarrassed by my wimpy footer and that I haven’t been doing my bloggerly duty—providing reciprocal links—together, I knew what I had to do. So checkout my new footer. It’s broken every other page on this site but it had to be done.

2010–01–09

happy new year

I’ve been hibernating lately, but finally the xmas rubbish ends and I can get back to normality. Normality in this case being buried ankle deep in the white-shite and having two tonnes of furniture to move. But you aren’t interested in that…

When I could avoid the oppressive social aspects of the season I spent the christmas and new year period hunkered down by the fire with the course units. I decided that, although I’m not actually behind, I needed to play ‘catch-up’. In fact I wanted to get ahead so that I can devote some time to ramping up my maths in preparation for MS221.

So how did that go? Pretty well I think, I’m beginning to ‘get’ both the Java language and the object-oriented stuff. There’s still a long way to go yet but, after my intensive toe-dip, now might be a good time to sum up my feelings about the course so far. [And I’ll be archiving the first part of this blog in a wee while].

To me The course falls into two parts—the above cited Java language and the OO stuff.

java

I rather like. It’s a big beast meant for big things—totally unlike anything that I’ve tackled before. This course is a mere introduction to it, if we’re going to code anything beyond the trivial there’s a whole lot more that we’ll need to know.

the object-oriented paradigm

Again I like. Before this course I never really saw what all the fuss was about, but I’m beginning to realize the power of its abstraction—for that’s what it is. It allows us to think [and talk] about an application at different levels. Of course it has other strengths—for example built-in re-use [if you use it right] but, to me, what’s most important is the way that it [almost] forces you think about code organization in a certain manner.

the course itself

Is a compulsory course, so I had to do it. Would I have done it anyway? On balance the answer is yes. I have some issues—there isn’t a clear enough separation between learning the language and learning the paradigm for my taste. But the course hasn’t been designed around me, for some students this is their first taste of programming, allowances have to be made.

Here I’m going to re-mount an old hobby-horse of mine—I think that there should be a first level course to introduce students to general coding principles. This would allows us to learn new languages without, endlessly, having to re-visit loops etc.

But minor carping aside I think that it’s a well balanced course, a good general introduction to Java and OO.

resolutions

Not something I go in for usually, but it is that time of year, so:

  1. Start doing the exercises—I’ve barely [aside from the TMA and my solitaire programme] written a line of Java. I really do need to be fluent at the click-face if I’m going to write Java with a pen.
  2. Stop messing around with recreational maths and start my pre-course revision for MS221 within the next week.

I think that those will do for now, don’t you?

2010–01–13

yes, it’s that time again…

Time to get down and dirty with the next TMA. Perhaps it’s a wee bit on the early side, there’s over two weeks to go and a tutorial coming up [that I might get along to]. But I’m getting the feeling that things are beginning to get on top of me. Or, at the very least, they’re crawling up my back in preparation for the aforesaid squatting. So, time to get something done.

After much soul searching—well a wee bit of thought anyway, I’ve decided how I’m going to tackle the TMAs for this course:

[The numbers represent the TMA]

  1. Use the course units, strive for perfection. A good mark will allow me to be flexible in my approach to future TMAs.
  2. Don’t use the course units, but write code using BlueJ.
  3. Don’t use the course units, write the code using pencil and paper first and only then put it into BlueJ. [Unchanged?]
  4. I haven’t seen this one yet = = no plans as yet.

One of the things that I took strongly from M263, studenty-wize, was the difference between the TMAs and the exam—’tis in the exam hall where the result is got. So I’m going to try to use the TMAs as part of my exam revision, hopefully without cocking-up my chances of a good mark in the process.

For the exam: you can’t consult the books; you have to write code by hand without the aid of the compiler; you’re under severe time-pressure.

Not much I can do about the last—I’ve deliberately not looked at the sample exam paper so that I can use it for a timed test. But if I can use the TMAs to get used to writing code by hand and without the course units…

I know what you’re going to say, “you could do that another way”. But I won’t—I need the spur of marks.

Anyway, such is the plan—I’ll keep you posted.

so how is it going?

By which I mean TMA two. The answer is not too bad.

TMA two consists of questions that walk you through the writing of classes—you aren’t asked to make anything other than the most basic of design decisions. I rather like this as a teaching technique—it forces you to concentrate on the basics. And it allows you tutor to swoop onto any poor coding-practices that we are developing or importing.

There are a couple of things that are worrying me—the length of time that it’s taking me and the feeling that I’m writing clunky code.

I’m putting the second down to the fact that we don’t, yet, have access to any of the Collection classes and, hence, have to do things in an odd way.

The first is more worrying—I took three hours to complete two questions. [I timed myself, it’s too easy to lose track of time when you’re coding in-the-zone.] That’s way too long. Perhaps it’s because I’m a beginner at Java, but…that doesn’t feel quite right—I’ve been coding for ever and nothing here is too new. Something to be watched.

Time to be getting on…