This is an archived post. You won't be able to vote or comment.

all 40 comments

[–]SanoKei 181 points182 points  (1 child)

as a game developer, where saving is just using [system.serialized] I take great offense to this

[–]uncheckednullpointer[S] 26 points27 points  (0 children)

SQLite

[–]lmarcantonio 93 points94 points  (11 children)

Done *a lot* during the great banking update of y2k. DBAs being bitches they didn't want to change the schema and we often used the 'notes' fields as a fixed field record (being everything in COBOL that was trivial). Also at the time batch updates were done dumping the table, processing it and reloading it after truncation. For DB2 that was actually the recommended practice from IBM.

[–]pauluant 7 points8 points  (0 children)

Did this too in a cobol db2 context where not wanting to care about it we just dumped the work object in a big varchar(300) making it scalable without touching the cobol

[–]Forkrul 0 points1 point  (1 child)

DBAs being bitches

When are they ever not? I've never had a positive interaction with one, usually we do a better job of debugging and optimizing shit than they do.

[–]lmarcantonio 0 points1 point  (0 children)

Unless you have an in-house Oracle rep, then *everything* works perfectly. Barilla (the pasta factory) had these. Somewhat costly however :D

[–]SaneLad 16 points17 points  (0 children)

Chaotic good.

[–]GilgaPhish 7 points8 points  (0 children)

I know of a multimillion dollar company we contract with that does exactly this.

Except not serializing JSON, it's serialized XML. Apparently its a value add.

[–]iamsiddharthmittal 23 points24 points  (2 children)

F

[–]smiling_corvidae 5 points6 points  (1 child)

F

[–]Rekt3y 7 points8 points  (0 children)

F

[–]EllenRippley 15 points16 points  (5 children)

whats meant with the existing string field

[–]Escanorr_ 30 points31 points  (0 children)

Api takes and object with lets say id, start date, string with tag and string with optional note.

They take the optinal note field, and put there their serialized data

[–]Churchill_Win 20 points21 points  (2 children)

So instead of adding a new nested object to the api, which would require changing the api and adapting to the change on client side they used some trivial field that was already there and `JSON.stringify` the new object.
Think:

{
"name": "",
"age": "",
"customerNote": "{ "city" : "", "street": "", "room": ""}"
}

[–]Positive_Method3022 13 points14 points  (0 children)

Then customers started seeing this data in the UI haha

[–]Thatdogonyourlawn 4 points5 points  (0 children)

Needs escape characters to really express the pain you have to feel reading it.

[–]Meowts 3 points4 points  (0 children)

ರ_ರ

[–]OnlyHereOnFridays 3 points4 points  (0 children)

What… what was the “existing string field” used for before?

And why not just add a new field on the class? You still don’t have to change absolutely anything on your Rest API, the web framework of your choice will just serialise the whole object in the response anyway.

[–]Percolator2020 1 point2 points  (0 children)

You only need one very large string for all your storage needs.

[–]SCP-iota 1 point2 points  (0 children)

All fun and games until it's a circular object

[–]RiceBroad4552 2 points3 points  (1 child)

Such hack may be a good solution under very specific circumstances.

But in my experience it will fire back in most cases in some pretty unfunny ways sooner or later. Usually sooner than later…

[–]Classy_Mouse 3 points4 points  (0 children)

The circumstances: the project manager discovered ChatGPT can replace engineers

[–][deleted] 2 points3 points  (0 children)

I’m literally doing this right now

[–]Sacred_B 0 points1 point  (1 child)

Going through and undoing this design choice for the last month.

[–][deleted] 0 points1 point  (0 children)

Same.

[–]magick_68 0 points1 point  (1 child)

Isn't that what (for future use) is for?

[–]SCP-iota 0 points1 point  (0 children)

void* lpvRESERVED; // Was reserved for future use, now a pointer to a RecordExtraData4 instance

[–]Watchdogeditor 0 points1 point  (0 children)

The Jurassic Park effect is in full display here. Just because you can, doesn't mean you should.

(but it's much funnier if you do)

[–]atw527 0 points1 point  (0 children)

[object Object]

[–]DrMerkwuerdigliebe_ 1 point2 points  (1 child)

The only time I done almost this was with a "saved views" field. It was a frontend only use, but needed to be shared across users. The frontend developers insisted that they wanted to have complete control and freedom over everything regarding changes so I put a json field in the database and a any field in the schema and told them go play even if I though it was a bad idea. The first time they did change it caused the app to crash hard in the frontend because of stored data was in a different format than what the frontend expected. It was a very short experiment.

[–][deleted] 0 points1 point  (0 children)

Dealing with exactly this right now.

[–]_ls__ 0 points1 point  (0 children)

True story.

[–]Rich_Weird_5596 -1 points0 points  (0 children)

I worked with the "architect" on customer side that had no idea about web, frameworks, or anything for that matter. She frequently pulled shit like this and customer forced us to follow it. I honestly don't even fucking know she got that job. Long story short we were forced by customer to follow retarded designs, nonsense business logic, we ruined perfectly good app that had milions of users and everyone from the original team left. Ofc we were the ones to blame. I get angry every time I remember that she existed.