The Perils of Gas Supply

So, I got home today to discover a nice polite letter put under our flat door. This enlightened us to the fact that representatives of the energy company E-on had tried to visit today “to discuss any problems [I] may have paying”, and that I should contact them as soon as possible, otherwise they would obtain a Warrant for Entry and return with Police and a locksmith if necessary.

Ohhhhhkay. Nice introduction to your service there, E-on.

Background time. When we moved into the flat, we were told that our gas and electricity supply was with Powergen. We were already with Southern Electric for both supplies in our previous house, so we called Southern Electric to let them know, and they moved over the account. Problem solved! They billed us by direct debit, without paper statements, and we payed what we thought was a reasonable amount every quarter for a year and seven months. Back in December, a British Gas rep reckoned they could beat what I thought we were paying for gas, about £30 a month, so I arranged to switch suppliers.

Back to the present. We called E-on, and apparently, they were our gas (but not electric) supplier. For nineteen months. Without sending us a bill. They were supposedly billing Swaythling Housing, the housing association who own half our flat under a first-time-buyer’s initiative. And Swaythling had no information on who lives here, despite us paying them £200 a month in rent, and so weren’t forwarding the bills to us.

The point at which E-on finally decide to visit the actual property is apparently Bailiff Time, not before.

Next complication, the question of who the heck is currently supplying our gas – could be E-on, could be Southern Electric, could be British Gas. And the answer is… nobody knows. Because we don’t exist.

E-on looked up our address, and our meter ID, on the central UK database, and we’re not on there. Our meter doesn’t exist and our property doesn’t receive gas, apparently. I’ve been having a lot of fake showers! E-on recommended that we call Southern Electric Gas, which we do. And guess what, we’re not in their database, and they can’t see us in the central database either. Their suggestion: call Northern Gas, who are apparently the Uber Energy Company.

And naturally, they’re only open 9am-5pm, Monday to Friday.

Also, they’re now apparently called Fulcrum. Wait, Fulcrum?!

So in a delightful start to the weekend: we’ve just paid £280 to avoid the bailiffs coming round, we live in a house part-owned by an incompetent company, and our gas supply may be provided by any one of four separate companies — or maybe no-one at all. And we get to wait until Monday to figure out if Fulcrum can help us. If they can’t, er… who knows? Campaign for the re-nationalisation of the gas industry?

Oh hey, does this mean I get to blame the Tories for this mess as well? Good-oh, I’ll stick them on the list too.

Semicolon Rage

Yesterday, I had a simple if statement. It looked like this:

if ((Frames.FramesLdPtr>Frames.FramesUlPtr) && (InterPFlags.RequestInitialisation==0))
{
    doSomeStuff(); // with function and variable names that might be classified =S
}

This should not trigger under normal circumstances, but for some reason it triggered repeatedly, every second or so. Breakpointing inside the if block, FramesLdPtr and FramesUlPtr were always zero. RequestInitialisation was always zero. I was stumped.

I spent several hours checking to see if LdPtr or UlPtr could be being changed by the other processor in the system — maybe LdPtr was flicking to 1 long enough to trigger the if statement, then going back to zero again. But no.

I commented out the right-hand half of the if statement, and lo! It worked — i.e. didn’t trigger repeatedly — again! But there’s not even any code to set RequestInitialisation anything other than zero, and besides, it’s an AND statement, so removing the right-hand side couldn’t stop it triggering.

I spent yet more hours figuring out if memory was being corrupted, or if the values could be being distorted by there being a breakpoint there.

And then I’d run out of our own code to blame. I began to wonder if the chip couldn’t access its own external memory properly, or if logic itself was somehow broken in my compiler.

Then I had a cup of tea. And through the wonder of caffeine, I beheld the truth. My code actually looked like this:

if ((Frames.FramesLdPtr>Frames.FramesUlPtr) && (InterPFlags.RequestInitialisation==0));
{
    doSomeStuff();
}

Now, I understand perfectly why that extra semicolon breaks it. And now I know why commenting out the right-hand side fixed it — I commented out the semicolon too. And I can almost understand why someone would want to put a block of code between curly braces without any kind of if/while/for/etc. attached to it.

But why, dear compiler, why in the name of Xenu’s testicles does an if statement with no content not at least generate a warning?

Grumble.