Is Granny sitting by the fire or beside the fire?
She is actually doing both since in many cases by and beside can be used interchangeably.
However, there are some cases where only by can be used:
Is both a preposition (indicates relation to another word) and an adverb (gives more information about a verb).
It is used to talk about:
By is used to mean 'not later than'.
I'll be there by 8am.
You need to be at school by 8:30am.
I need to leave for the airport by 2pm.
This painting was painted by Picasso.
This sculpture was created by Michelangelo.
This dinner was cooked by my mother.
The alarm can be turned off by entering this four-digit code.
The garage can be opened by using this key.
You can join the meeting by clicking on this link.
I live in a town by the sea.
She works in an office building by Green Park.
He likes to holiday by the mountains.
Beside only with a location
As you can see by has a variety of uses. Beside can only be used to replace by when it is related to location.
I live in a town beside the sea.
She works in an office building beside Green Park.
He likes to holiday beside the mountains.