4 ms·
So, I guess what you're saying (correct me if I'm wrong) is that even though memory management (and register allocation, and other things) can be classified as
by marvy 8y ago
So, I guess what you're saying (correct me if I'm wrong) is that even though memory management (and register allocation, and other things) can be classified as "incidental", this is a dangerous label, because people are prone to then think "and therefore I can outsource these problems to a GC/compiler/whatever and not need to think or worry about them anymore" and then wonder why performance is so bad.
If that's your point then I agree, but I still think it's worth at least making a vague mental note that the problem is still incidental (and then carefully avoid the above conclusion).
- mattnewport 8y agoNot the OP but I think you're still missing his point. The argument is that it is fundamentally wrong headed to argue that the process of realizing software on actual hardware is incidental or not part of the actual problem in the same way that it would be wrong to argue that the laws of physics are not part of the actual problem for engineering. If you're building a road bridge you could say that the actual problem is getting vehicles from one side of the river to the other and not the engineering details required to realize a physical structure capable of doing that. Things like the tensile strength of steel would be no more important to the bridge builders than mere memory allocation is to the average programmer in a GC'd language. You could also argue that taking that approach would lead to bridges that fail as badly at their primary function as much modern software does.
- keldaris 8y agoThat's exactly right, thank you. It's a fundamentally simple point often made by embedded and game programmers (perhaps most famously in recent years in Mike Acton's keynote at CppCon [1]), but most programmers seem to have completely written off most of what computer programming actually is as "incidental". [1] https://www.youtube.com/watch?v=rX0ItVEVjHc https://www.youtube.com/watch?v=rX0ItVEVjHc
- marvy 8y agoHmm... maybe I better watch this talk at some point and try to get this through my head better... When I saw the bridge example my reaction was basically "why would that result in bad bridges?" I feel slightly attacked when you say "written off". I don't mean to "write off" memory management as something undeserving of attention. I think that if performance matters at all, then even if you program in a GC'd language you better know roughly how your GC works and what it's good and bad at, and preferably have a plan for switching to a different GC if need be. More generally, "incidental" stuff deserves attention. It may very well deserve the MAJORITY of your attention. I don't want to "write it off". I just want to classify it properly. Am I increasing my own risk of creating bad software by thinking this way?
- keldaris 8y agoWell, there are two at least partly orthogonal points here - the teleological discussion over what computer programming actually is and the practical point regarding which mindset is more likely to lead to better software. I don't know that I can express my position on the former issue better than I already have in the form of a short comment suitable for this format (though I do recommend the talk I linked), so I'll leave that aside for now. On the latter point, however - and to answer your question regarding bad software - all other factors being equal, I think the answer is "probably, yes". The fundamental reason is that someone who is used to regarding memory management (which is really just one example among many) as incidental complexity to be outsourced away by default is less likely to reason carefully and intelligently about the actual implications of that decision. Just to pick a trivial example, someone who has internalized the RAII pattern in C++ without really understanding its implications may find it difficult to solve (or even find) memory fragmentation issues leading to bad performance - not something easily found in current profilers if you don't know what you're looking for already. There's a lot of issues like that which may seem either obvious or subtle depending on whether your mindset is to properly understand how the solution you've chosen actually works or regard it as incidental until proven otherwise. In the modern computer programming industry you can go a long way without really dealing with any of the issues I've mentioned. However, the fact that much of modern software is unbelievably bloated and slow for no good technical reason is indicative that perhaps it would be better if more programmers took direct responsibility not just for the code they actually write, but for the code they outsource to others, often without truly grappling with the implications of those decisions.
- marvy 8y agobefore I forget, thank you both for the discussion; reminded me why I signed up for HN :)