Re:9 truths that computer programmers know that most people ...
by neilk on Sunday March 08, 2015 @03:15AM
(#9164895)
The fact that most software sucks is not exactly a secret. I'm not sure a "look how the sausage is made!! ZOMG!!" thing would surprise a lot of people.
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.
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 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.
Re:9 truths that computer programmers know that most people ...
by EpicEng on Sunday March 08, 2015 @01:42AM
(#9164829)
"And yes, counting from zero is slightly more efficient than starting at 1. Computers are built on a 0 and 1 numbering system that makes up everything (hello binary!). Counting from 0, is just easier and creates efficiency."
Um... yeah. Who wrote this exactly? An actual programmer? And what does binary have to do with it? I am a fan of 0-indexing, don't get me wrong, but certainly we don't do it for the sake of efficiency. If anyone knows better let me know, but as far as I am aware it has much more to do with a more natural expression of a set, as well as dealing with pointers whose first element lies 0 elements away.
Re:9 truths that computer programmers know that most people ...
by dmcg on Sunday March 08, 2015 @03:06AM
(#9164876)
I was thinking that his point here would be that we always have to consider the noop case, the empty list etc. But no, so this item ironically added nothing to the piece.
Re:9 truths that computer programmers know that most people ...
by jheriko on Sunday March 08, 2015 @03:09AM
(#9164883)
yeah, its a terribly misleading comment...
still he might be a programmer, just not a 'real programmer' - some kind of web dev or script kiddie, and therefore knows little or nothing about memory addressing
Re:9 truths that computer programmers know that most people ...
by codeonfire on Sunday March 08, 2015 @03:21AM
(#9164904)
> "It would be like taking apart a brand-new 747 and discovering that the fuel line is held in place by a coat-hanger and the landing gear is attached with duct tape."
At the museum of flight in Seattle there is a 747. It's the first 747 that was built and partially taken apart (or never put together in the first place). Halfway down the interior fuselage you can seen the terrifyingly small cable pulleys that transfer pilot commands laterally to the wing control surfaces. The track in which the cable runs seemed not much deeper than the cable itself. If, say, a suddent jolt of turbulence dislodged the cable, something not good might happen. I'm sure aero engineers would say this is how airplanes have always worked and there's no chance the cable will fail. Programmers do the same thing: This is the way the database/web service/storage has always worked and there's no chance it will fail.
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.
>How a single number can be used to represent the answers to a set of yes-no questions.
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".
- 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.
Um... yeah. Who wrote this exactly? An actual programmer? And what does binary have to do with it? I am a fan of 0-indexing, don't get me wrong, but certainly we don't do it for the sake of efficiency. If anyone knows better let me know, but as far as I am aware it has much more to do with a more natural expression of a set, as well as dealing with pointers whose first element lies 0 elements away.
Update: Fixed the post, I wrote it at 4am, and just pulled that part from another source.
"Who wrote this exactly? An actual programmer? "
Any other reason?
still he might be a programmer, just not a 'real programmer' - some kind of web dev or script kiddie, and therefore knows little or nothing about memory addressing
At the museum of flight in Seattle there is a 747. It's the first 747 that was built and partially taken apart (or never put together in the first place). Halfway down the interior fuselage you can seen the terrifyingly small cable pulleys that transfer pilot commands laterally to the wing control surfaces. The track in which the cable runs seemed not much deeper than the cable itself. If, say, a suddent jolt of turbulence dislodged the cable, something not good might happen. I'm sure aero engineers would say this is how airplanes have always worked and there's no chance the cable will fail. Programmers do the same thing: This is the way the database/web service/storage has always worked and there's no chance it will fail.