5 ms·
I disagree with the premise. "Readability" is an excuse people use for writing slow code. It's not an inevitable tradeoff. Like, most of these people are not s
by bananaface 6y ago
I disagree with the premise. "Readability" is an excuse people use for writing slow code. It's not an inevitable tradeoff.
Like, most of these people are not saying, "we could do this thing which would speed up the app by an order of magnitude, but we won't because it will decrease readability." They have no idea why their code is slow. Many don't even realise it is slow.
My favourite talking point is to remind people that GTA V can simulate & render an entire game world 60 times per second, 144 times on the right monitor. Is that a more complex render than Twitter?
Computers are really fast, it doesn't take garbage code to exploit that.
- adamsea 6y agoIMHO it’s in part because of what I assume are different business models between a game like GTA and many / most businesses where a website / web app is core to their product. Different business models result in different environments in which to conduct software engineering; different constraints and requirements. IMHO constant and unpredictable change (which I assume happens less for games like GTA) is one of the big differences, as is the relationship between application performance and profit. But I like what you’re saying and would love to see that world.
- hkt 6y agoGTA V has graphics card requirements that, I suspect, may be quite large compared to Twitter. Although it is worth noting that GPU acceleration in the browser is increasingly a thing: https://support.mozilla.org/en-US/kb/upgrade-graphics-drivers-use-hardware-acceleration https://support.mozilla.org/en-US/kb/upgrade-graphics-driver... That being said, I don't think it addresses the problems with client side applications, although it may allow more complex ones.
- peacefulhat 6y agoWebsites like Twitter are not render bottlenecked. Even a software rendered game from decades ago like doom is doing more on the screen than Twitter.
- gowld 6y agoI don't have 8GB RAM to dedicate just to Twitter.
- Semiapies 6y agoHow long does it take to start up GTA V on your computer?
- bananaface 6y agoMore than a website that preloads its structure into the cache and then transfers blocks of 280 characters, a name & a small avatar, rather than gigabytes worth of compressed textures. Is the difference because GTA has more "readable" code? I have other games that do load up quicker than Twitter, which I do think is damning, but it's not really the point I'm trying to get across here.
- Semiapies 6y agoWell, the "less readable code"—ie, the goddamn mess that a lot of game code is, slapped together barely under deadline by staffs working 80 or more hours a week—is part of why AAA games like GTA have so many massive bugs requiring patches immediately after release. But then, you brought up GTA and games, which aren't even apples and oranges with a website. Websites—even the Twitter website—don't require GPUs or dedicated memory, they don't have the advantage of pulling everything from the local hard drive, and yet they actually work as designed, not merely in a low-resolution, low-effects mode on computers more than a couple years old. And while I wouldn't point out the Twitter home page as remotely fast for a web site, have you actually even looked at it recently? It shows a lot more than just a few tweets and avatars. It's got images, embedded video, etc.
- bananaface 6y agoThis is a dumb argument. My point is that readable doesn't imply slow, and "readability" is not actually the reason slow things are slow, most of the time. I don't think you even disagree with me. There's definitely another discussion to be had about why web tech is so disastrously slow given what computers are capable of, but it's not worth having here. We're never going to settle that one, and regardless if you are a web guy, you're stuck with JS. >It's got images, embedded video, etc. Bad excuse IMO. Lazy load them.
- choicenotchance 6y agoThis is a really dumb comparison. GTA V literally has a hardware requirement that more than exceeds the requirement for a browser. It loads code from the local disk, and takes way more RAM than a single website ever would. It's written in lower level languages with manual garbage collection, meanwhile for web dev we rely on JS as its the only language for providing interactivity in websites, which tbh, has come a long way thanks to V8 RT. GTA V takes up like 100gigs of space. I shouldn't even have to bring up the websites part of the comparison here. Bottomline - saying if games can do complex 3D renders 60 times in a second, then why are sites slow af, is a really really meaningless comparison.