What’s a kWh? (And other money-saving tips)

When I was at school, they taught us how electricity works only as part of science lessons. It was something future engineers might need, yet we all use electricity at home every day.

The problem with electricity is we’re a little bit separated from its cost. With cars, we fill up the car with fuel and pay for it right there and then. With electricity, we use many different appliances which all add up to an eye-watering bill at the end of the month.

This is my guide to what everyone needs to know about electricity.

Introducing the kWh.

Electricity is sold in units of “kWh”. We’ll come to exactly what those three letters mean later on but for now, imagine your electricity is being delivered to you in barrels, each one a standard size called the “kWh”. Think about your local electricity station and imagine one of these “kWh” barrels of electricity being hooked up to the wires that lead to your home. When a barrel empties, someone comes along and replaces it with a new full barrel.

The “kWh” has a scientific definition that all electricity suppliers agree on. It is so ubiquitous that if any supplier decides to use a different unit, they’re most likely up to something dodgy.

How much is a single kWh barrel of electricity? Check your electric bill. Here’s mine…

The 45Ā¾p per day standing charge is fixed. It doesn’t matter how much or how little I use; I still have to pay that 45Ā¾p every single day and there’s little I can do about that other than maybe switch providers.

More interesting is the 33p per kWh. At the end of each month, they count up all the empty barrels of electricity I’ve gone through and bill me 33p for each one. I’ll use that figure in my examples but do look up your own rate and replace it with however much your kWh costs.

Also note that it doesn’t matter how quickly I go through each barrel of electricity. If I go away for a few days leaving everything except the fridge switched off, it will take a lot longer to finish that barrel than when I’m home and everything is switched on. Either way, they still charge me 33p once that barrel is empty.

We’ll now pull apart those three letters, but always keep in mind that metaphor of barrels of electricity hooked up to the wires leading to your house.

Little barrels on the hillside.
Little barrels full of ‘tricity…

What Watt?

The W is short for the “Watt”, named after James Watt who invented them. If you’ve seen a capital W or “Watts” or “Wattage”, they all mean the same thing. The number of Watts any electrical appliance has is a measure of the rate of consumption of electricity over time. If you like, think of it as the speed that something eats electricity coming out of the outlet on the wall.

"High power fan heater. 3000 Watt. 2 heat settings, 1500W/3000W. Adjustable thermostat with overheat cut out protection."

This heater consumes electricity at a rate of 3000 Watts, or 1500 Watts if you use the low setting. Because one Wattage figure is twice as much as the other, you can safely assume that the high setting consumes electricity exactly twice as fast as the low setting.

Lightbulb in packaging. "15 year warrantee. 13.5W. 100W replacement. 1527 Lumens."

This lightbulb consumes electricity at a rate of 13.5 Watts, yet it shines as brightly as an old-fashioned 100-Watt filament lightbulb. Quite the improvement!

A quick exercise: Find an electrical item in your home and look up its Wattage figure. It might be on a label or written on the original packaging. If you can’t find it written down, try using a search engine.

Ooh kay!

1 kW (or one kiloWatt) means exactly the same thing as 1000 W. Adding “k” to “W” to make “kW” means the amount is multiplied by one thousand. The heater above could have “3 kW” printed on the box instead of “3000 W”. It would mean exactly the same thing.

Devices that draw a small amount of electricity like lightbulbs or phone chargers are usually rated in Watts, while larger devices that eat a lot of electricity like ovens or electric car chargers are typically rated in kW. They mean the same thing underneath.

Whoever makes your electrical appliances might have a personal preference for small numbers in “kW” or big numbers in “W”. The manufacturer of that heater probably wants to emphasise how well it heats, so they prefer to use the bigger number of “3000 W” instead of “3 kW”. More W equals more heat.

Our hours

The last letter is “h”, which is short for an “hour”, named after its inventor Sir Claudius Hour. (At least that’s what a man at the pub told me. He might have been joking.)

You know what an hour is, don’t you? It’s the time it takes to watch a normal episode of Star Trek with ads. It’s how long it takes me to walk all the way around my local country park if I don’t stop. It’s the time it takes to walk my sister’s dog before she (the dog) gets tired.

“And I would walk 500 miles and I would walk 500 miles more.”

All together now!

Now we know what each letter of “kWh” stands for, let’s bring them all together. A “kWh” is the amount of electricity consumed by a 1000 W appliance if it is left on for an hour.

