4 ms·
I don't know much about the current state of training courses but here's some advice for self study. A lot of things will be very similar to Java but with subt
by fredophile 11y ago
I don't know much about the current state of training courses but here's some advice for self study.
A lot of things will be very similar to Java but with subtle differences. This means you'll be able to get up and running quickly but your code will not have the same nuances. Look for coding standards used at big companies. I believe Google has one that's publicly available. Epic Games also has one for UE4. Hopefully they should have some explanation for the choices they made. If not, do some googling of the relevant areas and see if you can figure out why they chose what they did. Spend some time reading code. GitHub has lots of repositories you can check out.
For books you won't do badly if you pick up anything by Scott Meyers or Herb Sutter. They also both have good blogs. Meyers's books tend to be broken down into about fifty main points with discussion on each. I like to use them by reading one point and then trying to apply it specifically in my work. Doing this at one point a week I can go through about a book a year. C++ Coding Standards by Sutter and Alexandrescu or Effective C++ would be my top two recommendations for someone with your background. I'd stay away from Alexandrescu's other work for now since it tends to be more advanced and potentially dangerous.
YouTube videos of talks by any of the authors I mentioned may also be useful to you.
You specifically mentioned memory management and concurrency so I'll throw in some specific advice for them. Modern C++ uses smart pointers for dynamic memory. If you're allocating dynamic memory and not using a smart pointer you're almost certainly doing something wrong. If you want to get into really low level stuff with memory management look at how malloc or new are implemented and do a search for "small block allocator". For concurrency your best bet is probably to find resources devoted to threading and asynchronous execution. I haven't looked into that in a while so I don't have specific recommendations for good resources.
- humanrebar 11y ago> I'd stay away from Alexandrescu's other work for now since it tends to be more advanced and potentially dangerous. Advanced, sure. But dangerous? I've never heard that. Do you have any specifics?
- fredophile 11y agoSome of the template meta programming stuff he gets into isn't very portable and is very hard to debug when things go wrong. My rule of thumb is if I think I need to implement something from Modern C++ Design I am probably better off thinking about the problem a bit more and doing something else instead. Since it's been a while since I last looked at it I'd guess that some of the portability issues have gone away as compilers implement new features.
- Ace17 11y agoA lot of things from Modern C++ Design now are part of the C++ standard library.
- fredophile 11y agoThe implementations are very different. The implementations in Modern C++ Design used a lot of tricks to work around features the language didn't have. This isn't an issue when those features are part of the language. I'd also point out that even now there are parts of the newer standards that aren't fully supported by all compilers. Something being part of the standard doesn't mean you can use it on every platform.