Saturday, 23 September 2017 08:36 pm
bens_dad: (Default)
If Uber doesn't employ its "partners" (drivers), how does its licence to run mini-cabs in London cover them ?
If partners are sub-contractors, don't they need their own licences ?
bens_dad: (Default)
Whilst writing some (C++) code, to parse a file that I only roughly know the contents of, I have been printing variables at various points in the code.

I realised that this printing was masking the fact that some variables are not being used, so I inserted some conditional code

// Printing variables with CPLDebug can hide
// the fact that they are not otherwise used ...
#define CPLDebug(...)

so that compilers and other code analysers would not see the printing function, so correctly give warnings like:
[VRC.cpp:976]: (style) Variable 'nNotTIS' is assigned a value that is never used.

That was fine. Until I hit this block of code:

if ( this->nMapID == 8 ) {
int nNotTIS = VRReadInt(fp);
"Pay as you go; skipping value %d=x%08x before Tile Index",
nNotTIS, nNotTIS); // See * below

The variable nNotTIS *is* only used in the print, but = VRReadInt(fp) has a side effect (moving the file pointer) that is intended. In a strong sense, I do never use value read from the file and the warning is correct.

I think I will add a comment like
// Expect a warning like
// Variable 'nNotTIS' is assigned a value that is never used.
but is there a better option ?

* Unfortunately CPLDebug() does not support %m$ in the format string, eg "... %1$d=x%1$08x ...", so I have to pass nNotTIS twice if I want to see the decimal and hex values.
bens_dad: (Default)
Those of you with LiveJournal accounts may wish to read
LiveJournal: Important Updates at http://news.livejournal.com/
which includes the statement:

Control of LiveJournal as a blogging platform has been transferred to SUP Media LLC, a legal entity based in the Russian Federation. This decision stems from the urge to become closer to our users, most of whom live in Europe and Russia. Every LiveJournal user will be offered to sign the new User Agreement with SUP Media. Paid services, however, will still be provided by Live Journal Inc.

The new terms of service are at http://www.livejournal.com/legal/tos-en.bml (the link in the news page has a spurious double-quote) - except that they say:
ATTENTION: this translation of the User Agreement is not a legally binding document.
The original User Agreement, which is valid, is located at the following address:
Unless you read Russian, you may wish to be careful when using LiveJournal.

According to the English translation, that includes viewing any part of the website:
This Agreement constitutes a public offer in accordance with Article 437 of the Civil Code of the Russian Federation. By using the Service, including every access to the Website pages by any means, User unconditionally accepts this Agreement in its entirety.
bens_dad: (Default)
In less than two months it will be

20 centuries
16 years
12 months
8 days
4 hours and
0 minutes

since the nominal start of our time system.

