one of the worlds greatest speakers on c++. No idea we he hasn't published a book, or even recorded his workshops.
@lehaipham4622
2 жыл бұрын
This is just pure gold! I wish I could find more similar quality talks. Not sure if any other good ones, there are so many talks uploaded recently, which overwhelm my digestion.
@MyMjrox
2 жыл бұрын
Great presentation. To the point with clear examples . Klaus doesn't disappoint.
@CppCon
2 жыл бұрын
Much appreciated!
@pabstkkx
2 жыл бұрын
He never does :)
@8Trails50
2 жыл бұрын
One of the best talks I’ve ever seen.
@simonfarre4907
2 жыл бұрын
Klaus talks are always very qualitatively dense and great. Back to basics or not, always useful.
@CppCon
2 жыл бұрын
Glad you like them!
@mehtubbhai9709
2 жыл бұрын
Another great talk from Klaus. Always look forward to his Back to Basics talks
@CppCon
2 жыл бұрын
Glad you enjoyed it!
@dadisuperman3472
2 жыл бұрын
Designing classes is a constant search for orthogonalities. Exple: Circle->(implements)->the shape interface. Circle::draw -> calls RenderEngine::draw. Circle::draw generates the vertices of a circle, RenderEngine::draw uses whatever drawing engine (opengl, vulkan, Dx..etc) to lay these vertices on a color buffer. Instantiating a Circle by giving it a derived class of "DrawXXXXstrategy" means the user have to know which concrete class he has to use to render his circle. However this information is only relevant to the render engine, it is the one and only object which should know about the underlying platform. As an implementer of circle::draw method, i have only to say: void circle::draw(radius, resolution) { vector circumference; for(int i=0; i
@8Trails50
2 жыл бұрын
great advice. any books / resources you recommend?
@jimfcarroll
2 жыл бұрын
"#define private public", at least at one point, didn't work with Microsoft compilers because they included the access region in the name mangling.
@iamjadedhobo
2 жыл бұрын
Everyone needs a refresher now and then :) This one held me captivated for the entire duration.
@sotirissalloumis6129
2 жыл бұрын
Excellent presentation, congratulations to the presenter and a big thanks to CppCon for sharing..
@CppCon
2 жыл бұрын
Thank you too!
@CostaKazistov
2 жыл бұрын
Really enjoying this series. Klaus Iglberger is an excellent presenter. Looking forward to more Back to Basics videos.
@CppCon
2 жыл бұрын
Glad you like them!
@sirhenrystalwart8303
2 жыл бұрын
I would prefer Length to Size for the second array template parameter. Size is too easily confused with the size in memory, and in some ways (e.g., sizeof) could be more confusing than just N.
@masheroz
2 жыл бұрын
You can apply the law of least suprise here too; the stl containers use size, so use that one as well.
@yangwei6761
2 жыл бұрын
Thanks for speaking from experience.
@learntolearn3063
2 жыл бұрын
Excellent talk Klaus. Definitely its one of the best back to basic on design class. Am a big fun of you.
@thodin87
2 жыл бұрын
29:10: I really like the idea of providing the DrawStrategy by means of a template argument to the class. Unfortunately, the slide does not show how one would instantiate such a class. I managed to do this via a functor that I give as the template argument. However, is it also possible via a Lambda or via std::function? Would be very grateful if someone could explain how to do that.
@peregrin71
Жыл бұрын
About testing private members (of a class type). I would phrase it slightly different. Do NOT test them as part of the owning class. If it is a private member of a specific other class type then test the member class in isolation first. Also allow for the member to be injectable (inject interface or as template parameter) so you can test the using class using a "mocked instance" as member.
@maneshipocrates2264
2 жыл бұрын
Good talk. Enjoyed his training in my uni.
@CppCon
2 жыл бұрын
Great to hear!
@jmbrjmbr2397
2 жыл бұрын
Thank you soo much for these valuable lessons! Code examples made it very clear to me.
@CppCon
2 жыл бұрын
Glad it was helpful!
@vishnuuppada2181
2 жыл бұрын
Very Informative talk on design decisions !!!
@CppCon
2 жыл бұрын
Glad you liked it
@antonfernando8409
2 жыл бұрын
Excellent, you explain things very well, practical and to the point.
@CppCon
2 жыл бұрын
Glad you think so!
@greob
2 жыл бұрын
Nice presentation, easy to follow and understand. Klaus is a great teacher.
@CppCon
2 жыл бұрын
Many thanks!
@eyesopen6110
9 ай бұрын
Doesn't the std::function version of the Strategy pattern leave it open to any and all callable with the function signature?... No type checking at all?....
@thestarinthesky_
4 ай бұрын
Awesome! Thanks for sharing!
@think2086
Жыл бұрын
Why are the Germans such good C++ teachers?
@bongo990
Жыл бұрын
Maybe because there are a lot of users of C++ in Germany and people had to get good in it because they were using it so much. I mean considering that Germany produces a lot of mechanization and industrial equipment..
@fatpo2396
Жыл бұрын
great presentation and easy to understand
@schmardin0815
Жыл бұрын
Slide 79: You cannot implement copy ctor or assignment for that class. A type that has a move-only member like std::unique_ptr is automatically move-only as well. There is no Rule of 5 in this case.
@dennydaydreamer
Жыл бұрын
Isn't it only the compiler-generated copy constructor is inhibited? I tried to create the same Widget class in MSVC and there was no problem to create a user-defined copy constructor. You just need to do something different than move for the unique_pointer member, perhaps initialise it with a factory/clone method?
@jphvnet
2 жыл бұрын
Really good talk
@Solarbonite
2 жыл бұрын
Thank you so much for this talk! I need to get a copy of the gang of four book and test out the new features in the standard. I think that learning this is super valuable.
@CppCon
2 жыл бұрын
Glad it was helpful!
@pajeetsingh
4 ай бұрын
What operating system does Klaus use?
@davithov
Жыл бұрын
I didn't understand a few things. It would be nice to have more examples. For example, how 'destroy' function should be moved away to make it testable. Also when explaining "Template Method" 's purpose, you said that it solves certain type of problem, but I didn't understand where the problem is in that case.
@vadumsenkiv8773
2 жыл бұрын
Thank you so much for such great presentation 🔥
@srenh-p3798
2 жыл бұрын
That feel when having used #define private public a bunch of time in unit tests 😅. It is a hack indeed, and it is probably truly ghastly, but I don't think he really justifies that. Why is it actually so bad?
@LiveseyMD
2 жыл бұрын
Thanks for a really useful talk!
@CppCon
2 жыл бұрын
Glad it was helpful!
@oleholgerson3416
2 жыл бұрын
Thank you very much Klaus, excellent talk!
@CppCon
2 жыл бұрын
Many thanks!
@iliasalaur
Жыл бұрын
41:13 #define class struct is of course the best option here, as showed in the first answer😂
@peterevans6752
2 жыл бұрын
Great presentation.
@CppCon
2 жыл бұрын
Thanks for watching
@PedrosoJr
2 жыл бұрын
Very nice presentation!
@CppCon
2 жыл бұрын
Thank you very much!
@nandanvasudevan
2 жыл бұрын
13:29 Can anyone tell me what font is that (for the class definition) ? Its gorgeous!
@nandanvasudevan
2 жыл бұрын
It's PT Mono.
@paulina5247
2 жыл бұрын
Great lecture!
@CppCon
2 жыл бұрын
Thank you!
@georgesimeonidis8695
2 жыл бұрын
At 43:34 he says that by making the test class a friend you couple it into the production code. Can someone elaborate?
@verdantblast
2 жыл бұрын
You mean 42:35? My understanding is that if you make the test class as a friend, then this line of declaration will pollute your actual code of specific functions. Imagine that the production environment code does not have any test class, then the line of code will become dead and will never be used.
@cmdrwhiskeygalore3044
Жыл бұрын
Less data at the expense of more code is the only way. In real time you have to throw away good design in favour of less calls and the only way you can do that is make more functions, more code, that only need to be called once. The call itself carries values inherently and virtualisation provides that far better than delegation. When you connect to a real-time server you have to throw relationships out of the window. They are too inefficient. This back and forth as you traverse the data relationships is all wrong. Send one query. Get back a block that contains enough data that will stop you from having to retrieve relationships by sending more queries. Polymorphism carries implied intent. Delegation does not.
@codebus
Жыл бұрын
Your rapper name is Santa Klaus
@milad6914
Жыл бұрын
not fun indeed
@norbertnemesh
11 ай бұрын
This performance is dramatic that it gives me cringe overflow with undefined behaviour
@0XAN
5 ай бұрын
apply those principles descibed on the video is the best way to achieve slow code and the slow code for me is pure evil
Пікірлер: 70