CppCast - C++ in Finance

Episode Date: May 26, 2023

Antony Peacock joins Timur and Phil. After rounding up the news, we chat with Antony about what it's like to work in finance as a C++ developer, the similarities and differences to games dev and how y...ou can break in to a role in finance. We also discuss what it's like to work in tech as someone with dyslexia. News Visual Studio 17.6 released Valgrind 3.21 released Snitch 1.1 Meeting C++ Call for Speakers (until June 18) CppCon Call for Speakers (until June 25) Links P2547R1 - "Language Support for Customisable Functions" Maven on C++ "How to get into the tech industry" (Maven's blog) Interview question at Maven "C++ 20 Techniques for Algorithmic Trading" (webinar) "C++ Concepts and Fireside Chat on Algorithmic Trading" (webinar) "C++ and Python for Algorithmic Trading" (webinar) Example algo trading code from webinar series (1) Example algo trading code from webinar series (2) Antony's article on Neurodiversity and Dyslexia Diversita (UK) P0201R6 - "polymorphic_value: A Polymorphic Value Type for C++" P1950R2 - "indirect_value: A Free-Store-Allocated Value Type For C++" EVE - the Expressive Vector Engine P1385R7 - "Linear Algebra" P1935R2 - "A C++ Approach to Physical Units" mp-units - Mateusz Pusz' implementation of physical units P2547R0 - "Language support for customisable functions" "Why tag_invoke is not the solution I want" - Barry Revzin

Transcript
Discussion (0)
Starting point is 00:00:00 Episode 361 of CppCast with guest Anthony Peacock, recorded 17th of May, 2023. This episode is sponsored by JetBrains, smart IDEs to help with C++, and Sonar, the home of clean code. In this episode, we talk about some recent updates to C++ tooling and some conference news. Then we are joined by Anthony Peacock. Anthony talks to us about C++ and the finance industry. Welcome to episode 361 of CppCast, the first podcast for C++ developers by C++ developers. I'm your host, Timo Dumler, joined by my co-host, Phil Nash.
Starting point is 00:01:12 Phil, how are you doing today? I'm all right, Timo. How about you? I'm not too bad. I just came back from C++ Now, which was happening last week. Very exciting conference, and I have to say that the jet lag this time is actually not that bad, even though there's nine hours difference. But I actually feel quite all right. I think my body is slowly adapting to these conference travels. How are you, Phil? Sounds like you're becoming a traveling native. Yeah, it's a shame I didn't make it to Aspen this year, but I am back from part one of my Scandinavian tour. So I was in Copenhagen last week, but also visited a meetup in Malmo.
Starting point is 00:01:49 Met some great people, both locations. Wanted to give a shout out to them. But then next week I'm off again for part two of my Scandinavian tour. I go to Oslo and I'm going to be there for a few things, mostly NDC Oslo, but I'll also be speaking at the Oslo C++ meetup on Tuesday. But again, by the time you hear this, that will have already happened few things mostly ndc oslo but i'll also be speaking at the oslo c++ meetup on tuesday but
Starting point is 00:02:05 again by the time you hear this that will have already happened because we're recording the week before so um if i saw you there it was great to see you so phil um you're doing a scandinavia tour and you're coming to see me in finland i'm going to try and not take this personally and also um i mean finland is also technically not part of Scandinavia. So I guess you're getting off the hook on that one. Yeah, we'll need to expand it to a full Nordics tour at some point, in which case I need to fit in Finland and Iceland. But we'll see where we can work that out.
Starting point is 00:02:39 Well, you'll be happy to hear that we actually started our C++ Helsinki meetup. We had the first informal one a few weeks ago where we just went to the bar, but we're going to have a proper one with talks and everything in June to be announced soon and hopefully monthly thereafter. So I very much hope you will make it to Finland at some point soon. You're always welcome, obviously. I'll definitely be there at some point. All right.
Starting point is 00:03:02 At the top of every episode, I'd like to read a piece of feedback. Today, we have a tweet by Victor Siura, who wrote, I'm a little behind listening to CppCast, but I wanted to give kudos to Timo and Phil for doing a fantastic job at carrying the torch from Jason and Rob. Well, thank you, Victor. My favorite recent episode is the one with Andreas Weiss about safety-critical C++.
Starting point is 00:03:24 Well, thank you very much, Victor, for the feedback. It seems like we really struck a nerve there with the safety topic. Very, very glad to hear that. And you can tell that Victor really meant it because he not only tweeted it, but he put it on Mastodon and LinkedIn, possibly other locations, but that's
Starting point is 00:03:40 the places I saw it. So, thanks, Victor. Well, thanks. It's always good to hear that people like listening to the show. So we do like to hear your thoughts about the show. And you can always reach out to us on Twitter or Mastodon, or you can also email us at feedback at cppcast.com. Joining us today is Anthony Peacock. Anthony is a software engineer in the trading industry.
Starting point is 00:04:01 He started working life in the games industry in 2004. Since then, he moved into finance before making the transition into quantitative analytics and investment banking, which proved a natural domain for an interest in high-performance computing and numerical techniques. This led him to the trading domain, where he has since worked for hedge funds, market makers, and proprietary trading houses in the low-latency trading domain. Most recently, he's worked on developing a graduate training program and has become involved in a webinar series on algorithmic trading due to the lack of resources the industry provides to those newcomers aspiring to break in.
Starting point is 00:04:37 Anthony has an ongoing interest in the ISO C++ standardization process and hopes one day to finally see some of the papers he has co-authored make it into the C++ standard. Anthony, welcome to the show. Thank you. Thank you for inviting me on. So you moved from games into finance. I mean, having also worked in finance myself, I hear this story a lot. I know it's actually surprisingly common. But did that transition feel natural to you? Yeah, I think it's surprising how natural it actually is um and perhaps it's worth expanding on that a little bit um i mean i think you know
Starting point is 00:05:12 if you think about games um most people probably wouldn't think it but there's a lot of maths there there's a lot of linear algebra including geometry um you know calculus all sorts of mathematical techniques and that very closely relates the kind of mathematical techniques that you see in quantitative analytics and i think also you know in in quant groups often they're running very big numerical calculations that they have tight computational budgets to adhere to or they need to get trading numbers for the trading desks the next day and if things take days to run because they're running too slowly, that's a problem. And so there's a real desire to use high-performance computing techniques to speed up those calculations.
Starting point is 00:05:54 And those techniques are pretty much the same techniques that you see in games in a different context. Right. Right. Anthony, so we get more into your work in just a few minutes. But before we do that, we have a couple of news articles to talk about. So feel free to comment on any of these if you like, okay? All right, so first up, we have Visual Studio 17.6, which got released recently.
Starting point is 00:06:15 There's a lot of stuff in there for C++ developers. They have implemented various C++ 23 library features, such as views, zip transform, views repeat, lots of other range of stuff. They implemented the monadic functions for std expected, which was that proposal that made it into C++ 23 at the very last minute. They have vectorized implementations of find and count and lots of other stuff.
Starting point is 00:06:37 Interestingly, since we spoke about game development just a second ago, they now have built-in support for HLSL, which stands for High Level Shading Language. I have to admit, I do not know what that is, but Anthony, I guess you do. It's just a dialect for generating GPU code. All right. And so they have improved their embedded support.
Starting point is 00:06:57 They have now direct import of STM32Cube IDE projects. This is something that I have seen that's actually quite cool stuff for microcontrollers. And now a VC package is added by default. So yeah, quite a few new features there. That's really cool to see vectorized implementations of things like find and count going in. I think there's been promise of those kind of things going into the standard for a long time, and we've seen little progress.
Starting point is 00:07:21 So that's pretty exciting. Yeah, particularly nice to see so many c++ 23 features going going in at this stage it's uh still quite early in the cycle absolutely yeah i think microsoft uh really upped their game there in the in recent years i think yeah a decade ago they were always kind of the one compiler that lagged behind a little bit in terms of like implementing the latest standard and now they kind of turn it around completely and they're usually now the first ones to implement stuff like that so that's pretty cool yeah absolutely and you know there's often a lot of work when you're trying to live at the bleeding
Starting point is 00:07:52 age of c++ in trying to patch your project so that you've got you know open source implementations of things like fmt or uh you know stood expected with monadic interfaces there's open source projects implementing those and uh obviously, you know, what we all want is our compilers to support these properly. Right. We have another release. Valgrind 3.21 got released,
Starting point is 00:08:14 or 3.21, I guess, which has various usability improvements. The Valgrind tools that replace allocation functions, which is pretty much all of them, except cache grind and call grind. They can now deal with misaligned use of operator new. So we have operator new that takes align underscore T for overaligned types. And if you get that wrong, Valgrind can now give you a diagnostic.
Starting point is 00:08:39 That is normally handled by the compiler. So most users hopefully won't notice anything. But if you do get that wrong, then Bargain can now warn you on that. So I found that quite interesting. And then another thing, there is this testing framework, which I have to admit, I have not yet looked into myself, called Snitch, which was released earlier this year, I think was version 1.0. We talked about it on this podcast, didn't we, Phil?
Starting point is 00:09:04 I think we mentioned it back in January was version 1.0. We talked about it on this podcast, didn't we, Phil? I think we mentioned it back in January, version 1. So is this kind of like another one of those unit testing frameworks like DockTest that implement a subset of the Catch API? Yeah. It's very Catch-like. So some people have asked, is it built on top of Catch? But no, it's completely re-implemented. And it's meant to be actually faster than doc test to to build and doc test that the compilation speed is one of the big
Starting point is 00:09:29 selling points so definitely worth looking at i've not actually tried it myself yet but looking through the with the docs and some of the discussion it does sound really interesting particularly this release with uh with constexpr testing yeah exactly so the release 1.1 got released now and they have const expo check a const eval check which is reported at runtime but actually check the compile time this is actually really cool i remember this is something i was struggling with uh when i was using catch i had to like implement my own macros i mean maybe it has that now i don't know i switched to doc test uh some time ago have to admit, which also doesn't have that functionality. I won't hold it against you.
Starting point is 00:10:08 Alright, so we're even. You're not coming to Finland, I'm not using Catch. We're good. I see how it is. Right. So that also includes const x per number to string conversions, which I thought was really interesting. I think that's also a first for floating point.
Starting point is 00:10:26 That's what the author claims may be the case. I'm not aware of another one either. But what I thought was interesting about this was you would think, well, context per number to string conversions, that's really going to have a hit on compile times, which is one of the big selling points. But apparently, it's still really fast. So I'm actually quite keen to try this out and see whether all the claims hold up yeah you probably should um add support for it in zline yeah which should i think be fairly easy if it's like a catch-like interface but i'll have a look into that right and so the
Starting point is 00:10:58 last news section that we have is we have some conference news so we have call for papers that opened for the autumn part of the conference season so uh have call for papers that opened for the autumn part of the conference season so the call for papers is out for meeting c++ which is a conference taking place in berlin and germany in november and so that call for papers has a deadline of june the 18th so you have a month from now but when you hear this it's going to be less than that it's going to be about three weeks to submit your talk there and then very fresh announcement from literally last week cpp con has also opened their call for papers i think that was wednesday last week i think with a deadline of june 25th so that's also you know not very far away and the conference itself is taking place from the 1st to the 6th of october in aurora
Starting point is 00:11:45 colorado and yeah you can now submit talks to both of those so that's a big conference in europe and a big conference in the us depending on where you are one or the other might be a good fit for you or maybe both so when you say that was announced last week is that for us now recording yes that is uh for us now recording right so it'll be two weeks ago by the time you listen to this yes if you listen to it when it comes out because we are recording a week ahead right we do that this time okay with that we come to our main guest anthony hi again how are you doing hey i'm good thanks timor how are you i'm not too bad thank you excellent so uh why don't we start off by by you telling us a little bit about what you do and how you got into the finance industry.
Starting point is 00:12:28 I mean, you had some of that into your bio, but maybe you want to expand on that a little bit. Yeah. So, I mean, as I think my bio said, I started my life in video games. So I actually did a degree in video games. I thought I was going to work in video games my whole life. And that's what I wanted to do since I was about six years old. And then I went into the games industry and it was slightly different to my expectations. It's a great industry to work in. It's a lot of fun.
Starting point is 00:12:54 But when I came to London, one of the dominant industries in London is finance. And so for the last 15 years, I've lived in London. And during that time, I've moved from a number of different kind of roles in the finance industry. I think as I said, I eventually moved into quantitative analytics, which is very naturally aligned to the kind of techniques that you see inside of video games. And then more recently, I've kind of been working in low latency trading. So how do you actually use C++ as a language in the finance industry? Is there something about C++ that lends itself particularly well?
Starting point is 00:13:31 Well, I think, you know, all finance companies would like to say that they care about performance. I don't know if that's always true. But I think there's always that objective. And so whenever people think of performance, they think of C++. And I think if you think of a lot of the big financial organizations, investment banks, a lot of them have had programming departments for 20 or 30 years. And so that removes a lot of the newer programming languages that you might use just by how long they've been running. And then I think if we talk about their kind of low latency trading domain, then that really is a place that they care about speed.
Starting point is 00:14:09 And so they'll be using a lot of C++, but they'll also be using things like FPGAs and all sorts of kind of external hardware to speed up calculations and response to certain events in the market. So in low latency, apart from those external things, within C++ itself, are there particular techniques or conventions that are very specific to dealing with that?
Starting point is 00:14:30 Yes, absolutely. I mean, in my experience, what I have seen is a huge, extreme amount of template metafrogrim. More template metafrogrim than, you know, in your worst nightmares. I've had some your worst nightmares. I've had some pretty bad nightmares. Yeah.
Starting point is 00:14:49 I think we've all worked with somebody who's, you know, the guy that introduces that template metaprogramming code that no one else can understand. Sometimes that was me. Yeah. Yeah, I've certainly been guilty of that. But certainly in the finance industry, you know, in the latency trading, they rely very heavily on those techniques because you don't want to pay the cost at one time
Starting point is 00:15:05 of anything you can do at calculation time. And I think one of the upshots of that is that can lead to very big compilation cycles. And so I think that's one of the things that's interesting is the newer standards introduce a whole load of new techniques that allow us to improve the compile time performance of C++ and give us greater control over kind of the things we want to do. You know, a simple example might be how we used to have to do looping in template metaforaming, you know, doing recursive instantiation. Then we've got fold expressions, you know, and more
Starting point is 00:15:42 recently, you know, you can use constexpr calculation, and that's just so much faster, because it doesn't create types and put huge pressure on the internals of the compiler. I think we had a proposal at some point to even have like a template for, which would be kind of a very explicit kind of compile time loop, but I think that got dropped. I'm not sure where that is now. Yeah, I'm actually quite keen on that proposal because, yeah, the tricks to do that,
Starting point is 00:16:08 you know, for example, if you want to write a switch at compile time, the kind of way you have to do that at the moment is by using macros and producing a whole load of different versions of the function for different size switch statements. If we had this compile time template for, then you could just unroll for the number
Starting point is 00:16:25 of enums that you have in your type and dispatch magically. So I think there's a definite need for that feature. Yeah. So I remember we almost got it in the C++20. There was just a minor problem with it that we just didn't resolve. And then somehow it didn't get into C++23. And then somehow it got dropped i haven't heard about this proposal in a couple years i wonder wonder what happened to it it was certainly
Starting point is 00:16:50 mentioned in the um there was a large paper on summarizing all of the potential improvements for template metaprogramming oh that was from caranthel wasn't it yeah i remember that paper that was a very good kind of overview yes i, I think it was. Things that you want to have. But I also think, you know, this area is moving so quickly, you kind of see the stuff that, you know, is going on in the Circle compiler. And there's potentially all these nice new ways of doing it, which completely outdo what we can do in C++ at the moment. And so, you know, it's a moving target for people to hit with their proposal, which makes it quite hard to get functionality in and circle is the best name for a compile time
Starting point is 00:17:29 loop they have their metaphors i don't think you can top that um can i just ask you a very different question uh you mentioned a low latency trading a couple times um and i'm just very curious because i heard the term high frequency trading quite a few times in that context is that the same thing or not or what's the difference because that's something i think i get confused all the time and i just really don't know if that's the same or not yeah they're closely related so you know low latency means you know responding to market events very quickly um high frequency means placing lots of trades. And so, you know, if you place lots of trades, you want to do it quickly, but also you might be running what's called a low
Starting point is 00:18:10 or mid-frequency strategy, but still want to get your entry into a market very, very quickly. And so you'd be relying on low latency, even in a non-high frequency context, potentially. So I guess one way or another, it's all about placing your trade as fast as possible. Well, it's less about placing your trade. It's actually more about cancelling the trades that you have in the market. Because if the market moves, and you've got a load of open positions, and suddenly there's an uptick in volatility, and somebody has re-priced quicker than you, they've put in orders to buy at a better price that's closer to the actual price of the market. And you've got your roll prices sat there. They're going to run through
Starting point is 00:18:49 your orders. They're going to pick you up and they're going to sell those orders off a few seconds later at the actual price. And they're going to have taken your money in doing that. And so a lot of what companies want to do is to protect their positions in a market without losing money. And if you think about what most of these companies are doing, a lot of what market makers do is they're trying to make markets more efficient for retail investors or for everyone. The idea is that a market maker sits in between a buyer and a seller when nobody wants to trade,
Starting point is 00:19:20 and they allow people to get in and out of positions. And so theoretically, we shouldn't want them to lose money because they're doing a service to the market. And this is why we have the expression, every nanosecond counts. Right. I also heard the expression race to zero. Yeah. I think there is an element now that for any companies coming into the market, that the race to zero, companies are competing towards the theoretical fastest possible speed you can get, which is obviously light speed.
Starting point is 00:19:51 And along those lines, there's an interesting article on Jump Trading's website about trying to trade at light speed, which was about that vein, which if people are interested, I'd recommend. All right. So coming back to C++, you said that in order to achieve those latencies that you need for this kind of stuff, you do a lot of template metaprogramming. You also said that you started your career in video games,
Starting point is 00:20:14 which is obviously also an industry that cares a lot about performance. Would you say that the approaches there are similar or different or how are they different? Can you talk about that a little bit yeah well i have to caveat that with my experience in games was um probably 13 or 14 years ago now and at the time that i was doing it it was the case that a lot of you know if you're working on a console you've got a custom compiler or at least the the back end of the compiler is
Starting point is 00:20:41 custom and so um certainly when i certainly when I was working games, we were jumping through all sorts of hoops to avoid some of the problems of compilers. And so some of the games companies I worked in didn't use templates or didn't want to use templates. They were very, very cautious about using templates because they were worried about the kind of bloat that can be generated by them.
Starting point is 00:21:03 I think nowadays compilers are much, much better at optimizing those kind of cases. There certainly wasn't template metafogging when I was in games, but there was a lot of focus on understanding how the hardware underneath the machine works. So you want to avoid cache misses, branch mispredictions, all of the kind of interesting CPU kind of events that relate to good performance. And that's also true for the quant domain. I suppose one of the differences between Binance,
Starting point is 00:21:35 or particularly low latency and in high frequency, and games is whereas every nanosecond counts in the low latency and high frequency, with games you're really just trying to hit a particular budget. The number of milliseconds it takes to fill a frame usually. Absolutely. So it's not necessarily quite the every nanosecond counts as long as you can hit the budget.
Starting point is 00:21:57 I think also the other thing is with low latency trading, you're trying to respond to something as quick as possible. With the quant domain or video games, often what you're doing is throughput of calculation. so you're trying to run a lot of calculation you know your instruction pipeline will be full and you want to keep it full and it will be running for a long time in low latency you're trying to respond to a particular event as quick as possible right interesting all right we'll hold that thought there we'll come back to discuss that a bit more in a moment but i want to take a little sponsor break first.
Starting point is 00:22:26 So this episode is supported by JetBrains. JetBrains has a range of C++ IDEs to help you avoid the typical pitfalls and headaches that are often associated with coding in C++. So exclusively for CppCast, JetBrains is offering a 25% discount, 25% for purchasing or renewing her yearly individual license on the C++ tool of your choice.
Starting point is 00:22:48 That's one of CLion, ReSharper, or ReSharper C++, or Rider. Just use the coupon code JETBRAINS for CppCast or one word during checkout at jetbrains.com. All right. So we're back here with Anthony. So we talked a little bit about kind of how you use C++ in the finance industry and like low latency and all that stuff. And I'm kind of curious about it. I've never worked in a finance industry myself,
Starting point is 00:23:14 but kind of apart from like particular techniques that you use, it seems like the finance industry has a slightly secretive aspect to it, right? So it's really hard to know what's actually going on there if you're on the outside, like myself. So how do you actually get in there? Like, if you're a superstars developer, you're interested in the finance industry and working in the finance industry, how do you get in? How do you get a job there? How do you earn some experience with this kind of stuff? Can you give us any advice? Yeah think i think it can be tricky i mean
Starting point is 00:23:49 the first thing i'll say is i think it's one of those industries that a lot of people want to get into i've certainly had a lot of questions about how you get into finance but one of the things i should say is i think at the moment certainly in london uh London, there's a shortage of good C++ programs. And so I think there's actually a huge demand for people. And so I think people should realize that those skills are valuable. And, you know, if you're applying to finance, you have to frame it as, you know,
Starting point is 00:24:18 potentially you don't have experience in the domain, but you have the technical techniques to work on the code base. And given time, you know, you can learn the domain, but you have the technical techniques to work on the code base. And given time, you can learn the domain. It's just like any other domain. I think it's eminently learnable. I think there is a bit of an aspect of the finance industry being a bit insular rather than secretive.
Starting point is 00:24:41 So once you're in, you're in. You can move around quite quite easily but getting in that's the hard part yeah do you have any advice on getting over that that initial hump yeah i think that's very true uh i mean you know certainly if you if you want to get in i think um you know obviously it helps to apply to a lot of jobs and um let's be honest interview processes are not always easy things i think that's one of the things that people have to accept. I think interviews can be a bit disheartening for people going through them and failing and getting rejections.
Starting point is 00:25:11 But I think you have to try and look at it as just another skill that you have to learn. And I think each opportunity you have to talk to a company, that's a company who are giving you their time to talk to you. And time is valuable. And so I would certainly always appreciate those experiences, even if you don't get the result that you want in the end. I think you have to try and take away what you've learned and figure out where your weaknesses are and keep working on those weaknesses and slowly build your skill set over time.
Starting point is 00:25:42 And it's certainly not easy. It's hard and it can be frustrating. But it's also equally frustrating for companies who want to hire people and can't find those skills. So I think one of the things you also have to learn is about the interview process is people are normally rooting for you, even if you're not doing well. If you can give them the information or allow them to hint you in the right direction or explain to them what your sticking point is, normally they'll work with you during the interview process to try and give you enough hints to keep the interview going.
Starting point is 00:26:17 Because it's in no one's interest for an interview to completely stall. People want those interviews to run smoothly and for both sides to get the most out of the experience. Yeah, that actually is my experience as well. So, Anthony, you said when you were talking in advance about what we're going to discuss today, you said that you spent a few years building Maven's graduate program. And Maven, I think, is the finance company that you worked for before your current job right that's correct yes i i worked um on you know as as one of part of a team building
Starting point is 00:26:54 the graduate program and as part of that i built some of the c++ uh training content that's that's um you know the graduates will be using probably right now. And obviously the challenge there was how do we take people who have some C++ experience but not a lot and throw them into an environment where there's a scary amount of template metaprogramming. Specifically, we weren't trying to teach them C++. We were trying to largely teach them the template aspect of C++, which is arguably one of the more complex corners of the language. we were trying to largely teach them the template aspect of C++,
Starting point is 00:27:29 which is arguably one of the kind of more complex corners of the language. And so, yeah, I mean, for that, we built a whole lot of exercises that revolved around different aspects of templates, starting off from simple things like doing a compile-time Fibonacci sequence to building up to far more advanced things like trying to use expression templates and some of the kind of really cool stuff that if anyone's ever read the C++ templates book, which is, you know, 700 or 800 pages big, I see we're all looking at our bookshelves now, is a fantastic book. So for anyone who wants to get good at c++ that is one of the best sources of knowledge on the market i think right um yeah that's interesting you also did a webinar right on um algorithmic trading and finance stuff so it seems like you're doing
Starting point is 00:28:15 lots of uh kind of outreach and training and things like that yeah so i think that that was also you know that came about during my role at Maven. And that was a former colleague reached out to me, you know, from one of the guys from Forfeit View, and we discussed it internally. And one of the things we were seeing was it was quite hard to hire people with the skills that we needed because things like template metaprogramming are quite difficult. And so, you know, I think one of the things, the realizations that I've come to is that there's a lot of companies
Starting point is 00:28:49 wanting to hire people with C++ skills, and there's a lot of people with C++ skills wanting to get in, and both sides aren't really matching. You know, there's companies complaining about they're not being able to find people, and I've seen that internally from the kind of recruiting side. It's very difficult to to find people. And I've seen that internally from the kind of recruiting side. It's very difficult to find good people.
Starting point is 00:29:10 And also I was having the other experience of talking to a lot of people, particularly during these webinars, saying, I want to get into finance and it's very frustrating. And so we felt like what's the responsible thing to do for a company is to actually put time and effort into creating training material and talking about it because it's a big barrier to entry when people first of all you know you mentioned the fact that it's a secretive industry and so people often don't know what goes on in it and so how do you revise for something that you don't necessarily know what goes on or what are the techniques since that's one of the things that we did was we just talked about the kind
Starting point is 00:29:41 of techniques we were using and why we were using them. We also spent a bit of time just kind of talking about what were the roles and what the people do in there and which skills are applicable to them, which were more numerical, which were more focused on C++. Because I think from my experience of doing that, there's a huge hunger from people who want to get into the industry, but just don't know how. And I think talking to people, they find that very frustrating. And so I think there should be more companies doing more to address that. So with these webinars, is that something that's freely accessible? Absolutely.
Starting point is 00:30:16 I'm not involved in those anymore, but you can certainly go to Profit View's website and all of the ones that we've done historically are on there and they are continuing to work on those although I think some of the ones they've done recently are Python based but yeah absolutely there's a whole series that people can watch there but also hopefully this is something that other companies will start doing as well because I think there's a need in the industry to address the uh the skill shortage that companies are experiencing and some of that relies on companies to to fix i think what one of the things i saw from from running the graduate the graduate program at maven was we were having conversations with training companies to come in
Starting point is 00:31:03 and and run training for programming languages internally. And one of the comments that I heard numerous times was, you know, pre-2007, you know, prior to the financial crisis, a lot of companies, a lot of banks used to hire us in and have us do training. And then 2007 happened and there was pressure on budgets. And the first thing that got cut was training. And then 15 years later, we have a skill shortage in the industry. And these companies still aren't doing training. Because once you've removed something from the budget, it's very hard to justify putting it back in.
Starting point is 00:31:37 Well, that sounds like really useful material. We've got a few links to some of those webinars. We'll put those in the show notes. I'm sure there'll be some people that are interested in watching those. And we've got some example code as well on some GitHub repos. So we're going to put all that in the show notes. It's going to be quite a big set of notes this time.
Starting point is 00:31:56 But these are all resources that people are going to need to try and bridge that gap into the industry. So all very useful. Thank you. Yeah, thanks, Anthony. I'm obviously interested in that topic i'm giving talks about c++ occasionally so i'm very interested in kind
Starting point is 00:32:11 of how the topics are that people are interested in teaching um so is that um you know we talked about kind of general c++ skills we talked about template meter programming we talked about like specific things like knowing the underlying hardware or like how the cache works and things like that like what do you think are the areas where like there's kind of the most need for training or for like education well i think one of the the big areas is you know in 2011 we had a major revision of the language, and I still have many colleagues who are still working in a version of C++ prior to that revision of the language. And I also remember when I started using a version, you know,
Starting point is 00:32:56 prior to C++, sorry, beyond C++11, and I remember having to learn about things like R-Value references and things like that and all of the new aspects of C++, and that took time. And I think, you know, companies, you know, if you get stuck in a place where you've got an out-of-date code base and you can't update compilers, I think that leads to a situation where it begins to get harder to recruit people
Starting point is 00:33:22 because people want to work on the cutting edge, exciting stuff. And the longer that problem goes on, the more the people who are in that company who haven't moved around are stuck without the new skill set, the new version of C++. And that's great if you like watching YouTube talks and watching what goes on at conferences in the evenings,
Starting point is 00:33:42 but not everyone has the time for that. Some people have families. Some people don't want to spend their evenings and weekends programming. And so in that context, I think companies have to look at investing in training their staff. So you're saying that the basis is really the new language features and how to use them effectively. Absolutely.
Starting point is 00:34:04 I think that was one of the things that i you know i've really enjoyed about being at maven is that they have you know the most up-to-date code base probably that i'm aware of you know certainly in london but i think talking to friends very few friends i know are working on c++ 17 let alone 20 or 23 many of my colleagues are still in you know as i say prior to c++ 11 but some are on c++ 11 certainly some of the investment banks i used to work at would have many tens of teams if not you know if not more each of them on a completely different version of compilers trying to interrupt different versions of libraries with each other and spending time investing in solutions to do things like create a binary interface between two different versions of libraries with each other and spending time investing in solutions to do things like create a binary interface between two different versions
Starting point is 00:34:47 of libraries created with different compilers in Visual Studio that need to talk to each other. And because they've got different STLs and runtimes and they're not binary compatible, that adds a huge cost to companies. I think lots of people in finance will have done that kind of work. And it's a bit soul-destroying it's it's it's certainly not where the you know it's not where the exciting work lies i i have to say like if i may make a remark i don't think this is specific to the finance
Starting point is 00:35:16 industry at all like i experienced very very similar things in the music technology industry and particularly what you said earlier about like this distance between newer developers coming in, wanting to be on the cutting edge stuff and using the latest features, but then people who've been in the company for a while kind of still being on Superstars 98 kind of mentally and not being up to speed with the latest features, but having a lot of knowledge about the code base.
Starting point is 00:35:41 And so there can be tension there and it kind of can be difficult to navigate for a company. And yeah, I don't think that's specific to finance at all because I've seen the same stuff. And it's also what you said about like different compiler versions and all of that. I've seen the same stuff happening in the music tech industry as well.
Starting point is 00:35:58 Oh yeah, I mean, I think it is probably a problem that's very specific to C++ because the way that the ecosystem has evolved, I mean, we didn't have a major language of revision for a very long time. And now suddenly we're in this new cadence of every three years. And, you know, as you know, we've got many compilers and each compiler has a different set of features that they managed to implement. And so if you live on the edge, you have to do a lot of work with your code base in order to fill the gaps between the different compiler versions and i've certainly done that and that's a lot of work and if you don't do that then you know the other end of the scale is you're
Starting point is 00:36:33 stuck on a code base that you you know you can't easily progress or you know you might not be able to upgrade some of the dependencies that you use i've certainly worked at places where they have very old versions of boost and you know if update Boost every time, every six months when it comes out, it's great. But if you leave it for five years and then try and upgrade it, that's suddenly a lot of work. And suddenly you also don't have the skills to do that because you haven't been using the newest version. And so these are real problems in the industry that people are facing every day. Right. So switching gears a little bit. Some time ago, you wrote an essay about neurodiversity and dyslexia in tech.
Starting point is 00:37:12 And I read that essay and I found that really, really fascinating. Do you want to talk a little bit about your experience as being dyslexic in tech? Yeah, thanks. First of all, it's great to hear. It was interesting. I did that during some time off between jobs. And I was doing some mentoring with the SA is on the website of an agency that supports candidates from a neurodiverse background. And I was doing some mentoring of younger dyslexic software engineers there and i just said to them i think it would be really helpful if you put an article on kind of describing what dyslexia is and what's the experience and they were very up for that and so i i put this article together um and you know a lot of the information is uh from books of dyslexia that i have because when you know i was diagnosed and then really didn't talk about it to people a lot when I was younger.
Starting point is 00:38:07 And it was just my problem to deal with. But as I've got older, I've kind of come around to the idea that one, I shouldn't be, you know, I should be open about talking about the fact that I'm dyslexic, but also I think it's, it's important that people understand that,
Starting point is 00:38:21 you know, there's people with different ways of thinking and that's, that's okay in different ways of thinking, and that's okay, and different ways of working. And I hope by putting a document out there that explains what those effects are, that that might be a useful resource for software engineers who are dyslexic themselves, or for hiring managers who have someone on their team who is dyslexic and want to understand why they're seeing some things that are frustrating or that don't make sense or you know maybe that person's a bit slower and that is one of the you know the side effects of being dyslexic and there's very good neurological reasons and um that's what i've tried to lay out in that document and really explain first of all what the effects are but
Starting point is 00:39:01 also how people might look at using all of the benefits that you get from being dyslexic and obviously a lot of the benefits come from the the different kind of neurological style of thinking that you have as a dyslexic person and you know i i think it's it's really important people understand those advantages as well and uh there's lots of people out there talking about it nowadays like richard Branson is a good advocate for it. You know, he's dyslexic and he credits a lot of his success to that. And that's because, you know, there's a very disproportionate number of dyslexic entrepreneurs out there.
Starting point is 00:39:36 Apparently the American Association of Entrepreneurs, 30% of them are dyslexic, which is, you know, in the population, 5% to 10% of them are dyslexic which is you know in the population five to ten percent of people are so and there's some some very clear strong skills that you get from being dyslexic but there are also some some you know some downsides that you need to work and and know how to mitigate so is there any advice you can give to people who are either dyslexic and are considering a career in tech or companies who want to hire and want to harness that kind of different way of thinking
Starting point is 00:40:07 that can provide like all of these benefits to a team? Yeah, absolutely. I mean, first of all, if you're a company and you want to hire people who are neurodiverse, I would recommend you reach out to Diversita. Mark, who runs it, and he's got a great team there. They spend a lot of time doing charitable work and advising companies how to hire uh people from neurodiverse backgrounds but also what the what
Starting point is 00:40:30 the advantages are and what's the adjustments that are needed so that's that's one thing i think if you are dyslexic yourself one of the things that i've found really useful is uh reading books about it because it's helped me to understand my my own thinking patterns i read a couple of books on dyslexia and it was like that's that's me it's it's not just you know i'm not unusual um you know there's other people like me who think like me and it's it's not a problem and it's it's okay and it's it's fine to be like that whereas i think previously i'd spent a lot of time trying to cover up uh or or mitigate the fact that, for example, things might take me longer. And so I might put extra hours in and end up working evenings or extra time, which I don't think people should have to do.
Starting point is 00:41:15 But, you know, there's certainly things that hiring managers or managers, if they're working with somebody on their team is dyslexic there's things they can do to help them get up to speed on tasks quicker and also capitalizing the kind of thinking patterns they do have which is you know um you know a lot of the kind of skills that that dyslexics have relate to creativity and you know i would certainly say software is a creative industry definitely so a lot of the things that you said i think translate fairly well to to many forms of neurodiversity and it's good that as a society we're starting to become more accepting of some of these things but i think they're still for a lot of people's stigma attached so it's really good to have people out there showing that they've been successful and acting as examples and normalizing what is
Starting point is 00:42:05 really just a different way of of interacting as you say there are many advantages as well well absolutely and as i say you know the figures i hear are somewhere around five to ten percent of the population is dyslexic so it's certainly common so i don't i think it should be normalized but um yeah it's it's yeah i think it's it's important that it's talked about and people know what it is as well i think the other thing worth saying is certainly shifts in working patterns you know the ability to work from home i think has probably been very helpful um for other neurodiverse um styles, not necessarily dyslexia, but I think people of an autism background,
Starting point is 00:42:49 I think the ability to work from home can be hugely helpful. And so that's all positive because it's making the industry more accessible to people. So if I may just comment on this, I think really people can start by just reading your essay. It's just a few pages but i think it summarizes really nicely how the stacks yeah kind of it's just a different way of thinking which affects like many many parts of kind of how you reason about things and also how you write
Starting point is 00:43:15 code or how you look at problems in software so i i think actually that's a pretty good good way to start um for people to educate themselves about that We'll definitely put that in the show notes as well. Thanks. And switching gears again, back to C++, but now more to C++ in general. So out of all the things that are currently happening in the world of C++, there's a lot going on, but what do you personally find the most exciting or interesting well i'm going to apologize for the personal plug but obviously i'm going to say some of the papers that i'm involved in i'm sure you guys well phil you've wrote an article that mentioned indirect value i think and polymorphic value so um these are uh ideas of john co and
Starting point is 00:44:03 i've been supporting him on that effort. I think they're really good ideas. Effectively, well, polymorphic value solves the polymorphic copying problem. And having worked in codebases that have a base class that has a clone method, and every single class in the codebase implements clone, this allows you to delete lots of lines of code, and anything that allows you to delete code is good. And indirect value is a copying pointer type, I would say,
Starting point is 00:44:33 although it's named value. It's like unique pointer, but it allows you to copy as well. And I've certainly used unique pointer and then had to implement assignment operators because I actually wanted something that held that resource and allowed me to copy assignment operators because I actually wanted something that held that resource and allowed me to copy at the same time. So I think we see them as little gaps in the standard that need filling. Yeah, I think they help us to stick to the rule of zero.
Starting point is 00:44:55 Absolutely. And that's one of the fundamental things. You know, when we were doing a lot of interviewing, that was one of the core kind of skills that we would look for people to understand because that's so fundamental to every aspect of C++. If you don't understand the rule of zero, then, you know, you're not going to be implementing many of the operators or using the compiler to generate code correctly for you
Starting point is 00:45:19 when you could be not writing code. And let's be honest, we were like not writing code when the compiler will do it for us better than us so how are those proposals going through at the moment i've been hearing about them for a couple of years but um yes well i was hoping to go to varna but it doesn't look like that's going to happen so i think i don't know if john's going i need to talk to him um but certainly uh we'll try to push those later in the year at hawaii the other thing um worth mentioning is there was another kind of attached proposal called propagate const and this is kind of interesting because now uh there's been a paper come forward
Starting point is 00:45:58 on uh that's based on a new keyword called propconst, which suggests adding a language mechanism to propagate const. And so if that comes out, that would kind of potentially supersede propagate const as a type, which I think propagate const is supported in GCC in part of the extension library. So it is there if people want to try it, and we have public repos for this. But yeah, it would be nice to see this stuff into the language.
Starting point is 00:46:29 And this is where the problem you have, where you have a const pointer to something, and then that may have itself had pointers that are not const, and so you can mutate things in place, but it's actually propagate the constness transitively? Absolutely, yeah. It's kind of a gap in the standard or gap in the language i would say it it is doing the right thing but that's not what you want right yeah also worth mentioning if you use polymorphic value or indirect value they will propagate const for you correctly so that's another advantage to using those nice and you mentioned a
Starting point is 00:47:06 few papers that you're you're involved in well um yeah so i also mentioned the linear algebra paper um so that's being done by um guy davidson and bob stiegel uh that's not i'm not actually involved in that paper but i've been helping them with maintaining their public repository and so there's a github if anyone wants to try that and actually one of the things we've done is we've made that available via the conan2 package manager so if people want to try out the latest proposal for linear algebra in c++ it is available on conan2 and it is being used by the physical units project uh which is done by matthias butz um which is also a proposal for introducing uh physical units into the language and i think there's a few physical units libraries
Starting point is 00:47:53 but um actually the stuff that matthias is doing that is really really exciting it's using some really interesting c++ techniques um absolutely cutting-edge C++ 20 stuff. Yeah, that sounds really interesting from what I've seen of it. I'd love to get Matushan in the near future to talk about that when he's ready. Absolutely. Yeah, and I think one of the other things I'm very interested to see in the language is support for vectorization.
Starting point is 00:48:22 So there's been some talk around bringing in primitives for vectorized instruction sets. So that is every computer that you operate on nowadays has a different part of the CPU that does operations in parallel. We've all been writing absolutely horrible codes using intrinsics or trying to get our compiler to auto-vectorize code for us so that we don't have to see what's going on in the background and we can switch between different instruction set versions
Starting point is 00:48:53 nicely when we compile. But now there's potentially a proposal called std-sind, which will allow us to do that. And I think that's quite exciting. I think that's... I'm also excited to see how that might relate to do that. And I think that's quite exciting. I think that's, I'm also excited to see how that might relate to linear algebra. And one of the reasons that is,
Starting point is 00:49:10 is because working in investment banks, as you probably know, Phil, having worked in that environment, you see many, many matrix libraries. I've written some of them. You might see Eigen, you might see Armadillo, you might see Bruce Dublas, you might see many others.
Starting point is 00:49:26 And the linear algebra proposal is aiming to provide a common vocabulary which would allow us to wrap those inside of a matrix engine and hide hide that behind a common way of communicating with them and hopefully part of that you know we've stood simmed and things like gaming with the library, we're getting closer to getting support for kind of vectorized matrix operations, which there's lots of cool stuff you can do with that. So Stood Simmed is actually really interesting. I met the author of that proposal, Matthias Kretz, recently and had a few discussions with him.
Starting point is 00:50:01 He's a very, very knowledgeable person. And yeah, it's a fascinating proposal. I think actually we should get him on the show to talk about StatsMD. Yeah, absolutely. I had a big conversation with him about that after, well, I think it was in Belfast. And yeah, he's a very knowledgeable guy.
Starting point is 00:50:20 I think he's got a lot to say on that. When you were preparing the episode, you also mentioned that you're interested in language support for customizable functions. That's, I think, proposed by Gaspard Asman and maybe somebody else. I'm not sure. I think it was Baker and a couple of other people as well,
Starting point is 00:50:38 actually, I think. But yeah, absolutely. And I think the reason I'd say that is because having had the pleasure to work on some cutting agency plus plus, one of the most challenging aspects of interropping a whole load of libraries is how you get those libraries to communicate with each other. to be things like you know specializing types you know you know using adl lookup you know these were all kind of i don't want to use the word hacks but they they it's not the original thing that they were designed for yeah that's also what tag and focus doing right this is another one of those things where i just cannot wrap my head around like how it works like it just breaks my brain yeah i mean we have now like you know customization point objects nebloids which are very similar but slightly different you know and as you said tag invoke and i think
Starting point is 00:51:31 having dealt with the kind of template errors that you get from those mechanisms they're adding they're solving some problems but there's still there's still some things that they don't solve and i think there was a really interesting article. I think it was wrote by Barry Revson about customization point objects and what they do solve and what they don't solve. And if anyone's interested, I would highly recommend reading that. It's really well, you know, it's a good discussion on it. So I looked it up. The proposal is by Louis Baker, Corentin Jabot, and Gaspard Asman.
Starting point is 00:52:03 It's P2547, and we're going to put a linkaspard Asman. It's P2547, and we're going to put a link in the show notes. It's called Language Support for Customizable Functions. Yeah, absolutely. That is a really good paper. He's also got a paper on knee bloids and customization points as well, which might be worth referencing because I think it's not that one,
Starting point is 00:52:19 but it's another one very closely related. But yeah, he wrote, I think it was tag invoke is not the mechanism I want or something along those lines. And it was a good argument. Yeah, I can get behind that. Yeah, I'm definitely very interested too to see where this space goes as well. It definitely does seem like there's a good case
Starting point is 00:52:36 for having a language feature to make this all a bit neater and maybe more understandable. Yeah, it's one of those areas of the language which actually would add huge value and it's kind of underappreciated, but we absolutely, you know, we need a good solution for it. Well, I think we are about time.
Starting point is 00:52:53 We should start wrapping up. So is there anything else you want to tell us today, Anthony? I think, you know, you've been very gracious in listening to everything I have to say. I don't think I have much more to add at this point but um certainly i think you're going to share a lot of links to to some guides that i wrote around how to break into the finance industry um and also around interviewing in in the finance industry oh yeah definitely yeah we're gonna put all of those links in the show notes it's going to be a longer list of links this time
Starting point is 00:53:23 around but i think it's really valuable so we definitely do that cool thank you well thank you very much for being our guest today uh is there anywhere that people can reach you if they want to stay in touch or find out more um i'm certainly on twitter um and uh github and um slack i i tend to not tweet very much i'm i'm a of a stalker. I like following other people. But I'm there, so feel free to tweet me there if you want or reach out on Slack or LinkedIn or any of the social media things people use nowadays. Great.
Starting point is 00:53:57 They'll all go in the show notes as well. All right. Well, thank you, Anthony, so much for being our guest today. Well, thank you very much for inviting me on. It's been an absolute pleasure. Thanks so much for listening in as we chat about C++. We'd love to hear what you think of the podcast. Please let us know if we're discussing the stuff you're interested in. Or if you have a suggestion for a guest or topic, we'd love to hear about that too.
Starting point is 00:54:23 You can email all your thoughts to feedback at cppcast.com. We'd also appreciate it if you can follow CppCast on Twitter or Mastodon. You can also follow me and Phil individually on Twitter or Mastodon. All those links, as well as the show notes, can be found on the podcast website at cppcast.com. The theme music for this episode was provided by podcastthemes.com.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.