Find an appliance that’s rated at 1 kW. Plug it in and switch it on for an hour and then switch it off. You’ll have used exactly one kWh and your electricity bill will have gone up by 33p. (Or whatever your supplier charges.)

Let’s work out a practical example. Recall that 3000W heater from earlier. How much do you think it costs to run that heater for five hours on the high setting? We’ll ignore practical realities like the built-in thermostat and assume it goes for five hours straight with no gaps.

3000W is the same as 3 kW and we want to run it for 5 hours, paying 33p for each kWh. Multiply those numbers together:

3 kW Ɨ 5 h Ɨ 33 p/kWH = 495p (or roughly Ā£5.)

Try this calculation yourself. Pick an electrical appliance in your home and find its rated wattage. Think about how long you switch it on for and work out how much it costs to use it for that amount of time.

Applying the knowledge

It can be tempting to look at how much some appliances like heaters or ovens cost and conclude the only way to save money is to be cold and not eat. I hope that’s not the conclusion you draw. The benefit of knowing how much something costs to use is that you can make informed choices.

Will buying an air fryer save you money when your kitchen already has an oven? Work out how much it costs to cook your favourite meal in the oven then do the same for an air fryer. If you know both in actual pennies, you can make an informed decision to make that purchase or not.

While the Wattage figure tells you the rate it consumes electricity, it may be that the higher Wattage appliance gets the job done faster. Say you have a choice of two kettles, one runs at 1 kW and the other at 3 kW, it may seem at first blush that the 1 kW kettle will cost less. However, if the 3 kW kettle gets the water boiled in a third of the time as the 1 kW kettle, they will cost the same to use.

Does your supplier offer a different service with more expensive electricity during the day and cheaper electricity overnight? Which appliances would you use overnight when the kWh barrels are cheaper? Would that save you money overall?

Many thanks to my wife and my brother Andrew for their helpful feedback. Thanks also to my local B&M store for the pictures of lightbulbs and heaters I took while shopping there.

Creative Commons Picture Credits:
šŸ“ø “saturday recycle” by Andrea de Poda.
šŸ“ø “sad kilo” by “p med”.

You don’t have to wear a blazer to school on a hot day!

Remember, if you’re going to school on a hot day, you can leave your blazer at home if it’s normally part of your uniform.

“When you say bronze doesn’t need to be chipped, my questions is this, doesn’t it?”
  1. Teachers who insist that you wear a blazer on hot days can be ignored. They have a callous disregard for the discomfort caused by excess thick layers in hot weather and such callousness does not deserve respect.

  2. Teachers who insist that you bring your blazer to school and carry it around can also be ignored. These ones might not be callous but they are ridiculous. Making you pointlessly carry around some heavy item? Why?

  3. If you’ve been given a detention for not having your blazer, you don’t have to turn up. Go home at the normal time and let the ridiculous teacher whine to themselves. You’ve not broken any rules.

  4. If you need to, show your teacher this page.

  5. If you are a teacher who has just been shown this page by one of the children in your care, please stop making them bring their blazers in on hot days. It is people like you who caused the rise in belief in the flat-earth. “If people in authority can be so wrong about blazers, maybe they’re also wrong about the earth being a globe.” If you really must enforce rules, why not good rules like the one about running with scissors? (If I’ve not convinced you are in error, maybe teaching isn’t right for you. Why not consider a career in cooking where you’re meant to be heating things up?)

  6. I’m not the one undermining teacher’s authority. Teachers who are under the delusion that blazers are required are undermining their own authority by attempting to enforce such ridiculous rules.

  7. Yes, I do know better than those teachers. Thank you for noticing.

Picture Credit:
šŸ“· Close up of blazer pocket emblem for boys school group by “Kaye”.

Clever and totally pointless – my first publication

Way back in the early 90s, I subscribed to a magazine (think of it like a big website but printed on paper and sent through the post) called ā€˜PC Plusā€™. It included a section called ā€œWilfā€™s Programmers Workshopā€ where every month, Mr Wilf Hey would present a project (usually written in GW-Basic) and discuss the principles at work. It was here where I first managed to get something clever into print, except I didnā€™t do it quite right.

There would usually be a brief digression at the end of his section, and in one issue, he discussed the idea of a ā€œquineā€, a program whose only function is to generate its own source code.

printf(f,34,f,34,10);

It was from this I had an idea of a creative way to produce a quine of my own. I just had to be liberal about the definition of a programming language. Hereā€™s my (faulty) recollection of Mr Heyā€™s write-up of my entryā€¦

We had a clever entry to our discussion of self-replicating programs from Bill Godfrey who sent in a floppy disk, and it meets the rules of the game.

