4 ms·
You can't write a program in C without knowledge of assembly, unless you're willing to defer debugging to someone who does. You can't write a line of code in a
by Cushman 15y ago
You can't write a program in C without knowledge of assembly, unless you're willing to defer debugging to someone who does.
You can't write a line of code in any language if you don't know, on some level, what it's doing in the machine (whether physical or virtual). Sure, you can, but you're not a programmer, you're a tinkerer. To really program, you need to know assembly.
But at some scale, your application becomes large enough that no one person, no matter how well they know the assembly it's compiled to, can hold the whole thing in their head at once. At that point, reliably adding a new feature isn't hard, it's impossible. There will be side effects you can't predict.
Abstraction isn't there for making hard things easy. It does, and that's nice, but that's not what we need it for. We need it to make impossible things possible.
- thibaut_barrere 15y agoAt some point, being able to forget about what's below is a rare skill. Focusing on building your app, without necessarily having to understand everything it depends on, is hard work if you're a bit curious.
- hello_moto 15y agoWhile that may be true for C but I found that it's not necessarily true for GWT -> JavaScript. Knowledge of the DOM API is more important than knowing JavaScript.
- gnaritas 15y ago> To really program, you need to know assembly. That's just an absurdly untrue statement.
- Cushman 15y agoWell you don't need to know opcodes, but that's an implementation detail. If you don't have at least a basic understanding of what the machine is doing, you will never be able to really understand the code you write.
- danso 15y agoLet's take someone who has learned Ruby outside of the classroom and is now attempting a relatively simple Ruby on Rails site. What disadvantages does he/she have not having studied assembly (as most com sci/engineers do at some point in their coursework)? Are these disadvantages major compared to, say, the disadvantages of not having learned HTML and attempting to be a RoR dev? I would guess no. But I've learned both assembly and HTML so I can't tell for myself how much either has influenced me in ways that I'm not conscious of. Except that I actually use HTML knowledge when designing RoR views.
- Cushman 15y agoRuby presents a VM; someone who understands the capabilities and limitations of that machine will be able to write Ruby code much more effectively than someone who does not, simply because they will understand what they are writing. It would not shock me if most Rails devs were in fact Ruby tinkerers; and there's nothing wrong with that, if that's all you need to do.
- jamesbritt 15y agoEvery time I've heard people discuss that level of concern over code speed or space considerations the topic turns to C extensions. I cannot recall ever hearing or reading about tuning ruby code for its VM. Or even C code. Perhaps that's because I've never had the need to be concerned about it, but if there exists any writings or conference video on this i'd be curious to take a look.
- thedufer 15y agoAll abstractions are leaky to some degree. There will be problems you don't understand if you don't know what's happening one layer down. This is not to say there's something wrong with being a tinkerer - but it is saying that there is a difference between a tinkerer and a professional. http://www.joelonsoftware.com/articles/LeakyAbstractions.html http://www.joelonsoftware.com/articles/LeakyAbstractions.htm... for better writing on this topic.
- deleted 15y ago[deleted]
- gnaritas 15y agoAnd you're still wrong. Ass loads of professional programmers don't know and won't ever use assembly; they are not tinkerers. Your use of the words tinkerer and professional are decidedly non standard and frankly I don't think you know what you're talking about. Being able to write slightly faster code than the next guy does not a professional make. In the vast majority of work you'll be called upon when writing applications in the real world, that will simply never matter. Real professionals know when the code is fast enough and move on to delivering real value on time for solving real business problems. They also know there more than one way to skin a cat and if you ever do hit a wall on one approach because the abstraction leaks that much, you can just try another approach. I don't need to understand the machine at every level of abstraction down to bare hardware to be able to make the machine work well. One needs a vague idea of how an abstract machine works, one does not need the details of how this specific machine works. Knowing x86 assembly will be virtually useless on most modern VM hosted languages. Even when you do find a bottleneck, algorithm choice is vastly more important than any fiddling you're going to do to get the compiler to generate better assembly or even hand coding it. The idea than one must know assembly to be a professional is just absurd and naive.
- ethyreal 15y agothis is exactly what I was think while reading the post! at some point abstraction isn't just a something to geek out on, it is necessary. maybe the problem is not know some assembly or at least some C when you write Objective-C or C++ you can write some really bad, inefficient code if you don't know the work the language underneath has to do. the same goes for the DOM and Javascript our assembly on the web.
- HoLyVieR 15y agoThe situation of CoffeeScript and Javascript isn't the same. All the existing debugging tool will only show you Javascript code when you want to debug. C is different on that point. Almost all (if not all) the IDE in which you can code and debug allow you to debug without having to ever see any line of assembly. You don't have to understand the generated assembly code to code in C, because you will never have to look at it. The situation of CoffeeScript would be like C if the only way to debug C code was to debug it in assembly.
- marekmroz 15y ago> All the existing debugging tool will only show you Javascript code when you want to debug The key word here is "existing". This is about to change with CoffeScript support being worked on in Firefox (and some plugins like AceBug) For details see: http://www.quora.com/CoffeeScript/Is-there-a-CoffeeScript-debugger-yet http://www.quora.com/CoffeeScript/Is-there-a-CoffeeScript-de...