Pages

Wednesday, 14 September 2022

Not my king

Not my king

On the whole, I'm in favour of the monarchy, although I suspect that Big-ears will soon be a good reason to lean the other way.

But I'm also in favour of the right to protest peacefully. Holding up a placard saying "Not my king" or "Abolish the Monarchy" should be the right of everyone. And there should be no restriction as to when this sentiment can be expressed - indeed, the death of Elisabeth II is an obvious time to make this point.

So why are the police arresting, or moving on, people who are simply holding up a placard?

This is wrong. Very wrong. There should be an enquiry to find out who told our long-suffering police to act in this way, and whoever was the cause of this policy, should be moved far away from policy-setting.

And King Charles III should support such an enquiry. Or is he worried about what happened to King Charles I in 1649?

 




Thursday, 18 August 2022

Thirteen stone, three pounds

Thirteen stone, three pounds

Over the last few months, I've got some of my appetite back, and I've been putting on weight. Today, I was up to 186 pounds, 84.4 kilograms.

At one point, I was a lot less. Not long after my operation, I was down to 12 stone 8, or even less. In the hospital, they were so worried about my nutrition, they shoved a tube down my nose to my stomach and tried feeding me that way - it didn't work, it just kept me awake all night.

My BMI now is 27.3, overweight. Maybe I need to stop trying to fatten up.

 


 


Monday, 15 August 2022

It's beer, Jim, but not as we know it

 It's beer, Jim, but not as we know it

Actually, that's a misquote, but nichevo.

I've never been a big drinker (except in my late teens, when I got bladdered a few times). But I do enjoy a pint of beer, especially in this hot weather.

So when I found that I had liver cancer, and they cut out most of my liver to cure me, I gave up alcohol altogether, including coq-au-vin and other foods cooked with wine.

Six months after the operation, my liver has regrown, and (I hope) is back in business. I'm still not a big drinker, but I still enjoy a pint of beer. Except that now, it's "non-alcoholic" beer.

Which, it seems, isn't what you'd think. In my naivety, I assumed that non-alcoholic means ... no alcohol. But apparently not. Apparently you can still call it "non-alcoholic" if it has 0.5% alcohol . Normal beer is around 5%, ten times stronger.

Some non-alcoholic beers really are devoid of alcohol; you find out when you read the side of the can or bottle.

Right now, I'm drinking about two bottles per day; some 0.5% and some 0%. That works out at about one bottle of normal beer per week, and I'm thinking that my liver should be able to cope with that.

So why drink this stuff? Obviously, not to get drunk. It's because I like the taste, and in this weather, it's a good idea to get lots of liquids.




GET and POST

GET and POST

There are two ways to send data to a web page, GET and POST. GET puts the data into the URL - that means that the data is stored in the server logs and the browser history.

POST is, very slightly, more secure, because it doesn't have the above issues.

If you use https (and you have to use https to use the Barclays services), then all the data is encrypted before it's sent from your end, and only decrypted at the server end. That means that an interloper can find out what server you're accessing (payments.epdq.co.uk, which we knew already) and what port you're using (443, the https port). so the security benefits of POST, and quite tiny.

I use Barclays for running credit cards, and I do it with a program I wrote. I used GET to send the data, because it's slightly easier to implement. But, suddenly, Barclays have woken up to the difference, and they've just told me that as of October 2022, they won't accept GET, everything has to be POST.

There's nothing in my browser history, because I'm not using a browser, I'm using LWP::UserAgent. That is a perl library. There's no history. And yes, the info is in the server logs, but the server is run by Barclays, and they should have it under the most stringent security.

