CppCast - FluentC++
Episode Date: September 14, 2017Rob and Jason are joined by Jonathan Boccara to talk about the FluentC++ blog and the benefit of doing daily C++ talks at your office. Jonathan Boccara is a passionate C++ developer working fo...r Murex on a large codebase of financial software. His interests revolve around making code expressive. He regularly blogs on Fluent C++, where he explores how to use the C++ language to write expressive code, make existing code clearer, and also about how to keep your spirits up when facing unclear code. Jonathan loves writing, making videos, reading programming books, hanging out at conferences, meeting people, learning new languages and making trainings and presentations. News C++17 is formally approved Clang 5.0.0 Released (already on the compiler explorer) Two-phase name lookup support comes to MSVC CppCast compiles on godbolt Jonathan Boccara @JoBoccara Links FluentC++ STL Learning Resource Spread Knowledge in Your Company with Your "Daily C++" Murex Going Native 2013: Sean Parent "C++ Seasoning" Sponsors Backtrace JetBrains Hosts @robwirving @lefticus
Transcript
Discussion (0)
This episode of CppCast is sponsored by Backtrace, the turnkey debugging platform that helps you spend less time debugging and more time building.
Get to the root cause quickly with detailed information at your fingertips.
Start your free trial at backtrace.io.cppcast.
And by JetBrains, maker of intelligent development tools to simplify your challenging tasks and automate the routine ones.
JetBrains is offering a 25% discount for an
individual license on the C++ tool of your choice, CLion, ReSharper, C++, or AppCode.
Use the coupon code JetBrains for CppCast during checkout at JetBrains.com.
Episode 118 of CppCast with guest Jonathan Bocra, recorded September 13th, 2017.
In this episode, we talk about big updates from Klang and MSVC.
Then we talk to Jonathan Bulkera.
Jonathan talks to us about his C C++ developers by C++ developers.
I'm your host, Rob Irving, joined by my co-host, Jason Turner. Jason, how are you doing today?
Doing good, Rob. How are you doing?
Doing good.
I don't talk too much about my day-to-day job, but I've been pretty busy lately.
My software, the software I work on for the company, is used by first responders.
So I've been getting a lot of feedback out of Irma and Harvey.
Wow. Wow.
Yeah, but it's good.
We've been making some good fixes and improvements based on all that.
Well, it seems like a great opportunity, really, to improve the product.
Yeah, kind of crazy because we're trying to put out a release right now as is and just getting all this extra feedback as we're trying to put out the release makes things a bit stressful but i think we're uh we're finally got
the release out the door and i hope we're done with hurricanes for a little bit uh well i mean
hurricane season still has a month left so we'll see but yeah we'll see or however long it is i
know it goes at least until october You know, I have a random comment,
random thought that I had earlier yesterday, I think it was. We have a lot of guests from
Europe, and we've had some from New Zealand and Australia, and the US. And I don't think we've
ever had any guests from Asia, or from Africarica or from india no and we've had
guests from russia so i'm just thinking if we have listeners from a part of the world that we have not
yet had on the show reach out to us see if you got something you want to talk about yeah that's
if we can figure out the time zones c++ developers all over the place i'm sure we could uh find some
from some countries we haven't talked to yet
yeah
well at the top of our episode I'd like to read a piece of feedback
this week we got an email
and I can barely
try to pronounce this name
it's from Zbigniew Skoran
so I apologize for butchering that
and he writes in
hello I really like your podcast
the episode about Volta
was especially interesting since it touched on things we don't normally hear about and yet are
highly relevant. Thanks for that. As for my guest proposals, there are a group of well-known
programmers that are very anti-C++ and even more so anti-object oriented, and they have very good
reasons for that. Even though I don't agree with them fully, I've learned a lot by looking at
things from their perspective, and
it's improved how I use C++ and
helps me avoid many pitfalls.
So we send along the recommendations, and
some of these we've heard of. John Blow,
a well-known
game developer who we may have reached
out to him once. I don't think
I'm not sure if he responded or if we
just weren't able to set that up.
But also Casey Muratori, who invented immediate mode GUIs,
and Fabian Gison, who has an interesting blog about high-performance code
from graphics to compression to assembly.
I think I know him from Twitter.
Oh, okay.
Well, we'll have to reach out to them.
Do you know him as being anti-C++?
If that's who I'm thinking of, I never noticed that, but I could just be thinking of the wrong person also.
Well, it could make for an interesting show to talk to someone about why they have that perspective.
Yeah, it could be interesting. I will say, just for the record, that it does seem to be that guests who would be anti-C++ don't tend to show much interest in coming on the show.
Yeah, yeah. It's worth a shot, though.
Yeah.
Worth a shot.
Well, we'd love to hear your thoughts about the show as well.
You can always reach out to us on Facebook, Twitter,
or email us at feedback at cpcast.com.
And don't forget to leave us a review on iTunes.
Joining us today is Jonathan Bacara.
Jonathan is a passionate C++ developer working
for Murex on a large code base of financial
software. His interests revolve around
making code expressive. He regularly
blogs on Fluent C++ where he
explores how to use the C++ language to
write expressive code, make existing
code clearer, and also about how to keep
your spirits up when facing unclear code.
Jonathan loves writing, making videos, reading programming books, hanging out at conferences,
meeting people, learning new languages, and making trainings and presentations.
Jonathan, welcome to the show.
Hey, it's good to be here.
Definitely.
Thanks for joining us.
Looking at your bio and you say large code base, and I've noticed a huge range of definitions
for that.
So I'm curious, what do you consider to be a large code base and i've noticed a huge range of definitions for that so i'm curious
consider to be a large code base well our code base is in the tens of millions of lines of code
that counts as big yeah yeah well you've got bigger of course but it's fairly big
so it's big but not necessarily Google big, I guess. Yeah, exactly.
Okay, well, Jonathan, we've got a couple news articles to discuss,
and then we'll start talking to you more about your blog
and some of the other stuff you've got working on, okay?
Sure.
So we actually have a really big news week this week, Jason.
Three pretty major announcements. The first one from
Herb Sutter's blog is
the ink is officially dry on
C++ 17.
Well, almost officially dry.
Yeah, so the draft standard
came back with
100% approval with just
editorial comments, which is like spelling and
grammar fixes.
Right.
I'm kind of curious how much work that takes, i i don't think i would want to do it incorporating all the uh editorial fixes
for some reason i just feel like you would get in there and you'd be like oh wait this one editorial
fixes actually changes the meaning of this statement or something i don't know well that
was the case i think they would just ignore it i would think right i don't know i mean I don't know. Well, if that was the case, I think they would just ignore it, I would think, right?
I don't know.
I don't think they need to respond to all those.
I think they're choosing to.
That's my understanding.
But it's Richard Smith who has that job.
We've had him on the show before, right?
That name sounds familiar.
Okay.
What I wanted to
notice about this post is
really exciting news, and I'm really notice about this post is it's really exciting news and really excited about that
but I think that most of the work lies ahead for us developers because now we need to learn every
bit of it so I think the next question is how do we learn that how do we learn to use it properly
how do we end the pitfalls and everything in it yeah i totally agree this is
something i've been spending a lot of time thinking about lately with some of the conference talks i
have coming up right how do you use it properly is a big question right i'm sure we'll see plenty
of uh cpp con talks on that subject right there's actually only a few talks on C++17
at the major conferences coming up.
We might have to wait until the next round
and we'll see what happens.
Makes sense.
Okay, next big announcement is
Clang 5.0
is now available
and some of the major new features in here
are they implemented the C++
coroutines TS.
And even though, as we just said, C++ 17 just became official,
they're saying they have full C++ 17 support in here.
Yeah, that's a big deal.
Yeah.
Yeah, and it ties up well with the previous news article
because it's great to have something to experiment, right?
Yeah.
And also they have officially made the coroutines TS option available, acknowledging that it's a TS in there.
Right, right.
And, okay, so I don't know how closely you all looked at this, but one of the things under here is clangs diagnostics.
And,
uh,
that is obviously something that I'm going to look at.
And I noticed this very first one dash W cast qual was implemented for C plus
plus,
but I could not figure out when that warning class is supposed to come up
and how to actually get it to warn and C plus plus.
Are you guys,
did you spend any time playing with that
no i did not play with that no i haven't really so just for the record clang 5.0 is already up
on the compiler explorer if you want to go to godbolt.org right that's cool the other thing i
saw that was interesting is they're not with this but with version 6, they're going to change the default from what it currently is,
which is C++98 to C++14 as the new standard.
Which actually makes them the last compiler
to make that change for the defaults.
Yeah, so they're making this to more closely match GCC's behavior.
Yeah.
I'm surprised they're the last ones to make that change.
And the next article we have,
which is another pretty big announcement,
is Visual Studio is getting two-phase name lookup support.
And this is something that I think we've talked about a lot recently
when talking about their compiler updates.
And, yeah, it's finally coming.
It's still a work in progress.
But with the 2017 cycle, they're saying they're going to have it fully done.
Right, Jason?
Yes, but I'm sure there will be...
I mean, if you consider what this undertaking is,
they've effectively been trying to rewrite the parser for C plus plus for
visual studio while still continuing to push out major releases.
They didn't do,
like they said,
they didn't do a break and then try to do it all at once and then make one
major release.
So it's a huge undertaking with a lot of potential risk,
I think,
although probably less risk than trying to just go dark and release a big
release all at once. I don't think they could do that because they're such a customer
focused company. I don't think they could just disappear
for a year or two working on this.
It's great to have two-phase name lookup support in Visual Studio.
I'm sure that'll help a lot of libraries
that maybe are doing special behavior just for Visual Studio.
Hopefully, I'll be able to remove that eventually now.
Yeah.
And then the last thing, Jason, you pointed this out on Twitter
that Matt Godbolt worked on some code on Compiler Explorer that gets the CppCast code to compile.
Yes.
That made me very happy when I saw it.
Go ahead, Jonathan.
Yeah, I was going to say, this one was really funny.
When I saw it, at first I didn't get it.
I thought, how did he just do that what is this cast i don't know like podcast and then and i saw the trick yeah i had mentioned
to him on the side that you know it bugs me to see the c plus plus in our official logo because
i'm like it has to be a constant expression.
There has to be a way to get this to compile.
And we chatted for just a couple of minutes
that it would probably have to come down
to some sort of constant expression,
plus plus operator overload and whatever.
And then 10 minutes later, he comes back with that example.
I guess he was bored enough to sort it out.
But it's been bugging me for years that I look at that and say,
that can't compile.
I apologize that I wasn't thinking about it in that much depth, Jason,
when I first just wrote that little snippet.
It should have been just podcast CPP, I guess.
But to me, that didn't look as good.
It's fine. The standard caught up with us it works it works and uh you know other people and other conferences have done
similar things and now we know that there are ways to make these things compile yeah
well i was very happy about that yeah i'll put the link to that to that in the show notes in case everyone wants to see
how that's done uh under the curtains yeah yeah i saw one comment on twitter that you know it
shouldn't return zero it should return like pi or something so if anyone wants to take it to the
next level somehow by all means go ahead yeah okay so jonathan um we've talked about your blog posts a lot on this show during the news every week.
You managed to be pretty consistent with your blog, posting articles twice a week.
How did you decide to post that often?
Well, from the beginning, when I started Fluent C++, I was very clear with myself that this wouldn't be a hobby.
I wanted it to be a real project to which I would be committed.
And its purpose would be for me to learn and also to try and bring something to people.
But the thing is, back when I started, no one knew me.
So I had to deliver as much value as I could in a short amount of time.
So I set for this rhythm of posting twice a week on Tuesday and Friday.
And it seems like that must have been working well for you.
It has.
Well, you know, about a year ago before the block started
i was feeling very proud of myself because i was listening to cpp cast and and today i'm on the show
so yeah it has worked but more seriously um i've i have what my purpose was to learn and to read something to people, and I have learned
a ton of things, like, that's bloody amazing.
And I've received quite a few pieces of feedback from people that said that some posts had
helped them, so I'm really happy with that, and people are giving feedback and proposing
things and commenting and sharing, so, yeah yeah it's going okay i'd say i have to imagine also that you're getting like a
consistent growth on your readership numbers just uh i mean it seems like that kind of consistency
publishing every uh twice a week is huge for getting regulars coming back to your website.
Yeah, yeah, you're right.
I've seen, yeah, basically constant increase in readership,
except for some posts that went really crazy without really me understanding why.
But, yeah, yeah yeah you're right do you have a hard time uh coming up with topics to write two
posts every week well i haven't so far and i hope that this will continue um but there's a lot of things that I want to say really. I'm drawing inspiration from
several things, actually quite a lot of things. One of them is my daily work so I
see problems every day at work, I mean that's a point of work, and I try and
solve them most of the time with people and we come up with solutions and those problems I try and extract the generic things that would be useful to other people. been involved in um and also you know when you put things down on paper well not on paper but
blog but you know what i mean um you you see holes in your understanding that you see points that you
didn't plan and that and and then you understand that your topic that you're tackling is much deeper than you thought initially.
So it happened quite a few times that I would write about something and realize that there would be a big chunk missing
and big enough that there would be a new whole post just for treating that.
So digging deeper brings content.
And I think it's also really interesting
because I think people like getting deep
into the topics we discuss about on the blog,
the technical topics.
I think it brings value.
Well, also, I try to give a lot of priority
to people's reactions.
It happens sometimes that I write something, write an article about something,
and then someone would comment on it and say that you could do that differently.
And most of the time, it's way better than what I proposed in the first place
so when it happens I'm really happy because because it's an opportunity to
go further in the topic and that's an opportunity to to develop this idea that
the person would suggest and I always try and bring them forward and to give
them credit on the post
that i shape after the comment if there's enough material to to create a post from that so i really
try to give priority to people's reaction which are invaluable most of the time also um i think
a great way to realize things about programming in general is learning other languages.
And if possible, languages that are as different as possible from your main language.
Like a couple of years ago, I got a bit into Haskell.
And this is obviously very different from C++. But it gives you a point of view on programming,
which is quite different from what I was used to seeing.
And more often than not, you can draw things from that
and apply it to your programming style in your language.
So I've learned a lot of things with that.
I'm trying to express
them through the blog articles. Apart from that, I'm trained with books and other blogs
and listening to podcasts. I'm a regular listener to CppCast. I think you guys are doing an
amazing job, by the way. And I'm also trying to keep up with watching conferences,
CppCon and meeting C++.
There's a ton of content available on YouTube
that's just asking to be watched.
Yeah.
Yeah, I was talking with someone not that long ago
who talked about watching all of the videos
from a previous CppCon,
which is just an outstanding feat in itself i
think right so it would have to be i mean there's what six tracks of cpp con i'm just trying to
think how many hours of content that would be yeah and i'm pretty sure there's seven tracks for 2017
if i was looking at the schedule correctly it is a lot of talks that's going to be happening this year.
I was listening to how you describe coming up with the ideas for your articles,
and you said that as you dig into it,
you notice that the problem is perhaps deeper than you originally thought it was.
And I started to think it seems almost as though you've made a discipline out of doing,
I forget the exact word, is it like rubber duck debugging or whatever?
Do you know what I'm referring to?
Like where you just try to just, that's the concept where you like, if you have a problem, you basically describe it to your teddy bear or whatever, just to get your brain talking through the problem.
And then that makes you think about it a different way.
Right. Yeah, well, I think that one of the most efficient ways
of learning something is explaining it to somebody
or writing it down, which comes down to the same thing.
Because when you do it, the things that you know, before you write them down, they're merely thoughts.
And thoughts are deceptive because you may think that you understand something, that you have a global vision on something.
And it turns out that this is not true i mean for me it's it's
more often than not it's not true and uh explaining them forces you to structure your thinking
and then you start to see it in a different way you take a step back really and then you
you got a vision where you see what's missing and what's there.
Do you have a favorite article or a series of articles on your blog that you'd like to shine a light on and point to our listeners to?
Yeah, sure.
Well, I think I talk about a series
which is more like a part of the blog really,
which I have dedicated to learning the stl
i've called that the stl learning resource i uh i think you've talked about it on the on the show
actually uh with stl i mean the guy not the library um well i think that learning the STL is fundamental for writing expressive C++.
I came across this idea by watching a talk from Sean Perrin, you know, the C++ Sittling Talk.
That was a real eye-opener for me and I guess for a lot of people too.
So, I mean, if somebody who's listening now hasn't watched it,
then they should rush to their computer and watch it.
Yeah, you should try to put a link to that
in the show notes, Rob.
That is a great talk.
Oh, definitely.
In the talk, Sean shows how he transformed
a chunk of code that was really hard to grasp
at first sight,
it down into just one or two calls to functions
coming from the algorithms section in the STL,
and then the code would just speak for itself.
And that was mind-blowing.
And Sean Perrin said that you should know your algorithms.
Yes.
So I think this is really important.
Now, how do you learn your algorithms?
I pondered over the question.
I tried to learn them myself.
And there are quite a few of them.
I reckon that there are about 100 of them before C++ 17.
I was going to say, and growing.
Yeah, it's growing.
And I think just saying I'm going to learn them,
I don't think this is the most efficient way to go there.
I've thought about it.
I've thought about that.
And I think that the most efficient way I have found is to learn them by grips
By grips because some algorithm they relate to each other some are slight variations
of all the algorithms and
When you see them this way by grouping them they will share some commonalities like some
common use cases or some common pitfalls that you want to know about so in this
STL learning resource I'm putting together my target is to write an
article per group of algorithm and and discuss how they are useful how they
relate with each other what the pitfalls are and hopefully this makes them easy
easier to learn I mean for me it was definitely easier sometimes you you'd
find an algorithm that's so important that I would treat it just by itself,
like to transform, for example,
because there are so many things to say about that one,
which pops up so regularly when you use the STL.
So I think that I'd like to, yeah,
put forward the STL learning resource as a series.
Now, there has been a couple of articles
that went crazier than i would think like
how to do during the summer to get better at c++ i think we've talked about that one on the show
and this one went mad and there's not one single line of code in it
anyway there's also one on meta classes where I tried to summarize the proposal, which I think is really important to know, even though it's not real yet.
I mean, it's not available yet.
And some posts and smart pointers, I got really good feedback on them and some strong types as well.
So that would probably be the one that I would point somebody to.
I was curious if you have found the grouping that's on cppreference.com, which I'm not
sure if it's the same thing that's also in the C++ standard.
If you're grouping them yourselves or if you're finding value in any of the groupings that
exist on other websites or resources.
Right.
I reckon that the grouping in the standard is essentially mutating algorithms and non-mutating algorithms.
And perhaps numeric as well.
I think this is about that.
And CPP reference has more detailed grouping, I reckon.
But I think that we should group them more,
as in in smaller groups, to show how they really relate with each other in smaller groups.
Okay.
I wanted to interrupt this discussion for just a moment
to bring you a word from our sponsors.
Backtrace is a debugging platform that improves software quality,
reliability, and support by bringing deep introspection
and automation throughout the software error lifecycle.
Spend less time debugging and reduce your mean time to resolution
by using the first and only platform to combine symbolic debugging, error aggregation, and state analysis. At the time of error, Bactrace jumps into action,
capturing detailed dumps of application and environmental state. Bactrace then performs
automated analysis on process memory and executable code to classify errors and highlight
important signals such as heap corruption, malware, and much more. This data is aggregated and
archived in a centralized object store,
providing your team a single system to investigate errors across your environments.
Join industry leaders like Fastly, Message Systems, and AppNexus
that use Backtrace to modernize their debugging infrastructure.
It's free to try, minutes to set up, fully featured with no commitment necessary.
Check them out at backtrace.io slash cppcast.
Do you have any suggestions for listeners who are interested in blogging
and maybe want to get more readers on their blogs or anything like that?
Yeah, I do have quite a few, actually.
I've been doing that for most of my time over the past few months.
So, yeah, I guess I've got a couple of things to share
well first of all blogging is a great project um it's it's fantastic because you get to learn
by explaining things as we discussed before and you get to meet all those people i mean don't
meet them face to face but you you chat with them online and all those people they're going to bring with them or their point
of view on the topic you're passionate about and so that makes you grow really
and you're also helping people so I think this is a good experience this is
a great great experience now that a couple of things you have to know before
starting about being serious about blogging. Actually, I'm going to point out people to
great resource before giving the things that I've realized on my own. I've learned quite a few
things on the side in the work of John somers which you talked about on the show
when you invited arne mertz i reckon yeah yeah we mentioned john somers and he's the one who has
the list of all the podcasts on his blog yeah the one you won yeah i think right um so what he's
doing is uh i think this is great and particularly when it comes to blogging.
So, people that want to get serious about blogging should go check it out.
Now, as far as I'm concerned, I'd say that if you wanted to be serious about blogging,
and this will bring you a lot of things, you have to know that this is bloody hard work.
It takes time, you know. it takes time to write articles, it takes time to research
for topics, to chat with people, respond to comments, take care of emergency that happens
on your website.
I mean, it takes a lot of engagement engagement so you have to know that in advance also you have to when you when you write things that you
put in front of people you have to know that you will face criticism you will
now there are several ways you can react to that and I think that you
should really listen to criticism and to what people have to say. Some people
they come across as really mean in their comments and I'm sure that most
of them don't intend to and that's's okay. I mean, you shouldn't care about how criticism is formulated.
You should really discard this aspect and focus on what it is they have to say.
Because most of the time, when I write something, because that's my point of view,
when I write something, I'm really close to it and I miss things.
And someone who's just discovering my article as a whole,
they would see things that I wouldn't see.
And they would know things that I don't know.
And that's the whole point of it.
And so you can really learn from what people have to say.
And I think you have to be respectful
to to people that are um criticizing your work and and and try and understand what what it is
that they think is wrong and and find a way to grow uh with that then and help people with it
um related to the same topic um in such a big project you're investing so much of yourself into,
there are moments where you have to push through.
Sometimes this is hard.
I mean, for me, I'm lucky enough it hasn't been too hard,
but that's what I hear about other bloggers in general and some
sometimes you just don't feel like don't feel like writing an article you you you want to watch your
episode of game of thrones with your family or something and and you got to push through
so this is really important uh you have to see the big picture. It's not just about one article. And if one particular article just doesn't land well, you shouldn't stop everything because of that. You should try and grow from it and push through. that helps you pushing through everything is um if you love what you're doing um i love i love to
write really i really do i love to chat with people um and this is something that takes so
much of your time that you need to have a strong motivation to to go on with it and the best one you can find is enjoying what you're doing
so if you if you're doing for i don't know being famous or making money or whatever i don't think
this can isn't this can get you through the whole thing you have to love it and have a strong
motivation of learning and and helping people or anything that drives you.
You know, I'm aware that it takes a lot of time.
And that's one reason why I was so impressed that you have been consistently doing two
articles a week.
I'm curious just how much time you spend if you could estimate it per week.
It varies from article to article obviously um but in average i i'd say that i spend
about two hours and a half writing an article approximately um now that's time for research
that that's really varying depending on how familiar with you're with the topic and time to discuss with people, obviously.
So at least five to ten hours a week, probably.
It's practically a part-time job.
Yeah, yeah.
Also, if you want to keep up with the schedule,
you should have one in the can, if that makes sense, just in case.
So I think you should try and write a bit
more than what you publish because if you for some reason one day you can't write then you
don't want the blog to stop yeah that's good yeah i've wondered about that uh when we've mentioned
a topic on cbp cast and then just like two days later you'll address that question on your blog. And I'm like, well, did he like push his schedule out to fit in the answer?
Or what happened there?
Right.
I think that was about move iterators.
Yes, that's right.
Right.
Yeah, I pushed the schedule.
I put that one in priority.
That's funny.
I really appreciated that you did take the time to do that.
So what is this concept of daily C++ that you're starting to work on?
Actually, I'm sorry, Rob, but there were a couple of things I would add to the blogging thing.
Oh, sure.
Okay.
If I can.
Okay. If I can. Okay.
There's one thing that is really important.
Before that, there's something that you can do to get more traffic because that was your initial question.
I'd say for people that are just starting out,
to consider guest posting,
which consists in writing posts on a blog that has already a
fair amount of traffic I've started to do that on Arne Merz's blog and I've
done it on Cipa programmer which is John Sonmez's blog and I think that
brought quite a few people I mean some people told me that I knew your blog through that and that,
so that definitely brings people around.
So I think that's good, and this is also valid for people that don't want to start a blog,
that don't want to get into the hassle of managing a blog,
but that have something to get out in front of people, you can just
do one-time guest posts on a blog. So I think it's good practice. Actually, if people are
interested I'm more than happy to consider guest posting on Fluency++. We've just started
to do that this very week actually, and that went pretty well. So I'm happy to talk to people that would have something to say
or whether they have a blog or not, really.
And one last thing, which is, I think, really important that I want to mention,
is that if you have a family and you want to take on such a project
as having a regular blog then you should
let them know in advance where you're going because you're gonna spend time
you're gonna spend evening typing away at your computer you're gonna spend
Sunday afternoons working so you have to be clear with them and they have to agree with that
and give you their support
you're going to need it one way or the other
actually I want to grab this opportunity
to thank my wife Elizabeth for that
she's been very supportive
and she seems to have an infinite amount of
patience with my projects and she's brought on a lot of support. So I really want to thank
her for that.
Excellent.
Yeah, it's definitely very important. So what is a daily C++? Yeah, right. So a daily, first of all, is a new format of presentation
that consists in doing short talks of about 10 minutes, but every day.
And you give them to a particular team in your company
and you give them right in the office spaces where people
actually work so you pick a topic say C++ for example and that would be the
daily C++ and every day you do your 10 minutes talk to a company to a team in
your company right in their office we've been practicing that for a bit more than a year
in my company at Murex and this has become a common practice now. The thing is it's interesting
because 10 minutes is a short amount of time and that fits in pretty much everyone's
schedule that you can fit 10 minutes in your day to learn things and it's also
short enough so that you don't get bored didn't have the time to really and it's
it's designed so that it's super easy to attend. Because when your team is hosting a daily,
say the daily C++, for example,
then all you have to do is turn back your chair,
listen to the daily for 10 minutes,
and then carry on with your day's work.
And you don't need to spend a second.
Now, when you're the presenter of a daily session,
then you move on from team to team Now, when you're the presenter of a daily session,
then you move on from team to team every month with the same content so that you give your talks to everyone who's interested in your company.
And when you've gone to everybody, then you can start over with new contents um what's um so these are smaller like intimate presentations with just
like a few co-workers at a time yeah that's the idea now you could the the days the rooms and
times are public so everyone can join and we have typically about 20 to 30 people attending a daily in
general which is more than just a team you know so people are joining in what's
interesting when you do a daily when you present a daily is that you learn by
explaining which is what we've talked about, and you get to meet people, and you meet them face-to-face.
Those people are a very enriching experience.
Meeting them is a great experience
because they're going to come up to you with questions,
and they're going to show you their point of view,
and you're going to see a new vision on a topic that you're passionate about.
Also, you're going to know who's passionate about the same topic as you. So for me, it's C++.
And I'm doing the daily C++ in my company. And by doing that, I've met some wonderful people
that I wouldn't have known if I didn't do that. It's the people that
would come up to me and ask questions and would chat about C++ and this makes you really
C++ friends, if I may say. So it's a great experience to do a daily as a presenter. Now
it takes a bit of work, obviously, because you have to come up with contents.
A module for a month is say from 10 to 20 talks so you have to produce that.
Well it's a great exercise to produce that.
Now not everyone has the time to come up with contents and I I don't know, write about them and give a transcript or something.
So I think this is such a great experiment, and I think that everyone should have a go at that.
And since I don't want this to hold you back to not have contents,
I'm encouraging people to use the contents on Fluent C++ to fuel their daily
sessions. There are actually quite a few posts that I craft with that in mind because I use them
in my daily C++. So quite a few of them focus on a precise topic and they fit in about 10 minutes and they're structured in a progressive way. So if you want to make it even more useful to people,
a good way I found is to give out the content
that you're actually talking about in the form of a transcript, for example,
and to compile it into a handout, a booklet.
So if people want to use
the content on Fluent C++ to their daily C++, then I'm more than happy to compile the post that
they're using into a PDF that would be formatted for that. They can print it out and give it to
people. And I think it's something you want to try because you don't have anything to lose. I mean, if for some reason it doesn't work out,
then it would just have been an experiment.
But if it works out, then you have so much to gain.
I really like this idea.
You know, we talk about C++ user groups a lot on the show,
but it seems that there's so many C++ programmers out there
who aren't attending user groups, who aren't going to conferences,
and being able to introduce them to a little bit of community
while they're at the office and only takes 10 minutes
seems like a really fantastic idea.
Yeah, it's gone quite well.
Actually, there are other people in my company that picked it up
for their own domain of expertise we
had a daily Java daily functional programming a daily sequel daily UI and
we even had a daily Bitcoin even though we don't do Bitcoin but it's just
interesting so we had teams that were willing to to learn 10 minutes of
Bitcoin every day for a month so it just takes somebody who's willing to give the talks and
a team that's willing to host it to create a daily session do you find that your company is
cooperative with this and they give you the time and flexibility to present oh absolutely
this is something that's great with the place i'm working at Murex we really put a strong focus on
learning and getting better at what we're doing so when I decided to
try this experiment I just came up to my manager and asked him if he was okay and
he just told me to try it out.
I actually want to thank him for that.
He's actually a fantastic manager, Patrice.
And so I tried it out, and people liked it,
and we just carried on, and it got bigger,
and that just happened.
And no one tried to get in our way because this was different.
So, yeah, it was great to that extent.
Excellent.
Do you want to talk a little bit more about what you're doing at Murex with C++?
Sure.
So we're working on a large code base,
which is in the tens of millions of lines of code.
It's a financial software. I'm with the team who's in charge with everything related to equity, so stocks or shares in a company. So we do stock options and futures
and stocks and stuff like that, which is a very rich domain and quite interesting and stimulating. On the technical side, the challenge is to
make this software evolve. The company has been around for like 30 years. And I don't
think there are bits from the beginning that are remaining today in the code, but you've got bits dating from various ages so you have to to make that
work to maintain it and and include functionalities as clients are asking
and I've after after the years I found that the single most important thing
that would help me in my job would be to try and write expressive codes and
This is what got me started on this topic and and this came to be the topic of my blog
because
if you
if you
Have a hard time understanding codes if it takes long to understand what you're reading then you're gonna
need time to figure out and time is money in a company so you expressive code makes you money
but in a less practical point of view if you if you if the code speaks for itself
then it's going to show you where it's wrong,
and you're going to spot bugs more easily.
So being expressive makes it easier to have a more correct piece of software.
And also, and this is a big debate that I see coming up every now and then
on the internet or everywhere is about performance. So should you favor
a piece of code that's more expressive or that does less? Say, for example, if you have,
I don't know, a collection that you would do two things on, is it better to do the two things at the same time when you
run it down or should you run it down two times? That's just one example. And I think
that you should always go for the cleanest option. I found this is what works on the long run. I always do that and I treat
performance problems afterwards when they come up. When we identify where the
bottlenecks are then we fix them and sometimes then yeah we have to make
sacrifices to have a application that runs fast. But you don't want to damage your code beforehand,
before you know where it matters.
So working at Murex has taught me that
you really want to favor expressiveness in your code.
So working on this 10 million,
multi-million lines of code project
that you said has evolved over so uh so many years
do you get the opportunity to use uh more modern c++ 14 or even c++ 17 in the code base
right well we're actually in the process of migrating our compilers and we're nearly there
we should have it anytime soon uh to++11, I reckon, or 14.
But it's been a bumpy road.
Well, there are lots of codes, and we're sporting several platforms.
So we've got a bunch of compilers to work with.
And it's been a huge amount of work to migrate in that direction.
But this is something we're really adamant to achieve so yeah we're on our way and nearly there now there is a point i want
to make about that about modern c++ i think there's a bias on the internet or in conferences because when you go see
blogs or you go watch talks modern C++ is all over the place and when you go
back and look at your code if you don't have it then you feel like crap you feel
like you're the only person in the world that doesn't have it now I don't think this is true I I meet I meet
people you know I hang out in user groups often and I chat with people and
and quite a few of them they're stuck with C++ 03 and they're not even in a
process of moving you know for various reasons
and also have feedback from people on the blog on freemad c++ that would ask me to produce content
specific for c++03 because they that's what they have so i want to say that that there's a
difference between what you see on the internet, which is the most
modern thing, which are really exciting, and that's what you want to talk about, and what
some people have in their production code.
So for the people that have C++03, then you're definitely not the only one in the world. And in that situation,
I think that whatever your version of C++ in your production code, I think you shouldn't refrain
from innovating in your code. There are so many things to learn about C++03. I mean, there are, I don't know how many
books, I've written a post about books to learn C++, and there are so many, so many things to
know. So you've got things to learn. And also, you've got things to learn about how to design
code. And quite a few things are independent
from one particular feature in the language,
like how to make an interface clear, for example.
So you can still do things,
even if you're not there yet.
However, don't get me wrong,
I think you should do whatever is within your reach
to have modern C++ in
your production code. But if you don't have it, don't suffer and don't
stop from trying and do great code. Also, about that, I think that whatever
version you're working with, you should know and care about what's coming in the language,
in the version that you don't have yet. I mean, I don't think that many people have
C++ 17 working in their production code. I mean, Clang just came out with those features, so
pretty much no one has it, I suppose, in code but anyway I think that we should all learn it now because it shows us where the language is going and
this knowledge we can factor it in our codes even if we're in C++, I don't know, 03 or 11, we can use this. I think that even meta classes are worth
knowing about, even if they're merely a proposal that will probably evolve over the years.
I think we should know what that is. And this is why I've talked about it on my blog, because it gives you a perspective on the language.
And you see how the features that are there today, how they fit in this picture.
And this gives you more hindsight about the language.
And you can use this knowledge in your code.
Now, even if you don't have the latest version of C++, there are ways to get the features, at least some of them.
Some features are extremely easy to get, like algorithms in the STL.
You know that some algorithms appeared in C++11?
I don't know, like Olive or any of which are so useful?
Yes.
These are,
just take a second to implement. You can just
copy and paste the implementation that's
up on cppreference.com
into your code and start using
them. So this is the most
easiest thing you can get.
Or just call boost.
Yeah, that's what I was going to say, exactly.
So boost has features that are coming up in the language,
like optional, for example.
It's been in Boost since forever.
And it's been in the standard since C++ 17.
So you can start using optional if you just take in Boost.
And that's what we're doing.
You can emulate quite a few feature, even unique para.
You can emulate it, not just the same,
because you don't have move semantics,
but you can do something that's much better than auto PTR.
Heck, you can even implement some ranges, components,
that we don't even know when they get
into the standard you can you can implement like range adapters you know
like filter and transform and that that those amazing thing that you can plug
onto a collection and you can like wrap them within each other and have a code
that that's more expressive than one you could imagine.
You couldn't get that in C++, even C++03, let alone C++11.
So I think that if you want to use modern feature and you should have a go for it,
then you have options.
Yeah, absolutely. It's been great having you on the
show today and talking more about your blog i saw that you're going to be speaking at meeting c++
this year before we let you go could you give us a plug for that talk yeah sure so um at meeting
c++ i'll be talking about strong types so by type, I mean using a type that has a specific name
that's more meaningful than a primitive type.
Say, for example, you're representing a serial number
and you're using a string for that,
then you'd use a class, serial number,
that does pretty much the same thing as a string,
but that's called serial number.
There's a lot of things to say about strong types. So I'm going to talk about what they are, that does pretty much the same thing as a string, but that's called to your number.
There's a lot of things to say about strong types, so I'm going to talk about what they are,
how they can be useful, and also really practical C++ related issues with strong types.
How to pass them as reference, how to use them on generic types, how to use them on LOMDATs, for example, how to do conversion, how to use the
functionalities of the underlink types,
how they would
impact your performance, and that kind of
things that would be
really practical for strong typing
in C++.
Sounds great. Yeah, sounds really good.
And of course, people can find your blog
at fluentcpp.com, right?
Right.
Okay.
Well, thank you so much for your time today, Jonathan.
Thank you so much.
Yeah, thanks for joining us.
Thanks so much for listening in as we chat about C++.
I'd love to hear what you think of the podcast.
Please let me know if we're discussing the stuff you're interested in.
Or if you have a suggestion for a topic, I'd love to hear about that too.
You can email all your thoughts to feedback at cppcast.com.
I'd also appreciate if you like CPP cast on Facebook and follow CPP cast on
Twitter.
You can also follow me at Rob W Irving and Jason at left kiss on Twitter.
And of course you can find all that info and the show notes on the podcast
website at cppcast.com.
Theme music for this episode is provided by podcastthemes.com.