Author Topic: the peril of settings  (Read 2597 times)

Kim

  • Timelord
Re: the peril of settings
« Reply #50 on: February 11, 2021, 07:10:20 pm »
Plug-in timers come in three categories:

- Mechanical ones which count the 50 Hertzes and therefore keep excellent time, with on/off setting precision in the 15 minute range, while making distracting ticking noises and using more power than the device you want to switch on and off.

- Standalone digital crap that belongs in the bin.

- Internet-of-shit.
Careful, Kim. Your sarcasm's showing...

Cudzoziemiec

  • Eating all the pies and drinking all the tea.
Re: the peril of settings
« Reply #51 on: February 11, 2021, 07:16:00 pm »
We were given one of the first sort by the police after a spate of burglaries in the neighbourhood. We've never used it. I guess Avon&Somerset have a warehouse of them ready to respond to burglary statistics.
Faster than a walk, slower than a train, often slightly higher than a person. (David Byrne)

Kim

  • Timelord
Re: the peril of settings
« Reply #52 on: February 11, 2021, 07:21:43 pm »
We were given one of the first sort by the police after a spate of burglaries in the neighbourhood. We've never used it. I guess Avon&Somerset have a warehouse of them ready to respond to burglary statistics.

We got given some LED tea lights.

I did add a few lines of code to make lights come on and off at random at night when we're not at home.  But there's a pandemic and we haven't been not at home to test it.
Careful, Kim. Your sarcasm's showing...

Jaded

  • The Codfather
  • Formerly known as Jaded
Re: the peril of settings
« Reply #53 on: February 11, 2021, 07:33:25 pm »
I imagine a tea light would be pretty scary for a Brummie neer-do-well.
If you don't like your democracy, vote against it.

citoyen

  • Occasionally rides a bike
Re: the peril of settings
« Reply #54 on: February 11, 2021, 09:24:13 pm »
I did add a few lines of code...

It's been a long day and I'm tired. Which is my excuse for imagining I just read Kim announcing "I did a few lines of coke..."
"The future's all yours, you lousy bicycles."

ian

  • feat. Undead Jess & Finestre, Queen of Hell
Re: the peril of settings
« Reply #55 on: February 11, 2021, 09:44:58 pm »
The magic plugs know when it's night and when it's day and so adjust things accordingly. This is the future. I always run an exceedingly sophisticated anti-burglar disco. Most of the sophistication is admittedly down to the fact I failed to change the timers in an orderly manner. I put some dedication in the driveway lights though as I receive instructions. It seems she can't change them, only order me to do so.
Support the Great Surrey Bear Census 2020

citoyen

  • Occasionally rides a bike
Re: the peril of settings
« Reply #56 on: February 11, 2021, 10:02:28 pm »
I consider it a genuine advance in technology that many modern devices are capable of remembering settings even after a power outage.

I remember reading in the mid 90s of a generation of older people being labelled "the flashing noughties" because they were unable to program the VCR, so that was what was displayed on the LCD. They could get their grandson to program it for them once, but unless he lived within easy walking distance, a power cut would mean them being stuck back where they started until his next biennial visit.

Mind you, I'm still not entirely used to my phone updating itself every time the clocks go forward or back and have to double check via multiple sources before I'm convinced it is showing the correct time without my intervention. It's not only connected devices though - my wireless-but-dumb central heating controller can remember the extremely complex programs I set up some years ago, even when the battery dies.
"The future's all yours, you lousy bicycles."

Kim

  • Timelord
Re: the peril of settings
« Reply #57 on: February 11, 2021, 10:26:57 pm »
Flash memory became practical and cheap over the course of the 90s.  It wasn't just about NAND flash memory cards and USB thumb drives making Zip disks and CDs obsolete at the turn of the century:  Cheap NOR flash was the death knell for battery-backed SRAM and various flavours of ROM at the bitty microcontroller end of the spectrum.  Remember when gadgets needed a little lithium cell to keep the memory powered while you changed the main battery?

Connected devices are another kettle of worms.  Computers are surprisingly bad at being clocks, and if you want to waste a couple of hours reading the citations in the tzdata comments, you'll find yourself wondering if the rot actually set in around the time the sundial was invented.
Careful, Kim. Your sarcasm's showing...

citoyen

  • Occasionally rides a bike
Re: the peril of settings
« Reply #58 on: February 11, 2021, 10:34:05 pm »
Remember when gadgets needed a little lithium cell to keep the memory powered while you changed the main battery?

Indeed. I was thinking about just that in relation to my heating controller - I have a vague feeling that it requires such a battery. But I've never changed it in ~15 years, as far as I can recall. Maybe I'll discover it has died the next time the main power source (2xAA) needs changing.
"The future's all yours, you lousy bicycles."

Kim

  • Timelord
Re: the peril of settings
« Reply #59 on: February 11, 2021, 10:36:56 pm »
Remember when gadgets needed a little lithium cell to keep the memory powered while you changed the main battery?

Indeed. I was thinking about just that in relation to my heating controller - I have a vague feeling that it requires such a battery. But I've never changed it in ~15 years, as far as I can recall. Maybe I'll discover it has died the next time the main power source (2xAA) needs changing.

Possibly only to maintain a real-time clock, rather than store the settings.
Careful, Kim. Your sarcasm's showing...

Cudzoziemiec

  • Eating all the pies and drinking all the tea.
Re: the peril of settings
« Reply #60 on: February 12, 2021, 10:31:39 am »
What exactly is 'flash' memory and why is it called 'flash'? This is the kind of question which, when answered, is liable to leave me my informed but unenlightened, but I'm asking it anyway.
Faster than a walk, slower than a train, often slightly higher than a person. (David Byrne)

Cudzoziemiec

  • Eating all the pies and drinking all the tea.
Re: the peril of settings
« Reply #61 on: February 12, 2021, 10:37:55 am »
Perhaps I should make that a more high-level question: how on earth do 'silicon chips' store things? What happens when something is 'remembered' on one? What gets rearranged and how does it then get interpreted into something humans can see, hear, etc?
Faster than a walk, slower than a train, often slightly higher than a person. (David Byrne)

ian

  • feat. Undead Jess & Finestre, Queen of Hell
Re: the peril of settings
« Reply #62 on: February 12, 2021, 10:43:25 am »
Basically, the chips are arrays of little boxes, like bazillions of egg boxes joined together, that are either empty or full (of electrons). Volatile memory means those boxes are leaky unless kept topped up, non-volatile means the boxes stay as you left them. But it's all 0s and 1s, all the information has to be encoded multiple times to get from these words to the binary data stored in memory.
Support the Great Surrey Bear Census 2020

citoyen

  • Occasionally rides a bike
Re: the peril of settings
« Reply #63 on: February 12, 2021, 11:07:31 am »
Basically, the chips are arrays of little boxes, like bazillions of egg boxes joined together, that are either empty or full (of electrons). Volatile memory means those boxes are leaky unless kept topped up, non-volatile means the boxes stay as you left them. But it's all 0s and 1s, all the information has to be encoded multiple times to get from these words to the binary data stored in memory.

It's really just as well electrons are very small.
"The future's all yours, you lousy bicycles."

ian

  • feat. Undead Jess & Finestre, Queen of Hell
Re: the peril of settings
« Reply #64 on: February 12, 2021, 11:19:35 am »
That's the problem of smallness, eventually, you reach a point where quantum effects become significant. That's like putting one egg back in the box (one egg left, I'd eat it, to be honest, but that's a non-quantum effect), in one of the middle holes, and then the next day, opening the box and finding the egg has moved to the corner hole.

Obviously, if you have egg-based memory (or anything else based on the precise location of eggs), that's a problem. Fortunately, it's only noticeable if you have every small eggs. And you'd need a lot of those to make an omelette.
Support the Great Surrey Bear Census 2020

Re: the peril of settings
« Reply #65 on: February 12, 2021, 12:14:22 pm »
What exactly is 'flash' memory and why is it called 'flash'? This is the kind of question which, when answered, is liable to leave me my informed but unenlightened, but I'm asking it anyway.

In even more laymans terms, it doesn't remember what you put in there (as Ian says, "volatile").  We're currently trying to document for a customer that all the non-volatile memory (other than the obvious stuff, like hard drives) in one of our systems isn't capable of revealing their secrets should someone else get hold of it.
We are making a New World (Paul Nash, 1918)

ian

  • feat. Undead Jess & Finestre, Queen of Hell
Re: the peril of settings
« Reply #66 on: February 12, 2021, 12:31:51 pm »
Even non-volatile memory will eventually degrade. Any given electron may simply vamoose and pop up somewhere else which is a quantum effect so defined by probability. It's very improbable that an entire hen's egg will do this since every single component would need to do so at the same moment, but at the single electron level it is measurably probable.

