9 features of the future in the IDE, thanks to which you can master any programming language without courses in 1 day

It is believed that “programming is difficult.” That you can’t just take it and immediately start working with an unfamiliar programming language, immediately writing a working program, or understand a ready-made one. Yes, now it’s really not easy, and you will have many difficulties along the way, because of which you can turn around and leave without ever finishing what you started. However, these difficulties can be resolved in the near future. You may ask, how exactly? This is what this article will discuss.

All the examples, screenshots and keyboard shortcuts below are discussed in Jetbrains development environments on the Intellij platform.

But why Intellij?

Well, firstly, in other IDEs the functionality is even more limited than here. And secondly, it is on this platform that the largest set of IDEs for different programming languages ​​is available. And since the platform is common, this means that as soon as a new feature is added to it, as a rule, it immediately becomes available for all IDEs of this platform, which means it will be available for the corresponding languages.

1. Built-in single list of all functions, language constructs and language operators with Drag-n-Drop.

So you want to try writing a program in a language you've never worked with. So you installed the IDE to work with it, opened it, created a project, and what next? And then nothing, because you don’t know any functions, language constructs, or operators of this language, and you will literally have nothing to write your first program from. As a result, you will have to go to Google, look for manuals and reference books, and study them. Already at this stage, you will most likely turn around and leave if you are not ready to allocate time for this. But everything could have been different if it were in the IDE built-in single drop-down list of functions, language constructs and operators. From where you could Drag-n-Drop the ones you are interested in into a file. You would not have to look for anything, since everything that is in the language would be right before your eyes. Likewise, you wouldn't make a syntax error because you wouldn't have to write the function call by hand.

Drag-n-Drop functions/classes from a list

Drag-n-Drop functions/classes from a list

Autocompletion is not suitable for these purposes, since at a minimum you need to enter the first letter of the class/function. That is, you will have to go through all 26 letters of the English alphabet. At the same time, the issuance of autocomplete is not structured in any way, and the above list will be grouped into sections. For example, functions for working with strings, then functions for working with arrays, etc. Drag-n-Drop language constructs from a list

Drag-n-Drop language constructs from a list

Drag-n-Drop operators from a list

Drag-n-Drop operators from a list

In order to try it yourself and understand what it’s like without a list, you don’t have to download the IDE. It is enough to open any online interpreter (for example, onlinegdb.com), choose any language – and go ahead, try to write something right away, without turning to Google.

And by the way, having a list of functions before your eyes, you could just go through everything that interests you. But then it would be more convenient not to transfer the same functions to the editor every time, and execute them in a separate window.

2. Quick execution of an arbitrary code fragment/expression from a project directly in the editor, or in a separate window – REPL GUI

Now let’s imagine that you want to understand how the finished code works (again, in a language unfamiliar to you). For example, you took some project from Github. Or just a piece of code from the Internet. And now you read it, and you don’t understand how this or that piece of code works or what the expression produces. Or you understand, but you doubt that this is really the case and want to check. The best way to check is to run a snippet. However, you won’t be able to take and execute a piece of code; to do this, you will need to copy it to a separate file or to the console and execute it there. And to output the result, you will also need to wrap the variable that contains it in an output construct. What if you now want to execute a fragment of this fragment? The need to copy them to a file every time will very quickly begin to cause you discomfort (and this is provided that this does not scare you away at the very beginning), sooner or later you will fall into a stupor and simply turn around and leave without receiving the answer to your question.

And everything could be different if there was an opportunity immediately execute the piece of code you are interested in. It is advisable that you do not have to select it, but that this happens automatically when you hover the cursor (because you will get tired of selecting it every time). This way you could go through each expression many times faster and easier, and get the answer to the question.

Quickly execute expressions from a piece of code

Quickly execute expressions from a piece of code

And if suddenly you want to modify it before execution, but without making changes to the original code, so as not to violate the famous rule “if it works, then don’t touch it,” then copying the fragment/expression into a separate window and executing it there will do:

By the way, these features will also help you quickly “disassemble” your own piece of code, which you were able to sketch thanks to the feature from point 1, despite the fact that you are working with the language for the first time.

As for the code that was used as an example in the gifs, here it is:

$year = (new DateTime('18.01.2101'))
        ->sub((new DateTime('01.01.2024'))->diff(new DateTime('01.02.2024')))
        ->format('Y');

if ((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400 == 0)) {
    echo "Полученный год является високосным\n";
} else {
    echo "Полученный год не является високосным\n";
}

Still the same onlinegdb.com (following this link, the php language will be selected automatically) you can try to get the results of expressions from it to understand how inconvenient it is without quickly executing the code. Please note that expressions will need to be wrapped in echo or var_dump. Echo – if the result of the expression is a number or string, for example, echo 123;, echo "abc";; var_dump – if everything else, for example – var_dump(false);, var_dump(array(1,2,3); .

But let's get back to the features. It is assumed that the execution of fragments/expressions will occur in session mode, that is, it will be possible not only to execute an expression, but to assign its value to a variable, and then execute another expression that contains this variable, and not receive an error that it is not defined.

However, filling in variables yourself is not always convenient. For example, you wanted to execute an expression right from the middle of the code, as soon as you started the session. But it contains variables that are filled in 100 lines of code higher. And first you will need to go there and execute the expression that fills this variable. And if it also contains variables, then you will need to go up again. You can, of course, not go anywhere, but try to fill the variable yourself in the code execution window, but it’s also not always possible to immediately select the appropriate value. This problem will help to solve system for storing and generating examples of variables.

3. Support for nested code preview of functions/methods/classes, etc.

But what if you don't want to execute the function called at a given location, but just look at its code? Of course, you can open it in a new tab, but if there are a lot of tabs, then you will feel that there is “nowhere” to open another one. Most likely, you have encountered this more than once in your browser. As a solution to this problem, you can open not a tab, but a quick preview of the definition (Quick Definition, Ctrl+I), however, if there is also a function inside that you want to look at, you will still have to open a new tab, because nested preview is not currently supported . Surely this will simply stop you, you will not open anything, but will simply turn around and leave without receiving an answer to your question. What if there was nested previewthen you could “fall inside” as many times as you need, and the answer to the question would be received.

Here's how to do it now:

And this is how it should be:

And no extra tabs

And no extra tabs

This functionality will be indispensable if you want to walk through the “tree”. For example, there is a function, and it calls several more functions within itself (for example, 5), and each of them calls the same number, and those too. The total is 125 branches. Let's say that you can filter most of the branches by the name of the functions, clearly determining that what you are looking for is not there. But there will still be some branches that will raise doubts, and in order to dispel these doubts, you will need to walk through the branches and be sure. Moreover, the less experience and knowledge you have, the more such branches there will be.

The described case is somewhat reminiscent of this meme from the early 1990s:

Would you find the hidden project? Which folder would you stop at and be stupefied? And yes, the picture was taken at a time when the tab functionality was not yet available in Windows Explorer (but it appeared starting in Windows 11). This is if you suddenly think that you can “just open each time not in a new tab but in the current one.” In the explorer of those times, this was the only option, and I seriously doubt that this helped the guilty sister find her project.

4. Support for nested search for places to use functions/methods/classes, etc.

The same as point 3, but in the opposite direction. If you want to see where the function you are currently in is called, you can call Show Usages (Ctrl+Alt+F7), and a window will appear with a list of such places and their contents. However, if you want to repeat the same thing from there, you won’t be able to, and again everything will come down to the need to open a new tab. Which, of course, you won’t do, because of which you will again not be able to get an answer to your question and will leave again. And again nesting support for this functionality could solve this problem

How to do it now:

And this is how it should be:

This would help if, for example, parameters are passed to a function, but they are not defined directly in the function that calls it, but further down the stack, and you want to get to this point. Here is an example of such a parameter passing:

Without this feature, you will need to start debugging, set a breakpoint inside the function, reproduce the scenario in which this breakpoint is reached, and intercept the parameter value. And then, in the same way, go up the call stack (the debugger provides its own functionality for this), if you suddenly want to understand why the value is exactly that way.

Another case could be that you, for example, want to make changes to a function that is called in several places, and those in several more, etc. (the same tree as in step 3, but in the opposite direction). And you need to quickly understand whether making changes will break the functionality for each of the endpoints.

Or you just want to understand whether this function is used in the project, if at the same time it is called in other places, and those in several others. It is not clear whether the endpoints are called in the application or not, and you need to check this.

5. SQL – graphical interface for read operations (including JOIN and GROUP-BY HAVING

It would seem that point 1 (a single list, in this case, of operations) and point 2 (quick execution of expressions) should greatly simplify learning the SQL language, but you can go further and completely execute SQL queries without having to write them, by clicking pairs of buttons. This has already been partially implemented – when you open a table in the Datagrip IDE (the functionality of which is also built into other IDEs in the Intellij line), a SELECT query is executed against the database. You can also add a filter and sorting – as a result, WHERE and ORDER BY are added to the query.

However, as for JOIN and GROUP BY, there is no such option yet, and you will need to write queries with these operators yourself. But this could also be implemented in a GUIby selecting the tables that need to be joined to each other and selecting the fields that should be joined. Well, the ability to select fields for grouping.

An example of what a GUI for a JOIN operation might look like. And this is still far from the most advanced option. Columns could even be selected directly in tables without a separate window.

An example of what a GUI for a JOIN operation might look like. And this is still far from the most advanced option. Columns could even be selected directly in tables without a separate window.

Result of JOIN operation

Result of JOIN operation

Eventually you will be able to master SQL read queries with basic statements without having to write them, so it will be much faster and easier.

6. Display non-obvious features in the context menu as a separate item

How do you learn about the capabilities of the program you are in for the first time? Typically, most people do this by calling up the context menu by right-clicking and looking at what's there. And he draws conclusions, and if something is not there, then it is not and cannot be in this program. That's just not how it works in the IDE now. Here, in your context menu, not all available features in a given place are displayed (the place where the cursor was, that menu and the context menu). And among them there are many important ones, but you will not even know about them, or you will find out by accident. This is why it now takes months to get comfortable with the IDE.

As an example of functions that are currently not in the context menu, we can cite the features described in paragraph 3 (quick viewing of the function code) and in paragraph 4 (search for uses of a function) in their current form, forward/back navigation, or for example, displaying the parameters accepted by the function when pressing Ctrl+P:

But why doesn't the menu contain them? Because there are a lot of such features, and if you place them all, the menu will be overloaded, it will become too long and difficult to understand. So it was decided to save money, but the problem described here was not yet obvious.

But in fact, if you want, you can find ways to solve this. For example, add a separate item that will display a submenu with all other features. At the same time, it is not a fact that there will be many items in the submenu, because not all features should be there, but only those that are available exactly where the menu is called. At that time, there will be only one more item in the parent menu. Also, instead of a submenu, there can be a separate window with a list. And since this is a separate window, there will be more opportunities to make this list convenient for perception.

An alternative way could be the same menu item, but opening a non-submenu, and a page with a description of all those non-obvious features that are available specifically at the place where the menu is called.

7. Code navigation taking into account OOP class inheritance

Nowadays, navigation in the IDE also takes into account object-oriented programming, but not always. Here, for example, is a parent and child class inherited from it:

What will it be equal to $childClass->one() ? Let's trust the IDE's navigation and see where it takes us:

So, according to the IDE, the answer will be 444. However, this is wrong, and the correct answer will be 555. Because the three() method is overridden in the child class, and the result must be taken from there. That is, the navigation should have looked like this:

But why did the IDE lead us to three() of the parent class? Because once you moved from a child class to a parent class, the IDE forgot where you were before and made navigation as if you were never there. For example, if you were to move from a method $parentClass->one();then such navigation would be correct.

It turns out that if you don't know OOP, then you won't be able to trust the IDE's navigation to know the result of executing the code. Because IDE will screw you over will lead you to the wrong place and mislead you. But if IDE took into account where you came from when navigatingthen there would no longer be such a need for knowledge of OOP, and moreover, this feature would even help to understand it along the way.

8. Separate colors for built-in and user-defined functions/methods/classes, etc.

Look at the screenshot. Which of these functions is part of the language and which is part of the current project?

It's not clear, right? And all because they are painted the same color.

Answer

And this is another simple example, but if you studied the project more, while being a beginner in this language, you could completely make an erroneous conclusion about the operation of the code, or even about the language. For example, you look at the code of a project, a function is called in it, you thought that it was part of this project. But in fact, this is a function of the language itself, but you passed by and did not know about it, the result is that you have a gap in your knowledge of this programming language. Therefore, built-in and user-defined functions, classes and other language entities must be painted in different colors.

9. Built-in documentation for operators and language constructs

If you hover over a native function/class of a programming language in the IDE, a pop-up window will appear explaining what it is and why it is needed. And you won't have to go to Google to find out.

However, this will no longer work with language constructs and operators – this is not currently implemented for them. For example, here is an expression from a piece of php code from point 2:
(($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400 == 0)
What do they mean for example && And || ? These are the logical AND and logical OR operators. But if I hadn’t written about this now, and let’s say you don’t know this, then at least you would have to go to Google to find out. But even if you know, don’t delude yourself – the same operators can perform different actions in different languages. For example, the result of the expression $var1 || $var2 in php it will be true/false, and in js it will be the value of the variable var1 or var2, depending on whether the first variable is empty.

It will be possible, of course, to execute the expression using the same quick execution of the code from step 2, and try to draw a conclusion based on the result obtained. But the conclusion is just your guesses, which may not always be correct. And if you made the wrong conclusion, then the next time you see the operator used in code, you may encounter unexpected behavior and not understand why. That's why built-in documentation of language constructs and operators there should be one too.

Conclusion.

So we’ve looked at the features of the future that will eliminate the main reasons that prevent you from picking up and starting programming in an arbitrary language right now. But when will they all be implemented? And this already depends on Jetbrains, and (suddenly) on all of you too. The fact is that Jetbrains (like other companies) sets priorities when implementing new features based on what users request. They find out the presence of this request through their bug tracker youtrack, where they look at the number of votes for a particular feature request. Tickets have also been opened for all the features described here, and links to them are mentioned in the relevant paragraphs of this article. However, there was no user request for this functionality, so they will not be implemented soon. It is possible that not earlier than in 10-15 years. Currently, the implementation of none of them has begun.

But if you want to bring their implementation closer, you can follow the links and vote. You can log in to the tracker through your Google account. But if you have a Jetbrains account, then it’s better to use it (you can also use Github or Bitbucket). If the features get a sufficient number of votes and they reach the top (about 500 votes are needed for this), then most likely implementation will begin immediately from that moment. It’s hard to say how long it will take, but if they give it a higher priority, then it’s possible that most of them will take less than a year.

Links to tickets if you don't want to search for them in the article
  1. Built-in single drop-down list of functions, language constructs and operators – link to ticket
    1.1 Executing functions/methods/classes in a separate window – link to ticket

  2. Fast code execution directly in the editor, or with copying to a separate window – REPL GUI – link to ticket
    2.1 System for storing and generating examples of variables – link to ticket

  3. Nested function/method/class code preview – link to ticket

  4. Nested search for places where functions/methods/classes are used – link to ticket

  5. GUI for JOIN and GROUP BY operations in SQL – link to ticket

  6. Displaying non-obvious features available at the click location in the context menu using a separate item – link to ticket
    6.1 A page with a description of non-obvious features available at the menu location – link to ticket

  7. Code navigation taking into account OOP class inheritance – link to ticket

  8. Separate colors for built-in and custom functions/classes, etc. – link to ticket

  9. Built-in documentation of language constructs and operators – link to ticket

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *