CppCast - Exploring CLion
Episode Date: March 25, 2015Episode number 5 of CppCast with guest Anastasia Kazakova recorded March 25, 2015 Being a C/C++ fan since University Anastasia has been creating real-time *nix-based systems and pushing them t...o production for 8 years. She has a passion for networking algorithms (especially congestion problems and network management protocols) and embedded programming, and believes in good tooling. Now she is a part of the JetBrains team working as a Product Marketing Manager for CLion the upcoming cross-platform C/C++ IDE. News Curl is 17 years old Effective Modern C++ News VC2015 RTM What do you want it to have? What platforms are you running CLion IDE on? Anastasia Kazakova @anastasiak2512 Links CLion IDE CLion on Twitter CLion Blog
Transcript
Discussion (0)
Episode number 5 of CppCast with guest Anastasia Kazakova, recorded March 25th, 2015.
In this episode we celebrate the Curl Library's 17th birthday.
Then I'll interview Anastasia Kozakova about C-Line, JetBrains' new C++ IDE.
We'll also talk about Anastasia's background in C++ and the Russian C++ community. Welcome to episode 5 of CppCast, the only podcast for C++ developers by C++ developers.
I'm your host, Rob Irving, and I want to start out this episode by thanking David Sankal C++ Developers please go check out episode 4 if you haven't already. At the start of every episode, I like to read a piece of feedback when I have it.
This week, I got some feedback from John.
John writes in,
Hi Rob, I'm really enjoying CppCast.
I'm one of the developers on a product which has been sold since 1986.
It's written in C++,
and the C++11 and 14 changes are quite welcome in our area.
I focus on the Windows-specific portions of our application,
but enjoy hearing about
other areas which I have not
investigated via CppCast.
I, too, would love to hear
from some game developers.
Bruce Dawson comes to mind.
It would also be nice if you could find a way
to get some time from STL,
Stefan T. Lavege,
James McNellis, and
Kenny Kerr, all stars in the Microsoft
C++ world. Thanks again,
and keep up the good work. Thank you very
much for the kind words, John.
I definitely have some of those
names you mentioned on my radar
as possible future guests and i am
trying to get some game developers on in the near future uh no announcements yet but we are
definitely gonna hope to get some game developers here soon to get some of their perspective in
c++ development but joining me tonight i have anastasia kazakova from jetbrains anastasia Kozakova from JetBrains. Anastasia has been a C++ fan since university.
She's been creating real-time StarNex-based systems and pushing them to the production for eight years.
She has a passion for networking algorithms, especially congestion problems and network management protocols,
and embedded programming, and believes in good tooling.
Now she is a part of JetBrains' team, working as a product marketing manager for C-Line,
the upcoming cross-platform C++ IDE.
Anastasia, welcome to the show.
Thank you.
Thanks for being here.
So before we start talking to you, I just wanted to read a couple items of the news.
The first one is an article
about Curl having a birthday. Curl is the URL request library. It's written in C, and it is
now 17 years old. And the main maintainer of the library, Daniel, just made a post on his blog celebrating this
monumentous occasion.
And I just thought it was pretty special.
I mean, it's an open source library that has really been valuable to the C++ community.
Anastasia, have you done much with curl?
I saw you have a networking background, so I'm guessing you have.
Yeah, actually, I've used it for many times.
It's a fantastic tool. And so congrats and happy birthday i've used it for many times that it's fantastic tool
and so congrats and happy birthday uh yeah it's very cool and i'm like pretty impressed that it
still have regular releases and all that stuff and by the way there was one interesting thing
in the article so i found there that they go with this uh c oral abbreviation this is the same game
we've played with c line so it was like a nice addition to read on.
The backer name you're talking about?
Yeah, CURL stands for CURL URL Request Library.
Pretty cool.
Yeah.
Yeah.
And, you know, CURL is also LibCURL.
So, you know, you can bring LibCURL into different applications
and use it for, you it for contacting servers and pulling
down content, which has been really useful for C++ developers. And it runs on pretty
much every platform, which is great.
Yeah, exactly.
Yep. So the next thing I want to talk about was effective modern C++ news. This comes
from Scott Meyer's blog, where he is still working on the effective modern C++.
I think this is the third revision of the book that's coming out soon. And he released a new
sample chapter, so you can go and check that out. And he's also going to be doing a webcast on March
31st, which is something that would definitely be worth checking out. Did you have a look at this, Anastasia?
Yeah. Actually, you know, the webcast is the most interesting thing there
because, you know, the future is coming and we have to be prepared.
I mean, the first thing I've made myself is sign up
because I should be sure that once you've heard the news,
you do it yourself because this is the thing we all,, as C++ developers, should dive into in details.
Like, I mean, the mechanism for event communication among threads, and the future mechanism is the most interesting now.
And I hope to learn some new and interesting things from Scott.
Yeah, absolutely.
So definitely check out this article.
The webcast is going to be covering his chapter on C++11 concurrency API. So it's definitely something very interesting that all C++ developers should become well informed about. is a promotion that the book is 50% off, but that promotion actually ends today. Today
is March 25th that we're recording the episode, so by the time the podcast is out, that unfortunately
will be over. The next thing I have is that this post on Reddit, r slash cpp, where STL, Steven T. Lavege, is asking for feedback on the Visual Studio 2015 RTM,
the Visual C++ 2015 RTM more specifically. He's just asking, what would we like to see in it?
And I always like seeing this type of thing in the community because it really makes,
really reminds me that this is a community,
that these people working on compilers
and working on the tools we use
are always looking for feedback.
And they want, you know, us to be able to have input
into what they're going to work on.
So some of the interesting things that came up here,
I think, were this one user who was saying,
I think it would be really cool if Visual Studio were able to use other compilers to build and compile your code.
And I agree.
I mean, that'd be a really valuable thing.
What do you think, Anastasia?
Did you take a look at this?
Yeah, actually, I completely agree that it's great they're asking because, you think, Anastasia? Did you take a look at this? Yeah, actually, I completely agree that it's great they are asking
because it's always great when someone is asking and discussing the questions,
and especially when the actual developers do these things.
So making developers involved in the compiler creation
makes me feel we all do our common great job
because we ask people about tools, I mean IDE features,
and they ask Reddit users about compiler feature.
And this is the only way we can build a valuable environment altogether,
like asking each other.
So as for the suggestions, like my favorites are the strict standard switchers
and sanitizers that I think is cool and should be there.
So hopefully they will get them.
Yeah, definitely.
Very cool.
So the other thing I want to talk about before we get
into the interview is I put up another poll this past week. And because I knew I was going to have
you on the show, Anastasia, I asked, have you tried C-Line yet? And what platforms are you
running it on? So I'm guessing you are probably not going to be too surprised by these answers,
because I'm sure you have your own metrics and you're looking at who's downloading which version of C-Line.
But do you want to take a guess as to what it is?
Is it going to be Windows, Linux, OSX, multiple platforms?
Or no, I haven't tried it yet.
I believe it should be Linux probably.
Yeah, it's definitely Linux by a pretty strong, yeah, almost over one-third.
34% of the voters are saying they're running CLion on Linux,
followed closely by OSX, well, 17% running OSX,
and actually 13% running on multiple platforms, which is pretty cool.
There's also 12% running on Windows,
and only 23% who haven't tried it yet,
meaning three-quarters of the people who saw this poll
have tried out C-Line, which is pretty cool.
Yeah, this sounds cool, actually.
Our current Erlexis program user base
is significant with more than 17,000 users per month
running C-Line.
And following the user statistics, our users are kindly sent to us
because they have this possibility.
It's 40% users C-Line on various Linux systems.
It's 33% on Windows and 27% on OS X for us.
So it's simply like something
like you've got.
And it's quite reasonable because, you know,
this corresponds to our vision
that Linux users are lacking proper
C++ IDE most of all.
Yeah, absolutely.
You know,
I'm in the Windows world, so obviously
there are some good IDE choices there,
but I did install CLion on Windows, and I was pretty impressed.
And I think what I might do is maybe start cross-compiling my code.
You know, sometimes use CLion just to take a look at what that compiler is seeing in my code,
you know, get more warnings, get more errors out of it than it might get from Windows alone.
And I do some work on OSX as well, so I think I'm going to put CLion on my OSX machine.
Yeah, great.
So, like I said, I just installed CLion this past week.
I've been pretty impressed with the IDE so far.
But for those listeners who haven't tried out CLion yet, if they're in that 23%,
could you tell us a bit about CLion and what JetBrains is trying to achieve with the new IDE?
Sure. You know, here in JetBrains, we are focused on making developers more productive,
helping them cope with the programming tasks with ease and pleasure,
enjoy the process, and bring ideas to code quickly.
We started with a simple refactoring tool for Java.
It's 15 years ago for now.
And since then, we've provided support for a wide and amazing set of languages and platforms.
It's Java, it's.NET, it's Python, it's Ruby together with Ruby on Rails and Ruby Motion.
It's PHP, JavaScript, AngularJS, and many web technologies.
It's iOS development in Objective-C and Swift.
And we've even helped Google to start the Android Studio on our open source
IntelliJ platform and make Android developers happier.
So what is still missing?
I believe you can guess.
It's C++.
So honestly, we had some experience already.
So AppCode supports C and C++ for iOS development case.
But for sure, there are more use cases like embedded
development like financial systems game development and more and with respect to the long history of
c++ and c languages and being impressed by the new features and modern trends coming to those
languages in the latest standards we've come up with the belief that we could make CNC++ developers' lives easier
targeting these specific languages in our IDEs.
So our tools are widely known for their promotion of code quality, refactoring, smart editing
features, and quick navigation.
And now our goal is to provide CNC++ developers with the same feature spec.
So we've even decided to solve the task three times
because we did actually with three IDs.
So it's for Visual Studio and Windows case
and Microsoft compiler.
This goes to ReSharper.
This is our plugin for Visual Studio.
iOS case is still left for AppCode
and all other cases included
embedded development, cross-platform projects,
GCC, Clang toolchain, Go to C-Line. That development, cross-platform projects, GCC, Clang, Toolchain, Go to, C-Line.
That is actually a cross-platform IDE based on IntelliJ platform.
So as I said, C-Line supports GCC and Clang compilers on Linux and OS6.
For Windows, we support the GCC-based Minf and Cygn compilers.
And we're using CMake build system as a project model, at least for now.
The task is quite challenging because the language is quite complicated,
environments and toolchains differ,
and thus we have to handle many cases for every feature we introduce in CLion.
But we enjoy tough tasks, and hopefully cross-platform development in CNC++
can now benefit from using CLion as much as our Java, Python, or Ruby communities do.
Very cool.
And, you know, I think you said it in there, but JetBrains is really regarded as making very excellent IDEs.
I mean, I think IntelliJ is widely regarded as being, you know, the best Java IDE you can get on the market.
Is that correct?
Thanks.
Thanks.
Yeah.
So I watched some of the videos that are available on the CLion website,
and I was extremely excited about some of the refactoring features available in CLion,
many of which I don't think I've seen in any other C++ IDE.
Can you tell us about some of these refactoring features?
Sure. You know, here we are keen on refactorings, giving them major focus of forward development.
The idea behind is make them automatically track down your code and update every affected place
accordingly, so that at any time you can be sure that even large-scale changes haven't broken anything
and your project is still working correctly.
So, for example, let's consider the most widely known and popular rename refactoring.
It's quite simple, and it renames symbols, be it variables, functions, classes, types, or defines, or whatever,
and updates all its usages, touching the real symbol usages, I mean that it's context-sensitive and performs a context-related search,
not the plain text search.
Thus, renaming a local variable won't affect the global variable,
for example, with the same name.
So CLion will also suggest you a few name proposals
based on the current variable name and its usages.
And finally, you'll be able to update usages in commands and strings as well. That can be available, for example,
if you are renaming symbols which names are used in logging or output printings
or whatsoever. But this is simple. Let's consider more complicated code
changes. With CLI you can extract a block of code in a separate function.
CLI will automatically find out which values should be introduced as an input data
and which values should be an output from the newly created function.
And the corresponding function usages will be placed for you
and the correct values will be passed to it.
So then I can change the signature of function,
introducing new parameters, removing some old ones,
reordering the arguments, changing the result types or updating the function name.
And magically, all the usages will be updated for you.
In our daily Twitter tips, I've posted an example recently.
I'm not sure if our listeners have seen it or not.
When one can exchange the two, for example, integer arguments with the help of change signature refactoring,
the C line will change the order or the arguments in all usages accordingly.
So you never break something with this refactoring, you know.
And by the way, you can not only extract a function, but also a variable, a constant,
a parameter, type def or define.
For example, when extracting a constant, you'll be asked to replace only this value or all similar values found in the current file.
You can also select if to put this new constant definition to the header or if you'd like to declare it static or not, so all these things around.
There are also interesting inline refactorings to remove redundant variable usages and function calls with the actual declaration and a nice pair pull members up push members down with which you can safely move members up down
for the hierarchy. CLAN as usual will update all the usages for you and warn you about possible
conflicts and problems that can be here for example with member accessibility and the code
completion feature is there in the refactoring dialog
to help you to find the class where you want actually to move the members.
So there is also a similar pair, extract super class and extract subclass,
but it's nearly the same.
Very cool.
So I just want to dig into the extract features a little bit more
because that was one of the more magical things I saw watching this video.
So the way those work basically is you can highlight a piece of code and if that, you know,
like maybe a conditional statement or something like that that you're highlighting, if that's in
the same function multiple times, it'll highlight those as well and then you can just right click
and kind of be able to pull all that out. It makes the function for you and then replaces all those code blocks with that function.
Is that about right?
It's not working that directly right now,
but we hope this is the average goal to achieve.
Like, all the cases should be changed at once.
But at least we try to cope with all the usages
and we're trying to update them all.
And especially this is important for changing the signature,
because you can break things and you can't maybe miss this thing
right right so another thing I want to talk about is how last episode we talked
about CMake which CLion uses as its build system does CLion have any
features that will make CMake easier to work with and manage you know CLion have any features that will make CMake easier to work with and manage?
You know, CLion uses CMake as a build system,
but the thing that is more important is that it uses it as a project model.
That means we take all the information you've provided in CMake,
I mean files included into the project, language standard,
include directories, paths, compiler flags compiler flags and more and use it in the
IDE for resolving your code that means suggesting completion variants proper navigation and all
other smart features with this we can guarantee that CLion handles your code in the way you
actually want it so all the changes you introduce in CMake files are handled automatically by the
IDE and you can either reload the project
manually after them or set up the automatic reload. That means CLion will call the CMake
command itself so we don't need to do it manually. So following our All Access Program users'
requests, we've introduced some UI for CMake settings. Now you're free to configure CMake
options, environment variables or build options there. And for every target in your CMake settings. Now you're free to configure CMake options, environment variables or build
options there. And for every target in your CMake file, CLion automatically creates a configuration
that can be built to run. You're free to change the executable or make it non-runnable, configure
options, set scripts to run before and after configurations built. And when you add a new
C, C++ source or header file to the project,
CLan suggests you the list of targets where you can most probably want
to add this newly created file,
and targets will be updated by CLan automatically.
We've also presented a CMake cache editor in a separate CMake tool window
and support file names completion in CMake files.
We're actually planning more for future.
Right now we are working on fast CMake commenting feature
and considering CMake comment auto-completion feature.
And of course we do have more in mind.
And by the way, if you'd like to try CLion
and you don't have a CMake project, it's not a problem.
You still have a chance.
You can create a new project.
CLion provides you with a CMake file for this newly created project, it's not a problem. You still have a chance. You can create a new project and it provides you with a CMake file for this newly created project. Or you can simply
import a project from the existing sources. So some basic CMake file to start with will
be created for you also automatically. And some interesting option here is also to use
ByCode that is in general a C and C++ dependency manager,
but also can generate CMake layout for your project to open in CLine
and to work with ByCode at the same time.
So you can find more details in blogs and whatsoever.
Yes, I actually mentioned that a few episodes ago in the news.
ByCode recently announced that they're working with you
and that CLine can now integrate with by code libraries very easily.
Is that right?
Yeah, we are trying actually to build some collaboration.
So the first step was already made.
So we've like polished the layout so that they can generate the layout for CLion.
And hopefully we'll do more in future.
So maybe after the release time when we'll be not so overwhelmed with other tasks.
Right, right.
So are there any limitations
to the types of C++ applications I can develop in CLion?
I work on an Android and iOS application.
That's mostly written in C++, for example.
Could I use CLion to build and debug that app?
So I would like to be honest here.
CLion can be used for any cross-platform or single-platform project in C or C++
that is based on CMake and is compiled with GCC or any other custom GCC-like compiler or Clang.
So in this sense, there are no limitations as for now.
But still, for iOS, you are probably using xcode build
that is more for our app code ide and as for android uh gradle ndk build android mac files
all this stuff is not supported in c line and we're really unsure about this field for now so
at least no plans at this stage so maybe we'll come back to this later somehow i don't know
okay that's fair i'll have to check out those.
What was it, the app code for Objective-C development?
Yeah, actual app code is also the IDE based in our IntelliJ platform,
and it's for iOS developers.
So it uses the Xcode project structure.
It uses the Xcode build,
and it's like a great addition to those who are working under Xcode.
I'll definitely have to check that one out uh c-line has been early access preview since september of last year do
you have any info on when it might be moving from eap to beta or official release any ideas on what
pricing might be when it's released as well yeah sure c sure. C-Line is going to be released this spring and we're nearly done
with the roadmap for Ration 1.0
and ready to start.
So just follow our blogs and Twitters
and wait, we're nearly here.
As for the prices,
we'll have several licensing options.
It will be basic personal license,
commercial license for the companies,
50% discounted startup license.
And also C-Line will be available for free for students,
open source projects, and educational and training institution.
So it's our usual set of licenses.
You can review the similar set, for example, for the app code.
And actually, the prices will be the same.
So shortly, personal license will go for $99.
That's really great that you guys are giving this away to students for free.
I mean, I'd imagine, I know thinking back to when I was in college,
I think I did a lot of basic maybe using Vim and command line
and just being able to get taught using an actual IDE,
the type of tool that I'm going to use when I'm out in the industry would be great.
So I really hope you're successful in getting this into the hands of students.
Yeah, we have right now quite a big students pack.
So all our IDs are included
so the students can benefit from them.
Very cool.
Changing gears a bit,
your title with JetBrains is Product Marketing Manager,
but you have several years of background
as a C++ developer,
which I think is really fantastic to have an actual developer with experience managing this IDE.
How did you go about that transition, though?
You know, I'm a pure C and C++ fan since university.
And for eight years, I was doing C and C++ production-ready development in my actually favorite areas that are embedded and networking.
There was also a small research experience on my way as well in a fantastic Microsoft Research Lab in Cambridge, where we were working on the solution for automatic congestion problems resolving in home networks.
So luckily, during some period of time, I also had some small experience with promoting and pushing the product our team was developing to the telecommunication vendors.
So from the other side, I had a long relationship with the JetBrains company, admiring IntelliJ ideas since university time, working with Rui Sharper, knowing partly the team.
So I was very excited to learn about C++ IDE plans in the company.
I felt the lack of such products for myself,
and I was dreaming about it by myself for so many years.
And I also felt like I wanted to share all my C and C++ background
and experience with the team in some useful way.
And I'm grateful to JetBrains for their faith in me and this chance they gave me.
That's really cool.
Do you miss writing code at all,
or are you still able to get some dev time in
working on samples or demos of CLion?
Actually, I do some coding from time to time, of course.
I believe that I should try in details
every feature I'm presenting to the community,
talking about or showing during some conference talks or workshop.
So I have a couple of demo projects written by myself,
and I have more in my mind for the future.
Very cool. Very cool.
Speaking of the developer community,
what's the developer community like in Russia?
Is there an active community with user groups?
I'd imagine that a company like
JetBrains would do a lot to nurture its local dev community.
You know, before starting the C++ IDE here, we've performed a couple of researches on
C++ community size and per country distribution for this community. So for C++, on the top,
they were Russia, Finland, Germany, and Canada, and some more countries.
So we were sure that we would find an interesting and diverse community in Russia,
as well as we know about some big and famous companies here in Russia doing C++ development.
And you can meet some of them on the annual High Loud++ conference in Moscow, for example.
And when we've announced the private preview subscription for C-Line,
actually a lot of developers from Russian companies applied and including some big companies.
So we're sure the community in Russia is big and diverse.
It covers various areas and applications and is powered by some significant market players. user groups. There is a well-known meeting C++ Russia user group which is
organizing a lot of events all over the country not focusing on Moscow or
St. Petersburg but visiting various cities. We visited one event from the
list a year ago and it was a great event like a great user group meeting with
interesting topics around boost and more and hosted nearly I believe 100
developers so we were impressed.
And recently, they've handled a C++ Russia conference for the first time in Moscow.
It was a fantastic two-days event with a keynote from Sean Parent from Adobe,
and two tracks with interesting talks and 300 C++ developers as participants,
and an exhibition where JetBrains was joining Kaspersky Lab,
IncrediBuild and PVS Studio. We saw a great interest in what we do and received tons of
valuable feedback, comments, suggestions and simple good words from the visitors.
So I believe we'll continue working with the Russia C++ user group, and we also have some more C++-related events,
ideas, and minds, and plans,
but I believe it's too early to talk about them right now.
Sure.
Yeah, and meeting C++ is a great group.
I mean, they've hosted and started user groups
in many different countries,
mostly in Europe, I believe.
Is the Russia one one of the first ones they started?
Yeah. So there is a Russia one one of the first ones they started? Yeah.
So there is a Russia one, and they're quite great,
and they have a strong relationship with the general meeting C++ guys.
Very cool.
So is there anything else you want to talk about today?
You know, CLion's coming out.
It sounds like in just a few weeks or months, so that's very exciting,
and I'm looking forward to it.
Yeah, we actually encourage everyone to try the All Access program built and to follow our resources for the announcement.
But, of course, as usual, there will be a trial period for the builds when this line will be released, so it's not a problem if you haven't tried it before. You can come to our site, download, and try for 30 days for free.
So I want to see if you like it or not, if it fits your project or not.
And just select the license if you really would like to proceed.
Very cool.
So where can people find you online, Anastasia?
So you can go to Twitter.
You can find the Anastasia K2512 or something like that.
But, you know, actually, I'm posting more often to C-Line ID Twitter.
So, you can ask any question about C-Line there, and I will answer you for sure.
So, yeah, basically, the C-Line resources are maybe more, like, the better resources to find me in.
Sure.
And that's CLion underscore ID at Twitter, right?
Yeah, exactly.
Very cool.
Well, thank you so much for your time.
Thank you for waking up early for me.
Just so you guys know, I normally record this show in the evenings on the East Coast.
I'm recording a bit
later and Anastasia is actually recording at about 6am in Russia. Is that right? Yeah, it's 6am here.
Well, thank you for getting up early for me. Yeah, you're welcome. It was a pleasure for me.
Thank you. Yeah, bye bye. Bye.
Thanks so much for listening 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 that also
you can email all your thoughts to
feedback at cppcast.com
I'd also appreciate if you can follow
cppcast on twitter
and like cppcast on facebook
and of course you can find all thatCast on Twitter and like CppCast on Facebook.
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.