(If you are that way inclined, four seconds earlier you could write the time as
2016/12/08 04:00:-4

1815/12/09 06:03:00 is a better arithmetic progression date;
A quick search fails to find any memorable happenings that day, although Lady Ada Lovelace (Byron's daughter and the first computer programmer) was born the following day.

Electoral (il)logic

Tuesday, 28 June 2016 04:46 pm
bens_dad: (Default)
In May, Muirfield Golf Club voted 64% - 36% to allow women as members.
Apparently this is not enough to change the rules, so a second vote is being held
So nearly two-thirds want something to happen but it can't.

Last week the UK voted 51.9% - 48.1% to leave the UK, but it seems that although a very close result, that is definitive enough that we are committed to head in a novel direction, with substantial consequences for a significant part of the world's population, but without a plan or anyone prepared to actually lead us there.

The Brexit referendum was "advisory" - why can't the government do what it usually does with advice: ignore it and do what it wants anyway ?
bens_dad: (Default)
We have a new telephone answering machine with DECT handsets.
Not only do the handsets have screens (the old ones did too) but you can send and receive text (SMS) messages.

We did have to register for the service, but it is a great improvement on the voice-mails we had been getting each time someone texted us.

Extra points to someone since this appears to use a BT service and we are on Virgin :-)
bens_dad: (Default)
We have a Sony Blu-Ray player and a new Samsung telly.
By pressing the correct key combination on the Blu-Ray remote we have got it to control the telly sufficiently that we don't need the TV remote when we watch a disk.

This also worked with our previous, Panasonic, telly.
According to the manual the Blu-Ray remote can be configured to control nine brands of television.

It is nice to see that at least one manufacturer has put user convenience above forcing us to have the same brand of telly and disk player.
bens_dad: (Default)
I've been developing some code for a new (to me) open source project (GDAL).
One of the requirements of the developer guidelines is
Try to keep lines to 79 characters or less.


That is an old idea; 80 column teletypes (glass and paper) go back a long way
(though my first experiences of computing, forty years ago, were 132-column
printouts and IIRC 13-column punched cards, perhaps show the demand for wider
lines even then) and Knuth is said to have recommended 72 column text,
as that was about as much as an eye could see at once.

Programmers like to have as much code visible as possible; I've heard monitors
with a large (c1200) vertical resolution described as "programmers' monitors",
and such monitors were highly prized in the software house I once worked.

My attempts at learning Python were blocked for several years because although
I knew that indentation and line breaks were part of the syntax, I hadn't heard
of the rules that allowed a code statement to continue onto the next line.
Thus I was unable to write anything that required a statement wider than a
comfortable editor window. With meaningful variable and function names that
became a significant limit on an 80 column screen.

I had been developing much of my the GDAL code on a wide-screen laptop with more
than enough room for two 80 column windows side by side but not a lot of height,
so when I discovered this rule I went back and found that my code had got much
wider. The sample code I was working from was also heavily commented;
so much so that on an 80x24 window (the default terminal size on many systems)
a single idea could not always be coded on a single page. By making my screen
wider I had got my ideas to fit the page, but the 79 character rule meant
rewriting much of it and it became to long for comfort on the wide-screen laptop
with its restricted vertical resolution (once I would have fixed that by making
the characters smaller, but my eyesight is no longer sharp enough for that).

This post has a hard line break at least every 80 characters.

(no subject)

Friday, 5 April 2013 09:19 am
bens_dad: (Default)
The elders of the Maasai are calling for our help:

The Tanzanian government is about to evict the tribe from their traditional lands so that rich men can hunt lions and leopards.

I accept that lion hunting and the money it brings can, under some circumstances, be good for the local people, wildlife conservation and even the population of lions or leopards. However evicting the local people cannot help any of those causes.

Please consider signing the petition at http://www.avaaz.org/en/stand_with_the_maasai_loc/?cDOTsab

The Deficit Myth

Sunday, 2 December 2012 08:28 am
bens_dad: (Default)
I've just seen this post from the huffingtonpost from Oct 24


Can anyone refute its claims that the Tory spin that Labour caused our massive deficit are wrong, or the author's claim that he is a conservative ?


Thursday, 29 November 2012 12:45 pm
bens_dad: (Default)
I'm pleased to hear that the UN General Assembly is expected to vote this afternoon to recognize Palestine as a nation

This is not as good as the UN granting Palestine membership (which the UN Security Council failed to do last year) but it is a step in the right direction.


Monday, 15 October 2012 10:14 am
bens_dad: (Default)
Virgin charge to send me a paper bill.

Fair enough, an e-bill is fine for many people and printing and posting a piece of paper costs money and resources.

... Except that more often than I get a bill I get an advert from Virgin for one of their wonderful
services. Sometimes it is addressed and sometimes it is "Dear Householder" and they may be getting bulk delivery ("Newspaper" ?) rates from the Post Office.

But this morning's advert takes the biscuit.

Dear Householder,
Over 80% of your neighbourhood is connected to Virgin. Why don't you join us.

If 80% of the neighbourhood is connected then sending an advert to 100% of it, then
either 80% of the adverts are wasted on current customers (if "connected" means "signed up", or
20% of the adverts go to people who can't receive the service (if "connected" means "have a wire to the property").

Either way, the failure rate of these adverts must be enough that it would be worth targeting the mail shot rather than blanket coverage ? And if they can spend my service fees on this I don't see why they can't pay for me to get a paper bill.
bens_dad: (Default)
I thought there was a presumption of innocence.

This morning's news is full of the Football association removing John Terry as captain of the England football team, and speculation that Chris Huhne will be removed from the cabinet if the DPP says that Huhne will be charged (last night the news was saying that the Prime Minister and the Deputy PM had decided he couldn't stay if he was charged).

Both Terry and Huhne deny the charges.

http://en.wikipedia.org/wiki/Presumption_of_innocence#The_presumption_of_innocence_in_modern_practice describes some cases where UK law removes the presumption of innocence, but neither charge appears to come under those exceptions.
bens_dad: (Default)
Every year Rupert Murdoch and BSkyB get tens of million pounds of TV licence fees

This is justified because BSkyB retransmit BBC channels from their satellite. Fair enough ? Maybe. But if so, how come Murdoch charges cable companies for including Sky channels in the their bundles ?

Culture Secretary Jeremy Hunt is about to consider whether to renew this ridiculous deal. Please sign the petition http://www.avaaz.org/en/stop_murdochs_bbc_robbery_2/ to ask him to stop it.
bens_dad: (Default)
I loved Lego when I was a boy.
I often spent all my birthday and Christmas money on it and my train set wasn't Brio or Hornby but Lego.

When I first heard complaints that Lego was effectively ghettoising girls I found it very difficult to find out what they were doing. The only sign on their website was that amongst their categories ( http://shop.lego.com/en-GB/ByCategory ) as well as "Buildings", "Vehicles", "Robotics", "Trains" and "Preschool" was one called "Girls".

Whilst two of my nieces might find that category either irrelevant or patronizing I wonder whether my other niece - the one with an older brother - might find the "Girls" section a useful way into the product range without being besieged with Ninjas and Transformer-style robot/alien/warriors (though when I nephew got one of those I remember thinking those were a bad example of Lego for him too). Yes the "Girls" category has plenty of pink and purple, a beauty shop and a fashion studio, but cars and pirate ships are prominent too.

I was all set to say that what I heard was overblown and that yes Lego were getting too commercial for my liking and maybe they were saying "girl equals pink" a little but, the real problem was that so many of the sets looked as if they could only be used to make a limit range of themes.

Many of the pieces in each set are very specialized and the huge range of colours available now makes putting several sets together and making something completely different a very much harder task than it was in my day.

However, I have now discovered that Lego send a magazine to interested children. They have now started sending a different magazine to the girls on their list, one that doesn't include any construction plans !
For a good description of what Lego are getting wrong try http://impeus.com/?p=445

Worse, the Lego Club page has sample copies of the "regular" magazines but does not mention that girls get a different one.

I'm now happy for those who wish to boycott Lego over their new attitude to girls.

Mouse skills ?

Sunday, 6 November 2011 04:30 pm
bens_dad: (Default)
Ben's favorite television program "Something Special" (Mr Tumble) has a website with some new games.

One of the games (Balloon popping) was demonstrated on the TV and the presenter said he was using a web cam so that the game could see where he was pointing - like a Play Staton Eye Toy or a Microsoft Kinetic. The laptop I'm using doesn't have a web cam, but it does have touch screen, and it turns out that the games work with that too.

So the question is, should we teach Ben to use a mouse, or will they be obsolete by the time he needs to use one ?


Sunday, 2 October 2011 08:24 am
bens_dad: (Default)
On friday our folding bike folded up while I was riding it and I have broken my hip.

They have screwed it together and I'm not to put any weight on it for six weeks, but I can go home when the physio is happy that I can use crutches safely.

Hospital internet (bloxx) has blocked my reading page so I may have to follow you on live journal until I get home. This touch screen is on a long folding arm which wobbles when I type, so I do not expect to post much.

(no subject)

Thursday, 8 September 2011 10:46 pm
bens_dad: (Default)
I've just looked in the fridge and seen four sorts of milk.

Not milk processed in four different ways (full fat, semi-skimmed, skimmed, ...)

and not milk produced in different ways (eg. conventional and organic),

but milk which is the product of four different types of living thing:

cow's milk, goat's milk, soya milk and rice milk.

All in my fridge right now :-)

Two deaths

Sunday, 24 July 2011 11:31 am
bens_dad: (Default)
Just before bed I heard that Amy Winehouse had died and that a neighbouring bit of cyber-space was full people getting worked up over her death. I think I have heard her music but I first heard of her as, and think of her as, a celebrity who had problems with her consumption of certain substances.

This morning an old lady from church died. She seemed to get a lot of pleasure from my son's company the few times I saw them together.

I find it difficult to care about the death of a celebrity whose work I don't know but my son's friend's death has made a difference to my day.
Page generated Sunday, 22 October 2017 11:57 am
Powered by Dreamwidth Studios