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 ;)

Friday, May 19, 2006

Nicknames

Ah, the wonders of the web.

While pondering it occurred to me that we didn't have a reasonable nickname for our son, and that "evil little bastard", "little horror" and even "lord foul's bairn" and other similar epithets were wearing thin.

After a bit of thought I arrived at "Bielzibabe" and the wonder of the web is such that a mere few seconds later I can confirm that it's original, or at least Google hasn't heard of it. Ah... So, it's goodbye to "what's the evil one been up to today, then" and hello "BB"...

Now all I have to do is work out what to tell her indoors it means...

Friday, May 05, 2006

Overheating

I noticed my fileserver (a bog-standard tower PC with a vertically-mounted motherboard) was down yesterday, so I wandered out (it lives outside the house, for various reasons) and power-cycled the bloody thing.

It started working, so I logged onto it had a rummage about on the disk to see if there were any traces of what stopped it. After a minute or two of this it stopped again. After various dark mutterings (it was dark) I wandered out again and went to power-cycle it again, but this time I noticed it smelled 'hot' so I dragged it inside and took the covers off. This time it wouldn't start up at all...

And eventually - never accuse me of being completely unobservant - I noticed why. All the surface mount power devices near the CPU had slipped away from their placements. The buggers must have got so hot they'd desoldered themselves and wandered off...



It's interesting that all the devices seem to have been exposed to the same temperature, so my model, which could be complete bollocks, is along the lines of the CPU fan failing (the only mechanical bit, after all) and the CPU then steadily dumping heat into the PSU devices (they're very near. The CPU is just out of shot in that photo) until they got fed up and sloped off.

I suspect the PSU was running right up until the end and the ex-FET probably died heroically as a result of its clamp diode leaving home and abandoning it... Strains of the Titanic, the music playing on as the passengers slid down the deck to their doom... What? Sorry, came over a little strange there. Been working too hard. Doesn't happen often...

Sunday, February 26, 2006

Fundie-Flit(tm)

> Just invest in a flag factory. The Muslim world can't burn enough of
> 'em, apparently.

I've just had an idea - what someone ought to do is encode the text of the holy books of every god-bothering set of lunatics into binary, then transcribe that to a DNA sequence (fairly easily done these days) and then it could be cheaply replicated and sold in spray cans. Then all you'd have to do is spray your flags, embassies, etc, etc with it and they'd be inviolate: "You can't burn that - it has billions of copies of the Qur'an on it"

We could call it "Fundie-Flit" or some such.

We could also insert the appropriate sequence into a retro-virus, making it possible for the daft buggers to write the word of de lord into every cell in their bodies, where hopefully it'd do the most good (for the rest of us, that is)...

Friday, February 17, 2006

More culls from conferences

(6 Sept 2000) General ineptitude

An idiot was once asked to video a friend driving in a motor race, which would have been fine had they not pressed the record/pause button once too often at the start and so become completely out of sync. . .

The resulting footage consisted of twenty minutes of grass, footwear, and incidental conversation, interspersed each lap as the camera panned up to the track when the cars became audible then cut just as they come into view to a shot of them disappearing out of view again.

So, having videoed the entire race without managing to get a single shot of the damned car, but capturing every disparaging comment made about the driving, the idiot then went and gave the tape to the driver without checking what was on it ;)

There's a plus side, though. I don't get asked to video races anymore...


(18 Oct 2000) Energy policy

> If I had gas I would set fire to it.

I have friends who regularly try to set fire to mine. . . Bastards, all of them. One day I'll invent catalytic-converter underpants, simultaneously eliminating the risk of blow-back and keeping the olde nadgers warm. See if I don't...


(22 Nov 2000) Reminiscing

I miss the person I was back in the days of laurence, I occasionally find myself rereading it and wondering what the fuck my sense of humour has been doing during the subsequent five years and why the bastard hasn't sent me a postcard.


(3 Dec 2000) Railway speed restrictions

What's all this nonsense about train-drivers being unable to cope with new speed restrictions ? What do they do that's so complicated ? They don't even have to steer the damned things. Mind you, I suppose having to look out of the window does present a bit of a challenge if you're used to getting in, slapping your beer-belly on the dead-mans switch and falling asleep.

I suspect the only reason these railway speed-restrictions have been lifted is that the tiny-brained vermin who rejoice whenever motorists get shafted tend to travel by train, and don't like it when it happens to them. . .

>> They should be thankful that they don't have speed humps.

Pah. Don't talk to me about speed-humps, t'wife set a new record the other day. From completely clothed to post-coitus cigarette in under a minute, and we don't even smoke.


(9 Oct 2004) Women

> How else could they be so cunning and manipulative?

Lots and lots of practice. I have a theory - dinosaurs... no! not that theory! Where was I? Oh yes:

For the last few months She Who Must Be Obeyed has been taking t'daughter, Gurgle, (aged 5 going on 15) to ballet dancing lessons. Lots of Gurgle's friends seem to be involved, but - and here is where the theory comes in - as far as I can tell none of them shows the slightest ability or inclination to dance. It would be kindness itself to describe their dancing ability as being on a par with that of Ayres rock. They collectively have all the grace and skill of a herd of pissed elephants. So, either this is a ruse and they're being taught something else or somewhere in cheshire there's an inept and/or suicidal ballet-dancing teacher. . .

I suspect some sort of female indoctrination process hidden from the eyes of men. I must investigate. I'll follow her next time and report ba[no carrier]

Thursday, February 16, 2006

"Publish and be dumbed"

After forty-odd (some very odd) years I've come to the following conclusion about life:

It is not possible to avoid making mistakes. It is, however, possible to only make one mistake. And that's by never doing anything at all...

Monday, February 13, 2006

Easter eggs

For some reason hidden jokes in computer software are called "easter eggs"; some can be found here:

http://www.eeggs.com/

Thursday, November 10, 2005

Echo

Gah, just caught the tail end of another popular science program which referred to the cosmic background radiation as the "echo of the big bang"...

Why echo? Do they think the bloody photons bounced off something? Edge of the universe, perhaps?

(Kindly resist the urge to mention decoupling)