News for hackers. Stuff that matters.
Re:Metal monolith found by helicopter crew in Utah desert by JoeAltmaier on Tuesday November 24, 2020 @04:52PM (#25203361)
Instead of declaring a message and creating it with a call to the (now obsolete) module specific to the structure being transmitted, one simply passed the structure to the message-send api. The conversion template to 'Message' automatically rewrote the structure argument as a message argument.

I was re-writing the driver as a simple C++ set of pure virtual objects and implementations for my hardware. So when I scavenged code to send a certain structure as a message, I simply didn't make the old calls. I remember I did (for some reason) edit all the old modules to use the new API, to prove it still worked I guess. A long afternoon of search and replace.

The (Korean?) company that owned the driver must have had a team or something. It was extremely brain-dead code for every element of an 802.11/ethernet abstraction as a separate module, done twice (once for the driver; once for the module firmware). Double structure definitions for everything.

My team wanted a walk-thru of the existing driver. I scheduled two hours, one before lunch and one after. I opened with "I've brought just the 500 most significant modules today, and we're going to walk thru a connection and message send". Proceeded to open dozens of nested module references on a very long path from triggering a connection attempt to exchanging the first message for negotiation. The hour was up.

Nobody came to the 2nd hour after lunch.

Re:Metal monolith found by helicopter crew in Utah desert by richardfey on Tuesday December 01, 2020 @05:19PM (#25270789)
> Double structure definitions for everything.

I wonder if that's because two different teams worked on the two different abstractions.

> Nobody came to the 2nd hour after lunch.

I guess that the pain of that first hour convinced them that your rewrite was trustworthy.