4 ms·
To me an interesting question is why they bloat up. Is it all mindless waste or is there a tradeoff being made here?
by cle 5y ago
To me an interesting question is why they bloat up. Is it all mindless waste or is there a tradeoff being made here?
- legulere 5y agoOptimizing software costs developer time, so it’s only done when needed.
- fredsir 5y agoSo its about core values, it’s about principles. It’s because people focus on something else than craftsmanship and creating great things. Obviously, it’s because of how our society and culture is oriented. But I’d like to see that change.
- legulere 5y agoYou can put almost infinitely much effort into optimization. When do you stop? Do you test every user-interaction takes less than 100 ms below which it can be considered good?
- deleted 5y ago[deleted]
- loup-vaillant 5y agoI would hope so actually: someone needs to test every user interaction at least once, at which point we can notice if it's too slow.
- legulere 5y agoIt’s not as easy as that. What’s acceptable in test might not be acceptable in your customers conditions. It’s difficult to correctly measure the time for every interaction and humans are extremely bad at telling you how fast something is. Then you also have the problems of regressions that stem from other unrelated changes.
- loup-vaillant 5y agoI believe it can be made easy, if you have an easy way to profile your GUI. Test the feature, get a timer. If it took more than 20ms on your killer test machine, it might be too slow for some users. (Adjust your heuristic with the context of your application of course.)
- blacktriangle 5y agoMost devs would love to focus on craftmanship and creating great things. Most customers want their immediate problem solved as cheaply as possible. Unless you're in a market where customer's pay for craftsmanship, you will get undersold.
- fredsir 5y agoIt’s a cultural thing and cultures can and do change.
- vendiddy 5y agoI don't fully buy this argument. The bloat we see in many systems ends up slowing down development in the long run. Well defined interfaces and good composition support the goals of the author of lean software. They also happen to improve developer comprehension and reusability, both of which speed up software development in the long run.
- slver 5y agoWhen something doesn't matter, you don't spend time optimizing it. It's the natural behavior of systems.
- rosetremiere 5y agoIn my "software development" course at university (so, not programming, but every "management" thing around it: unit testing, git, waterfall/scrum, etc), I remember the instructor telling us that the first approach to making your program faster was upgrading the hardware. The more time passes, the more shocked I am at an instructor telling this to his students, to the point that I'm now thinking I might recall a cruder version of what was originally said. In any case, that may be the cause!
- mrweasel 5y agoTo some extend I don’t disagree with: “Just buy a bigger server”, but for software for laptops, home PCs or mobile it’s not a great option. If you’re trying to tweak every single query to get more performance from your SQL server, then maybe the money is better spend on hardware than developer time. Weird counter point to “buy more hardware”: I worked with a client who have some code they developed, it takes a dataset, run some calculation and returns the result. To speed up part of the calculation they use CUDA. We help migrate they system from older physical hardware to AWS, pretty standard. They got more memory, more CPU cores and jumped three generations of Nvidia GPUs. The result was 10% speed increase, no where near what hardware alone should have yielded, so clearly in this case there’s something in code that prevent the hardware from being fully utilised.
- mywittyname 5y agoIt's so much faster to develop wasteful software. It's also a lot easier. There's no need to use high-performance, but difficult to develop languages (c, c++). There's no need to be conscious of data structure choices. There's no need to profile code, etc. Optimizing code can be a deep rabbit hole. If you remember a few months ago, some random person dug into why GTA Online was taking longer each day to load. The reason turned out to be a string parsing inefficiency in the strlen method, a core library. But it only manifested itself in certain situations.
- hindsightbias 5y ago“Premature optimization is the root of all evil” - Knuth So the only exposure most students get is not to do it. I doubt any CS programs make performance analysis or optimization a requirement. Just buy a faster system.
- kwertyoowiyop 5y agoTell a Product Manager "I can do a preliminary version of that feature for the next release, but it'll be really inefficient" and they hear only "I can do...that feature for the next release."
- titzer 5y agoHuman effort and attention span are still limited quantities. There are so many more libraries, frameworks, utilities, and doodads, that it's easier to plug something together from lego blocks rather than craft (and debug!) a custom solution that is both efficient and small.
- dale_glass 5y agoWe do more things, and have more complex graphics. Eg, a 320x200x8 display has 64000 bytes of memory. A 4Kx32 bit display has 33177600 bytes of memory. That's 518 more times memory used just for a single screen. Take into account that these days we have compositors and each window is present in memory on its own, before it's composed into the result, and it's even worse. We also work on far bigger projects. The project I work on as a hobby has 400K lines of C++. Imagine the amount of processing an IDE needs to do to parse all of that and provide its various convenient functions. And of course a good chunk of that is in RAM, because that's far too much stuff to parse everything every time. Old tools also don't really cut it anymore. If I try running ctags on it, it comes up with a 14GB tags file. I don't think it handles it quite right.
- andrewmcwatters 5y agoThank you for mentioning ctags, even if it's not useful today. I wasn't aware of this tool.
- dale_glass 5y agoI mean, it depends on what you use it for. My project seems to confuse it in some way. But it should work perfectly fine for a lot of stuff.