@meredith_matthews When I'm building stuff I'm always thinking about things like algorithmic complexity, number of database queries, and what I can get browsers to keep cached. That doesn't mean I always choose the highest-performance approach, because there are other criteria I also have to consider... usually the key one is whether I'll ever be able to find anyone else who can make sense of my code

@jamey @meredith_matthews I tend to agree, readability over performance, but if that's the compromise you're making, how bad could the performance hit possibly be?

@meredith_matthews I mean… writing an exponential algorithm that's very clear and very inefficient is pretty easy for a lot of problems, if you take a "guess and check" approach. The "check" step is where you write down the characteristics of the answer you're looking for, so that's easy to understand, and the "guess" step is enumerating all combinations of possible inputs, which is often easy too. So… could be pretty bad? 😅

@meredith_matthews But the more common situation I've faced is when I can either hand-craft a database query that computes exactly what I want there and just sends me back minimal results… or I can use my web framework's ORM to make a bunch of queries and compute the result in whatever scripting language I'm using. The difference can be dramatic in both performance and readability.

Follow

@jamey @meredith_matthews I've never met an ORM I liked. And not because of that very legit reason. I just hate them.

@meredith_matthews I don't blame you! I've never seen one that provided a proper relational algebra so you could compose queries in reasonable ways, for example. But when I'm working in a framework like Django, the ORM is not really optional… and for the things which the ORM can do, I usually find it more clear than the equivalent SQL, which makes it worthwhile for me.

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!