News for hackers. Stuff that matters.
Re:Nobody ever got fired for using a struct by ambicapter on Thursday March 05, 2026 @10:32PM (#47270521)
What's in them?
Re:Nobody ever got fired for using a struct by unclad5968 on Thursday March 05, 2026 @11:09PM (#47270764)
Data from measurement tools. Everything about the tool configuration, time of measurement, operator ID, usually a bunch of electrical data (we make laser diodes) like current, potential, power, and a bunch of emission related data.
Re:Nobody ever got fired for using a struct by arethuza on Friday March 06, 2026 @06:49AM (#47273827)
I think I'd rather work with very wide tables than the entity-attribute-value approach - which seems like a good idea but rapidly becomes a mess...
Re:Nobody ever got fired for using a struct by jayanmn on Thursday March 05, 2026 @10:48PM (#47270631)
Property1 to 20 or more is an example. There are better ways to do it but I have seen columns for storing ‘anything’
Re:Nobody ever got fired for using a struct by Spivak on Friday March 06, 2026 @12:19AM (#47271182)
Sounds like a generic form of single table inheritance. I don't honestly see any other way to do it (punting to a JSON field is effectively the same thing) when you have potentially thousands of parts all with their own super specific relevant attributes.

I've worked on multiple products that have had a concept of "custom fields" who did it this way too.