2015/12/21

Advice to programmers! And writers too!!!!!!!

I saw a program save a file and then show this dialog:




That exclamation mark told me a whole history. It told me that the programmer had had a hard time getting the file saving function to work. In alpha and beta releases the program had crashed at various points during the process. The programmer had not slept wondering what was wrong. And he wanted recognition for his work.



So when he finally got it to work, he was surprised, hence the exclamation mark. And you, the user, should be grateful that the program has done what it has been designed to do. The correct functioning of the program is so rare that it is worthy of an exclamation mark.



Neither Word not AutoCAD tell you that the file has been saved (for example). These programs do what you ask obediently, and silently. It is not a surprise that they work properly.



If you ever use a program which puts exclamation marks in its messages, do backups of your data often.



And if you write programs which put exclamation marks in messages, please stop. Though I suppose you can be forgiven if you have to tell the user:





But non life threatening messages do not warrant an exclamation mark.



Multiple exclamation marks are also bad form in writing. I once saw this at the end of a self published book:





In this case I suppose the author is asking sympathy, the book is long and took a lot of research, and look: I've finished!!!!!



Actually the book, though it told an interesting story, badly needed an editor, so the exclamation marks could be for the reader: I've finished!!!!!


2015/12/12

Advice to programmers.

When you have even a slightly difficult problem you should switch off the computer, get a piece of paper and a pen, go away from your desk and solve it "manually".

The temptation to code a vague idea you have in your head directly at the keyboard is difficult to resist. I was reminded of this as I sat waiting in a sport's center for my daughter to finish her kickboxing. There was music booming out of hall where the 40 something skeletons were maintaining their skeletoness, as well as a radio station talking at me from the ceiling. 

I was bored and thought I might as well try to solve a stupid little graphics programming problem that had been bothering me. So I found a free page in my diary, and in less than a minute it was done:


The point is that sitting in front of the computer is not always the best way to write computer programs. The computer screen, and the keyboard, distract you from the concept you need to implement.

Often the concept is independent of the computer language. What you need to do is write down in plain English (or Italian Or Russian or Chinese etc...) what you are trying to do.

2015/12/06

All religions are death cults, but it is not the end of the world!

All religions are death cults, but it is not the end of the world! 

All religions basically say: "Do what I tell you to do, and you will have paradise and eternal life."

Which leads to some people to  think that life now, here, today, is worthless. And death (by murder,  suicide or old age) will take you, via religion, to a better place.

But! There is something you can do! Support the Richard Dawkins Foundation for Reason & Science...



...and if you do it before the 31st December 2015 your contribution will be doubled by Louis Appignani.



2015/11/27

What have immigrants ever done for me?

Well, one immigrant gave me half my DNA. My dad came to the UK from "the continent" at the end of Second World War and met my mum – and here I am.

