5 ms·
> “If you don’t know how compilers work, then you don’t know how computers work. If you’re not 100% sure whether you know how compilers work, then you don’t kno
by amelius 11y ago
> “If you don’t know how compilers work, then you don’t know how computers work. If you’re not 100% sure whether you know how compilers work, then you don’t know how they work.”
What nonsense. If you don't know how quantum mechanics works, you don't know how transistors work. If you don't know how transistors work, you don't know how computers work, etcetera.
- mozumder 11y agoMost electrical engineers do go through quantum mechanics in their modern physics classes, in order to understand how transistors work...
- JustSomeNobody 11y agoComputer engineering degrees get some too.
- ChuckMcM 11y agoI was thinking that same thing, and because I was minoring in CS during my EE degree I also got to do the compilers class with the rest of the CS majors (and a class on interpreters). But I get that you can understand a lot about computation without understanding compilers. Just as you can understand a lot about circuits without understanding quantum mechanics.
- andrewchambers 11y agoI think what you said is reasonable. We only approximately know how most stuff works.
- arethuza 11y agoI would doubt that it is even possible for an individual to completely understand a modern computer from the transistor level up to the top of the software stack - so we have to work with abstractions and their occasional leaks.
- gedrap 11y agoI agree with both of you, to some extent. I agree with you, as yes there's a line somewhere to be drawn and I didn't exactly like the tone of the quote. But there is some truth in the quote. Knowing how abstraction layers work, a couple of levels below the one you are working with, even if it is not something you would use in your day-to-day job, is extremely rewarding.
- noelwelsh 11y agoYou're correct, but I think the utility of knowing about compilers is underrated. There have been a few front page posts recently that demonstrate very naive machine models. E.g. a few days ago there was this post > Writing Go took me a little longer since I had to implement a lot of functionality provided for me in Ruby. However, for every task it also made me think about what the computer actually does. http://jorin.me/textstat/ http://jorin.me/textstat/ Building a naive cost model for Ruby isn't so difficult if you know how compilers work. Believing that Go provides a model of what the computer actually does is rather naive. Both of these can be addressed by spending a bit of time studying compilers.
- Someone 11y ago"Building a naive cost model for Ruby isn't so difficult if you know how compilers work" You also need to know all of ruby. In particular, if you do not know how flexible the language is, you may make the mistake of thinking that function call targets can be resolved at compilation time. With duct typing, that gets considerably harder. Another example is that you may have to know the way integer overflow works. Wrap around, throw, or silently convert to bigint all have different performance characteristics (luckily that's an edge case for most programs) Also, if you aren't naive, it gets really hard to build a naive cost model for Ruby. You start thinking "will they have complicated things by doing X (e.g. assuming that x.f is a function, and recompiling if that assumption gets invalidated) to get performance here?" all the time.
- jdmichal 11y ago> With duct typing, that gets considerably harder. Your hypercorrection from duct tape is bleeding into your duck typing. So named because "if it looks like a duck, it must be a duck."
- js2 11y agoIt so happens that the tape was originally called duck tape, so named because it was made by applying adhesive to duck cloth. The name duct tape came later, when it started being used in construction to seal duct work. Amusingly, modern duct tape is not certified for that use. None of this has anything to do with the duck referred to in duck typing. But I am now curious about the etymology of "duck cloth" and whether it has any relation to water fowl that quack. edit: "strong, untwilled linen (later cotton) fabric," used for sails and sailors' clothing, 1630s, from Dutch doeck "linen cloth" (Middle Dutch doec), related to German Tuch "piece of cloth," Danish dug, Old Frisian dok, Old High German tuoh, all of unknown origin."
- deleted 11y ago[deleted]