Live data from Hacker News

Things I wished more developers knew about databases

medium.com

361–370 of 464 posts

Re: Things I wished more developers knew about databases

#361
post #149

Here's a fun bug I had a few years ago - Had a postgres database which was using pgbouncer for connection pooling. The most senior developer (24yo or so) we had on the project was using Go to connect to the database to write some simple reports, but each report took hours to run, and often had to sleep for 30+ minutes. So, after a while, pgbouncer would kill their connection, and their report would die. No other appl…

>> That ended up fixing the problem Interesting take, since you're still stuck with "simple reports" that take hours to run. What about writing more efficient queries, adding indexes, normalizing the DB... ?

It amazes me the complexity of solutions these days, when 20 years ago almost everything ran in relational databases and query tuning was usually the solution to performance problems.

Re: Things I wished more developers knew about databases

#362
post #321

Earlier quoted context omitted.

> The most senior developer (24yo or so) I see the problem there.

Shameless age discrimination. Very smart people exist at all ages. I've seen 21yo junior grad developers outperform 45yo 'senior' developers.

It's unlikely (but not impossible) that a 24 year old developer has had much of the experience needed to be classed as properly senior.

Re: Things I wished more developers knew about databases

#363
post #261

Earlier quoted context omitted.

Just because you saw a few exception does not mean the rule does not hold in general. Or are you saying most people don't learn with time (a corollary of your theory that age is not a big factor)?

> most people don't learn with time I think this is correct. The curve flattens with age (in my opinion). > you saw a few exception I think the seniors you met (the knowledgeable ones) /were/ the exceptions. Most seniors I have seen have convinced themselves that they know all there is to know.

I am getting on a bit and its not that I think I know all there is to know, but I see so much new tech that seems like pointless unnecessary complexity. I reckon that more than 90% of apps could be done in a classical MVP, with a bit of JQuery and a well tuned database. Most new ideas are a rehash of something from decades ago. It gets rather tiring.

Re: Things I wished more developers knew about databases

#365
post #343

Earlier quoted context omitted.

> most people don't learn with time I think this is correct. The curve flattens with age (in my opinion). > you saw a few exception I think the seniors you met (the knowledgeable ones) /were/ the exceptions. Most seniors I have seen have convinced themselves that they know all there is to know.

> Most seniors I have seen have convinced themselves that they know all there is to know. Yeah, seems we've met different kinds of seniors... I don't know any senior who wouldn't understand that "the more you know, the more you understand just how much you still don't know".

That quote is very true!

Re: Things I wished more developers knew about databases

#366
post #280
post #261

Earlier quoted context omitted.

Just because you saw a few exception does not mean the rule does not hold in general. Or are you saying most people don't learn with time (a corollary of your theory that age is not a big factor)?

I would say that I have seen no discernible pattern, so I have learnt that it is imprudent to judge a developer by their age. People do learn over time, but some people learn more "cogently" than others, i.e. some get more out of one year's worth of learning than others get in 10.

But your point is only valid if those who do learn with time are either rare (so do not make a dent in the general trend) or they somehow also do not learn much after a certain age, both of which I find deeply problematic.

Programmers by the nature of the profession must be good at learning over time... and I find it difficult to believe someone who is good at learning when at 20, will be bad at learning when at 40...

> some get more out of one year's worth of learning than others get in 10.

Sure, but they probably continue learning the year after?? And the year after??? Or they too, stop learning (or are just too rare)?

Re: Things I wished more developers knew about databases

#367
post #276

Earlier quoted context omitted.

Go code often reinvents/reimplements a lot of things from scratch, reintroducing problems that have been addressed long ago in other systems. It's like this new trend, let's rewrite everything in Go to be cool. Financially makes little to no sense.

Let’s not just target Go with that sentiment, it applies almost universally, just in varying degree. Counterpoint: how is anyone supposed to learn, if not from their mistakes? We might worry about the blast radius, but there’s no compression algorithm for experience.

Most programming language implementations don't try to avoid using libc.

Re: Things I wished more developers knew about databases

#368
post #51

Earlier quoted context omitted.

I disagree. There's more to relationships that typing. I'm very pro-dynamic languages and still chafe at static typing but the wonder of the relational model fits nicely with my liking for declarative and functional approaches. (EDIT - and as another data point I dislike SQL's syntax. The semantics are bearable but the syntax just makes my brain melt)

They're not identical concepts, but both relational schemas and statically typed programming languages provide assurances about basic structure. Mongo, and Python, offer no such assurances, and leave it to the developer to get it right. Agree that SQL's syntax is rather bad.

> both relational schemas and statically typed programming languages provide assurances about basic structure.

Yes I get that but I was trying to make the point that there's more to the relational model than just assurances. It offers a richly entwined semantic structure and an elegant route to reducing duplication and the risk on inconsistency that comes with it. None of this is in tension with dynamic typing.

(Also - dynamic languages aren't just for sloppy thinkers and cowboy coders. There's actual value that is lost in moving to static typing even if you think the trade-off is well worth it)

Re: Things I wished more developers knew about databases

#369
post #17

Earlier quoted context omitted.

All of those things are unproductive until after your project is successful which is usually not a guarantee when building the software. You're not gonna need it.

Observeability, reliability, scalability - really easy to bolt on once you are successful. There's a middle ground, and a DBA turned SRE turned Architect is probably ok with compromises, those are all roles where "it depends" is a bylaw.

And security, that one's trivial. Just get an audit and fix whatever they manage to find, done!

Re: Things I wished more developers knew about databases

#370
post #7

(The 80/20 rule applies below, some developers do care) Developers... just don't care. They want to spin up an ORM, point it at a URI, and forget about it. I've fought this for over a decade now as a DBA, SRE, DevOps, and architect. Most of the developers don't want to deal with anything infrastructure-wise; they want to spend all the time they can just focusing on the problem they're writing software to solve. Obser…

There's truth to this, but there are also reasons for this.

First, it may be fair to say that infrastructure is in an other domain of problem solving than structuring and implementing program logic. (Speed requirements and crunch time tend to lock a person in a single domain.) Second, those developers, who do understand the importance of infrastructure, tend quite naturally to care for those levels which are closer to them and which they actually may understand (like the programming language and how it actually implements things, standard libraries, dedicated libraries, the OS, any middleware). Finally, SQL via networks (and all the flavors this may come in) is hard, there's a reason for why there are specialists.

Speed of development, of course, is orthogonal to concerns about infrastructure. Which may be a major concern. Communication (a constant source of enterprise horror stories) and general awareness (on all levels) may help. These are not problems that can be solved on a single side of the implementation. And then, there's certainly some kind of "developer heroism", which doesn't especially help.

(I guess, I've successfully managed to have messed up with everyone? ;-) )

Post reply on HN