News for hackers. Stuff that matters.
Re:Software engineering topics I changed my mind on by busterarm on Saturday January 23, 2021 @10:50PM (#25889028)
> Frankly, many engineers want to use the latest trends like microservices or NoSQL because they believe that’s what’s best for their resume, even if it’s not necessarily best for the company.

Probably nobody is using NoSQL for their resume. It's because picking a relational database, while usually the correct choice, is HARD when you're operating in an environment that changes quickly and has poorly defined specifications.

When you start seeing engineers have difficulty reasoning about what the data model should be and nobody willing to commit to one, it's the clearest sign that organizationally things are sour and you need to start having very firm and precise conversations with product.

Re:Software engineering topics I changed my mind on by potta_coffee on Saturday January 23, 2021 @10:56PM (#25889055)
I'm facing this issue now. App is supposed to deliver to clients after this sprint - and the data model still isn't locked down. After arguing through about 10 hours worth of meetings this week, I think I need a new job.
Re:Software engineering topics I changed my mind on by theshrike79 on Sunday January 24, 2021 @06:57AM (#25891335)
The best thing about the lockdown is that you can apply, interview and change jobs without leaving your desk at home =)
Re:Software engineering topics I changed my mind on by busterarm on Saturday January 23, 2021 @11:09PM (#25889125)
My condolences.
Re:Software engineering topics I changed my mind on by Shorel on Sunday January 24, 2021 @12:03AM (#25889446)
There are only two options for me: MySQL or Postgres.

And using AWS generally means using Aurora. Then the choice is already made. Not hard at all.

Yep, my work involves heavy use of SQL and I find it better than the NoSQL insanity.

Re:Software engineering topics I changed my mind on by orobinson on Sunday January 24, 2021 @01:59AM (#25889947)
Just curious, for what reasons would you choose MySQL over Postgres?
Re:Software engineering topics I changed my mind on by kenhwang on Sunday January 24, 2021 @02:41AM (#25890162)
Personally, when I want speed or easy upkeep and intend on doing dumb simple things.

Postgres is more featureful, but if you don't intend on using those features, MySQL is consistently faster and historically smoother to update and keep running.

Re:Software engineering topics I changed my mind on by busterarm on Sunday January 24, 2021 @02:43AM (#25890181)
Also in the Enterprise, if you're doing a lot of sharding and replication across networks, Percona MySQL is a very compelling product. I say that as a Postgres diehard.
Re:Software engineering topics I changed my mind on by twic on Sunday January 24, 2021 @01:29PM (#25894373)
> MySQL is consistently faster

Unless you want to do a join.

Re:Software engineering topics I changed my mind on by xorcist on Sunday January 24, 2021 @12:00PM (#25893545)
Traditionally it was because you needed replication or sharding that you didn't have to boil half an ocean for, or at least half decent full text indices. These days however I believe the differences are smaller and in other areas.

Most often, you choose a database because of what you application supports and is tested with, not the other way around. Or what your other applications already use. Complete green fields aren't all that common.

Re:Software engineering topics I changed my mind on by Shorel on Monday January 25, 2021 @10:26AM (#25904214)
Replication.

And our DBAs are already familiar with the gotchas of MySQL.

You just have to write queries in a different way (subqueries are slow, so they are to be rewritten as joins).

Re:Software engineering topics I changed my mind on by malinens on Sunday January 24, 2021 @02:57AM (#25890241)
Probably the same way sometimes people choose sqlite versus mysql- simplicity. There are many cons and pros for both of them!
Re:Software engineering topics I changed my mind on by ithrow on Saturday January 23, 2021 @11:05PM (#25889098)
It's because picking a relational database, while usually the correct choice, is HARD when you're operating in an environment that changes quickly and has poorly defined specifications.

Wouldn't this apply if you are using a static typed language too? what's harder about changing the schema in the DB?

Re:Software engineering topics I changed my mind on by tikhonj on Saturday January 23, 2021 @11:11PM (#25889141)
You (mostly) don't have to deal with data migrations with statically typed languages. Releasing a new version of some code is usually easier than making structural changes to a database that's in active use.
Re:Software engineering topics I changed my mind on by Chris_Newton on Sunday January 24, 2021 @06:13AM (#25891102)
Releasing a new version of some code is usually easier than making structural changes to a database that's in active use.

Yes, and on top of that, code-only changes need to be internally consistent to make sense but DB schema changes almost inevitably require some corresponding code change as well to be useful. Then you have all the fun of trying to deploy both changes while keeping everything in sync and working throughout.

Re:Software engineering topics I changed my mind on by busterarm on Saturday January 23, 2021 @11:09PM (#25889122)
You've hit on something there as well, but essentially it comes down to forced rewrites and flexibility. We tend to choose the more flexible systems to avoid forced upfront work when changes are needed even when it's the wrong choice for the project in the long run.
Re:Software engineering topics I changed my mind on by Falkon1313 on Sunday January 24, 2021 @04:05AM (#25890513)
Eh, not so much databases, but in terms of code, super flexible 'all things to all people' generic abstractions tend to be a lot more work and a lot more difficult to debug than a tight solution tailored to the problem it's solving, written in domain terminology.

If only I had a nickel for every hour I've spent debugging abstractions and indirection that were just there for the sake of adding flexibility that would never be needed.

Re:Software engineering topics I changed my mind on by busterarm on Sunday January 24, 2021 @11:03AM (#25893073)
I'm in agreement with you actually. I was badly suggesting that that kind of flexibility up front bites us in the ass later and it's a bad impulse often followed.
Re:Software engineering topics I changed my mind on by souprock on Sunday January 24, 2021 @05:39AM (#25890937)
Is every NoSQL database non-relational, and every relational database SQL? It sure seems to me that you could have a relational database without SQL. Something non-text could be nice. It might be a binary data format or compiled code.

One might even convert SQL to binary query data at build time, with a code generator. It could work like PIDL, the code generator Samba uses to convert DCE/RPC IDL files to C source with binary data. Binary data goes over the wire. Another way is that both client code and server code could be generated, with the server code getting linked into the database server.

Re:Software engineering topics I changed my mind on by eecks on Sunday January 24, 2021 @06:33AM (#25891212)
Which parts are hard?