HACKER Q&A
📣 chirau

What would you say is the single most important idea across all of CS?


What would you say is the single most important idea across all of CS?


  👤 juangacovas Accepted Answer ✓
Basic bit and byte knowledge, like some other "foundation" stuff. Basically, that everything in computers are numbers under the hood.

A bunch of things I can just think where the bit and byte stuff has helped me:

- Database structures: smaller is usually faster, and you save storage. If you know a column can only store numbers from 0 to 16, make it TINYINT UNSIGNED (one byte, 8 bits) instead of 4 bytes (32 bits). Think of x4 storage gain, think when you have hundred of thousands of rows...

- Encoding stuff: learn some hexadecimal to be able to scratch your head around the bytes of anything instead of being blind about it.

- For critical or limited storage (or making smaller packets/transfers), you can use "bit masks". Instead of using 8 bytes for 8 flags, you can use just one byte (8 bits) and just "flag" each bit of it.

Etc.


👤 elviejo
Abstraction: extract the essential for this problem in this situation and make it so easily to understand for someone with domain knowledge.

Composition: the output of a function/ program / server should be digestible by another function / program / server that doesn't know anything about the first one.


👤 snow_mac
Dry. Don’t repeat yourself

👤 mister_hn
The ACID test