Run the program SELFREP.EXE and it produces the ā€œsourceā€, PKZIP.EXE itself. He supplies a batch file which recompiles the program. First, PKZIP ā€œcompilesā€ SELFREP.OBJ (instead of .ZIP) and then the ā€œlinkerā€ ZIP2EXE is invoked to produce the completed executable program.

Unfortunately, because Mr Godfrey didnā€™t write PKZIP, heā€™s technically disqualified from this contest.

Once the initial excitement of appearing in print wore off, I was kicking myself for not thinking my idea through. I only used PKZIP.EXE as the source file because I needed a file to be the source code, and PKZIP itself seemed the most applicable for that role. That decision alone disqualified me.

What I should have done is supply some ā€œsource codeā€ such asā€¦
   /* A self replicating program by Bill Godfrey. */
   Go();

The batch file should have just compiled (zipped) that two line text file and then linked (zip2exe) it. Running the generated EXE would have produced the same two line text file back. It would have totally complied with the rules and I would not have been disqualified! Grrrrā€¦

Iā€™ve long since lost that edition of PC Plus. If anyone reading this has a copy, Iā€™d love a scan of that page please.

Picture credits
ā€œReading a magazineā€ by flickr user ā€œZaCky ą„ā€.
ā€œDanger – Self Replicating Device!ā€ by Sam Ley, aka flickr user ā€œphidauexā€.

‘First Past the Post’ isn’t.

Iā€™m a bit of a nerd for vote counting systems. So I discovered with delight that in the UK, there will soon be a referendum on changing the way votes are counted. As I write this, most of the UK (and the USA) uses a method we call ā€œFirst past the postā€.

Itā€™s called ā€œFirst past the postā€, but it isnā€™t. The name is about as ridiculous as calling North Korea;  ā€œThe Democratic People’s Republic of Koreaā€. The country is on the Korean peninsula, so at least that name is a little bit honest.

Put what you know to one side and think about what a vote counting system called ā€œfirst past the postā€ should look like by the name alone. Itā€™s a clear analogy to running in a race with a ā€œpostā€ at the end of the track. So thereā€™s a predetermined number of votes and the first candidate to get past that threshold wins?

Nope. ā€œFirst past the postā€ doesnā€™t work that way at all.

Imagine a vote of 100 voters selecting one of three candidates; A, B and C.

A 45 votes
B 30 votes
C 25 votes

If we put the ā€œpostā€ at 51 votes (a simple majority), then all three candidates lost. They all fell over and dropped out of the race before anyone reached the finish. Three pathetic failures. Rather than declaring no-one the winner, the people organising the race then dig up the post and re-plant it just behind A, as if the post was always there. He is declared the first one to pass the post.

If that wasnā€™t confusing enough, the other counting system to be offered in the referendum, ā€œAlternative Voteā€ or ā€œAVā€, does indeed look like how youā€™d imagine ā€œfirst past the postā€ to work. To continue the analogy with AV, candidate C drops out of the race after the first round. The second preferences of Cā€™s voters are counted and added to Aā€™s and Bā€™s total.

A 45 + 3 votes 48 votes
B 30 + 22 votes 52 votes
C 25 votes

Hurrah! After two rounds, B was the first candidate past the post. A had an early lead but couldnā€™t keep up as far as the finishing line, overtaken by B in the closing straight.

So remember, the vote counting system that works in a ā€œfirst past the postā€ manner is the one called ā€œAlternative Voteā€. The one without anything like a ā€œpostā€ is called ā€œFirst past the postā€. Clear?

Picture credits:
Vote Goat by Jeremy Richardson (Mr Jaded on flickr).
Racing demons by Simon Webster (shaggy359 on flickr).

Google snooping WiFi? Don’t panic! Don’t panic!

Google have got into a bit of hot water when it emerged that while their cars drove around taking pictures for their Street View service, they collected and stored peopleā€™s private WiFi traffic. People have understandably got angry with Google for doing this, but I think some demystification is in order.


Did they collect my private data?

If your WiFi access point uses WPA with a good pass-key, donā€™t worry. Your network traffic is encrypted and is just noise without that pass-key.

If your WiFi is ā€œopenā€, then anyone within range can collect and look at your network traffic. I would be more worried about that creepy guy in the van parked around the corner, maliciously snooping on you, spamming and browsing dodgy websites. Worrying about Google would be way down my list. Take this opportunity to switch on WPA on your access point. This article will still be here afterwards.


