News for hackers. Stuff that matters.
Re:Ask HN: Is there a better way to document complex softwar... by platz on Sunday November 25, 2018 @02:14PM (#18528352)
But my domain model is

    Store
    =====
    Id int
    Col1 varchar
    Col2 varchar
    Col3 varchar
    ...
    Col134 varchar
    foreignKey1 varchar
    foreignKey1Type varchar
    foreignKey2 varchar
    foreignKey2Type varchar
    ...
    foreignKey10 varchar
    foreignKey10Type varchar
    validFrom varchar
    validTo varchar
    isActive boolean
    deleted boolean
Re:Ask HN: Is there a better way to document complex softwar... by 6nf on Sunday November 25, 2018 @05:11PM (#18529392)
I don't need your flowcharts, I'll be heading for the door!
Re:Ask HN: Is there a better way to document complex softwar... by Aeolun on Sunday November 25, 2018 @07:39PM (#18530089)
Ah, it’s good they used varchar, at least now you can store everything in those columns.

And there’s a multitude of ways to soft-delete too!

This is much better than some schemas I’ve seen.

Re:Ask HN: Is there a better way to document complex softwar... by muthdra on Sunday November 25, 2018 @08:26PM (#18530315)
Not 2 years ago, I saw an entire Joomla schema converted to Microsoft Excel tables which we should use to port the website. Our team just ignored the effort.
Re:Ask HN: Is there a better way to document complex softwar... by thrower123 on Sunday November 25, 2018 @08:29PM (#18530326)
Probably the most important part of that effort was to keep the project managers and analysts busy fighting over that nonsense, providing aircover for the devs to actually do the work.
Re:Ask HN: Is there a better way to document complex softwar... by muthdra on Wednesday November 28, 2018 @02:47PM (#18554968)
Good guess but this is third world country public school level. The friendly sextagenarian did his best but he was only comfortable with PHP and Excel.
Re:Ask HN: Is there a better way to document complex softwar... by quickthrower2 on Sunday November 25, 2018 @02:44PM (#18528579)
Looks like a schema to allow the code to decide the real schema at runtime. A poor mans mongodb.
Re:Ask HN: Is there a better way to document complex softwar... by rco8786 on Sunday November 25, 2018 @04:24PM (#18529146)
This is pretty common looking for things like CRMs or CMSes where customer specific custom fields rule the day.
Re:Ask HN: Is there a better way to document complex softwar... by CMCDragonkai on Sunday November 25, 2018 @07:46PM (#18530113)
The database was meant to be the CMS and SQL was designed to be human readable.
Re:Ask HN: Is there a better way to document complex softwar... by josephg on Sunday November 25, 2018 @10:16PM (#18530780)
Counterpoint: If small design decisions require global SQL schema changes, it slows you down. And small barriers to change will, in aggregate, kill you.

Eg, over a month of iterations: "Can we add another field to user registration? It should be free text. Oh, they should select from a list. No wait, make it a date. Actually a date and a text field. No wait, dump the text field."

Sometimes slowing down these changes is a good thing. But often, being able to ship each iteration along the way will help your design team converge on the best solution. If you need to write a schema migration for every iteration, it kills the ability of your team to experiment and explore the space of "what should our product actually look like".

Faster iterations = more iterations = better product in the long term. Sometimes the best long term result requires some random stuff getting crammed into a big JSON field in your database in the short term.

Re:Ask HN: Is there a better way to document complex softwar... by enimodas on Monday November 26, 2018 @05:45AM (#18532406)
Sounds like the real problem is that there's too much friction with schema migrations.
Re:Ask HN: Is there a better way to document complex softwar... by platz on Sunday November 25, 2018 @03:04PM (#18528706)
This is only a slight exaggeration of real things that exist in products like SharePoint or Visual Studio Team Services
Re:Ask HN: Is there a better way to document complex softwar... by nafey on Sunday November 25, 2018 @02:36PM (#18528529)
That's scary to even read
Re:Ask HN: Is there a better way to document complex softwar... by zeroname on Sunday November 25, 2018 @09:03PM (#18530476)
> But my domain model is...

No it isn't. That's the model for the representation of the actual domain model. The actual domain model may well be "idk everything" (then you're SOL) or it just may not be formalized (then you might want to fix that).