CppCon 2018: Kate Gregory “Simplicity: Not Just For Beginners”

preview_player
Показать описание


Many people say that simple code is better code, but fewer put it into practice. In this talk I’ll spend a little time on why simpler is better, and why we resist simplicity. Then I’ll provide some specific approaches that are likely to make your code simpler, and discuss what you need to know and do in order to consistently write simpler code and reap the benefits of that simplicity.

Kate Gregory
Gregory Consulting, Partner

Kate Gregory has been using C++ since before Microsoft had a C++ compiler. She writes, mentors, codes, and leads projects, in both C++ and .NET, especially for Windows. Kate is a Microsoft Regional Director, a Visual C++ MVP, has written over a dozen books, and speaks at conferences and user groups around the world. Kate develops courses on C++, Visual Studio, and Windows programming for Pluralsight.


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

Her course on coursera "Beautiful C++: STL algorithms" really changed the way I code C++ and made me appreciate it much more. Awesome talk!

bilbobeutlin
Автор

Timeless wisdom from Kate once again. Thanks for this great talk! Every dev - no matter the language! - should watch and embrace this. On a personal note, I have to do lots of work for certifiable software, and most certification processes are inherently very, very hostile towards code refactorings. Effectively, refactorings are often too expensive to be made because while the tools do it in sub-seconds, the subsequent paperwork will take days or weeks. So often times, code is not allowed to be made better in the spirit of this talk, and that is an extremely unpleasant thing to experience.

IncompleteTheory
Автор

She is great, entertaining speaker, no doubt about it.

kamilziemian
Автор

Several important parts of this talk (meaningful names, short functions, caring about the reader of code, etc.) are very, very similar to "Clean Code" practices, as praised by Robert C. Martin a.k.a. Uncle Bob. While "Clean Code" mostly referred to Java, Kate's approach is C++ oriented - which I find very valuable.
I was practicing clean code for over 3 years already, personally and with my students. And I can easily observe how much the quality of code improves. Especially my beautiful code ;)

So go for it Kate! And big thanks for this wonderful talk :)

WiktorWandachowicz
Автор

Brilliant talk. Clear, concise, well explained. Thanks, Kate.

davidmiller
Автор

Love the way this woman simply presents the stuff! I am a simple man, love simple women, and i must learn simply simple things.

Ptr-NG
Автор

This talk is great. There are two kinds of people who don't like it. Those who already do everything she says, and the talk really isn't for them, and those that like their complexity and don't think they need it...if they get thru it without being convinced, it probably isn't for them either. I knew a lot of these, but do I always DO them? No, and it makes a difference.

jvsnyc
Автор

Recently i did finally use the
It was handling a user-input that sets some context-specific member-value - with the option of default-values and for different types. For tracing and styleguide we have to trace out the old and new value and the name of the member that was changed. It is not simple code but a dedicated function for a single-use object that requires several variables of the surrounding scope also seemed excessive. But sure as hell i want that "newValue" to be const as i had previously seen people doing a *"if(newValue = -1)"* and then wonder for ages why it does not work like they intended.

ABaumstumpf
Автор

I've often seen experienced developers writing a lot of hardly understandable and complex code along with a ten line comment that's even harder to understand. An attitude associated with this is that they think their code is great, because it "works" and nobody else is remotely able to understand it without spending a lot of time. That is detrimental to product development and team work. The real art is to write code that's simple yet capable of doing the job.

tobiasl.
Автор

Thank you for this talk. I'll buy pizza for my department and we'll be watching it together over an extended lunch.

JasonMercer
Автор

Writing complex code requires experience, simplifying complex code requires mastery.

beastyshout
Автор

I like it simple. It can be so easy. Great talk!

TheLavaBlock
Автор

The main question is how to convince the management that code base should be rewritten because it is not maintainable?

LiveseyMD
Автор

Good advice, very pleasant to watch and listen to.

KarelDonk
Автор

Fantastic video Kate. Much stuffs for reflection.

tomkirbygreen
Автор

Ngl, the one thing i do when i use other people's libraries: i wrap them around to 1( Simplify it, 2) To make it fit my code style.

Mempler
Автор

I like simplification too - "Make Simple Tasks Simple!" (c)

slavamelanko
Автор

Great talk.

In 20' I would add that "auto don't justify the absence of const"
Moving from
for( auto p: people)
to
for( auto& p: people)

will not protect you from modifying p.

If you need performance, don't forget correctness

for( auto const& p: people)

Another core rule "Don't forget const when using auto if you want immutability"?

botetescribavicentej.
Автор

Clicked like button 1 minute because i know talk will be awesome!

code_report
Автор

For the const recommendation, at least give our Constificator plug-in a try (as part of the Cevelop IDE). It will recommend adding const where appropriate and do so for you.

PeterSommerlad