OU blog

Personal Blogs

neil

editor[1]

Visible to anyone in the world

Well B & Q was visited and much paint was bought, which bodes ill for the future. Some weekend soon is going to be completely buggered up with non-congenial work.

I did make time to sit down and draw up a specification for my text editor; said spec. is beyond basic but will, more than, do me for now:

  1. Create a GUI
  2. Be able to open, edit and save files

As I said: basic.

However not so easy. I've spent the last couple of hours reading the documentation, what I'm about to attempt is going to be something of a challenge.

Part of my problem is that I re-cycled my M257 unit texts [ie put them in the bin] so I don't have any hard-copy boilerplate to refer to. [Online is OK but I still prefer hard-copy.] And of course all the stuff that I created during M257 is who-knows-where.

Another issue is that Javax.swing isn't thread safe. Apparently. I'm vaguely aware of what that means—not good. So I'm going to have to be careful if I intend to use this as a base for something more powerful.

The final issue is how to chop up the code: one monolithic block? Or something a wee-bitty more flexible that will probably fall apart?

I've decided that the Input/Output [file-diddling] stuff doeshave to be hived off, but I'll try to keep the rest of the beast inside a single class. [I'll try to use inner classes just in case.]

So tomorrow we, my good wife and I, go to Asda where, amongst other purchases, I'll buy a large bottle of ertzatz red bull and get coding when I get home. Which might mean that I'll avoid, "we could do the painting this weekend..."

Permalink 4 comments (latest comment by Neil Anderson, Thursday, 3 Nov 2011, 18:11)
Share post
neil

editor

Visible to anyone in the world

Most of today has been spent piddling around doing nothing much, however some Java has been written. And that which has been written has convinced me that, at least, some of my madness is achievable.

As ever, with computing, the trick is to break the task down into manageable chunks. So to start with I'm going to write a basic text editor. In real life this would be a stupid proposition [don't re-invent the wheel], but I'm trying to learn here, so I'll let myself off.

An hour or two got me something that I can use. At which point I stopped. Which I'm proud of myself for.

There's a temptation when you're programming to just thrash ahead when things are going well. This has to be resisted—when you see that you can do something then is the time to write the specification. So that [and a visit to B & Q] are on the menu for tomorrow.

I hate writing specifications, and B & Q, but then I hate most of the text editors that I use—they have too many time-consumming features that I never want to use. it would be nice to have a bespoke one.

[Eventually I'll move all this rubbish onto my nonsense, but for now you're going to be stuck with me posting here!]

 

Permalink 1 comment (latest comment by Susan Whelan, Wednesday, 2 Nov 2011, 00:27)
Share post

This blog might contain posts that are only visible to logged-in users, or where only logged-in users can comment. If you have an account on the system, please log in for full access.

Total visits to this blog: 252605