3 ms·
> That's because you are not using the power of postgresql... Isn't that a potential positive? I mean, yeah, and those darn programmers with their 'platform i
by sago 6y ago
> That's because you are not using the power of postgresql...
Isn't that a potential positive?
I mean, yeah, and those darn programmers with their 'platform independent languages'. Why are you not using the power of assembly?
- djur 6y agoThe very best ORMs are not anywhere near as good at 'compiling' their abstractions into platform-specific SQL than your standard C/C++ compiler is at producing optimized platform-specific machine code. Part of the reason for this is that SQL is already at a high level of abstraction comparable to the ORMs themselves; the relationship between Python and SQL is not comparable to the relationship between Python and assembly (or C and assembly, etc.)
- marcus_holmes 6y agoNo, it's really not. A better analogy than the language one: Your web app has to run on Firefox, Chrome, and... IE6 yay! You're not allowed to use any modern Javascript, or most of the API's you'd like to use. Because being able to switch to IE6 at any point in development is more useful than any of those fancy-dancy API's, right?
- sago 6y agoMeh. All analogies are partial. If there was an ORM that dealt with everything but a flaky end of life database, sure start working on it. But this is advocating picking one platform. Like creating Chrome-only JavaScript. I guess the nearest thing with Electron. Yeah the analogies breakdown at some point. I don't think anything is black-and-white. I just think the vast majority of Django apps are fine with Django's ORM. This article smacked of premature optimisation.
- marcus_holmes 6y agoI always get the feeling that people love ORMs because they don't want to learn SQL. Because if you do learn some SQL, then the problems with ORMs become annoyingly apparent. I agree that most Django coders will be fine with the ORM. I guess I don't see that as a good thing, though.
- sago 6y ago> I always get the feeling that people love ORMs because they don't want to learn SQL. I suspect that's the problem. It's neither my feeling or my experience. Every platform/language/OS/chip I know has annoyingly apparent problems. In my experience high-self-conidence-low-self-awareness folks are too keen to drop-level and 'make it right'. And love feeling how smart they are ('everyone who disagrees is obviously not as smart!) Too often 'smart-guys' cost more, long term. And I'm not ragging on you. That was me in my 20s. Embarrassingly.
- marcus_holmes 6y agohehe, I'm in my 50's and have been doing this for >25 years. I still don't know where that line is
- jordic 6y agoAgree, at least for me, I don't discovered the sqlsuperpowers till I got inside it... I would love to see some of this pretty clever orm migrations applied on a busy potgresql server.. with a bit of concurrency... :)
- fr1tkot 6y agoimagine hating working with databases so much you'd want to spin not being able to use modern databases amazing features as a "potential positive" just so you don't have to deal with them...
- VBprogrammer 6y agoIf people had the same opinion when it came to web browsers we'd be in a pretty sorry state.
- sago 6y ago"Imagine hating databases" ... "just so you don't have to deal with them" Do you normally respond to issues by trying to characterise people? Imagine this fictional world where anyone that disagrees with me is incompetent. In my experience, I think working with database specific functionality is like dropping to lower-level of code generally. Something I have done in ORM->Raw SQL and C->Assembly. There is a point where the price in development cost, testing development time, platform lock-in, reduced code reuse IP, subset of experienced programmers within the team/salaries/training, loss of access to future updates and bug fixes, and so on is worth it. But almost never in my experience. Almost but not entirely.