Download the jar – you know you want to

Help me test Hexxed, my free software hex editor.

You can download it here:

Run it: java -jar hexxed.jar

Let me know what you think!


Software testers wanted

Big-little endian
Big-little endian (Photo credit: Wikipedia)

I have now reached the point with my hex editor – Hexxed – that I can aggressively look for software testers with confidence, as I feel I have a piece of software that does all the key things I want:

  • insert (as zeros) and delete multiples of 8, 16, 32 or 64 bits at a time
  • load and save arbitrary files
  • do and undo edits

For those looking for hex editors (as opposed to just another binary editor) it will handle 8, 16, 32 and 64 bit hex representations in both little endian and big endian format (and you can switch between them), as well as display addresses in a block:offset format (block size may be set arbitrarily). While for those looking for a binary editor it has a Vi-like interface and displays charcters in both UTF8 and 16 bit unicode.

It doesn’t do everything, though, and it may still have bugs so testers are needed to identify what features it needs but has not got and what might go wrong with it.

I am hopeful that I may have a chance that could turn out to be reasonably widely used in future.

To test: you don’t need my permission, it’s free software, freely available – covered by the GNU general public licence (version 3). Though of course that means that no warranties, to the maximum level allowable in law, are offered either.

You can pull it from git here:

Or ask me for a jar file.Get the jar file – executable via standard Java setup – via here.

Please help and test if you can

The trouble with “The Selfish Gene”

The Selfish Gene
The Selfish Gene (Photo credit: Wikipedia)

I do not have any argument with the basic case that Dawkins makes in his book (though why the audio recording for the book has to be so quiet that even at full volume I find it hard to hear in a noisy gym is another matter) but I do find his general anthropomorphising of genesvery annoying.

Genes are ascribed will in his presentation when, really, what he is talking about is a statistical process. It seems he is so desperate to maintain a popular presentation that this has to be forced into the background at all times, lest people are frightened off by a bit of maths.

The Moon (again)

The Moon, approx 21.05BST, 28 May 2012Won’t be doing this every night, I promise, but here’s this evening’s photograph. Possibly the crater you see at the South (bottom) is Tycho, which as any lunar observer knows dominates the full Moon with its extensive ray system, but here is only just visible in the dawn light.

I suspect the (low) quality of these images is likely quite similar to the view of Galileo when he first turned a telescope skywards four centuries ago.

Waited 32 years for this…

The Moon
Moon at 21hrs BST, 27 May 2012

Ever since I did my Astronomy ‘O’ level in 1980 I have wanted to take a picture of craters on the Moon.

In those days it was all but impossible to get high street developers to make prints from my attempts and so it failed.

But now, at last, the digital age is with us, and with the aid of a telephoto lens, I have done it,

The Appennines (Mons Apenninus) can be seen very clearly as can several craters (I used to be able to name craters very easily, but I am long out of practice,but I’d guess Archimedes and Plato.)

Next step, get the camera to work with the telescope.

And on to “The Selfish Gene”

English: Richard Dawkins at New York City's Co...
English: Richard Dawkins at New York City’s Cooper Union to discuss his book The Greatest Show on Earth: The Evidence for Evolution (Photo credit: Wikipedia)

So, having completed (listening to) Kevin Mitnick’s Ghost In The Wires: My Adventures as the World’s Most Wanted Hacker I decided that the idea – of listening to a book while pounding away on the exercise equipment at the gym – is a good one and I would pick another book, but not a novel (it now seems lazy to listen to a novel but not to a non-fiction work).

I picked The Selfish Gene. Richard Dawkins has taken a lot of flack in the UK of late, adding opponents of private university education to his traditional enemies in the world of religion, after he supported plan for a private university college in Bloomsbury. But the prefaces to the book make it clear that he’s been dealing with wider political interpretations of his work for some time.

In fact, he seems very defensive about them all. Yet it is difficult to disagree with the comment of Stephen Jay Gould, quoted at the start, that the theories in the book will be seen as part of an ideological flow to the right in the 1970s. But then again, as Dawkins makes clear, the theories themselves are about the truth, not politics.

Promises to be an interesting ride…

The end of Kevin

So many hours in the gym later (believe it people) I have got to the end of the Kevin Mitnickaudio book.

English: Kevin Mitnick Deutsch: Kevin Mitnick ...
English: Kevin Mitnick Deutsch: Kevin Mitnick Русский: Кевин Митник (Photo credit: Wikipedia)

Do I feel much more sympathetic to him? No, not really.

Yes, he was treated badly at various times. And he spent a lot of time in prison awaiting trial. And the US penal system is a disgrace (though he doesn’t seem to say much about this). But he also kept on breaking the law in the full knowledge of the likely outcome.

He probably should have had medical treatment rather than be slung into a prison, but then he’s hardly the only one that applies to. (He’s clean these days but his behaviour – such as keeping the hours of a teenager – does suggest a deeper physiological problem is at the heart of this: he just wouldn’t grow up.

The book is a salutary reminder that the biggest security weakness of any IT system is the people using it. Mitnick says nothing to suggest he was a particularly skilled programmer – but he was a world expert in manipulating people.

An NP-complete problem from the world of embedded computing

English: Euler diagram for P, NP, NP-Complete,...
English: Euler diagram for P, NP, NP-Complete, and NP-Hard set of problems. (Photo credit: Wikipedia)

First of all – a quick explanation of P and NP. The class of problems known as ‘P’ – for polynomial (as in they can be solved in a time which is dependent on a polynomial of their complexity) – are those for which a known algorithm – a sequence of mathematical steps – to solve them exists. For instance, solving (i.e., finding the value of x where the formula evaluates to zero) x – 2 is a P class problem. NP (not P) problems are much more interesting – these are problems for which an algorithm exists but which is unknown at the time the problem is posed. In the worst case the only way of solving the problem may be to try all the potential algorithms until we find the one that solves the problem. That said, once a potential solution is found it can be verified ‘simply’ (i.e. in polynomial time). It is not known if, in fact NP problems (such as drawing up school timetables or cracking internet public key encryption) are really P type problems after all and we just have not found the solution or are permanently excluded from ‘simple’ (P) solutions. A class of NP problems called ‘NP complete‘ are those that, if shown to really be P class problems, would indicate P=NP. Most, but not all, mathematicians think, in fact P!=NP.

So, here’s the problem. It sounds simple, but as it is NP, it’s not! (I got this from Making Embedded Systems: Design Patterns for Great Software)

You have a micro controller with a timer of fixed 4MHz frequency and two 8 bit registers, a and b, such that (a) counts ticks and (b) is a match register that triggers an interrupt when the count register matches the tick count stored and a 16 bit prescaler (that allows the scaling of the ticks e.g. – if set to 2 then twice as many ticks are required to trigger the interrupt).

So how can you set the match and prescaler to work for an arbitrary frequency? Sounds like it should be easily algorithmically managed, but it’s not.

The problem with Apple kit (part one?)

Last September I joined a startup, Centreground Political Communications and, like my three fellow employees, have been using Apple equipment more or less since then.

It is good quality kit, focused on (typical) user experience: like Windows done right. And, yes, as a Unix/Linux person I also get a bash shell and access to forty years of engineering excellence.

But it is difficult not to see the faults also:

  • The one button mouse – a legacy of the 1980s and one that Apple must recognise is a poor one (why else have all those Ctrl dependent commands?
  • The emphasis of design over function – no ethernet port, and a wireless performance massively below even the least powerful IBM compatible
  • Audio that works out of the box – if you can ever hear it