CS4FN Advent – Day 14 – Why is your internet so slow + a festive kriss-kross puzzle

Today’s CS4FN Christmas Computing Advent Calendar is showing a picture of shiny tinsel, which reminds me a bit of computer cables. At least, enough to theme this post around broadband speeds 🙂

A piece of shiny tinsel.

 

Did you know?

Only two letters were transmitted over the Internet before it crashed for the first time. The Internet was born on 20 October 1969 with the first transmission of data sent from a computer at the University of California to another one at Stanford, near San Francisco. Only two letters L and O were sent – the system crashed when the G of LOGIN was entered.

Why is your Internet so slow?

by Paul Curzon, QMUL. This article was originally published on the CS4FN website.

The Internet is now so much a part of life that, unless you are over 50, it’s hard to remember what the world was like without it. Sometimes we enjoy really fast Internet access, and yet at other times it’s frustratingly slow! So the question is why, and what does this have to do with posting a letter, or cars on a motorway?

The communication technology that powers the Internet is built of electronics. The building blocks are called routers, and these convert the light-streams of information that pass down the fibre-optic cables into streams of electrons, so that electronics can be used to switch and re-route the information inside the routers.

Enormously high capacities are achievable, which is necessary because the performance of your Internet connection is really important, especially if you enjoy online gaming or do a lot of video streaming. Anyone who plays online games would be familiar with the problem: opponents apparently popping out of nowhere, or stuttery character movement.

So the question is – why is communicating over a modern network like the Internet so prone to odd lapses of performance when traditional land-line telephone services were (and still are) so reliable? The answer is that traditional telephone networks send data as a constant stream of information, while over the Internet, data is transmitted as “packets”. Each packet is a large group of data bits stuck inside a sort of package, with a header attached giving the address of where the data is going. This is why it is like posting a letter: a packet is like a parcel of data sent via an electronic “postal service”.

But this still doesn’t really answer the question of why Internet performance can be so prone to slow down, sometimes seeming almost to stop completely. To see this we can use another analogy: the flow of packet data is also like the flow of cars on a motorway. When there is no congestion the cars flow freely and all reach their destination with little delay, so that good, consistent performance is enjoyed by the car’s users. But when there is overload and there are too many cars for the road’s capacity, then congestion results. Cars keep slowing down then speeding up, and journey times become horribly delayed and unpredictable. This is like having too many packets for the capacity in the network: congestion builds up, and bad delays – poor performance – are the result.

Typically, Internet performance is assessed using broadband speed tests, where lots of test data is sent out and received by the computer being tested and the average speed of sending data and of receiving it is measured. Unfortunately, speed tests don’t help anyone – not even an expert – understand what people will experience when using real applications like an online game. Electronic engineering researchers at Queen Mary, University of London have been studying these congestion effects in networks for a long time, mainly by using probability theory, which was originally developed in attempts to analyse games of chance and gambling. In the past ten years, they have been evaluating the impact of congestion on actual applications (like web browsing, gaming and Skype) and expressing this in terms of real human experience (rather than speed, or other technical metrics). This research has been so successful that one of the Professors at Queen Mary, Jonathan Pitts, co-founded a spinout company called Actual Experience Ltd so the research could make a real difference to industry and so ultimately to everyday users.

For businesses that rely heavily on IT, the human experience of corporate applications directly affects how efficiently staff can work. In the consumer Internet, human experience directly affects brand perception and customer loyalty. Actual Experience’s technology enables companies to manage their networks and servers from the perspective of human experience – it helps them fix the problems that their staff and customers notice, and invest their limited resources to get the greatest economic benefit.

So Internet gaming, posting letters, probability theory and cars stuck on motorways are all connected. But to make the connection you first need to study electronic engineering.

 

Today’s puzzle

Download a printable version

Festive kriss-kross puzzle.

The 11 words to fill in the squares in the puzzle above are: Advent, Bauble, Cards, Chimney, Decorations, Presents, Reindeer, Sleigh, Snowman, Stocking, Tree. Answer tomorrow.

From an earlier puzzle “You might wonder “What do these kriss-kross puzzles have to do with computing?” Well, you need to use a bit of logical thinking to fill one in and come up with a strategy. If there’s only one word of a particular length then it has to go in that space and can’t fit anywhere else. You’re then using pattern matching to decide which other words can fit in the spaces around it and which match the letters where they overlap. Younger children might just enjoy counting the letters and writing them out, or practising phonics or spelling.”

 

