Wednesday, December 12, 2007

Terry Pratchett diagnosed with early onset Alzheimer's

What miserable news. Bastard fucking universe, there are plenty of other people out there you could have picked on, why did it have to be him? :(

Thursday, November 29, 2007

Fragment of text

Text file found in an olde archive (28 Jan 1992):

[
Curiosity has killed many a cat, but I was killed by rationality - a less rational man would have given in to the urge to flee, to run blindly into the night - and would have been spared the horror that is contained in this house (only a small fraction of which I can report here). The light is fading and before it fails completely I will take my last chance on the stairs, though I can feel them waiting below in the hall, and the effort is futile.

It started in the last weeks of 19--, when Rodway claimed that he had discovered hidden
]

I wonder who the hell Rodway was going to be? And what had he found? Some game idea long forgotten...

Saturday, November 24, 2007

Olde games

Quite possibly the best version of Space Invaders so far...

http://www2.b3ta.com/notepadinvaders/

Wednesday, November 21, 2007

A whale of a time?

People on TV and in films never talk during sex, which has occasionally struck me as odd. Mind you, I suppose that most of the things said during passionate moments don't bear repeating... "Lie back and think of Wales" a girlfriend once said to me in jest; I suspect she meant "You lie back - I'll think of Whales"...

Random Thought

Will mankind end its reliance on technology before technology ends its reliance on mankind?

Don't ask me, I just think these aphorisms up. Some other bugger can answer them...

(That one makes me sound like a bit of a carbon chauvinist, but I'm not. As long as something is looking at the universe with wonder and understanding I don't care if it's an over-educated monkey or a piece of technology.)

Friday, November 02, 2007

Quantum mice - a watched mouse never gets caught...

About a week ago we discovered we have mice in the eaves, a situation SWMBO asked me to remedy in my own time, or at least that's how I chose to interpret her hour of screaming hysterics...

So, following on from a design for a mouse trap Ste and I made about twenty years ago, which caught a dozen mice in its first four hours of operation, I hacked together a transparent box with some bait, an infra-red beam to detect the mouse and a solenoid operated trap door to catch it. This was then placed in a likely spot and an infra-red video camera rigged up to watch the mice being caught.

About an hour later the first customer turns up. After a cautious sniff around the outside it stuck its head and shoulders into the box and rooted about, not going far enough in to break the beam. Fair enough, perhaps mice have grown more cunning in the last twenty years... Nil desperandum - give them a chance to get used to it.

A bit later another mouse appears and goes through the same process... Perhaps they don't like plastic boxes?

Then one turns up and gets inside the box - I sit poised - surely this is it? But no, somehow the bloody thing doesn't trip the trap, and leaves. Bastard, I'll get it next time... But no, it's back, and this time it brings a friend. To cut a long story short they explore the box, they party on down on the bait, they jump about, have sex, snooze a little, and at no point does the bloody trap door close. After a bit they get bored waiting for something to happen and wander off, presumably giving the place a bad review.

Only then does it occur to me that a mouse trap that relies on the mice breaking an infra-red beak in a transparent box is probably not the best thing to watch using an infra-red camera that has about a dozen high-intensity infra-red LEDs built in as illumination... Doh!

Got 'em when they came back an while later - amazing the difference a bit of cardboard around the camera makes...

Thursday, October 11, 2007

Programmers can't, part the n'th.

Grumpy crem... Shouldn't have sent this, perhaps, but there are times when the unspeakable incompetence of programmers drives me into incoherent rage... Sorry, incoherent fucking rage...

It might help to explain the annoyance that this isn't their first attempt, and I've given them perfectly good source code that would do the job, so they're playing the "not invented here" game by refusing to use it. And so wasting my time... Tossers...

> Attached is a dump of the RS232 data.
> Please check that it conforms to your specification.

No, it certainly doesn't conform to our specification. Tell the stupid bastards to try reading the fucking documentation, I've made it perfectly clear (in several places) that all the data is encoded as pairs of hex characters.

[sigh] Let's look at the bytes.

The first four bytes are OK, I suppose, though not what I asked for.

> 0D 43 41 4E

[CR] CAN - I'd rather they used KAN, it seems (slightly) cleaner to avoid using hex chars in the header, but that doesn't particularly matter.

> 47 00 00 01 02 03 04 05 06 [etc]

But after the first four bytes they go into a bit of a decline. All the rest are garbage - they've completely failed to grasp the idea (god knows how) that ALL the raw bytes are encoded as pairs of hex characters... They're not allowed to send any bytes other than the ASCII characters for "0" to "9" and "A" to "F"

Let me quote from the fucking documentation: "Data bytes are encoded using pairs of hexadecimal characters."

Is there anything even vaguely unclear about that? It's the second fucking sentence... Can't they read? Did they get bored after reading the first sentence and give up? If that isn't clear then what about this?

"After a valid marker field ALL machine-readable data will be represented as octal bytes encoded as pairs of hexadecimal ASCII characters (0123456789ABCDEF or 0123456789abcdef)."

What sort of moron do you have to be read that and not grasp the idea we encode data as "pairs of hexadecimal ASCII characters"?

I don't need or intend to waste my time on drivelling fucking morons like this... The documentation is perfectly clear, tell them to get someone in off the fucking street to read it to them if they can't understand simple bloody english. Pillocks...

[polite but irrelevent bit removed]

I've given them source code that does the encoding, why can't they just use it? If they don't want to use it then what sort of pillock doesn't at least look at it to see what it's doing? Christ, where do you dig these people up?

Here is the relevant bit of the protocol document, in case they haven't even bothered to look at the fucking thing.

I've made bold (assuming your email client understands this) the places where I made it absolutely fucking clear how the data are encoded... Perhaps you can see why I'm pissed off at having to deal with some jerk who can't read?

Haven't they even got the fucking common sense to look at the examples I've included and see that they're nothing at all like the drivel they're sending? There are times when I despair at the sheer unbelievable moronic stupidity of programmers.

[first line of documentation]

Messages use standard ASCII encoding. Data bytes are encoded using pairs of hexadecimal characters.

[section deleted]

After a valid marker field ALL machine-readable data will be represented as octal bytes encoded as pairs of hexadecimal ASCII characters (0123456789ABCDEF or 0123456789abcdef). These pairs may optionally be separated by SPACE characters to increase human readability. Any character aside from (0123456789ABCDEF or 0123456789abcdef) and SPACE will be treated as a terminator. Normally upper case should be used for hexadecimal numbers, but lower case may be used.

[section deleted]

Following the marker field there may be an arbitrary number of space characters, then there must be two hexadecimal characters representing a single byte of "message length" information.

[section and some examples (FFS!) deleted]

Following the length field there may be an arbitrary number of space characters, then there must be two hexadecimal characters representing a single byte of "message type" information. This contains a single byte representing the type of the message. This field must be present in a valid message.

[section including another example deleted]

Following the "message-type" field there may, or may not, be message data. If there is it must be an even number of hexadecimal characters representing a number of bytes. These may be separated by any combination of space characters but ONLY between pairs of hexadecimal digits.

[section deleted]

Following the message data, or the message-type field if there is no data, there may be an arbitrary number of space characters, then there would normally be two hexadecimal characters representing a single byte of "checksum" information.

[etc, etc]

Monday, August 13, 2007

The Moving Cursor

The Moving Cursor writes; and, having writ,
Microsoft Word crashes: nor all your Piety nor Wit
Shall save the file,
Nor all your Tears recover a Word of it

Thursday, May 31, 2007

Everything is getting far too complicated

The universe has run out of simplicity. Be warned...

Thursday, May 03, 2007

Frustration

According to Dick Francis there's an evocative phrase in the racing world for the situation where a jockey is replaced against their wishes - "jocked-off".

Pity there isn't a similar phrase for designers - "designed-off" doesn't quite catch the "fucked-off" feeling...

Thursday, April 05, 2007

The dangers of abstraction

Apparently there is an offence under British law of "abstracting electricity", which covers tampering with an electricity meter. Abstracting? I imagine outstanding warrants exist for Messers Ampere, Volt and Coulomb, not to mention Faraday and Maxwell.

Personally I think they're abstracting the urine...

Legal link

Sunday, March 25, 2007

They're Watching

Reading an article in the paper today I was struck again by the credulity of journalists, who are capable of being sold any story, no matter how ridiculous, provided it's framed so as to reinforce their belief in their own cynicism. The particular case in point was a claim that the British secret service have developed a device that allows them to read the information on a computer screen using nothing more than the reflections on the user's face. From, oh, half a mile away... Hmmm... I suppose you could get a specular reflection from the... No. Forget it - there are much easier ways to do this.

But it did have me wondering why the spooks would bother putting out such a story, assuming they did. Presumably to cover up the way they really do it...

And thinking about the number of different ways you could do it got me wondering about computer security in general, and the great unanswered question of why the hell any sovereign government other than the US would allow Microsoft to sell Vista to their citizens, let alone use it in their government departments, when MS or anyone else who has access to the relevant codes can use the content protection (ha ha) features to pull the plug on any Vista machine whenever they want.

It seems to me that there is a strong case to be made for all 'essential' computing to be done using open source software on open sourced hardware, unfortunately there's a much stronger case to be made that all politicians are incompetent to even understand the problem.

Of course, you don't have to worry about this if you believe his Billiness is a nice guy who won't ever use them maliciously or to gain a commercial advantage, and that the US government doesn't have access to them, and that no hacker will ever have access to them, and no virus will ever be written that 'bricks' your computer using them, and so on.

(Bricks means to turn your computer into a brick, ie, stop it functioning. Vista has introduced ways to do this remotely, and not just by causing the software to malfunction through the usual programmer incompetence, hard as it may be to believe Vista certified hardware can be told to stop working, and it then becomes permanently useless. Bet it doesn't mention that on the box...)

But maybe I too suffer from excessive cynicism, because I suspect that behind all this submission is a naive government that has been fed a few crumbs allowing them back door access to Windows, and they're so fucking stupid they've sold the rest of us down the river to a foreign power in exchange...

Not that I don't admire MS for trying; in one stroke they stand to make the PC a closed-architecture machine and so kill off Linux, a master-stroke of industrial ruthlessness. Pity they're being allowed to get away with it, though ultimately I suspect that a few billion Chinese won't give a fuck and all MS will achieve is to slightly speed the end of western domination of the IT industry. I'm tempted to say good riddance...

Think I'm too paranoid? See http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.html

Wednesday, March 21, 2007

Programmers Can't (part deux)

Wrote this for another conference, but I just can't be bothered any more.

> ISTR the core of a 3D modelling app in the 90s was written in
> assembly.

Shock! Horror! Never! Not the 90s!

Sorry, but this thread is becoming increasingly surreal; it's true enough that most programmers these days are writing non-critical applications for absurdly fast machines and so don't need to care much about efficiency, but there's still plenty of assembler being used where performance and reliability do matter.

For all the exaggerations put about the difference between compiled code from an efficient language (C, for example) and competent assembler is very rarely less than a factor of three (execution time) and can be several orders of magnitude. A sensible rule of thumb is that on average a bloody good compiler will emit code that runs about three times slower than bog-standard human assembler. It's meaningless to discuss the ratios for optimised assembler; it depends too much on specific circumstances. Besides, outside the fevered imagination of other programmers the reality is that assembly programmers very, very rarely bother to optimise their code; bog standard assembler is usually fast enough.

The performance difference between compiled code for an inefficient language, as most are these days, and assembler is correspondingly greater; frankly only a fool would consider them comparable, so I find it fairly disturbing that so many programmers are ignorant enough of the basics to talk about compiled code and human produced assembler without understanding that the two things are really poles apart.

Now, every time the subject comes up on cix it gets bogged down in irrelevancies - "I don't use assembler because it makes the dog throw up", or "It took me five years to write a Hello World program in BASIC, I wouldn't live long enough to do one in assembler", or "I knew someone who knew someone who had a friend who wrote everything in assembler, even love-letters, but they gave up when compilers started producing better code" without mentioning this happened after they'd become so senile they couldn't remember their own name, or whatever, so don't expect me to do more than this one grump. If anyone needs a reality check have a look at some of the compiler code dumps in cix:avr, or cix:zeitgeist/mp3vsassembler:8 where I've looked in some detail at the code emitted by compilers (mainly C/GCC). I might be persuaded to argue the case in mp3vsassembler, I suppose, but frankly I doubt it.

Still, this is a beginners topic, I suppose. Perhaps for our next excursion into profound ignorance we could round up a few virgins and get them discussing sex? I'm sure we could find a few who'd consider themselves Don Juan on the basis of their first fumble; be much more fun to read and maybe more relevant to linux than the ramblings of a few programmers who "saw some assembler once" and believe that makes them experts in computer science. Just a thought...

[WSFN]

(cix: August 2006)

RAD tools aren't a new thing...

Someone asked me why this wasn't republished in grumbles, I though it had been.

The comment was originally inspired by a thread where some poor sod was discussing a god-awful vax cross-assembler that used to assemble Z80 code at the rate of a couple of lines of source per second. This was back in the 80's, and even then that sort of performance was laughably slow. Not that I have much sympathy with programmers who put up with garbage development tools - we always wrote our own, and as a result while that idiot was waiting half an hour or so for each build we'd have been long finished and off down the pub. Each to their own, I suppose...

From cix:flying_gerbils, Nov 2001. This was a glimpse of what life was like in the fast lane of software development way back when we were fab, not flab ;)


It is the mid 80's. In a bedroom in Manchester crem leans back from his computer and idly fondles his sleeping girlfriend**. ParaSys, his IDE, notices he's stopped typing and assembles several thousand lines of Dark Star source, links it and sends it across the network to the target machine. Debugging windows open, soft-scrolling command histories in the couple of seconds this entire process requires. The game starts. ParaSys emulates user interaction until a watch point event fires and traps the application. The editor window moves to the offending line and register displays slide into place. Crem groans. Lesley stops groaning. He leans forward and single-steps through a few lines of code, then changes one with ParaSys automatically updating the syntax-highlighting and error markers as he types. He leans back and seconds later both games continue with renewed enthusiasm... Twenty seconds have passed...

[edit]

It is nearly twenty years later. In an office in wales crem leans back from his computer and idly fondles himself. Ameol doesn't notice. Lesley is long-gone and the only thing groaning is his chair...


** Games weren't written in bedrooms for nothing, y'know.

Monday, March 19, 2007

Bzzzz-z-z-z-zzzzz-z-z-z-zzzzz

I have long cherished the ambition to stop working on tedious industrial products and get involved in something more satisfying, something with human interest, something that increases the sum total of human happiness... In short, sex aids.

The opportunity arose last week. One of my friends managed to wear out her favourite toy and asked if I could fix it; reluctantly, after several fractions of a second of arm-twisting, I agreed.

On inspection all that was wrong with the poor thing was that the wires were broken - it was one of the ones that has a control box and a variety of plug-in, erm, attachments. These had all been used to the point where they were intermittent; a simple enough fix - some more flexible cable, some heat-shrink tubing, some user-testing [cold shower] and the job's done. Unless, of course, you have the sort of mind that opens the control box, looks at the inevitable 12C508 PIC, and thinks "PIC? I'm not having any of my friends having sex with a fucking PIC..."

So, a couple of hours later we have a new improved AVR version. From eight 'programmes' to forty; pulses, sequences, sawtooths, triangle waves, variable speeds...

Source (Zeus) code for the AtTiny15 can be found at http://www.desdes.com/products/avr/

Enjoy ;)