Re:9 truths that computer programmers know that most people ...
by captn3m0 on Sunday March 08, 2015 @11:31AM
(#9165863)
Could someone expand on this:
>How a single number can be used to represent the answers to a set of yes-no questions.
Re:9 truths that computer programmers know that most people ...
by neilk on Sunday March 08, 2015 @12:39PM
(#9166125)
Think about how everything in the computer is represented as binary ones and zeroes. That's kind of weird. When a non-programmer counts 5 items in the real world, they don't think of it as being equivalent to saying "101", or "YES NO YES".
Now imagine you have a set of questions like that, to be stored for kajillions of items. You can efficiently pack those yes-no questions into a single number for each item. Like, in the unix file permission system, 5 expands out to "let others read this; don't let others write this; let others execute this".
Re:9 truths that computer programmers know that most people ...
by captn3m0 on Sunday March 08, 2015 @02:11PM
(#9166479)
The unix perms bit made me understand it. Thanks.
Re:9 truths that computer programmers know that most people ...
by untrothy on Sunday March 08, 2015 @12:23PM
(#9166057)
Off the top of my head and according to what he meant by single number:
- As a single entity: I usually think in decimal so you could write a "single" decimal number (e.g. 234) and convert it to binary and the 1 and 0 character mean Yes / No.
- As a single character: You could just write a random character (e.g. ॐ ), specifying that is has to be interpreted as a number in Base N+1 and ॐ + 1 = 10. This is useless though.
In my experience, one of the most counterintuitive truths that (good) programmers understand is that security is, in most cases, the opposite of obscurity. It's really hard to explain to a non-programmer that the most secure system is the one that everyone understands perfectly.
I could go on... there are lots more. Like, the mythical man month is something most of us know about now. The deep relationship between randomness and compressibility. Cryptographic hashing. How a single number can be used to represent the answers to a set of yes-no questions. And so on.