Arpa's blog

By Arpa, history, 5 months ago, In English

Hey folks!

Choosing an efficient IDE or editor is a common concern in competitive programming and other programming areas. There are also a lot of Codeforces blogs about that. Many of my students always ask me about this matter, so I created some content on this concern. I also encourage others to do the same and show the features of the IDE/Editor they are currently using.

After 10 years of experience and examining a lot of editors and IDEs, I am using CLion today. As you may know, CLion is an IDE by JetBrains. They also have IDEs with the same features and shortcuts for other languages like Java (IntelliJ) and Python (Pycharm).

There are two main reasons people try to avoid JetBrains (or similar IDEs):

  1. The first one is that they are usually not free.
  2. The second one is that they are slow.

For the first one, note that if you are a student, you can access the student version of JetBrains. For the second one, follow me to see why they are worth it.

The advantages of using an IDE include numerous shortcuts that speed up your coding (which you can see in the video linked below). Another advantage is that they assist you in debugging. They can also catch compile errors and warnings before compiling! There are many other benefits that we will discuss soon.

Watch: https://www.youtube.com/watch?v=kd7-YG-xLVo

  • Vote: I like it
  • -2
  • Vote: I do not like it

»
5 months ago, # |
  Vote: I like it +15 Vote: I do not like it

i feel vim is something better than a ide

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This was just the first part. I will explain the advantages of IDEs and CLion compared to Vim. After our journey is finished, we can discuss if you still think Vim is better.

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      even if you conclude it is better than vim, it won't be better than neovim or vscode, (both if configured correctly) in 1000 years

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    That's true. Vim is fast and will not cause the loss of unsaved code.

»
5 months ago, # |
  Vote: I like it +30 Vote: I do not like it

i like usaco guide ide

»
5 months ago, # |
  Vote: I like it +24 Vote: I do not like it

MS word is best IDE.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I had to code on google docs for a competition once — can confirm it is the best IDE

»
5 months ago, # |
  Vote: I like it +5 Vote: I do not like it

vs code ?

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it
»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The claim that CLion is slow is not true. It is a great ide. (other jetbrains products are also good)

»
5 months ago, # |
  Vote: I like it +17 Vote: I do not like it

Sublime is the GOAT.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I tried it but sometime an infinite loop runs in background and my laptop freeze

»
5 months ago, # |
  Vote: I like it +50 Vote: I do not like it

Genuine question: how do you ensure that the IDE you're used to is also present on onsite contests? In my experience, coding during practice using the same editor/IDE as the onsite contest gives a significant advantage in terms of both time management and coping with last minute time pressure.

I've seen people use vim alongside CLion for IOI, for example. My first real IDE was Geany (you should seriously try it out — I liked it more than both Sublime and VS Code), and shortly after, I switched to Vim (my setup), which I used for around 5 years or so. I still use it, but via Doom Emacs whenever possible.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Just using a common IDE looks like the way. Also jetbrains is a ICPC sponsor so you're sure to have CLion. I don't know what vim users do during cintests, but i saw a vim-vscode setup once

    Anyways practice contest is very important, there's always setup problems and some settings that you may want to set as soon as contest starts (like autosave)

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      CLion may be guaranteed for ICPC WF, but not for many regionals/other contests, so it's an issue if the IDE of your choice is not available in all contests (which is the point of my comment).

      In my case, my teammates used Sublime and I used vim, so I used to type up my compact vimrc in the beginning (generally takes < 2 minutes). Using vim was pretty easy for them too, since I had enabled dropdown menus on right click and everything worked just fine in insert mode. The same was the case for me in Sublime, but I used vim for > 95% of my time.

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I look at this issue from a completely different view.

    CLion can boost you in CP. You get faster and you can solve more problems and get stronger. You learn how to avoid undefined behaviors. Your rating grows, and then your self-confidence. And more.

    So consider the case you are going to participate in a competition that CLion isn't supported. Ok, the environment might be a bit different, but you should remember all the gains you had from CLion. I recommend that for such a competition, switch to their environment 20 days before the contest.

    In short, you should consider the benefits and costs in the long term, not the short term.

»
5 months ago, # |
  Vote: I like it -6 Vote: I do not like it

vs code is the goat of all IDEs because it is all IDEs. prove me wrong

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Notepad++ and using Cygwin is ok for me

»
5 months ago, # |
  Vote: I like it -7 Vote: I do not like it

The best IDE for CP is CP Editor without doubt!

»
5 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

I tried CLion and I will say that it is damn slow than other IDEs. But you can solve interactive problems with it, which cannot be done with Sublime text. But I use Sublime text and I never came across interactive tasks :)

Sublime text > CLion

»
5 months ago, # |
  Vote: I like it +7 Vote: I do not like it

CodeBlocks is a great IDE if you are starting out, but as you progress, Geany and VS Code are great options too as they can be customized and their relative light weight is useful.

However, if you are a fan of online solutions, USACO Guide IDE is by far the best such editor I have seen.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

cp editor is awesome, I think it works best for cp. Contains everything that is needed. And if you really need a debugger, gdb with -tui is pretty good

»
5 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

For me Sublime text is the the a good editor with the installation of FastOlympicCoding package using competitive companion which help me to parse testcases .

Benifits of using it :

  • it provides a linter that highlights any error in C++ syntax realtime.

  • it provides a inbuild stress testing feature.

  • if you run a infinite loop by mistake you will be able to stop it using a stop button.

  • it also mention the runtime of the code .

  • it also it compares the sample output with the output from your code against the sample input it might not be helpful for questions with 3 or 4 sample testcase size but is useful for question having 10 or 12 sample test case size.

I have also used vscode ,Vim , emacs.

The problem I faced with vscode is though it works same as Sublime but the Competitive Programming Helper package in it truncates the output for long test cases so it is hard somtimes for me to debug

The problem I faced with Vim and Emacs is that the settings are very complicated for new users and a part of concentration used (i.e. distracting) in switching from insert mode to normal mode in Vim and vise versa for beginners.

I have also used Sublime text with this setting but problem is that sometimes by mistake if I run an infinite loop it it causes Sublime text to lag and stop responding so it can cause a problem during contests

The above problems and benefits are completely with respect to my personal experience.

If anyone one has any other point for veiw regarding this they are welcome to comment below this post

  • »
    »
    5 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    From my POV reading "Sublime text is a good editor" is hilarious

    did they fixed this?

    • »
      »
      »
      5 months ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      Ya you are right they do have this problem . This indentation problem also occurs during pasting .

      I have never faced exactly this error as I use curly brackets after my loops and funtion so if I ever face issue after pasting I format my code using "Alt+Shift+f" key.

      May I ask you what editor do you use ?

      • »
        »
        »
        »
        5 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        most of the time I use vscode (with code runner + cph) or codeblocks

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Far manager on Windows and far2l on Linux

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Pls teach how to use GNU on Clion :)

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

@Arpa: Why not the BEST Editor VSCode?

It can do anything you said here:

The advantages of using an IDE include numerous shortcuts that speed up your coding (which you can see in the video linked below). Another advantage is that they assist you in debugging. They can also catch compile errors and warnings before compiling! There are many other benefits that we will discuss soon.

And, it is FREE for everyone and very FAST!

»
5 months ago, # |
  Vote: I like it +3 Vote: I do not like it

CP editor is great for cf and i believe it could be the best IDE for cf if afew features were added

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Vim without any extension is god tier. Inspired from William Lin.