markdown guide

Memory is when you want to remember something. If you remember that you got a lollypop that you want to eat later. That is called memory.
A computer also remembers things. In computers that is called "memory". That is split into two different parts. One is called "RAM" which is like when you remember something in your head and can answer straight away when asked. Another is called "DISK" (normally a hard drive) which is like when you write something down in a notebook and when asked about it, it takes time to access it (depending how big the notebook is and how fast you can go through the notebook) as you have to go through the notebook.


And a child could ask back:

  • So I can remember to eat an unlimited amount of Lollypops?
    • How do I keep track of already eaten Lollypops?
  • Why would I write something in a notebook, if I could just remember everything in my head?



I would answer:

  • So you can remember to eat however many lollypops your parents let you eat.
  • You keep track of them in the same way you remember the lollypops that you haven't eaten yet.
  • You write things in the notebook when there are to many things to remember in your head.

It's a big sheet of paper with a number on each line.

You can write anything you want on each line but are limited to whatever can fit in that fixed amount of space. You can also erase whatever is on the line and replace it with something else later if you want.

You can look stuff up later by number, making it so that you don't need to remember everything that was written on each line, just which line(s) to find it on.

You can make all sorts of neat things happen if you come up with special rules that tell you which lines to look at or change the contents of in which order, and can even place those instructions in memory so that they can make changes to the rules themselves.

From there, it gets pretty complicated. πŸ˜„


RAM (random access memory) is digital memory. Now measured in gigs and terabytes, it can load and retrieve data much faster than an HDD, which is mechanical. That’s why, on startup, computers load parts of the OS or any programs you specify into RAM for quick retrieval. Generally, when techs talk about computer memory, they mean RAM.


You are holding a book. You can read that book at any time -- look at its pictures, take in its words. However, you can only hold a small number of books without dropping them -- making a mess, and getting told off.

To swap for a new book, you have to walk to the bookshelf. This takes time. The bookshelf can hold a lot more books ... but you have to find the one you want. This also takes time.

The book you're holding is in RAM -- quick access, limited space. The books on the bookshelf are on a Disk -- slow access, more space.

(... And that's about where the analogy falls down.)


It's like a row of coat pegs at school. Each coatpeg has a number, so you can be told to go to it easily.

You can hang only one thing on each coat peg, and it's really quick to go and get them, but there's only so many pegs, so you can run out.

A peg might be empty, or it might have a coat on it. If you want to put a coat on a peg, you can only do so if there's not a coat there already, or you take the old coat off first.

Computer memory is like that - lots and lots of numbered hooks, each possibly holding a single piece of information.

The hard disk is more like a big chest. It can store loads and loads of coats, but it's quite slow to get them, and you might have to lift out a number of coats to get to yours.


Shoe rack, you have limited space, you can put a number of shoe at a time. You can remove a shoe and keep that rack empty or new shoes in the future.


Programs are toys, memory are hands.
You can only play with things you hold in your hands.

Classic DEV Post from Nov 1 '19

How I Got Hired at DEV (and Every Other Tech Job)

Ben Halpern profile image
A Canadian software developer who thinks he’s funny. He/Him.