• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Best code ever

Maintaining C/C++ code (if it can be called that).

Found this class:
CFrameworkFactory

My head hurts. Does yours?

Yes, I know this might be a logical name but a class that creates different frameworks for one application?
 
Last edited:
Professor told me how he was hired to help debug some code. So he started looking over it and there was a print statement that didn't print anything... So he asked why was that in there, and they said well when they take it out the program crashes.
 
Professor told me how he was hired to help debug some code. So he started looking over it and there was a print statement that didn't print anything... So he asked why was that in there, and they said well when they take it out the program crashes.

lol I remember weird anomalies like that when I started programming in Pascal in high school.
 
Hard to know if it's bad without seeing the code behind it, but I have seen my fair share of horrid code lol. I run a game server based on an app called RunUO. OMG, so much spaghetti code, Italy is jealous. I ended up redesigning lot of the systems but so much more to go. I wish I would have coded the engine from scratch at day 1 lol. Sometimes it's easier to just scrap and start over.
 
I used to work for a company making high end communication equipment (I'm talking about core networks shit, not consumer), and one of their products code looked like someone opened a C book, did the typical printf( "hello world\n" ) example and continued from there to code the device. Disgusting. And not one single comment to spare. To make it better, that code never ran outside of simulation mode - they had a MANUAL TRANSLATION of that code to DSP assembly. Which means - you change a line of C - some human drones came and translated what you made into DSP assembly.

Later, I used to work for one of the major mobile phones manufacturers, doing some very focused platform work (Bluetooth support, etc.). The code of that thing was the most monstrous, disgusting, disorganized piece of shit I ever encountered. Hundreds of thousands of files, preprocessor programming ('#if 0' all around), no comments (or worse - not in a language I could understand). Piece of shit. I will never, ever buy a mobile phone from them, ever.

One time I refused a project after seeing the source code. It was the only time I did so. It was source code up to 15 years old, all developed by a single person who probably never saw a line of code outside his own. Those are the worst, as they never have a chance to understand what they're doing wrong.

Yes, I've seen my share of crap.
 
Last edited:
i've seen a FactoryFactory before

FactoryFactory can be legit under certain circumstances, for example where you want the factory to dole out Mock objects under unit tests, yet the original implementation is not flexible enough to support that (and cannot be extended for whatever reason).

So you have to create a factory that dishes out different types of factories depending on case.

And yes, I've seen some pretty horrid code in my life - most of it written by contractors.
 
Back
Top