4 ms·
I agree that the answer is not exactly "No", but I disagree with most of your points. Building reusable components, coding at a low level and building a flexib
by bsaunder 17y ago
I agree that the answer is not exactly "No", but I disagree with most of your points.
Building reusable components, coding at a low level and building a flexible architecture all take considerably more effort than their alternatives, IMHO.
That being said, it makes sense to have the big picture in mind for the first time around and to take some small considerations on the way.
Avoid doing inherently bad things like schlepping around tons of unneeded data and not doing some simple caching.
Like the recent post about embracing technological debt, much of the early work may be discarded before it see the light of day so no point in over investing.
Rather that doing lots of things right the first time, I spend more effort not tightly coupling the pieces so that when you have to write something twice (and you will), it's a clean separation. I'd get the processor intensive stuff done with as little effort as possible (and likely barely fast enough), but in a way that I could rip that part out and plug in some native code when the time came.
- MicahWedemeyer 17y agoMy favorite examplei is naked SQL vs an ORM. The ORM will never be able to write queries that perform as well as if you write them all by hand. But, you'll be able to crank out functionality much faster. Eventually, if you're lucky, you'll have enough traffic to warrant going back and rewriting some of the ORM calls using a SQL query optimized by hand. Lastly, 99% of the time, the query you end up optimizing will not be the one you expected to when you started writing the app. That's because between when you started and now, the direction has changed significantly and you finally know what it is that you're really building.