News for hackers. Stuff that matters.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by hamburglar on Wednesday February 10, 2021 @02:23PM (#26093507)
This is certainly true for data types that the system knows how to serialize and deserialize, but (at least back when clippings were introduced) for others, the app that owns the clipboard data must provide the hook for the serialization and deserialization. Back in my first programming job, we were about to ship a shrink-wrapped software product that I will not name but you’ve almost certainly used, and we discovered that we “needed” to support clippings or else (I can’t remember if this was some Apple compatibility rule or some marketing person’s rule). We didn’t have much time, and we also didn’t have serialization code for this very complicated data structure that was on the clipboard, and my manager told me to just implement it by sticking THE POINTER in the clipping. I objected and was overruled. I did it, it shipped that way, and I will always be ashamed. You could only use a clipping in the same process that created it. I had to add code on the deserialize that checked to see if the pointer was valid. It still makes me sick to think about.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by marmaduke on Wednesday February 10, 2021 @03:02PM (#26093927)
That’s the practical approach .. and you are lucky to have a manager who is technical enough to make suggestions like that
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by hamburglar on Wednesday February 10, 2021 @04:27PM (#26095053)
There is nothing practical about writing a pointer value to a file. This was a quick hack that made the feature appear to work rather than actually work. It's really bad engineering.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by marmaduke on Thursday February 11, 2021 @01:46AM (#26098927)
I agree with you, before the external constraints enter the picture. But as you said, it had to be delivered with this feature on a shorter timeline than a better solution allowed for. The choice between delivering something and delivering nothing, how do you proceed there?
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by hamburglar on Thursday February 11, 2021 @05:21PM (#26108200)
Slip it or cut it. Doing it in a way that loses data for users is a bad call.