To be more correct, in semiconductors, it's the empty holes in the egg carton that are important, not the eggs.
Support the Great Surrey Bear Census 2020

Cudzoziemiec

  • Eating all the pies and drinking all the tea.
Re: the peril of settings
« Reply #67 on: February 12, 2021, 02:00:45 pm »
Basically, the chips are arrays of little boxes, like bazillions of egg boxes joined together, that are either empty or full (of electrons). Volatile memory means those boxes are leaky unless kept topped up, non-volatile means the boxes stay as you left them. But it's all 0s and 1s, all the information has to be encoded multiple times to get from these words to the binary data stored in memory.
That's what I thought all along.

What was the question again?
Faster than a walk, slower than a train, often slightly higher than a person. (David Byrne)

Cudzoziemiec

  • Eating all the pies and drinking all the tea.
Re: the peril of settings
« Reply #68 on: February 12, 2021, 02:04:22 pm »
What exactly is 'flash' memory and why is it called 'flash'? This is the kind of question which, when answered, is liable to leave me my informed but unenlightened, but I'm asking it anyway.

In even more laymans terms, it doesn't remember what you put in there (as Ian says, "volatile"). 
So it's memory that doesn't remember?
 ???
I shall do my own research...
(click to show/hide)
Faster than a walk, slower than a train, often slightly higher than a person. (David Byrne)

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: the peril of settings
« Reply #69 on: February 12, 2021, 02:07:13 pm »
Mmm... Egg and chips  :P

Kim

  • Timelord
Re: the peril of settings
« Reply #70 on: February 12, 2021, 02:26:11 pm »
Perhaps I should make that a more high-level question: how on earth do 'silicon chips' store things? What happens when something is 'remembered' on one?

