1,889 karma · joined Nov 25, 2022 (4y ago) · 747 submissions
comment 2y ago · link · parent
comment 2y ago · link · parent
So you write the code with algorithm X. You potentially might not know the complexity, depending on how extreme you are with this philosophy, but let's say it's O(n^2). You run it on your test data. It's too slow because of some unneeded deep copies. You change that. Now it's fast enough. It gets merged.
3 years later, you're experiencing integration test failures, because scaling up your system has caused this algorithm to make things time out. No problem: you'll simply look into it and optimise it. Except you can't. Thanks to leaky abstractions, threading-models, or just an inherent quality of the code, changing this algorithm to something with a lower complexity becomes a major refactor. Pray you don't have external APIs or stakeholders depending on it.
So, not only have you wasted the time polishing the O(n^2) algorithm, you also now have a huge technical debt from what can simply be described as inadequate forethought.
The 'simple code now, polish later' process - which is really just 'move fast and break things' in a different shade of paint - means you never learn to internalise the easy wins. It also paradoxically portrays optimisation as both too complex to do initially but trivial to do later. It's not the latter. Having a good gut-feeling of algorithms or the Kafkaesque way memory works is not something that is learned over the course of a JIRA ticket - it's learned over the course of years, treated as any other code-quality concern. For comparison, you could close many tickets quickly by using a global variable to pass data around. But you don't. You make sensible, idiomatic changes to make sure things are stored and accessible where makes sense. Optimisation is the same: there is a lower bound below which it's unacceptable, even if it's not something that fails requirements.
StructuredProgrammingWithGoToStatements was written in 1974. It doesn't track well to modern computing models. I have more L1 cache than he had main memory. I do accept that the vast majority of bugs were from this, 50 years ago. I don't accept that's still true today. It's still a useful thing to teach new learners so they learn how to prioritise their development but as professionals creating novel things we need to have a certain level of planning ahead. And pride.
It's also a tautology. If the optimisation is worthwhile, it's not premature. If the optimisation is noncritical, it's premature.
My example above is not fanciful, by the way. Off the top of my head, Windows, Python and C++ all had/have trouble with some performance loss due to the fallout from earlier decisions and difficulty rectifying it once the world is built on top of it. I've run into similar problems at my own jobs, particularly anywhere that uses microservices. You can't avoid all of these but you should avoid those you can.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
The TAM is saturated. Taking share from Android is difficult. Making more humans use smartphones is difficult. Making more humans is difficult. Extracting more rent is not. So the idea that the security is more important for future revenues than the ability to exploit the userbase doesn't hold up, particularly when there isn't and can't be an alternative with a different security model.
comment 2y ago · link · parent
It's only because Apple's legal wrangling failed that Android even exists today.
comment 2y ago · link · parent
Because, when you buy an Apple device, they shove free trials for subscription services down your throat in the hopes that you'll do exactly this. And it's not strange that they don't use it: the first thing you discover after starting the free trials is that they're useless and full of shovelware.
comment 2y ago · link · parent
comment 2y ago · link · parent
I don't buy that it suddenly takes 5 times longer to make a game. Voice acting and mocap FMVs are self-inflicted wounds. There are some genres like 'imsims' and metroidvanias which are so strongly defined by a few beleaguered series that talented indie devs have picked up the slack. Their great challenge is not making a good game, it's making the game be seen. Make a game with a similar team size but using an IP people remember fondly and you've got a hit. At worst, you've wasted a fraction of the budget Rockstar are spending on bespoke concrete textures.