4 ms·
Really, the worst code only ever happens in systems of extreme maturity. I'm doing some light internal Windows system stuff right now, and all the business w.r
by leif 16y ago
Really, the worst code only ever happens in systems of extreme maturity.
I'm doing some light internal Windows system stuff right now, and all the business w.r.t. COM combined with a rampant NIH disease and competing coding guidelines results in a pretty gnarly mess.
Ignoring for a moment the endless wars between those who are for one particular style or library and those against, and the slight differences in the amazing number of different string types (they number in the dozens at least), I think the worst of it comes from COM. Rather than use language or library support, they reinvent everything. Now, granted, in this case it lets them do some pretty nifty things (like instantiating objects on remote machines and invoking methods there as if they were native), but the way you end up doing everything with these opaque macros (that are, if you can find where they're defined, usually written unsafely, by the way) just seems too magical, and the idea of passing around GUIDs for fuck all is just crazy. Too many times have I had a problem that, even in the debugger, was completely incomprehensible and unimaginable in traditional or UNIX C/C++, and after asking around and waiting for responses, amounted to "oh, just take that magic incantation out of your header because it's fucking with your vtable and you don't need it" or "oh just rebuild everything because your old GUIDs aren't valid" or something.
Most of my time is spent wandering around blindfolded in a room while angry hungarians pelt me with college-aged black boxes, to the point that I'd say no more than 4% of my time debugging has been spent actually fixing real problems with my own code that I might have made outside of this environment.
Ahhh, that felt good. End angry rant.