Previous Advent Calendar posts

CS4FN Advent – Day 1 – Woolly jumpers, knitting and coding (1 December 2021)

 

CS4FN Advent – Day 2 – Pairs: mittens, gloves, pair programming, magic tricks (2 December 2021)

 

CS4FN Advent – Day 3 – woolly hat: warming versus cooling (3 December 2021)

 

CS4FN Advent – Day 4 – Ice skate: detecting neutrinos at the South Pole, figure-skating motion capture, Frozen and a puzzle (4 December 2021)

 

CS4FN Advent – Day 5 – snowman: analog hydraulic computers (aka water computers), digital compression, and a puzzle (5 December 2021)

 

CS4FN Advent – Day 6 – patterned bauble: tracing patterns in computing – printed circuit boards, spotting links and a puzzle for tourists (6 December 2021)

 

CS4FN Advent – Day 7 – Computing for the birds: dawn chorus, birds as data carriers and a Google April Fool (plus a puzzle!) (7 December 2021)

 

CS4FN Advent – Day 8: gifts, and wrapping – Tim Berners-Lee, black boxes and another computing puzzle (8 December 2021)

 

CS4FN Advent – Day 9: gingerbread man – computing and ‘food’ (cookies, spam!), and a puzzle (9 December 2021)

 

CS4FN Advent – Day 10: Holly, Ivy and Alexa – chatbots and the useful skill of file management. Plus win at noughts and crosses – (10 December 2021)

 

CS4FN Advent – Day 11: the proof of the pudding… mathematical proof (11 December 2021)

 

CS4FN Advent – Day 12: Computer Memory – Molecules and Memristors – (12 December 2021)

 

 

CS4FN Advent – Day 13: snowflakes – six-sided symmetry, hexahexaflexagons and finite state machines in computing (13 December 2021)

 

CS4FN Advent – Day 14 – Why is your internet so slow + a festive kriss-kross puzzle (14 December 2021) – this post

 

 

 

CS4FN Advent – Day 9: gingerbread man – computing and ‘food’ (cookies, spam!), and a puzzle

Computing- and food-themed post on cookies and spam + a puzzle.

Welcome to Day 9 of our CS4FN Christmas Computing Advent Calendar. Every day between now and Christmas we’ll publish a post about computer science with a puzzle to print and solve. You can see all our previous posts in the list at the end.

Today’s post is inspired by the picture on the advent calendar’s door – a gingerbread man, so we have a food-themed post. Well… food-ish.

Festive gingerbread man, wearing a mask. Safety first!

1. Cookies, but not the biscuit kind

Imagine you have a Christmas gift voucher and want to spend it in an online shop. You visit the website and see an item you’d like so you click ‘add to basket’ and then look for some other things you’d like to buy. You click on another item to find out more about it but suddenly your basket is empty! Fortunately this doesn’t usually happen thanks to cookies, which are tiny computer files that can make your website visit run smoothly.

Websites ask you if they can put these cookies on your computer. If you say ‘yes’ that lets them see that you are the same person as you add new things to your basket. It would be no use if you added your second item and the website decided that you were now a completely different person. Some cookies help the organisation know that you’re still you, even when you’re viewing lots of different pages on their website.

Cookie image by congerdesign from Pixabay

Other cookies mean that you don’t have to keep logging in every time you click on a new page within the website. It would be very annoying if you had to do that.

Some cookies are there to help the organisation itself. They let them see what people are clicking on when they’re on the organisation’s website, and what path they follow as they visit different pages. They can also tell what device someone is using (a phone or a computer) so they can make sure the information is set to be the right size on their screen.

If people are logged in then the website knows who they are. Because of this, organisations have to be very careful about how they use this information, to protect their visitors’ privacy. If they don’t take care then they are breaking the law and can be fined a lot of money.

Further reading

Cookies (no publication date given) – from the ICO – the Information Commissioner’s Office.

 

 

2. The recipe for spam

These days when people talk about “spam” they are talking about unwanted emails from strangers. The word spam comes from a tinned meat product which, because of a comedy sketch by Monty Python, now also means “email messages that no-one can avoid”.

by Paul Curzon, QMUL. This post was originally published on the CS4FN website.