How come their camera cars collect WiFi data at all?

It can be used to supplement or replace GPS. Google are in the mapping and navigation business, and knowing where you are is essential to helping you get where you are going.

If you go out to some random spot in a built-up area and switch on your laptopā€™s WiFi gizmo, youā€™ll find several access points, both public and private, all with a variety of weird names. Make a list of those access points and their signal strength, compare it against a list of known access-points and their previously monitored location, do a few calculations and youā€™ll have your location.

No need for GPS electronics, just use the same WiFi electronics your laptop will have anyway.

Thatā€™s very nice, but even my WiFi address is private. They shouldnā€™t have collected even that.

Is it? By necessity, your WiFi access point has to broadcast itā€™s identity to the public in the clear. Your neighbours might be using WiFi too, possibly within range of your own laptop. When it hears something broadcast, it loads the packet and looks to see if its from an access point it knows about. Itā€™ll be receiving lots of noise from your neighbours and silently throwing away anything itā€™s not interested in.

Now apply the principle that no-one else should even look at a packetā€™s identity. Youā€™ll have no way of knowing which packets are yours and which are someone elseā€™s unless you do look at the access points identity. Itā€™s part of the protocol.

But they collected private traffic as well as just the access pointā€™s identity. How could that be accidental?

Even when you are only interested in the identity of an access point, you need to collect a whole packet before itā€™s useful. The trouble is that radio on itā€™s own is subject to noise and interference. To fix this, the clever people that designed the WiFi protocols added a noise check. Before a packet is broadcast, some simple calculations are done on the content of the packet and the result is added on the end. The recipient takes the packet and performs the same calculation on the content. If the result the recipient ends up with is the same as the number on the end of the packet received, it can be reasonably sure the packet arrived without errors.

For this to work, the recipient needs the whole packet. If they only listened to first bit where the senderā€™s identity is stored, there is a risk of noise creeping in, masquerading as correct data.

But why did they store the whole packet after the error check has passed?

Very little of a software developerā€™s work is making things from scratch. Instead, we reuse and build upon work done in the past. We make reusable components that can be reused for different things.

I can only speculate here, but I imagine that when Google put this project together, they would have taken a generic WiFi receiver component which has been well tested and trusted rather than build an entirely new one. The packet is the natural unit of a WiFi receiver, so it would be expected that generic components designed to deal with WiFi traffic would store whole packets as a matter of routine.

Wouldnā€™t they have noticed a huge data file if they were only planning to store a fraction of what they did collect?

They would have been taking pictures and collecting many image files at the same time, so the space taken up by captured WiFi traffic would be a small proportion. Even if they were only collecting WiFi locations, the amount of storage that would be required in the field isnā€™t quite so predictable. Databases arenā€™t simple files where one item is stored one after the other, but are complex structures with indexing and redundant copies.

I imagine that if I were an engineer at Google and I wanted an estimate of how many hard disks to buy, I would send the car out on a short test journey and see how big the database is when it came back. Multiply that figure by however far the car will be going and thatā€™s how much storage Iā€™ll need. Hard disks are not that expensive these days, so spending engineerā€™s time working on reducing the amount of storage needed might not be a good economy.

Even so, collecting private network traffic is illegal. If I were caught eavesdropping, I probably wouldnā€™t get away with it.

(Iā€™m not a lawyer, and this is not legal advice. If you take legal advice from a software engineer, youā€™re insane.)

If Google were taken to a criminal court over this, they could show that there was no intention to eavesdrop as Iā€™ve outlined. If they take steps to securely destroy the additional collected data, no-one has been harmed here. Prosecuting this ā€œcrimeā€ would be a petty reaction to a simple oversight.

But I donā€™t trust Google to not look at and abuse the collected private data.

If youā€™re not using WPA, your private data has been broadcast to all and sundry in range since you started using it, and youā€™re only worried now?

Picture credit: ‘Shot of Daventry area while cycling’ by… me!

Paying for Power

Being an evil genius, I’m obsessed with getting as much power as possible. If only I could get power for nothing, but alas, I have to pay for it.

In England, and most of the western world, we have a well established system of sending electricity from the power stations to me and sending money in the opposite direction. It works, but I think we can improve on it.

An Electron’s Journey

Electricity starts life at the power stations. They sell their power supply on the grid at market rates, competing with other power stations. The price of electricity fluctuates over the day. If the price goes down far enough, they might switch off the generators, keeping their raw materials for when the price goes up. A wind farm can’t keep stocks of wind in reserve, so they will stay online all the time regardless of the price.

