CppCast - Sourcetrail

Episode Date: August 17, 2018

Rob and Jason are joined by Eberhard Gräther to discuss his work on Sourcetrail, a cross-platform source explorer for C++ code. Eberhard Gräther is software developer, user experience design...er and founder at Coati Software. He started programming C++ during his undergraduate CS degree at Salzburg University of Applied Sciences, majoring in game development. During multiple internships in the Google Chrome Team he worked on tools for rendering performance analysis. He then specialized in Human Computer Interaction and developer tooling during a Master's degree, where he started working on Sourcetrail, a cross-platform source explorer for faster understanding of unfamiliar source code. News Interactive Websites: Using Boost.Beast WebSockets and Networking TS New Educational Video Series: How to CMake Good Using MSVC in a Docker Container for your C++ projects Win a free ticket to C++ on Sea! Eberhard Gräther @egraether egraether.com Links Sourcetrail Sourcetrail 2018.3 C++Now 2018: Eberhard Gräther "The Untapped Potential of Software Visualization" Sponsors PVS-Studio February 31 Patreon CppCast Patreon Hosts @robwirving @lefticus

Transcript
Discussion (0)
Starting point is 00:00:00 Episode 163 of CppCast with guest Eberhard Gratter, recorded August 16th, 2018. Try the demo version today at viva64.com. In this episode, we discuss how to CMake good. Then we talk to Eberhard Gratter, founder of Kuadi Software. Eberhard talks to us about SourceTrail, a cross-platform source code explorer tool. Welcome to episode 163 of CppCast, the first podcast for C++ developers by C++ developers. I'm your host, Rob Irving, joined by my co-host, Jason Turner. Jason, how are you doing today? I'm doing all right, Rob. How are you doing? I'm doing okay. Came back from a little work conference.
Starting point is 00:01:31 Yeah? Yeah. Was it fun? It was fun. Nothing too exciting and, you know, it wasn't very technical. It was all work-related, but I had a good time. So it was more like three days of meetings or something? Yeah, pretty much. That doesn't sound like fun at all. I get to go down to the hotel and stuff, I guess.
Starting point is 00:01:50 Is there anything exciting going on? No, just getting ready for CBPCon coming up. Yeah, we're like five weeks out. Five weeks out, yeah. We just got an email from John Kolb saying that the conference is five weeks out which is a reminder to anyone going here if you didn't get that or didn't see that email from john the conference block hotels are filling up so make sure that you get something booked preferably something that's in the block that the conference has uh promised to fill but you know it's up to
Starting point is 00:02:22 you of course right okay well on the top of our episode i'd like to read a piece of feedback uh this week we got this tweet from barney and it was maybe a month or two ago i think we we talked about the octal uh literal a couple times yeah for over a couple episodes well uh barney wrote saying a while, CppCast discussed octal notation, how in C++, any integer starting with a zero, including zero itself, is an octal. I hit this today. I was creating a date and used 01 for January. Then I tried 08 for August and got a bunch of crazy errors.
Starting point is 00:02:57 So, yeah, people do run into this. That does, though, still... I commented that anywhere where it would actually be an error and not the value that you intended it to be like that would be would likely to be two digits like it was and you would get a compile time error yeah and that that is what barney hit also so yeah it's just if you don't know why i would imagine compile time error is going to be a little confusing to you. Yes, which, yes. Today I was doing, or not today, yesterday I was doing some programming and I hit something.
Starting point is 00:03:32 I don't even remember what it was now. And I literally could not understand the compiler error at all. And that's frustrating. You have no idea what happened. What was the thing we suggested would be a better suggestion for augmentation like having a lowercase o or something like that yeah oh oh just like ob for binary ox for hex yeah yeah okay well we'd love to hear your thoughts about the show you can always reach out to us on facebook twitter or email us at feedback at cppcast.com and don't forget to leave us a review on itunes joining us today is eberhard Gratter.
Starting point is 00:04:05 Eberhard is a software developer, user experience designer, and founder at Koide Software. He started programming C++ during his undergraduate CS degree at Salzburg University of Applied Sciences, majoring in game development. During multiple internships in the Google Chrome team, he worked on tools for rendering performance analysis. He then specialized in human-computer interaction
Starting point is 00:04:24 and developer tooling during a master's degree, where he started working on SourceTrail, a cross-platform source explorer for faster understanding of unfamiliar source code. Welcome to the show. Hello. Thank you for being here. Thanks for coming. I am curious now. You're specializing in human-computer interaction. I know a few people when I was in university who were interested in that, but not very many people who retained an interest after graduating.
Starting point is 00:04:50 What has been your interest in HCI and that kind of thing? What spurned that interest? Well, as mentioned in the bio, originally I wanted to become a game developer, and it was always this interactivity of applications that really interested me. And so during my undergraduate, I became interested into this whole, how can you build something in a way that people will immediately understand how to use it? Like, how do you know something's a button? How do you know something's a text box and all that stuff?
Starting point is 00:05:28 And then I wrote my thesis on this, like in the area of human-computer interaction, and I read into how to do user studies, how to give users tasks they have to solve on a certain user interface and how to collect their feedback and how to optimize based on that. And I think it's just something that I like doing. Okay. So I imagine in your normal daily life you use computers all the time,
Starting point is 00:06:01 like the rest of us do. There has to be things that sometimes you like go to use an application you're like seriously this is like wrong in so many ways do you have like a recent like uh pet peeve or something that you had that you just want to share okay i i have actually i have a really good thing and i thought about you writing about it actually okay so you know how you navigate an audio player. There's like play and pause and then there's next track
Starting point is 00:06:30 and then there's previous track. But if you're in the middle of a song and you hit previous track, what happens? It's the beginning of the song usually. Right, yeah. Why? That's with audio player software, what does an old school CD player do?
Starting point is 00:06:48 I can't even remember the last time I used one. I tried to find it out, actually. I was like, was this there from the beginning? I looked up an old manual for the first Sony CD player. I couldn't really find it out so far. But I think it's a mistake that system has become the standard oh interesting
Starting point is 00:07:09 yeah okay well we have a couple news articles to discuss feel free to comment on any of these and we'll start talking more about source trail okay okay sounds good okay so this first one is a post from Vinny Falco about his talk.
Starting point is 00:07:26 It's going to be at CBPCon this year. And it's interactive websites using BoostBeast WebSockets and Networking TS. And this is just kind of his intro to the talk. He's kind of, I guess, advertising it, trying to get people to show up at CBPCon. But I thought it was a pretty interesting um talk and he's going to be talking all about the interactive web how you can write a web sockets program using c++ and i thought it was worth uh looking at yeah do you remember do you remember uh the include os guys yeah when we had include us on here and it's like seemed like that's a lot of their model, is being able to boot into something
Starting point is 00:08:05 that could be like a web service. And I'm kind of curious how well this works together. Like if we can use BoostBeast with WebSockets and includeOS and boot straight into something that's using BoostBeast. And then on top of that, you could maybe do some assembly. Web assembly? Web assembly, yes.
Starting point is 00:08:25 To fully do a web application on C++ these days. Yeah. Have you looked at any of this web stuff at all, Eberhard? Yes. Also during my undergrads, I did quite a lot of web development. Looked into
Starting point is 00:08:41 JavaScript, did some graphics and game development there. That was the time when Canvas and the WebGL was really new. And some guys at our university worked with WebSockets when they were really new. And so I think
Starting point is 00:08:58 I also had some prototype at some point. Yeah, I think so for this talk, he already has the slides in the repository and I think it looks like a good beginner's introduction
Starting point is 00:09:14 to WebSockets, what they do and how to use BoostBeast. I remember at C++ Now this year, there was a talk on the same topic by Jason Rice. But it was not about boost base. It was more about how to manage application state with WebSockets and how to handle events and how to make it all general.
Starting point is 00:09:42 So it's easy to extend. More of an expert talk, in my opinion. That's interesting, just from a presenter's standpoint, putting up your slides and source code and everything and giving away all the secrets of the talk before you actually
Starting point is 00:10:00 presented it. I don't do that. I don't see that happen too often. No, I want to wait. You have to come to my talk. Also, I would never prepare so far ahead. Well, one of my talks,
Starting point is 00:10:15 this is just a quick plug for why you should go to your user group meetings that are locally. I have had the chance to fully test one of my talks that I'm presenting at CBP con. And that's a great opportunity for our speakers to get some practice. So Jason, I put this next one in for you, a new educational video series, how to see make good. Yes. That's, um, what does he have like 12 episodes up or something? I think he put up eight videos on YouTube already.
Starting point is 00:10:47 And he's not committing to doing one every week the way you do with C++ Weekly, but I think he's hoping to do one a week for a while at least. I don't know if I recommend committing yourself to doing one of these every week. It's a thing. But I also, I mean, I see this username around on reddit vector of bull i'm not sure who it is in real life but uh i think it's funny to me that the name is like the user name is like a troll basically because everyone hates vector of bull or at least we're taught that we're supposed to hate vector of bull Bool or something like that. Right.
Starting point is 00:11:29 But yeah, I have not actually watched any of them yet, but it is good that someone is going through and actually talking about how to correctly use CMake, because there's so many bad examples out there from the last couple of decades. I briefly watched into 1A and 1B, and I thought they were very well made. And he also mentioned a comment like stuff that was interesting to know. So I hope he continues and gets to the more complicated stuff. Yeah, it starts out for our listeners. It starts out with very straightforward, like how to run CMake from the command line. Yeah.
Starting point is 00:12:08 So it looks like he's looking to go pretty in depth then, you know, starting from the beginning. Yes. Yeah. Okay. Great. Uh,
Starting point is 00:12:18 this next one I have is from the visual C plus plus blog. And this one is, uh, how to use MSVC in a Docker container for C++ projects. What's going on, Jason? Oh, I needed this like four years ago. And now I don't
Starting point is 00:12:34 care because I'm not working on projects where I'm managing the build system. But four years ago I needed this. Yeah. Right, yeah. It'll be useful for others then. Yes. I think it will be useful for others then yes yeah i think it will be useful for us we need it good i'm sure there are plenty of people that need it i'm just not managing a build system today where i have to worry about these things yeah but it it's actually it's
Starting point is 00:13:00 really nice how docker made all that stuff much simpler. You can just run pretty much your build on any machine, and it's awesome. Yeah. I mean, it requires running on Windows, right? I believe so. They're making references to Hyper-V, so I assume it's meant for the Windows version of Docker. Yeah, I'm pretty sure that's required here, but I still would have been using it a few years ago when I was setting up these build systems.
Starting point is 00:13:29 Yeah. Oh, there's one other news item that's not on our list that I would like to mention real quick, and that is Phil has posted that C++ on C, you know, his conference coming up. He is doing a contest to win a free ticket to the conference, and it involves tweeting about the conference. So we will put a link to that in the show notes.
Starting point is 00:13:54 Okay. So, Eberhard, do you want to start off by telling us a little bit about SourceTrail? I know we've mentioned it a couple times on the podcast, but it's probably been a while. Yes, sure. Thanks for mentioning, by the way. So, SourceTrail. SourceTrail is a cross-platform source explorer for navigating and understanding source code. Now, you probably know the features go to definition and find all references in your IDE.
Starting point is 00:14:31 And just imagine someone really went nuts on the whole concept of knowing immediately how something is used everywhere in your code. So the first thing, okay, so SourceTrail is a GUI desktop application. It works on Windows, Mac, and Linux. And the first thing it does is it creates an index of your code base. So it knows all classes, methods, variables, macros, files, whatever, everything that has a name, and all the relationships between them, like inheritance or function call or template specialization or file include, all of those. And then it provides you a user interface that mainly consists of three components. It's search, graph, and code.
Starting point is 00:15:22 And so with search, you can quickly find anything. And then once you activated it, the graph will give you an overview of all the dependencies to other symbols. So you see like a visualization of the thing you selected in the middle, like a class. And on top, you have all base classes. At the bottom, you have the derived ones. On the left side, you see all the other types and functions that depend on this type.
Starting point is 00:15:49 And then on the right, you have types the selected one is depending on. And then the code view will show you all locations where this type is referenced. And everything is interactively linked. So you can just click on any node, on any edge, or on any location in the code and everything will update and you have always a full picture of what you selected. So starting at the beginning, you said first it indexes your code and that sounds kind of magical, but how do we actually tell it what code we want indexed? That's actually one of the really tricky parts.
Starting point is 00:16:31 Because the thing is, you have to really know how to build your code base. There's a shortcut, which I will mention right afterwards. So basically, you need to define where are all my source files and what are all my header search paths
Starting point is 00:16:50 for where headers are found and what are all other compiler flags necessary to correctly build and like command line defines. And you need everything to pretty much... Our indexer is based on Clang lib tooling, so everything Clang needs for compiling your source code, you will also need to give source trail.
Starting point is 00:17:17 Okay. A lot of our users have some trouble with that, so I recently made a video that sort of goes into best strategies. If you need to figure out how is my project currently built and how can I give SourceTrail all this information. But there's also a better way. There's the Clang JSON compilation database format. You probably have heard of it. So it's a file that contains a list of all your source files
Starting point is 00:17:56 and pretty much the command line for building this translation unit for one file. So you can just do a source trail project setup with a compilation database and everything usually works right away out of the box. And these JSON compilation databases,
Starting point is 00:18:24 mostly you can export it from CMake. There's a flag. It's called CMake Export Compile Commands. Right. And it does not work for every generator. But there's also some other ways of creating one of these compilation databases. Like there's a tool called Bear, which simulates a build. Okay.
Starting point is 00:18:52 And it sort of collects these compile commands, and then it creates this compilation database file for you. And for Visual Studio, we actually build this functionality right into our plugin. So we have a plugin that communicates between SourceTrail and Visual Studio, and you can also to make project setup easier, if you're using Visual Studio, you can export a compilation database with all the information of your Visual Studio project.
Starting point is 00:19:26 Oh, interesting. So your plugin does the exporting of the compilation database. Yes. I would imagine that would be pretty easy to do by talking to the Visual Studio project files. So internally, Visual Studio has an API where you can sort of look at the project structure and the source files and collect that information.
Starting point is 00:19:53 But if you're really, you know, you don't want to try to parse the solution files yourself. Right. Okay. So you're using the API? Yes. Okay. Good. so it sounds like oh sorry go ahead rob i was just gonna say uh to rewind a little bit um do you want to tell us how you got started on the project um so you mean like where does the idea originate yeah um so yeah i told this story quite a few times but okay um so it basically began with
Starting point is 00:20:30 an internship my first internship at the google chrome team and um my supervisor he just threw me into the water and he gave me this task that i had to plump some value through the whole code base of Chrome, like right through WebKit and Chrome and the Compositor. And so I spent my first one or two weeks just reading code, pretty much. And so the Chrome team has a pretty good tool. It's called Chromium Code Search. They have the whole code base indexed online,
Starting point is 00:21:07 and you can do a find all references of everything. But after spending that much time with the tool, I felt like I'm wasting so much time with this. Shouldn't I be coding? So I talked to my supervisor and he said, no, no, that's normal. Like everyone, every new developer spends a lot of time on reading
Starting point is 00:21:35 and understanding code base at first. And with a code base like Chrome, it's half your job. And so I thought, okay, if this is such a huge thing, reading and understanding code then maybe we should think about how to make it better
Starting point is 00:21:48 and so I returned to my I still had to finish my undergrad degree so I thought that was a good topic to write about and that was actually the topic I choose,
Starting point is 00:22:06 reading and understanding source code. And I also looked into software visualization. How can you utilize visualization to make understanding easier? And I built a prototype. I had a user study with students and some other developers. And well, so the prototype was really bad.
Starting point is 00:22:36 But it already had this core concept of visualization next to code. But only the visualization was interactive. And there was one thing that was clear very early. Users would always click into the code. Click into the code. Why can't I click there? And also one feedback was the whole, I want to search stuff. And then the next prototype was already pretty much this concept that became SourceTrail. And yeah, so after I finished my bachelor's's i decided to continue with a master's degree
Starting point is 00:23:07 and um at our university we can do this um one big project where we can build a team and start building something big and that was the thing we built and at the end of the master's degree, we had a working alpha. And then we thought, okay, why stop there? So we founded a little software tooling company. We got some public funding. In Austria, there's really good public agencies that help you in getting started if you're developing something new, innovative. And so I think one year later, we released a public beta. And then last year in summer, we made it a release version.
Starting point is 00:24:08 So how many years has it been now since you first started your first prototype? The first prototype was in 2013. So that's five years ago. But then for almost a year, not much happened. Then during university, we were not full-time developers. So we're really developing on it three years now, I would say. Although I imagine that during the time when nothing was happening, you were still thinking about what you wanted to do with it.
Starting point is 00:24:44 Yeah, sure. Once you start, then you figure out that some things you thought were good actually don't make that much sense. Right. Okay, so the next question I have talking about the history of this is maybe a bit random,
Starting point is 00:25:01 but in my head, the tool was originally called cody is that right yeah that's right that's right okay so our listeners might have know it by that name previously when it was first announced when did you change the name um so we changed the name shortly before um before we released our release version and okay So I'm not sure if everyone knows what a kodi or kuwati is. Kuwati? It's a South American,
Starting point is 00:25:31 South Middle American animal. It's close to a raccoon. It's part of the raccoon family. But it has a long tail and a long nose. And it spends all day running around in the forest and climbing trees and using its nose to find fruit and bugs. And so we thought, you know, that's our spirit animal. Okay. That's running through your code, finding bugs.
Starting point is 00:26:01 Yeah. Sure. But, well, as soon as we sort of started with the company, we saw that the name Cody or Kuat, he had some downsides. Like, it's an animal, so everything, you know, every username, every domain is taken. And also every online search is showing you an animal. Pictures of rioters, yeah. in the same, so in trademarks you have categories and for the software category there was someone who already used the term on hardware
Starting point is 00:26:52 and so it could have also become a legal issue at one point and so we just thought, you know, before we go release we come up with a new name and the new name was SourceTrail. And we kept our logo, so it's still the Koti, Kuati icon. Kuati? Yeah. Okay.
Starting point is 00:27:17 That's, yeah, I feel like for my projects, trying to find a name that's not already in use is like 75% of the effort right yeah yeah the programming is easy compared to that yeah right so you actually just put out a new release about two weeks ago right yes what uh what's new in the release um so we do a major release every quarter. So every three months we put out a new big release where we document what we did on the blog post.
Starting point is 00:27:57 This year so far we really focused less on adding big new features and more on polishing what we have. So we spent time on cleaning up the UI, making it look the same on every platform, and improving usability features and project setup, making error fixing easier, all that kind of stuff. And so with our last release, which we released last week, we added finally a legend for the graph. So now there's a button in the graph view in like the bottom right corner. And if you click it,
Starting point is 00:28:38 you see all types of nodes and edges. So far, we only had tooltips. So you didn't get a full picture of what's all it can do. You pretty much had to go there first. Okay. Yeah, and one sort of bigger feature, which was a big request from our users, was background, indexing in the background.
Starting point is 00:29:10 So far, if you re-indexed your project, you couldn't use the UI, which doesn't make much sense to a user. It was just sort of an architectural issue, and we finally fixed it, and now you can re-index your project while still browsing the old code, and then as soon as it's done it switches to the new state yep i was just going to ask how when it switches that's that's the clean easy solution the trying to make it live update while you're still browsing it doesn't seem worth the effort um although we have that request a lot.
Starting point is 00:29:46 Do you? Yes, but the problem is you don't really know when, while you're coding, some things might not compile without errors. And in that case, unfortunately,
Starting point is 00:29:58 it can happen that the Clang lib tooling indexer, the AST traverse will just stop at that point and all the information below it is then gone. And then your new index would miss all of that. And, you know, of course, we could like compare, do we get more errors now than before? And if we don't get more errors, then use the new information. And if not, then stick to the old one. And we might do that in the future.
Starting point is 00:30:26 But there's also... There's also the problem that sometimes, you know, you touch a header file and a lot of source files depend on it, and you basically need to re-index half of the code base. Yeah.
Starting point is 00:30:42 So I'm curious about this use case that your users are having. And if I'm understanding correctly, they basically have their IDE or Vim or whatever open, and they're just typing away, doing their thing. And they expect, whenever they save the file, that source trail is going to regenerate it, and they can just tab back over there and look at the new graph.
Starting point is 00:31:03 Like it's just constantly doing this. Currently it's not doing this, but yes, that's how a lot of our users would imagine it. Okay. That's interesting. But having a non-changing index state, in my opinion, also has its advantages. Because for me, if I start developing a new feature, I just keep that state where I'm branching off from my master branch. And then I can see, you know, how was it before.
Starting point is 00:31:38 And then at some point when I'm like, okay, now everything's working, Then I update the change files, and then I'm back to a clean state. Yeah, and it sounds like in your use case, you're using it more like a... What's the word I want to look for? Almost like a git diff or something. You want to see what the last state was so you know if you've broken anything yet, basically.
Starting point is 00:32:10 Yeah, maybe. statewide so you know if you've broken anything yet basically um yeah maybe or well i think i'm mostly using it like a like a doxygen okay like so this is my you know this is my um application and now i'm doing something new which is not yet part of it. Okay, right. But anywho, so if this constant re-indexing is something users want, then I'm sure at some point we will have it. But you said right now you do support background indexing. So I am curious, when does the background indexing happen? Or do you still have to click a button saying re-index now or something?
Starting point is 00:32:47 Yes, that's it. You have to say re-index now. And then if you while you do the re-indexing you're right in the middle of implementing something new and it throws errors then, when it picked up the file at that point then you will have the errors. But then after the re-indexing is done, you can just re-index that file again, and you're sort of good.
Starting point is 00:33:13 Okay. That sounds pretty cool. Now, I have used SourceTrail a little bit, and I have demoed it to students just for the record because students always ask, like, how do we learn about a new code base? I demo SourceTrail a little bit, and I have demoed it to students just for the record because students always ask, like, how do we learn about a new code base? I demo SourceTrail a little bit. Thank you.
Starting point is 00:33:29 And a couple of other tools, yeah. I don't know if anyone's actually purchased it or anything from that. Well, so if they're students and they're not working commercially for money, then they can use it for free. No, I'm doing on-site training at corporations. So it is people who are actively employed.
Starting point is 00:33:49 But I'm just thinking about this live re-indexing thing that users have requested. And then I wonder, have users requested a diff of you? Like, I want to see what the graph looked like yesterday, and I want to see what it looks like today somehow. But doing a graphical diff, that would be extraordinarily difficult to visualize. Yes,
Starting point is 00:34:10 it's also a request. It has not come up as often but integrating git blame information is often coming up and also show me the differences in the visualization. I'm not sure if it would be that hard to do, actually. Because you would sort of build on the whole green-red metaphor.
Starting point is 00:34:35 Like, everything green is new, everything red is gone, and everything yellow maybe has changed. And I think it's possible to do that. All right. You should probably focus on the things that your users are requesting first. It sounds like it's off to a great start regardless.
Starting point is 00:34:55 It is a stable product and you do have customers currently. Yes. Okay. I wanted to interrupt the discussion for just a moment to bring you a word from our sponsors. Okay. before they become vulnerabilities. The analyzer uses many special techniques to identify even the most complex and non-obvious bugs. For example, data flow analysis mechanisms, which is implemented in the tool, has detected a very interesting bug in the Pertobuf project.
Starting point is 00:35:34 You can read about this bug in the article February 31st. The link is under the description of this podcast episode. The analyzer works under Windows, Linux, and macOS environments. PVS Studio supports analysis of projects that are intended to be built by such common compilers as Visual C++, GCC, Clang, ARM Compiler, and so on. The analyzer supports different usage scenarios. For example, you can integrate it with Visual Studio and with SonarCube. The Blame Notifier tool can notify developers about errors that PVS Studio detects during night run by mail. You can get acquainted with PVS Studio features in detail on viva64.com.
Starting point is 00:36:13 You mentioned that you're, with this latest version, making UI changes to get the platforms to look more closely together. What do you use for cross-platform support? Pardon? What technologies are you using to work on multiple platforms? Are you using Qt or something else? Yes, we use Qt. Actually, I think our tech stack is pretty simple.
Starting point is 00:36:38 It's Qt. It's Clang lib tooling and then we use SQLite for the persistence storing. Then there's some boost. And yeah, I think that pretty much sums it up. Okay. Well, since you use lib tooling, now you've mentioned that a couple of times,
Starting point is 00:36:57 and you also have support for Visual Studio. In the use case where someone is using C++ code that lib tooling can't compile because it's Visual Studio, you know, they're using Visual Studio extensions, that kind of thing, do you support this use case? The thing is, we're unfortunately pretty bound to what lib tooling supports. Right. supports. And there are some compatibility flags for MSVC stuff and they also support GNU C++ standards.
Starting point is 00:37:33 But sometimes we have users with just some parts that are not correctly indexed. Usually they don't really have that much of an impact. Okay, good. But it depends.
Starting point is 00:37:49 Are there any limitations as far as the size of projects you can handle? Yeah, I think so. So I think the largest I've seen recently was a user with 7 million lines, and I thought that was pretty good already.
Starting point is 00:38:12 Yeah, that's pretty big, yeah. It depends on the hardware, though. But I would still say around currently up to 10 million, but above that, it's probably easier if you just split it into smaller projects. For me, I think it would make sense if you keep a project to the size of 1-2 million, which is sort of the size of the Clang frontend,
Starting point is 00:38:38 and that works pretty good performance-wise. So have you yourself tested it with large projects like the Clang front-end since you mentioned that? Yes, we actually also have the Clang front-end for download on our downloads page, so it's pre-indexed. Well, if you don't mind me asking, how long does it take to index a project that large?
Starting point is 00:39:05 Well, I know you said it depends on the hardware, but what would you expect? So actually our goal is to sort of reach the same time it takes to compile it. Okay. But we recently had some complaints that our indexing is not as good as it is, not as fast as it is. And so we added some improvements with the last release and now for the next release,
Starting point is 00:39:33 we really want to look into making it faster. And we already, like last week, we made some big progress on the whole database storing stuff that's now twice as fast. So it brings the total down by 10%, 15% already. And I keep looking into it.
Starting point is 00:39:54 It's something we probably didn't pay enough attention to. Yes. Well, my experience is that programmers always want their tools to run faster so yeah even if you get it 10 times faster someone will tell you it's not yeah well we've already like you know prodded you about future releases and you just teased that you're hoping to make the next one indexing faster, what other plans do you have coming up? Yeah, so we talked at the beginning of the week, and we pretty much decided for a new big feature.
Starting point is 00:40:34 So drums. Okay, I can't do that. I'm not very... Tabs. Tabs, oh. Tabs, yeah, which is a highly requested feature. It sounds like for everyone not using SourceTrel, it sounds really underwhelming. Like, okay, everyone else has tabs.
Starting point is 00:40:53 But we didn't think about it in the early conception. And at some point, it's like, yeah, it would make so much sense to have tabs. So it's a feature that caters to our existing users, and I think they will be happy about it. That sounds, yeah. I mean, we just expect tabs everywhere all the time now. I don't even know how many tabs I currently have open in Chrome.
Starting point is 00:41:18 I don't think I can count that high. It's got to be at least 30, anyhow. In one window, of course. Because who uses windows? How do you use windows when you have tabs? Yeah, right? Well, that sounds pretty cool. Anything else that you would like to announce?
Starting point is 00:41:36 I think for the moment, we always, you know, we don't make our schedule too full to sort of be flexible on what comes up. Usually there's always some bug fixes. And, yeah.
Starting point is 00:41:52 So are you kind of like on an agile release cycle or something? Like you're planning to do releases every so many months or weeks? Yeah, every three months is a new release. And we do some maintenance releases in between if urgent fixes need to go out. Okay.
Starting point is 00:42:08 So whatever features are ready at the end of the quarter, there will be another release, basically. Yeah. But usually, you know, I'm the kind of guy that if there's a deadline coming up, I put in the hours to make it work.
Starting point is 00:42:24 Right. And this is your full-time job, even though it started as a university project. Actually, not quite. I still have a small job on the side, but I'm looking forward to quit it soon, actually. Very good. Very good.
Starting point is 00:42:43 Now, I'm curious also, since you've mentioned HCI was like one of your big interests in university. And we've had discussions recently, Rob, what a couple weeks ago about tools that work well for people who are visually impaired. And I've actually just had a couple of things come up recently with my YouTube channel for people who are hearing impaired and are interested in closed captioning and that kind of thing. So I'm just curious if you've given those things any consideration and have any tools for visual impairment or whatever using SourceTrail. That is an interesting topic that I also thought about. At the moment, we don't really have anything for that. The only thing I did care about was to not rely on green-red colors in the UI because it's very common.
Starting point is 00:43:45 Green-red blindness is very common. Right. But apart from that, unfortunately, we are not really at that point yet. So far, we really focus on what our users demand. But it sure would be a really interesting topic
Starting point is 00:44:03 to look into. As long as it doesn't get in the way of screen readers and screen magnification tools, it's probably most of the way there for the average user. Have you had any success stories from users? Well, the thing is, almost every week or every other week, someone writes me, like, really, really great tool, and continue working on it.
Starting point is 00:44:34 One thing, maybe, that you should improve. Right. And whenever someone is really excited about the tool i i sent them to a captera now which is sort of a online platform for software and reviews and uh happy if you know if users write a review because you know makes more people interested um but the thing is most users can't really tell us what they're working on because of corporate policies. So actually I don't really know that much about what users are working on.
Starting point is 00:45:16 I know it's all kinds of stuff. It's compilers and virtual machines. It's games and it's manufacturing and it's manufacturing and it's security and it's also research, laboratories, it's teaching all over the place.
Starting point is 00:45:37 Wow. We mentioned the Visual Studio plugin. Are there any other IDE integrations with SourceTrial? Yeah, so You mentioned the Visual Studio plugin. Are there any other IDE integrations with SourceTrail? Yeah, so I think we sort of have a plugin for every, not every, but let's say the more common source code IDEs and editors, which I think in total we have around 10 plugins.
Starting point is 00:46:03 Oh, wow. And what they do is they allow you to easily switch between SourceTrail and your IDE. So you can say, show me this type in SourceTrail. And in SourceTrail, you can click in the code view and say, my cursor there in my IDE. That's pretty neat. Yeah. So it sort of builds on the concept of using SourceTrail on the second
Starting point is 00:46:26 screen. So on your main screen you have your code editor, on the second screen you have SourceTrail, and then you just synchronize your cursor. And this is why your users then want it to automatically live update as they're typing basically. Yes, I think so, yes.
Starting point is 00:46:42 Yes, I can see the users who would want to do that. But, I mean, it's an awesome concept. I didn't realize you had that tight of integration with the IDEs. I mean, it's not super tight, but it's a start. Yeah. I take it probably not Vim. Vim 2.
Starting point is 00:47:03 Oh, really? Yeah, we have Vim 2. Okay. We have VIM2. Okay. We have WIM, Emacs, we have Catbrains IDEs, we have Acute Creator, we have Eclipse, we have Visual Studio,
Starting point is 00:47:18 Atom. What else is there? Sublime Text. Visual Studio Code? Yes. Visual Studio Code? Yes, Visual Studio Code as well. We have a lot already. Do you maintain all these integrations, or do users who are interested end up maintaining them also?
Starting point is 00:47:37 Also, yes. We have all of those open-sourced, especially for the Visual Studio plugin and the JSON compilation database generation, we had some contributions to that. And that's also our most installed plugin, I think. It has, like, thousands of installs. Oh, wow.
Starting point is 00:47:57 Wow. Yeah. That's very cool. Okay. Well, is there anything else you want to go over before we let you go no i think i think you've you've touched like the the most interesting points right okay well okay then before we let you go i would like to ask you
Starting point is 00:48:20 how your experience was at c++ now, since you were there this year. So, yes, I've been to CppCon last year, and then C++ Now in spring. And there's a difference. I mean, there's a lot of the same people, but while, yes, CppCon is, I would say, more for the, yeah, to get an overview of what is new in C++, what is going on, and what are people doing. And then C++ now is more like the core community discussing, arguing, and, you know, really getting into proposals and, like, where a talk is more a discussion than a talk. It's more for the, I would say, hardcore part of the community.
Starting point is 00:49:15 Did you have good interaction from the people who came to your talk? You did present, yes. Yes, I had a talk sort of went into software visualization and how it, well, how I think it makes software understanding easier and faster. And yes, I had good feedback on that.
Starting point is 00:49:37 Although I have to say it was quite intimidating presenting in front of that audience. No, it's not intimidating, it's fun. Okay. You just need to change your attitude about it. Yeah, but since I'm attending conferences,
Starting point is 00:49:58 I think my understanding of C++ has increased a lot. I was not that aware of all the new stuff that is happening. It's actually amazing how much that language is changing now, within a couple of years. Yeah, so that actually raises a question for me. So let's see, attributes like no discard, which is added in C++ 17. Does your visualization tool keep up with that kind of thing well?
Starting point is 00:50:41 The thing is, we have that information in the Clang-Lib tooling AST, and then we can do something with it or not. And for example, with the attributes so far, we don't do anything with it. But it's a good point. We should. Okay. I just imagine for you and just like for any of the people that we've ever interviewed who work on IDEs like Sea Lion,
Starting point is 00:50:58 it seems like it's a constant thing. You're going to have to be chasing these features to make sure you stay up to date, basically. Yeah, I think that's what it is now, yes. It's a chase. But on the other hand, of course, most of our users are working on some legacy system. Requests for new language features don't come up that much so far.
Starting point is 00:51:27 Right. People still have other issues. Right, yeah, they're more concerned about trying to understand some 20-year-old 7 million line of code codebase. Exactly, yes. Right. So do you have other conferences
Starting point is 00:51:42 that you are planning to attend coming up? If our listeners want to meet you, talk about the project. So currently I'm on the schedule of attending like one per year. And with C++ Now I did that already. I see. Yes. I think next year it's probably going to be like CppCon again or meeting C++. Or maybe C++ Now again.
Starting point is 00:52:07 Actually, I'm not too much planning ahead on that. Okay. What's wrong with that? Yeah. Okay. Well, it's been great having you on the show today, Eberhard. Well, thank you very much for the invite. Certainly.
Starting point is 00:52:23 Talk to you soon. All right. Bye. Bye. 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.
Starting point is 00:52:44 I'd also appreciate if you like CppCast on Facebook and follow CppCast on Twitter. You can also follow me at Rob W. Irving and Jason at Leftkiss 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.

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