3 ms·
The statement is false on the face of it. I've learned over past year or so how computers work down to the gates with fragmented understanding of analog that im
by nickpsecurity 10y ago
The statement is false on the face of it. I've learned over past year or so how computers work down to the gates with fragmented understanding of analog that implements them. I've built compilers before, too. The subjects are orthogonal: you can fully understand what a computer is doing without ever understanding how compilers work. It's called assembly language. :)
I think the author really meant to say you have to understand some amount of how computers work and how compilers translate HLL's to them in order to fully understand why your HLL programs behave the way they do. That's the charitable interpretation. I'm actually writing this comment on a laptop sitting on a book that did that for me. It's called Write Great Code by Randall Hyde. Guy who made Art of Assembly Programming and HLA. It was enlightening.
- the_duke 10y agoYeah, I think a more appropriate statement would have been "If you don't know how compilers work, you don't know how software works".
- nickpsecurity 10y agoAgain, software in most HLL's that uses compilers. There's assembly, macro assemblers, and some HLL's close to the metal. For the later, you can get a list of what various constructs will look like as assembly, heuristics on what to use where, and still don't need to know compilers.
- the_duke 10y agoBut almost all software today is written in a high level language (above C). And even in C, optimizations can change your code quite a lot. So I do think having a basic udnerstanding of how compilers work under the hood should be required for every programmer. As I said elswhere, every proper programmer should write at least one toy language with a compiler and / or interpreter.