The Perils of Gas Supply

So, I got home today to dis­cover a nice polite let­ter put under our flat door. This enlight­ened us to the fact that rep­re­sen­ta­tives of the energy com­pany E-on had tried to visit today “to dis­cuss any prob­lems [I] may have pay­ing”, and that I should con­tact them as soon as pos­si­ble, oth­er­wise they would obtain a War­rant for Entry and return with Police and a lock­smith if necessary.

Ohh­h­hhkay. Nice intro­duc­tion to your ser­vice there, E-on.

Back­ground time. When we moved into the flat, we were told that our gas and elec­tric­ity sup­ply was with Pow­er­gen. We were already with South­ern Elec­tric for both sup­plies in our pre­vi­ous house, so we called South­ern Elec­tric to let them know, and they moved over the account. Prob­lem solved! They billed us by direct debit, with­out paper state­ments, and we payed what we thought was a rea­son­able amount every quar­ter for a year and seven months. Back in Decem­ber, a British Gas rep reck­oned they could beat what I thought we were pay­ing for gas, about £30 a month, so I arranged to switch suppliers.

Back to the present. We called E-on, and appar­ently, they were our gas (but not elec­tric) sup­plier. For nine­teen months. With­out send­ing us a bill. They were sup­pos­edly billing Swayth­ling Hous­ing, the hous­ing asso­ci­a­tion who own half our flat under a first-time-buyer’s ini­tia­tive. And Swayth­ling had no infor­ma­tion on who lives here, despite us pay­ing them £200 a month in rent, and so weren’t for­ward­ing the bills to us.

The point at which E-on finally decide to visit the actual prop­erty is appar­ently Bailiff Time, not before.

Next com­pli­ca­tion, the ques­tion of who the heck is cur­rently sup­ply­ing our gas — could be E-on, could be South­ern Elec­tric, 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 cen­tral UK data­base, and we’re not on there. Our meter doesn’t exist and our prop­erty doesn’t receive gas, appar­ently. I’ve been hav­ing a lot of fake show­ers! E-on rec­om­mended that we call South­ern Elec­tric Gas, which we do. And guess what, we’re not in their data­base, and they can’t see us in the cen­tral data­base either. Their sug­ges­tion: call North­ern Gas, who are appar­ently the Uber Energy Company.

And nat­u­rally, they’re only open 9am-5pm, Mon­day to Friday.

Also, they’re now appar­ently called Ful­crum. Wait, Ful­crum?!

So in a delight­ful start to the week­end: we’ve just paid £280 to avoid the bailiffs com­ing round, we live in a house part-owned by an incom­pe­tent com­pany, and our gas sup­ply may be pro­vided by any one of four sep­a­rate com­pa­nies — or maybe no-one at all. And we get to wait until Mon­day to fig­ure out if Ful­crum can help us. If they can’t, er… who knows? Cam­paign 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

Yes­ter­day, I had a sim­ple if state­ment. 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 trig­ger under nor­mal cir­cum­stances, but for some rea­son it trig­gered repeat­edly, every sec­ond or so. Break­point­ing inside the if block, FramesLdPtr and FramesUlPtr were always zero. RequestInitialisation was always zero. I was stumped.

I spent sev­eral hours check­ing to see if LdPtr or UlPtr could be being changed by the other proces­sor in the sys­tem — maybe LdPtr was flick­ing to 1 long enough to trig­ger the if state­ment, then going back to zero again. But no.

I com­mented out the right-hand half of the if state­ment, and lo! It worked — i.e. didn’t trig­ger repeat­edly — again! But there’s not even any code to set RequestInitialisation any­thing other than zero, and besides, it’s an AND state­ment, so remov­ing the right-hand side couldn’t stop it triggering.

I spent yet more hours fig­ur­ing out if mem­ory was being cor­rupted, or if the val­ues could be being dis­torted by there being a break­point there.

And then I’d run out of our own code to blame. I began to won­der if the chip couldn’t access its own exter­nal mem­ory prop­erly, or if logic itself was some­how bro­ken in my compiler.

Then I had a cup of tea. And through the won­der of caf­feine, I beheld the truth. My code actu­ally looked like this:

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

Now, I under­stand per­fectly why that extra semi­colon breaks it. And now I know why com­ment­ing out the right-hand side fixed it — I com­mented out the semi­colon too. And I can almost under­stand why some­one would want to put a block of code between curly braces with­out any kind of if/while/for/etc. attached to it.

But why, dear com­piler, why in the name of Xenu’s tes­ti­cles does an if state­ment with no con­tent not at least gen­er­ate a warn­ing?

Grum­ble.