I hate it when they do this. I've been running credit cards for 25 years now. Originally, they could only accept paper, so my database would print out each billing, and we'd ship the paper to our local bank. They would then ship the paper to Poole (except one time when they lost it and didn't tell me until several months later) and some typist at Poole would type it all in again.

Since then, they've been gradually improving their service. The problem is, each time they make a change like this, thousands of businesses all over the country, have to make changes in their software. I've been though this maybe a dozen times now.

The security difference between GET and POST has been known for a very long time. Why have Barclays only just woken up to it? And why do they think it would affect my systems?

Also, it would be nice if Barclays gave a sample working program. Since they haven't, I'll do it.

It would also be nice if someone at Barclays tried to read their documentation. Everything one needs is there, but it can be really difficult to find.

I'm not telling you my id, userid or password, obviously - if you use Barclays to run cards, you have your own. This program works, and I can then parse $content to take action depending on whether the card was accepted or declined.

#!/usr/bin/perl
use LWP::UserAgent;
use CGI::Carp qw(fatalsToBrowser);
print "Content-type: text/html\n\n";
$epdqurl = "https://payments.epdq.co.uk/ncol/prod/orderdirect.asp";

$amount = '1000'; # meaning $10
$cardno = '4111111111111111'; # that's a test card, it will be declined
$expires = '0824';
$transactionid = 'post-test-1';

my $browser = LWP::UserAgent->new;
my $response = $browser->post(
    $epdqurl,
    [
'AMOUNT'    => $amount,
'CARDNO' => $cardno,
'CURRENCY' => 'USD',
'ECI' => '9',
'ED' => $expires,
'OPERATION' => 'SAL',
'ORDERID' => $transactionid,
'PSPID' => 'my_id',
'PSWD' => 'my_passwd',
'USERID' => 'my_userid'
    ],
);
open RES, ">test.out";
print RES $content;
close RES;



Portable air conditioning

Portable air conditioning

It sounds like just the thing. A small, battery-powered box that makes a room cold in just a few minutes.

 Except, it doesn't.

A real air conditioner is a heat pump. It pumps heat from one place to another. It works by compressing a fluid (which causes the fluid to get hot), it move the hot fluid to another place, then it uses convection to cool the hot fluid; so the heat is dissipated outside the room. Then the fluid is decompressed and that makes it get cold, and that cools the room. You can see the effect for yourself using a bicycle tyre pump. Refrigerators and freezers work the same way.

These portable units, don't have anywhere outside to dump the heat. Anyone with any sort of physics knowledge would know right away that a "portable air conditioner" cannot work, just as a perpetual motion machine can't work. Of course, most people have very little knowledge of physics.

So what do these units do?

If you blow air over water, the water gradually evaporates, and this cools the area by using the latent heat of vaporisation. Your sweat works the same way; the sweat evaporating from your skin, cools your skin. Not by much, but it does work.

So you could get the same effect by letting a fan blow over a basin of water ... and that's pretty much what these units do. Or they use ice, which means that they're piggybacking on your freezer, and your freezer will have to work harder to make all that ice.

If it comes with a hose that you poke though a window, then it could actually be a portable air conditioner, in which case it will cost around £500. If it's an evaporative cooler, then it'll be more like £30 (£15 to £20 if you get something from eBay), and if you pay much more than this, you're overpaying. The Beldray costs £20. The Cooledge costs £65, far too much, but most of these evaporative cooling units are grossly overpriced - and over-claiming.

There's a downside to evaporative cooling that no-one mentions. The air it blows out is a little bit cooler, but it is also a bit more humid. And that means that your own personal cooling system (your sweat) won't work as well as it does with dry air.

 Yes - evaporative cooling works. But don't expect it to do very much





 

 

 



 

Monday, 8 August 2022

The cost of living crisis

The cost of living crisis

Inflation has hit us. The consumer price index was 9.4% highr in June 2022 than a year ago. And there are lots of arguments about the cause - the Ukraine war has affected gas and oil prices, food costs more, we're seeing the delayed effect of the Covid crisis. Lots of explanations are being thrown around, but everyone seems to agree on one thing - the government must Do Something.

And so Some Things are being Done. None of them are effective.

There's a price cap on energy; specifically gas and electricity. In our house, we use very little gas - almost none, because our heating is done with a heat pump, which is driven by electricity. Also, we aren't on the "default tariff" - I had a big haggle with our vendors EDF to get the best price.

The price cap came in, in 2019. People thought it was a great idea, but experience tells us that it isn't as simple as that.

For any resource that isn't unlimited (economists call these scarce resources) there has to be a way to allocate them between buyers. The usual mechanism is price; a higher price causes a lower demand and (after a lag) a higher supply. And vice versa. If you try to control the price, and make it lower than it would be (a price cap) then demand is higher than it would be, and supply is lower.

The other mechanism is rationing. You tell people how much they can have. That worked in WW2 with food rationing, because it's possible to calculate how much food each person needs (about 2000 calories/day for women, 2500 for men). But how do you do it with electricity? How much electricity do you need? How do you ration electricity?

In April 2022, the price cap rose by 54%. It needed to go up, because global gas prices had gone up. You can tell a vendor "Buy your gas for £100 and sell it for £90) but they won't stay in business for long. A lot of energy vendors went out of business.

In October 2022, the price cap will rise by 70%. You see the problem? If your bill was £1000 last year, it went up to £1540 in April, and will go up to £2600 in October. The April rise was made more palatable by the fact that we don't need much home heating at that time of year, but the October rise will hit the winter of 2022/23.

People will be forced to choose between eating and heating, is the slogan I've heard. It's nonsense, of course. When I was a lad, if it got cold, you put on another sweater. We didn't have central heating - what we did have, is ice on the windows (single glazing) in the cold mornings.

So what can the government do? There's a variety of possibilities, but they all boil down to subsidising the cost of energy. But if you cut VAT on energy, you'll have to raise taxes somewhere else. Or borrow, and "borrow" implies "pay back later". And once you start subsidising the cost of energy, you won't be able to stop, because then that 70% price rise kicks in. The only hope is that energy costs fall in a few years, and I'm not expecting that to happen.

So everyone is telling the government "Do Something" because talk is cheap, and I've not seen anyone in government admit that "there isn't much we can do". They can do a bit of nibbling round the edges, but nothing substantial.

So the government will Do Something. And then act totally surprised when it has no effect.











Sunday, 24 July 2022

This weird trick reverses diabetes

This weird trick reverses diabetes

How many times have I seen spam like this? A lot. But ...

In September 2021, I was diagnosed with diabetes. Using the finger prick test, I was coming in at 8 or 9 (normal is 4 to 7). And the HBa1C test was saying much the same (that's a blood test that is measurung the average over the last few months) . So, I changed my diet a bit (I never did take much sugar) and went onto a prescribed drug for it.

But I've been off the ddrug (Metformin) for months now, and I've not been watching my sugar intake. Yet by the prick test,  I've come down to 5 or 6, which is normal, and this is confirmed by my latest HBa1C test, which also came up normal. 

So what changed? Obviously the big change was the nine-hour operation in which they removed most of my liver and all of my gall bladder. 

So there you are. I wouldn't recommend this to anyone else, because the chopping of my liver was an anti-cancer measure, but it seems to have had the good side-effect of also removing my diabetes.