What is meant by the term "dirty object"?
Asked Answered
P

2

43

I see the term "dirty" or "dirty objects" a lot in programming.
What does this mean?

Passably answered 17/11, 2009 at 0:43 Comment(2)
And meanwhile you reversed so the copied term is back again, tx :)Shiner
yep, I saw the edit, I thought your answer could still be relevant.Passably
T
72

A dirty object is an object that has changed in its content, but this content has not been synchronized back into the database/disk. It's a typical situation of desynchronization between a cache and a storage.

Tina answered 17/11, 2009 at 0:45 Comment(0)
S
10

CONTEXT: original question was phrased as I find a lot in "programming dirty", this answer attempts to address that. The accepted answer is about dirty objects, the new question after it was changed, and a significantly different subject.


"Programming dirty" as you quote it, can mean that you use a "quick and dirty" method for solving a problem (archived), usually to stay within time constraints, and hoping to fix it later.

Programming dirty is often used with prototyping (i.e., a mini-program that shows the principles of a concept, later to be replaced by the actual product), where it is needed to show something quickly, but your code is not meant to last and you expect it to be thrown out (note: in the real world, companies don't always kill prototypes, leading to maintenance nightmares of the dirtily programmed code).

Shiner answered 17/11, 2009 at 0:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.