The lies-to-children version of the main flavours of computer memory:
  • A circuit that's permanently wired in a certain way.  This one always outputs '1', that one always outputs '0': it's a Read Only Memory (ROM).  More useful that it sounds, for storing things like which combination of segments to light up to display which number on your digital watch, or the basic program that a computer needs to check it's not broken, find a disk drive and start loading an operating system.  Can usefully be constructed out of fuses: It starts out as all '1's and if you want a particular bit to be a '0', you apply high current and blow that fuse, making it Programmable (but only once) Read Only Memory - PROM.  Doesn't need power, and keeps its contents effectively forever.
  • Then there's the 'bistable' or 'flip-flop' circuit: An electrical circuit that, as the name suggests, will happily settle into one of two stable states.  There will be an output that is on when it's in in one state but not the other.  There will also be inputs that allow you to nudge it from one state to the other by applying different combinations of voles or no-voles.  When you turn the power off, it loses its state, and when you turn it back on it will settle into one state or the other, at the whim of physics (unless circuitry is present to ensure it starts up in a particular condition).
    This is more or less how SRAM[1] and DRAM[2] work - they're simple to build (even out of things like relays and vacuum tubes if you've got a big enough room and lots of electricity) and nice and fast, but require power to maintain their contents.  This will be what your computer uses for random access working memory.
  • Capacitors: A thing that stores a charge (like a battery, but using physics rather than chemistry - you'll be familiar with them providing standlight power in dynamo lights).  Have a circuit to charge or discharge it in response to an input and then disconnect the power source to leave it in the desired state.  Some more circuitry senses the voltage at the capacitor and provides an output.  This is how EEPROM (Electrically Erasable PROM) works, and - perhaps unintiutively - most modern camera sensors[3].  It's slow and relatively expensive, but keeps its contents for a long time without external power.
  • Flash memory: Same basic principle as EEPROM, but with much smaller capacitors that are effectively part of a transistor.  We're into fiendishly clever semiconductor physics, and the word 'quantum' is bound to crop up at some point.  Suffice to say, it lets you build circuits that behave a lot like EEPROM, but more cheaply and at much higher storage densities.  It keeps its contents without power and is faster than EEPROM, but a bit more sensitive to long-term wear and ionising radiation.  This is what [any computer built this decade - Ed] uses for file storage, and it's frequently used as an alternative to *ROM for bootstrapping computers large and small (hence "re-flashing the BIOS" or "re-flashing the firmware").
  • Spinning rust, magnetic tape, optical and magneto-optical discs, punchycards, etc. - all that other stuff that isn't based on silicon, becoming increasingly obsolete as flash memory becomes cheaper and more dense.  You've probably got a decent idea how these work already.  Notable in a computing context for being used as 'storage' rather than 'memory'[4] - it would be a very slow computer that used any of these for its RAM.

Quote
What gets rearranged and how does it then get interpreted into something humans can see, hear, etc?

As any good hacker movie will tell you, "it's all just ones and zeros".  What I've described above covers a single one-or-zero 'bit'.  To do anything useful, you need a metric fuckload of them.  8 bits gives you a byte, which can hold one of 256 possible values, for example a number between 0 and 255, or between -127 and 128.  That's starting to become useful, as you have enough values to hold one character from most alphabets, in upper and lower case, with room for some punctuation and things like 'backspace', 'carriage return' and 'end of file'.  Given enough kilobytes, you can store and manipulate useful amounts of text.

Images, well, we could use that text to store a list of instructions: Draw a horizontal line this long; draw a vertical one twice as long at the end; join them up, fill it in.  That's vector graphics, and while it's extremely useful, it went out of fashion for most purposes as computer memories got big enough for:

Bitmap graphics:  Start at the top left corner; fill the pixels with balck, white, black, black, black, white, black; next line: black, black, white, white, white, black... etc.  One bit for each pixel, and with a few hundred bits you've got a grainy black & white image.  Want colour?  No problem.  Let's use three bytes for each pixel, giving the relative amounts of red, green and blue.  Yay, colour.  Cripes, what a lot of bytes.  Maybe a few million.

Want video?  Well, it's just 25 of those every second.  Gigabytes.

Audio?  Well, as found on the back of your record player, it's just a voltage somewhere between -1 and +1 volts.  We can map that to a value between -127 and 128 and store it in a byte.  Do that a few thousand times a second, and feed it through the right circuitry to convert it back to analogue and drive a speaker, and you've got sound.  Megabytes.

The thing that's made modern digital audio and video possible is clever programs that can take an image or audio file and work out a series of instructions to re-create it that's smaller than the original file.  Instead of saying "black; black; black, white, black, black, white, white" you might say "three black, one white, two black, two white" (this is how GIF and fax works).  For video you can compare the difference between the frames and just copy the stuff that hasn't changed from the last one (MPEG).  For audio you can look at what frequencies are present in the signal at any given time, and throw away the insignificant ones (MP3, AAC, etc) and hope that nobody hears the difference.

It's algorithms all the ways down.



[1] Static and Dynamic Random Access Memory, respectively.  'RAM' comes from the early days of computing, when the distinguishing feature was that you could read or write to any part of it at any time, rather than spooling through a paper or magnetic tape.
[2] This is a lie, DRAM relies on the charge in a capcitor being constantly refreshed, but that's not important right now.
[3] It turns out you can also discharge the capacitor by shining light on it, due to the photoelectric effect - arrange your memory bits in a line or grid, and you've got some pixels.  There was also a predecessor to EEPROM, EPROM, where the erase process required you to shine ultraviolet light through a little window in the chip package - same principle.
[4] "A place to keep files" and "What the computer' currently thinking about".  Non-trivial computers, like your phone or laptop will use SRAM or DRAM for RAM, and flash memory (or magnetic disk) for storage.
Careful, Kim. Your sarcasm's showing...

ian

  • feat. Undead Jess & Finestre, Queen of Hell
Re: the peril of settings
« Reply #71 on: February 12, 2021, 03:26:57 pm »
It's all ultimately quantum mechanics. Which, brilliantly, no actually really understands. But it works.
Support the Great Surrey Bear Census 2020

Re: the peril of settings
« Reply #72 on: February 12, 2021, 04:04:05 pm »
Richard Feynman reportedly said "If you think you understand quantum mechanics, you don't understand quantum mechanics,” and he wasn’t joking. Speaking of which.


Bananas: they just work

Re: the peril of settings
« Reply #73 on: February 12, 2021, 04:14:07 pm »
Richard Feynman reportedly said "If you think you understand quantum mechanics, you don't understand quantum mechanics,” and he wasn’t joking. Speaking of which.


Bananas: they just work
Using a Biro on a bananananana is exceptionally satisfying.
ETA: And yes, that's the end which monkeys open them.

Re: the peril of settings
« Reply #74 on: February 12, 2021, 04:19:03 pm »
Richard Feynman reportedly said "If you think you understand quantum mechanics, you don't understand quantum mechanics,” and he wasn’t joking. Speaking of which.


Bananas: they just work
Using a Biro on a bananananana is exceptionally satisfying.
ETA: And yes, that's the end which monkeys open them.
But:
There is nothing better in life
Than writing on the sole of your slipper with a Biro.