Fighting spam

Monitor screen showing spam in the mailbox

Shutting down spammers is tough for the authorities, so the internet’s arteries go on getting plugged up by spam. The best strategy against it so far seems to be filtering out junk emails from your inbox. Lots of early spam filtering relied on keeping lists of words that appear in spam and catching emails that contained them, but there were plenty of problems. For one thing, certain words that turn up in spam also appear sometimes in normal emails, so perfectly innocent messages sometimes ended up in the spam filter. What’s more, spammers have ways of eluding filters that simply check words against a list. Just me55 a-r-0-u-n-d w1th teh sp£lling.

Finally a simple but ingenious idea surfaced: instead of trying to keep a list of spammy words, why not try and teach computers to recognise spam for themselves? There’s a whole branch of maths about probability that researchers began to apply to spam, and a programmer called Paul Graham made the strategy famous in 2002 when he wrote an essay called A Plan for Spam.

Spammy maths

Paul Graham suggested that you could analyse the words you get in a sample of your email to see what the chances are that a particular word would appear in your real messages. You could do the same with a sample from your spam. Then you could look up any word in a new message and see whether it’s likely to be spam or your real email.

Of course, one word’s not enough to base your conclusion on, so Paul’s filter chose the fifteen most interesting words to look at. What that meant was that it grabbed the biggest clues to look at – words that, statistically, had the best chance of being in either spam or real mail, but not both. Then it used those clues to figure out the overall chance that an email is spam. It did this with an equation called Bayes’ theorem, which tells you how to figure out the chances of something being true given a set of facts. In this case Bayes’ theorem figures out the chances of a message being spam given the set of words in it.

What’s brilliant about the statistical approach is that not only does the computer learn as it goes on, meaning it keeps up with spammers’ tricks automatically, it can learn what words are normal for each person’s email, so scientists working on Viagra wouldn’t have to worry about all their emails going in the bin.

On guard online

Spam filters now work well enough that you can make your inbox pretty safe from the porky hordes of messages trying to invade. Wonderful news for the 99% of us who don’t have any use for dodgy meds, fake fashions and pyramid scams. As long as people keep buying into spam and the small group of overlords keeps turning computers into zombies, we’ll need to keep our defences up.

 

3. Today’s puzzle – the melting snowman

A picture showing several snowmen, drawn by Paul Curzon.

Instructions

One of the snowmen keeps disappearing! Is it melting or just flying
away, and which one is it?

Cut out the picture along the straight black lines, to give three
rectangular pieces. Then follow the simple algorithm and see the
snowman disappear before your eyes.

1. Put the three pieces together in the original positions to make the picture.
2. Count all the snowmen.
3. Swap the position of the top two pieces over so the top and bottom halves of the snowmen line up again
4. Count the snowmen again.

One snowman has disappeared!

Put the pieces back and you will find it reappears.

The explanation and answer will arrive in tomorrow’s (blog) post 🙂

 

4. Answer to yesterday’s puzzle

Here’s the answer to Daniel’s puzzle.

 

5. Previous Advent Calendar posts

CS4FN Advent – Day 1 – Woolly jumpers, knitting and coding (1 December 2021)

 

CS4FN Advent – Day 2 – Pairs: mittens, gloves, pair programming, magic tricks (2 December 2021)

 

CS4FN Advent – Day 3 – woolly hat: warming versus cooling (3 December 2021)

 

CS4FN Advent – Day 4 – Ice skate: detecting neutrinos at the South Pole, figure-skating motion capture, Frozen and a puzzle (4 December 2021)

 

CS4FN Advent – Day 5 – snowman: analog hydraulic computers (aka water computers), digital compression, and a puzzle (5 December 2021)

 

CS4FN Advent – Day 6 – patterned bauble: tracing patterns in computing – printed circuit boards, spotting links and a puzzle for tourists (6 December 2021)

 

CS4FN Advent – Day 7 – Computing for the birds: dawn chorus, birds as data carriers and a Google April Fool (plus a puzzle!) (7 December 2021)

 

CS4FN Advent – Day 8: gifts, and wrapping – Tim Berners-Lee, black boxes and another computing puzzle (8 December 2021)

 

CS4FN Advent – Day 9: gingerbread man – computing and ‘food’ (cookies, spam!), and a puzzle (9 December 2021) – this post