My parents were told by the teachers that I was not quite good enough to get into Grammar School. I would not pass the Eleven-Plus which was the exam which determined, in the UK, in those times, whether you went to a "good" school (Grammar School) or not. (Why someone's fate should be decided at 11 years old I cannot tell you.)

Anyway, when my parents (one native English and one a refugee immigrant), heard this, they sent me to a maths teacher to learn how to pass the IQ tests. And this maths teacher was a Polish immigrant. He taught me how to pass the 11+. This immigrant taught me how to pass an IQ test. And I did.

So, one immigrant gave me half my DNA, and another got me into a good school.


2015/11/26

You just can't shut up can you Owen?

- You just can't shut up can you Owen?
- No.
- Even when no-one is listening?
- Even when no-one is listening.


2015/11/08

Would you miss this?

Would you miss the blog? I've noticed that a large proportion of "viewers" are actually automated system trying to get me to click back to see where the link is coming from. So I have even fewer viewers than I imagined.

This blog is a good way for me to put down ideas and experiences, but if nobody is out there I may as well just talk to myself. Talking to myself I can be more honest about some things...

So, leave a comment if you would like me to carry on writing.




2015/09/25

The VW trick is at least 30 years old

I used to work for a company that designed and made graphics cards. In those days, the 1980s, there was a lot of competition. When you bought a PC you would, if you wanted to use play the latest games or use "high end" CAD, choose a better than standard graphics card. There were maybe 30 makers of graphics cards all competing on speed and price. And magazines, like PC World and Your PC, and so on would run benchmark tests on graphics cards to see which were the fastest, which had the most colors, which cost the least and so on. But above all, which graphics cards were the fastest. The results would be published in explicit tables of glory and shame.

In these days of high frame rate 3d animation it seems ridiculous. But in those days the speed of a graphics card it was important. It was what made your screen zip along and allowed you to work faster.

We could not understand how a competitor could always be rated fastest in one of the magazine's tests. We knew technically exactly what was needed to have a fast graphics card. We knew what we had to do to make our cards faster. We knew that some things cost more and would increase the speed, but at a price too high for the end user.

So we were amazed at the speed (and reasonable price) of the card. We bought the competitor's card and had a look at the signals as it ran the tests. We used logic analysers and oscilloscopes. And the board peformed the tests at the fantastic speed shown in the magazine. While our board trudged along at a third of the speed.

Then one bloke said: "There's a trick. They know about the test, they know what is supposed to be drawn on the screen, they recognise the test and drag the image from local memory before the test command has even finished!"



And indeed it was like that. The test which was performed was well documented so that all graphics boards would have the exact same test conditions. So the "winner" processor could recognise the sequence of commands coming along and without waiting for anything else, complete the test screen in lightening speed.

Simplifying a bit... One of the tests was to write "The quick brown fox jumps over the lazy dog" 100 times. Another one was to draw 200 red circles all over the screen. Once the processor saw these commands it knew the test was happening.

In fact with any similar test, but maybe the text changed to "The quick brown dog jumps over the lazy fox" and the speed of the graphics card fell enormously.

So, computers know to behave better when watched. Or rather, the programmers do.


2015/09/18

The strangeness of Sam Harris's support of Tim Ferriss ("The Four Hour Work Week").

I like Sam Harris's books. He's an aethistic neuroscientist/philospher who writes plainly and clearly. I was curious about Tim Ferriss's podcasts. I did not know that the two were slightly connected. In one of the Ferris podcasts Sam Harris mentions that he wishes he could do all or some of the stuff recommended in "The Four Hour Work Week". This connection seems strange to me...



One of Tim Ferris's ways of working less (according to Ferriss himself) was to set up a brain supplement selling site. The supplement is called BrainQuicken. Hmm. There have been no tests which proved it work. Ferriss claims to have made $40,000 a month from it. Those claims have been disputed.

So, Sam Harris support of Ferriss is a sort of testimonial. A testimonial of a person who claims to make money selling worthless pills. Is it worse or better that he makes $40,000 a month? Because if it is true then he is taking $480,000 a year from the gullible, some of whom probably can ill afford the price of the useless pills. If it is not true then he is lying (duh!).

Hence my puzzlement of the Harris-Ferriss connection.

Search in google for


sam harris tim ferriss podcast

to find the podcast.

Disclaimer (we all have to disclaim these days): I'm not suggesting that Ferris paid Harris anything. And if anybody can point me to an independent double blind study which shows that BrainQuicken works I'll change my assumption that it doesn't.

Self induced health-scare over...

...I stopped planning my own funeral.

(And listened, with a smile on my face, to Andy Narell's "Tatoom".)

2015/09/05

Anyway I take comfort from my "moments"...

I went for a walk the other morning, quite early, and had another of those "moments". The straight town road was in front of me, and at the end of it a cloudy horizon. Above me the sky was clear, slowly brightening. And behind me at about 40° elevation, a nearly full moon. The road ran East-West. There was a scattering of small long clouds just above the denser ones on the horizon. And there was Venus, above and to the right of where I imagined the sun would rise shortly. The light from the hidden (to me) sun hitting the moon's surface.



The moment that I had was that if we were not used to such sights (if we would not take them for granted), it would feel as if we were living on "another planet", or in a science fiction film maybe.



And inside that moment was another feeling of what I was really looking at. From space, and not to scale, it was this:



From space, and more to scale, this:





(I don't know what device you're reading this on but in the above image, (to scale), the Earth and Moon are two tiny dots  on the left of the image, over to the extreme right is the Sun, and Venus, another tiny dot is 3/4 across the image, closer to the sun. I've found that in an image of 600 pixels it is almost impossible show the inner Solar System to scale.)

And in this science fiction film, who were the baddies? Hmm. Too simple for a film, let's turn it into a novel. In this novel the baddies are (in rough recent historial order), the Nazi Party, the Soviet Communist Party, Chairman Mao and his lot, White Fundamentalists, Pol Pot and his lot, the Religious Right, the North Korean government, and finally (last but not least) ISIS.



All of them ignoring human pain and scientific reality. In favour of … having faith. Faith in things written by humans. Faith in ideas from really quite primitive humans at that. So how would they be treated in a science fiction novel? As the baddies. And enlightened humanists would come out on top. I hope the novel comes true, and that it comes true sooner rather than later.



Anyway I take comfort from my moments and in the amazingness and hugeness of the universe. And the mystery of it. So remember to look at things freshly every time. Who are you giving advice to Owen? Hmmm, looking at the stats for this blog, myself mostly.

2015/08/27

When I can't sleep...

When I can't sleep I listen out for dogs barking in the night. 


I don't know why but it makes me feel good.

 


The train line from Gallarate to Milano is close by, and I listen out for trains too. The idea of mysterious voyages in the night can make me fall asleep. This is linked to Toranomon Station when I lived in Tokyo. It means "Tiger Gate". Romantic.


Planes are almost as good as trains, flying passed the Moon maybe.

Flying through the night as I lie in bed.



If those fail, then reciting poems I'm learning by heart can sometimes do it. And Death Shall Have No Dominion. Out Revels Now Are Over. She Walks In Beauty Like The Night. The Eagle. I Met A Traveller...

2015/08/03

Three Places

Sometimes, when studying for my A-levels years ago, in Bigglsewade, I'd go to the cemetery over the hedge. The hedge was at the end of our back garden. An unofficial path ran along that hedge, passed all the back gardens, to the small road which ran through the cemetery. The road was (is?) only opened for funerals. In the center of the cemetery is a building which looks like a small church, but I don't think ever was. It is a sort of storehouse for the grave diggers and gardeners.




In my last year of school, I'd go into the cemetery and study Physics or Eng. Lit. sitting on one of the benches, near evergreen trees under a blue sky. It was a pleasant place to stay, though not really very good for serious study. Too relaxing and the curved surface of the bench would make setting the books down and writing awkward.



In Yokohama, Japan, about eight years later, my teacher Hideko Imai Sensei took me to the British Commonwealth Cemetery. 

If is full of the graves of soldiers who died during WWII. When I got frustrated trying to learn Japanese and/or write a program to do Fast Fourier Transforms, I'd walk the long walk from Gumyoji,Yokohama, to the Cemetery.



It is much bigger than the cemetry over the hedge of my home town. But it is lovely, very very green, with different levels and curved walks, always well kept.


The keeper/gardener was a big old Brit, from Yorkshire I think.



Once I took some visiting friends there and the keeper appeared saying that we would see the police wandering around. A Japanese man had hung himself from a tree in the cemetery the previous night.



Italian cemeteries I do not like. Both the cemetry over the hedge and in the British Commonwealth Cemetery were dominated by lovely grass and lush trees. The Italian cemeteries are full of gravel, cement and dried flowers. They are also very busy, with visitors every day, many more on Sundays. But there are too many life size statues of angels in black or white marble. The angels look pityingly down on the graves of the deceased. In some places there is a sculpture of a Christ figure dying on the cross. And most graves have photos of the dead on the gravestone. It all seems a cartoonish lie to me. Cartoonish super-heroes and a dodgey promise of life after death.



The "church" in Biggledwade Cemetery dominated the view from our back garden.


And often appeared in my dreams. I slept inside it one night, when I came home late with keys to the house only to find that my Mum had not removed her keys from the inside of the door.



Now it is a reminder in my mnenomic map for the book "Willful Blindness", of one-pointedness.



2015/07/19

Poetry, Backgammon and Tension

The third verse of The Rubaiyat of Omar Khayyam goes like this:



And, as the Cock crew, those who stood before
The Tavern shouted--"Open then the Door!
You know how little while we have to stay,
And, once departed, may return no more."

It is one of the poems I'm learning by heart. (Not the whole thing, it is far too long, but the first few verses.) 


Anyway the second line has, to me, a sort of tension:




"Open then the Door!"
Because it would be more natural to say say "open the Door then" but that would not rhyme. So "then" is put in the "wrong" place...


"Open then the Door!"

...and gives me pleasure. It happens in other rhyming poems. And I noticed that I get the same feeling of tension when playing backgammon.



If you don't know anything about backgammon you can go to Wikipedia. Like poker it is a game of chance where skilled players beat unskilled players, eventually. Like poker there are championships for money. You have to understand your opponent and you need to understand a few very basic laws of probability.



And those laws of proability sets up the web of tension over the board which occurs in my mind as I play.



Pieces left alone can be eaten by the opponents pieces. For example is it better to place a piece close to an opponent's piece or further away? It is my turn, I can put my black piece close to my opponents the white pieces...






...or I can put it further away (hard to see, black piece on black point on the right)...






It depends exactly on what you mean by "close to". Just like you, your opponent has two dice. My black piece is on its own and can be eaten by one of the opponents three pieces if he throws the right number. There are 11 (30.1%) ways that he can get a 1 with two dice...





...but there 16 (44.4%) ways of getting a 6...





So just considering this simplified situation it is better to be within 1 place from your opponent rather than 6 places, even though 6 places looks safer:



The reasoning could be that the further away I am from my enemy the safer I am. But do the calculations and you'll find that a distance of 1 is safer than a distance of 6. Maybe that is part of the tension I feel as I play backgammon. Something looks more dangerous but is actually less so.




And over a full game, for points, the tension extends and contracts over time and the 2D space of the board.



I play with friends. I only once went to an offical tournament (in Milano). At the beginning of the tournament the organiser, a large man with a far away look in his eyes, "shook" my hand by letting me touch his fingertips. Hmm, I thought, I must have offended him by in some way. Then I played a game with a thin blonde woman who smoked and gently blew the smoke into my face. She played well, won and I was out of the running. But because of the slippery handshake and the smoke in my eyes I decided that this was the first and last official backgammon tournament I'd play at.



So I play with friends and enjoy the clatter of the dice and the feel of the hard round pieces as I slide them over the smooth wooden surface.





And in the mornings I remember...



Dreaming when Dawn's Left Hand was in the Sky
I heard a Voice within the Tavern cry,
"Awake my Little ones and fill the Cup
Before Life's Liquor in its Cup be dry."

2015/07/01

I Fell In Love With Those Curves.

I saw the flower of the melissa plant on my balcony and fell in love with the curves. The flowers die pretty quickly and the one I wanted to look at with my Veho was a poor shriveled up thing by the time I got round to it. Luckily others had blossomed in the meantime, but even then it took me a while to find one which matched my inital impression.



Here are the first attempts, the width of each of these photos is about 1cm.




Then I found her:

A tiny thing but leaping up out of the green with a hairy tongue sticking out and a smaller spiral one almost hidden within the mouth.



Ah, those curves, those curves... especially the upper one going up at more than 45° then sloping over towards the mouth. Is it just me?


2015/06/22

Of Socks and Sandals.

Are you one of those mediocre minded sheep humans who thinks that people who wear sandals with socks are sexual perverts (at worst) or unimaginative techies (at best)? If so, switch off your brain (already in standbye it seems), stop reading this and get back to posting photos of your latest meal on FaceBook.

I've decided that instead of staying in the summer office all day with steaming sweaty smelly feet it would be best to wear sandals, with or without socks. But since I live in a fashion dictatorship (where fat girls show off rolls of flesh above tight jeans and thin women clump loudly and clumsily around on shoes that make them look as if they have two wooden legs and men wear long floppy knitted hats because, because, well, because, why???)... Hmmm. Got distracted. Anyway. As I was saying since I live in a fashion dictactorship I have to wear sandals with socks, secretly. So I have to find black sandals and always were them with black socks.

Well Owen, I can hear you say, that won't fool many people for very long.

You're right. But those who have known me for a long time don't need fooling, they already know my limits and failings. And those who don't know me might be fooled long enough to consider my personality more than my footwear. As some ladies say: "My face is up here, not down there..."

So, I need to wear sandals and socks by stealth, but I could not find any totally black sandals, so I bought some black sandals with white trimmings and painted the white trimmings with acrylic paint...



(Maybe I should post this on instructables.com too?)

I may have to go over some of the plastic white bits with a black magic marker. Acrylic paint soaks into textiles very well, but scrapes off plastic quite quickly.

Since I am no longer allowed to go down onto the factory floor to fix the electical testing equipment without special boots, why not go the whole hog and just wear sandals with no socks? I'm not that brave, I lack the courage. The fashion dictatorship can only be attacked obliquely.

The problem is that I forgot that I haven't got any black socks, only dark blue ones...


Anyway, the next challenge is to get out of the house without my wife seeing my footwear. Maybe I should hide the sandals in the boot of my car?

2015/05/19

Nostalgia

Nostalgia is not necessarily for a long time ago. I'm oddly nostalgic for last Christmas. Christmas 2014. The cat had an ischemia the day before Christmas Eve. I could not believe it, suddenly his back legs just went floppy. Within a few seconds. He started to drag himself around the room, back legs laying out behind him like two extra shorter tails. It was horrible and sad to watch.

So Christmas Eve was spent at various vets, and the conclusion was, that he'd probably regain some control and power in his legs, but not be as he was before. I did not believe them. We were told to help him regain this power and control by lifting his back end up with a scarf under his belly and accompanying him on his walks around the garden. Only using two front legs fo 90% of the work.

It was a terrible time. Ok, not terrible like being in a country invaded by ISIS, or having a nearest and dearest being diagnosed with incurable cancer. I know, I know, but I have got it all in perspective, don't worry. Still it was painful to see him struggle away along the floor, trying to be as normal as possible, but clearly failing.

We took him down and lifted his back end up with a scarf, and off he'd run! Suddenly he felt lighter I suppose, and we had difficulty keeping up. "What is this antigravity machine attached to my bum?" he was probably thinking.

Eventually we began to hope that maybe the vets had been right. He regained some rigidity mixed with clumsy movement in both his back legs, and began to limp (badly) around the garden on his own.

Yes! Yes! All very interesting but what about the nostalgia, the title of this post?

I'd take him down during the day, when there was enough light to find him if he hid somewhere. I'd follow him around listening to podcasts as he sniffed the grass and looked longingly at the birds he used to chase. He was getting better and starting to complain that he wanted to go down during the night. He used to be a "dirty stopout" before his illness.

So I began to accompany him for 30 minutes in the evening. He'd stay under a tree with low branches in the dark. I'd walk about nearbye with my earphones in. The dark. The tree. The podcasts. The passing cars. Sometimes the stars, sometimes the low grey clouds.

And that is it. I have nostalgia for that time in garden, in the failing light, alone except for a limping cat. Odd eh? Maybe if the cat's legs had not improved as much as they did over the following months I would not be as nostalgic for that Christmas. But he did recover and I am strangely nostalgic.

And here he is at the end of January.

His tail was paralysed too and will never again be the erect black fluffy indicator it used to be. But he seems a happy enough cat now.


2015/05/03

Spider on Mint

I've already blogged about how much I like my Veho (and how to get 200X magnification out of it) so when I saw a tiny spider on my mint plant I decided it was time to get the USB microscope out again.

I brought the mint plant into the house onto the computer table, but as usual getting things into focus and at a decent magnification is a bit of a struggle. I managed like this:


You can see the tiny dot of the spider in real life and its image from the Veho on the screen. It is about 1mm large. I balanced the microscope stand on a book and a box and was careful not to break the web of the spider:
It was disturbed by me poking around in its jungle and started to run around a bit. I managed to get a few more nice shots:

The motion blur below was caused by the spider running around too much.



Aren't nature, science and engineering wonderful?

2015/04/02

Credits.


 Nice photo eh? Who should get the credit? I think credit should be given to...
  • The universe for being so strange and beautiful.
  • The designers of the optics of the camera.
  • The designers of the electronics of the camera.
  • The programmers who wrote the software inside the camera.
  • The production engineers who put it all together so reliably and cheaply.
The photographer did 0.0001% of the work compared with those above.

2015/03/24

Scary Chewing Gum – The Super-People

I was chewing away on some gum when I suddenly noticed the picture on the box...



… I mean just look at those people! Don't they seem like super human giants just ready to take over the world?

It looks like the designer found a stock photo of some healthy Scandinavian blue-eyed blondes and added extra-big teeth. The image scares me. And it is false advertising, I've chewed through a ton of this stuff, but my hair is still grey, my eyes are still grey and I still don't smile wildly like they do.


And what are they looking at? The universe and beings they dominate?

2015/03/13

Intelligent women and stupid men

She was young and intelligent, and because she was intelligent she had doubts.

He was young and stupid, and, because he was stupid, he had no doubts.

When she suggested that she'd like to become a doctor, maybe even a medical researcher, he smiled down at her, full of love and condescension, and told her that women were not made for that sort of thing. Women were too delicate and not intellectually capable of the effort required. He was very sure of what he said. She was full of doubt, and accepted his clear conviction of his own rightness.

It was that sort of culture.

Over the next fifteen years she came to understand (without a doubt) that he really was stupid. And realised she'd wasted her life because of him.

2015/02/21

Is dopamine what makes me write this blog?

I have so few readers, why do I carry on with this blog? My best so far is 60 readers in a single day:



Is it a tiny amount of dopamine which gives me pleasure as I see that I did better today than yesterday?

An experiment in the 1950s showed that rats contained in a cage continually pressed a lever which resulted in a them getting a dose of dopamine. Pushing the lever closed an external electronic circuit which stimulated electrodes embedded in the rat's brain, and this caused the dopamine release. The rat preferred pressing the lever to exercising, eating, or even sex.


But I heard about this on a radio program and it occurred to me that even a doubling from 7 to 14 readers may provoke a tiny release of pleasure giving chemicals in my brain. So I write yet another blog post in the (unconscious?) hope of getting another dopamine release the following day.

I mean to say, I could be doing more ambitious things. I could (slowly) write the greatest English language comic novel. Or I could try at least. Or I could create all that art I dream of based on electronics, stepper motors, microphones and lights. I could.

Or I could simply write another blog post.