We, the public, never see those fluctuations in price. Instead, we purchase electricity from a supplier who deal with the power stations. The suppliers usually charge us a fixed amount per unit of energy, sometimes having a daytime rate and an overnight rate, but the price they charge us is fairly stable, only changing the rates every few months.

(As well as the suppliers, we also pay the companies that maintain the grid system and meters in our homes. This article is not about them.)

When all is said and done, what do the suppliers actually do? They don’t generate the electricity and they don’t bring it to us. They are middle-men who flatten out the price, charging a bit more than the expected average price, like an insurance premium, to compensate for the risk of over-demand and price rises. Do we need that service? We have insurance to spread the risk of unexpected events, not for the everyday costs of life.

What if, instead, we had a minimal supplier that just handles the accountancy at a low cost, quoting a price that changes every five minutes, tracking the wholesale price. (Perhaps having an easy to use gizmo that displays the current price.) With this type of supplier, we would probably save money over the long term. After all, we wouldn’t be paying that insurance premium any more.

But more important than that, it would give us an interest in when we use electricity. At the moment, we really don’t care that the price of electricity rises dramatically during the adverts on popular TV shows. We all switch on our kettles at the same time, not really caring about the economics. If we felt the rise in price, we might plan our tea making better to avoid these peaks and save some money.

This plan wouldn’t have worked when the grid was originally built, but computer and communications technology have advanced to point where we can finally think about pulling down the old ways of working. I’m looking forward to it.

Picture credits.
Nuclear power by koert michiels on flickr.
insurance prohibits ladders by stallio on flickr.

The Making of an Evil Genius

When I was around 9 or 10 years old, my school, as they would every year, put on a Christmas show. The younger children would re-enact the birth of Jesus of Nazareth and then the older children would perform a play. That year, we were performing Grimm’s Snow White.

I wasn’t performing on stage though. Instead, I was in charge of the music. We had a cassette of all the music and the children on stage would sing along. I would press play when its time to sing and after, position the cassette for the next song.

I wouldn’t know it at the time, but it would be this rather mundane task that taught me one of the most important lessons of my life.

A “technical hitch”

The music cassette had all the tunes with large gaps between each song. The cassette player was an early 1980s era device with a mechanical counter and a button to move all the dials back to zero. The number on the counter weren’t anything useful like seconds but how many times the motor had turned, or something like that. Fortunately for me, the teacher organising the play had gone to the trouble of writing down the counter position for each song and the order in which they are to be performed. What could go wrong?

Indeed, what could go wrong? A few days or so before the big performance,  we did a dress rehearsal and I demonstrated I could operate a cassette player without assistance. Everyone was happy.

Finally came the day of the show. Before the audience had arrived, the teacher told me to position the cassette for the first song and I did that exactly. Everything was ready. During the show, the first tune was played without a hitch and after the song was over, I dutifully positioned the cassette for the next song.

Time for the second song… disaster!

I had pressed play but instead of music, silence. I could hear the children on stage singing “We dig-dig-dig-dig-dig-dig-dig in a mine…” until they realised there was no music. The teacher duck her head behind the curtain and asked what was happening. I showed her the tape was running and I didn’t know what was wrong. She had to go up on stage and apologise for the “technical hitch”, to much laughter from the audience.

Truth is, I knew exactly what went wrong and I was already fixing it. What happened, was that when the younger children did their nativity play, their teacher was using the same cassette player for their music. When they finished, they put our cassette back in the player but the counter was all messed up. My first song was fine because the tape was already in place, but when I positioned the cassette for the second song, it was based on a counter that was in the wrong place. I had been playing one of the gaps between songs.

What’s more, I remember thinking that exactly this would happen while watching the earlier nativity play. I was sitting there thinking “I hope they put tape counter back when they finish.” But I said nothing, after all, the teachers were in control and they would have thought of this too and wouldn’t want me bothering them. I mean, they’re adults!

While I was rather mocked by the other children for spoiling an otherwise perfect performance, it turned out to be one of the most important moments of my childhood. It taught me possibly the most valuable lesson I’ve ever had.

People in authority can be wrong.

After that incident, I started looking at adults in a new light. Not just teachers, but my parents, politicians, bishops, experts, celebrities, anyone in authority. I finally saw them as the human beings we all are.

Picture credits:
“Samantha’s Christmas nativity play” by alecea on flickr.
“Soundesign tape deck” by kumar303 on flickr.
“Silence */” by circo de invierno on flickr.