Daniel Duffy
C++ author, trainer
- Joined
- 10/4/07
- Messages
- 10,469
- Points
- 648
As you say in your first post, you are looking for advice. For agree... there are other sites.You don't really strive for agreeableness, do you?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
As you say in your first post, you are looking for advice. For agree... there are other sites.You don't really strive for agreeableness, do you?
How to achieve this overhaul (for <£100)? ---> by S. Meyers - Effective Modern C++?
And then dabbling a little with QuantLib, once more privy with the Concepts and Practices of Mathematical Finance?
I never said Rust to be widespread, just influential. That said it is the driving force at Mozilla (for Firefox) and widely used at some other tech companies (off the top of my head, DropBox and Facebook have announced some major projects). Even the Linux kernel has welcomed Rust drivers as of late and without naming names at least a couple of large fintechs/funds have embraced the language. While personally I do like the language, my point was not that it was good, but that a language that consistently gets voted as most liked on Stack Overflow (thus the influencer clout) gets several features that have made a recent appearance in C++ in the core language itself (so the compiler helps you---the entire point of typed/compiled languages) is in itself significant and an indicator of moving software engineering practices (beyond new/delete in this case).Rust is probably another 'quiche' language? It is mainstream?
Effective Modern C++ is not outdated (it's about C++11/14), nor is Meyers syntax only (though the way this particular book opens is on some very tedious arcane differences between auto, template etc. type inference that is basically about syntax). I, however, would not recommend it to you straight out of the box as I regard the book rather advanced (unless I misremember, it does assume a passing knowledge of lvalue, rvalue, std::move etc).
What I would recommend, and I think Daniel disagrees with me here, is for you to start with the old Meyers books, in particular Effective C++. The syntax may be outdated, and it will obviously not have all the bells and whistles of modern C++, but I still think its advice has aged well and it is a good starting point of the dos and don'ts of C++. As I said earlier, your knowledge of C++ seems decades---plural---behind (the next book in Meyers series, More Effective C++ published in 95 goes into detail of implementation and usecase of a shared pointer), and Meyers' old books are basically written for someone with your background moving from "C with classes" to C++.
Now I'm not here to convince you to learn new things if you have already decided that you know better, and that ignorance is something to be proud of. [...] It is not simply for fun that people do this or just because someone might forget to type delete (and why this happens is not a matter of simply forgetting delete, but about the more general concept of memory ownership-for someone coding funxtionally simple noninteractive programs at home, these ideas may not come up), but for elegance and to make things work at scale.
2. Some developers wax lyrical on super-cool syntax such as constexpr, too much emphasis on auto, generic lambdas. Determine why you want to use them and what the consequences are before wasting time that you may never use. Always provide a business case (time costs money).
3. 25 years ago multiple inheritance in C++ was the new hype; it was in fact a train wreck. I _never_ used it because there are better ways to do software design. In fact, inheritance is neither necessary nor sufficient:
https://en.wikipedia.org/wiki/Object_composition
5. Syntax for syntax sake is mind-numbing.
6. Code is written once and read/modified/debugged/hacked many times for the next 20 years. And this costs $$$ and it doesn't grow on trees. It is always good to first write a proof-of-concept.
7. Forget step 6 if you have money to burn.
Of course, these remarks apply universally.
The late Mark Joshi's C++ book with Design Patterns + basic examples in finance might be a good place to get some initial exposure. It dates from 2005 (same time as 1st edition of my own book), so much has changed.
Section 2.2.1 was a short history lesson on raw old style memory management. Sections 2.3 to 2.3 are devoted to smart pointers.
The demo!
1. GetPerimeter(), Area() do not belong in Shape ... not all shapes are closed
2. He did not delete the array of Shape* in main()
Sapir_Whorfe said it. Humboldt is better
“Die gefährlichste Weltanschauung ist die Weltanschauung derer, die die Welt nie angeschaut haben."
2. He did not delete the array of Shape* in main()
Ooompfh 1168 pages, you guys really want to keep me unemployed
My book is really several books in 1:
1168 pages??? It's only 1142 pages, what?
1. C++11 syntax A-Z without being a copy of the reference manual. Syntax alone + silly examples I am allergic to (sorry, I am not a CS).
2. New libraries e.g. random, tuple for maths
3. STL A-Z
4. ODE, SDE, PDE and FDM for Black Scholes
5. Parallel programming and libraries
6. Modern design and architecture
7. + other stuff
That's why it's 1142 pages. And for the price of 1 book + full tested source code (nobody else does/dares this )
Thank you. One goal is to get the reader up to speed as quick as possible. In training sessions, it is similar to 20 minutes lecturing and then 30 minutes practice. This is the optimal mix imho.
Good question. A given topic has a begin(), middle and end(), So new C++11 stuff needs to be motivated before jumping into code, for example chapter 3 on modelling functions is vital1 section in a chapter is equivalent to 20 + 30 min lessons + exercises?