8 ms·
The project I got transferred to was the thing of nightmares. It was a C++ project and all the bad things that have ever been said about C++ were true about tha
by lasagnaphil 7y ago
The project I got transferred to was the thing of nightmares. It was a C++ project and all the bad things that have ever been said about C++ were true about that code base. There was not much code but it was utterly incomprehensible. There were massively deep inheritance hierarchies, compilation speed was measured in minutes for even the most trivial changes, and so on. It was managed by an architecture astronaut that, as one is wont to do, rewrote existing mature libraries as header only template libraries that were buggy and untested (one could even say untestable).
Oh no, it seems like a hyper-modern-C++ developer lead the project and transformed the code into template-metaprogramming madness... (inferred by the absurdly long compile times) Deep condolences to all the people who worked on the project.
- karma_fountain 7y agoI have done this when I was younger, after reading Modern C++ Design and the Template Metaprogramming book. I am sorry. Please not I'm not saying those books are bad, just blindly apply stuff because you think it is cool and fancy is probably not good leadership.
- bdavis__ 7y agoHow do you know how to use the new shiny things without real practice? My friend, we have all done this. (after about the 10th time the 'new technique' turns to a mess, you become very conservative about 'new things').
- TomMarius 7y agoI consider this one of the milestones leading to the senior title
- microtherion 7y agoIdeally, I prefer to practice radical new approaches on hobby projects, or single person explorations, rather than team projects.
- cgh 7y agoModern C++ Design is simultaneously a work of genius and a practical handbook on how not to write maintainable software. I've never seen anything like that book.
- ido 7y agoOne of the reason why sight-unseen I would actually prefer to be dropped into a c based project than a c++ based one.
- Crinus 7y agoSure. As long as code generators that parse adhoc type descriptions from header comments and spit out code for a homegrown object oriented system / generic data serialization framework are banned on sight. Or most code generators in general. If you are using a code generator to bring features from other languages to C then just use those other languages.
- ido 7y agoMy impression is that these are less common in c codebases than simply abusing c++'s built-in features is in c++ one (probably cause the former actually requires a lot more tech skill than the latter). Maybe I'm wrong?
- Crinus 7y agoThey are less common, but in general doing big projects in C as opposed to C++ is less common, at least in my experience (note though that it might be my bias on working with games and desktop software). C doesn't allow for much overengineering and most C projects tend to be simple (well, they tend to be libraries that do mostly one thing) but if someone really wants to overengineer a C project they can put the worst C++ architecture astronauts to shame since as C doesn't allow for much by itself they need to work outside of it (hence generators) and there are no limits to what you can do outside of C.
- apta 7y agoNot very dissimilar from golang as far as (badly implemented) code gen goes.
- karma_fountain 7y agoYou just get more macros then.
- nerdponx 7y agoIt was managed by an architecture astronaut that, as one is wont to do, rewrote existing mature libraries as header only template libraries that were buggy and untested (one could even say untestable). Serious question: how do these people make it past intermediate level? Luck, no major catastrophes/bugs, putting in 14 hour days, all of the above? Maybe things are different in data science, but I was kind of the data science equivalent of this at one point in my life. It left me with nothing but bad blood between myself and former colleagues and employers.