this post was submitted on 14 Jun 2023
45 points (97.9% liked)

Programming

3347 readers
1 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

So, I have been mostly self thaught programmer (C++), as its a big part of my job (not a regular developer). But so far I have been using a simple text editor like Geany to code and I compile stuff either in terminal (linux) or produce my own make file.

I am starting to wonder if I should switch to a full IDE, as I am on linux, I was thinking of trying KDevelop. But I am simply not sure if its worth, do I even need it?

I have never used an IDE, it seems kind of complicated for the start with "projects" and I havent really found any good introductions to how this workflow is supposed to work.

Do you think using and IDE is something everyone should use? Or do you think a text editor with producing your own make files should be enough?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 32 points 1 year ago* (last edited 1 year ago) (2 children)

For my money: yes, you should use an IDE or something like one, but not because you're "missing out" - rather, because a plain text editor will limit your progress.

There are (still!) people around who think it's some sort of badge of honour to only use text editors, but in reality, this means they miss the syntax errors and typoes that we all make because we are human, and end up wasting hours looking for them when an IDE would let them see them.

You wouldn't turn up at a cookery school saying "I'm still a beginner, so I'm only going to use this pair of scissors" - specialised knives and utensils are part of the chef's toolkit, and becoming a better chef is just as much about learning to use them effectively as it is about memorising recipes. It's the same with programming.

[–] [email protected] 4 points 1 year ago (8 children)

I stick with vim for years out of that sort of badge of honor. Now I use vscode and nobody is taking it from me.

You can do almost anything in vim or emacs, but I can do it faster in vscode. It's a really fantastic tool and it's completely free.

[–] [email protected] 3 points 1 year ago (1 children)

VSCode + Vim extension is where it’s at

[–] TitanLaGrange 1 points 1 year ago

VSCode + Vim is one of the configurations I use right now. It's quite good. Not quite as nice in terms of being Vim as Vim + Tmux, which does get in my way, and it doesn't handle bookmarking very well, but definitely a very usable setup. I regularly use VSCode, Rider, and Visual Studio all with Vim extensions, and as much as I like Rider, the best Vim extension for it has issues. Visual Studio is probably my overall favorite for web backend, but VSCode is right there with it, and my preference for front-end.

[–] [email protected] 2 points 1 year ago

I actually went back to (neo)vim because I found vscode was not quite keyboard-driven enough for my wants. But especially with neovim you can torture it into basically being a IDE with all the available plugins out there (e.g. in my setup I have highlighting, code completion, reporting of syntax errors and forth)

[–] [email protected] 1 points 1 year ago

Do you use the vim plugin for VSC to keep your speedy navigation? I miss things like "select up to the next quote" but I'm not enough of a vim user to make the switch myself.

load more comments (5 replies)
[–] green_pyroxene 1 points 1 year ago (2 children)

for statically-typed languages, i agree that having powerful static analysis tools can help a lot, but why would you need an IDE just to catch "syntax errors and typos"? any editor with decent syntax highlighting would work for that, right?

load more comments (2 replies)
[–] [email protected] 29 points 1 year ago (2 children)

In this Thread: people telling you how IDEs suck then proceed telling you how to turn their terminal based text editor into an IDE

[–] [email protected] 3 points 1 year ago (3 children)

There's a learning experience to it though. When coding in intellij I'm just using writing some java without deep understanding how the build system works ans what's done underneath. Setting up some nvim with lsp forces you to focus more on the whole process so I'd say it can be beneficial

[–] [email protected] 4 points 1 year ago (1 children)

Yes but people should also factor OP's experience into recommendations. They are not a regular developer, self-taught programmer who uses C++ for work. They are probably not familiar with many build-chain internals, command line debuggers, and compiler search paths. So while everyone in this thread can probably agree that something like code completion is better than not having code completion, I think it’s also fair to get op started with something quick and easy like VSCode and then once they are comfortable they can go figure out how to install cool plugins for neovim

[–] [email protected] 2 points 1 year ago

Yup that's also true, I've hit the wall multiple times when trying to use vim/emacs. Now I'm in neovim and feel like I get a better understanding of buildsystems but I won't say it's something that everyone should start with. I don't know what the C/C++ intellij is though. On windows it's probably visual studio. On Linux maybe vscode but I'd say if op wants to try some morw serious ide then clion may be a better choice

load more comments (2 replies)
[–] zmhanham 1 points 1 year ago

It's less about "sucks" and "not sucks" but the point I think is important is that IDEs are generally a closed system. You can't modify them very much, if at all, to fit your needs. If the IDE out of the box is a good fit for your needs then by all means use it! But if there comes a time that you need to do something that isn't supported by the IDE you either need to drop to the command line or attempt to hack together some solution in whatever limited extension language/API they support. Or hope that an extension already exists.

Vim, emacs, and other programmable editors make it easy for you to do that one specific thing you need to do. And there is very likely already a package/plugin that someone made for it. But if there isn't, it's so much easier to modify a programmable editor than a closed IDE.

So really it just comes down to what do you need from your editor? Now if you're someone like me, I need to try to perfect the way I program. Always trying to find the most efficient way to do some common operation. But if that's not you that's totally ok (and honestly I envy you lol)

[–] [email protected] 13 points 1 year ago* (last edited 1 year ago) (4 children)

I use vim, and I can safely say, it was worth bothering to learn it and set it up, ESPECIALLY if you make a career out of it, and one time I had a friend who didn't use an IDE and I showed him how much easier it was to do certain things on vim and he felt very very stupid for using notepad.

load more comments (4 replies)
[–] [email protected] 12 points 1 year ago

It’s worth figuring out an IDE “lite” like vscode to see how you go. It’s pretty lightweight and easy to spinup compared to something like IntelliJ

[–] [email protected] 8 points 1 year ago* (last edited 1 year ago)

If you try out an IDE don't feel obligated to have to use every feature of it just to justify using it. Just use it much like your text editor to start with and learn the extra features you go.

[–] [email protected] 6 points 1 year ago (1 children)

The line between IDE and text editor is kinda blurry nowadays anyway. I don't know that much about Geany, but many of the text editors I've used were basically full IDEs, except that the IDE features were opt-in.

Currently I use VScodium as my editor, and I've been happy with it. I hear a lot of good things about Kate too, and as a KDE user, I feel like I should try it some time. Kate to me looks like the same spirit of text editor as Geany. Maybe if you're comfortable with that style of editor, give it shot.

The 2 editors that have really been catching my eye lately have been Helix and Lapce. I think it's really cool that Helix went with a Kakoune style "selection → action" system instead of the normal vim style "action → selection". I think Lapce is trying to be a similar style of editor to Vscode, with simple IDE features by default, but then an extension sytem to expand that. Maybe an editor like that would be approachable to you. Although unlike Helix, Lapce seems to be less production ready for now, so maybe wait on that.

For now you could of course just try VScode (or VScodium if you're like me and want open-source software) since that's a popular one right now.

[–] Ministar 1 points 1 year ago (1 children)

I was looking at Kate as Geany does not seem to get a lot of feature updates, but unfortunately i dont have KDE at work and there does not seem to be a flatpak version of Kate.

I did not know about VSCodium, and I do actually prefer open source software so I will check this out. Thanks

[–] ravnswood 1 points 1 year ago

IMO VSCode is one of the best options: a text editor with plugins and IDE-like features, but allows the user to create the project from scratch.

[–] starship_lizard 5 points 1 year ago

There's a lot of value in using an IDE, from just general formatting stuff to being able to tell what class functions do without having to dig into the class itself. Not to mention autocomplete.

There's lots of free solutions out there now, so if you're curious I'd give it a shot. I think you'll find once you start using one it'll be hard to go back to just a plain text editor.

I like vs code a lot, if you're looking for specific recommendations. It's lightweight and can be upgraded to do pretty much anything via extensions.

[–] IndependentRanger 5 points 1 year ago (1 children)

Interesting question. Personally, I started with a text editor transitioned to vim, then to VSCode and now I've settled on a customised neovim install.

I'm a believer of PDE, that is personal development environment. It's a concept one of the Devs of Neovim TJDeVries talks about.

In essence it's the idea of building your development environment how you want it. Personally, Neovim allows me to do this. For example, I have a VSCode style debugger, incredibly fast searching with ripgrep, vim keyboard shortcuts and uses the same language servers as jetbrains products.

Here's a link to his full conversation on the topic: https://youtu.be/QMVIJhC9Veg

Stay awesome!

[–] gears 1 points 1 year ago (1 children)

Can you elaborate on your debugger?

I've been trying to switch to neovim, and I've got a pretty decent setup with treesitter and also lspconfig. My search and debugger are still non-existent and I'm not sure what is best.

I write python and c/c++ (for MCUs) at work, and I'm curious what the state of integration with potential debuggers is.

[–] IndependentRanger 2 points 1 year ago* (last edited 1 year ago) (1 children)

Sure. It uses something called DAP and I use nvim-dap-ui for a VSCode like experience. I appreciate its annoying to find a good debugger for neovim. I use mine with python and it even plays nicely with venvs. Hope that helps!

https://github.com/mfussenegger/nvim-dap

https://github.com/rcarriga/nvim-dap-ui

[–] gears 2 points 1 year ago (1 children)

Hey thanks for letting me know about this btw! I've been using it at work and it's great, I love it. I've been using it for my Python repo, but I still need to set up the cortex-debug stuff and whatnot for my MCU crap.

[–] IndependentRanger 2 points 1 year ago

I don't know about cortex-debug I'm afraid, but I'm glad the python stuff is working out 🙂

[–] [email protected] 4 points 1 year ago

I usually use a text editor in day to day, but when I say text editor, I mean something a little more full featured like emacs or sometimes vim. It's quite valuable to have something that can integrate easily with a debugger and has navigation + completion features if you want to go the text editor route. I hadn't heard of geany before, but it looks like it can do at least that much.

[–] [email protected] 4 points 1 year ago

Some IDE's really speed up development, yes. They provide tools for running tests, automatically do formatting and make it very easy to navigate around the code. For me, that last point is the main reason to use an IDE, it is so much faster to just click on a function and go to the file where that function is implemented. IDE's can also help with setting breakpoints and using the debugger.

I'm not sure how things are for C++ though. Personally, I mostly develop with Java, Typescript (Svelte), Python and Rust. For Java, I use IntelliJ, for all others I just use VS Code.

[–] [email protected] 3 points 1 year ago

As hiajen said, most IDE’s simply aren’t as useful for lower-level languages like C++. And while communist suggested vim, I would say that something along the lines of helix-editor would be a bit more user-friendly, and just as extensible :)

[–] [email protected] 3 points 1 year ago

not using an ide as an swe would be like an architect doing everything without auto cad. It's an absolutely essential tool.

[–] [email protected] 3 points 1 year ago

I think there are two key aspects to IDEs:

a) the larger the codebase and the less familiar you are with it, the more of a nightmare it will be to hunt bugs or search places to insert code; this is where an IDE becomes extremely helpful by e.g. letting you search a struct across multiple modules, showing lints, compiler errors etc.

b) IDEs are only as helpful if they can be configured with your codebase, and sadly there are probably numerous codebases that won't play nice and let you crate a working config

[–] [email protected] 2 points 1 year ago

There are "simple text editors" with IDE like features also, like neovim configured with LSP, Helix aso. And for languages that will infer types, it is really nice to have the editor show the types as inlay hints.

[–] [email protected] 2 points 1 year ago

Hm, i do thing witu c/c++ the benefits of using an IDE are not as great as for other languahes like java/python etc etc but still existant.

I wont programm java without my IDE, for c/c++ i mostly just use vim with someplugins for autocompletion. I could be a snowflake tho.

[–] zikk_transport2 2 points 1 year ago

Depends what you are programming. PL like Golang I would say it's a MUST for autocompletion and enforced syntax/styling.

Give visual studio code a try. Ensure you install requires extensions. :)

[–] bobaduk 2 points 1 year ago

When I first started programming I used a text editor, UltraEdit32. When I moved into .Net, I initially used Ultraedit and wrote all my own build files, but switched to using Visual Studio with all the bells and whistles. When I moved to Python/Node I adopted Vim, and these days I tend to use Doom Emacs.

There's a spectrum from visual studio or eclipse, with complex project structures, through vscode and rider which are simpler, to programmers editors like Emacs or neovim, to plain editors like nano.

I think the most important thing is that you're comfortable with your tools. I could crunch out a lot of code with Visual Studio and Resharper, but I use Emacs as an IDE, note taking tool, and email client . The familiarity makes me productive.

It is super helpful to have syntax errors or warnings highlighted when working on code, and a decent editor will make it easier to navigate code - jump to the definition of a function, find the documentation for an API call etc.

As codebases get larger, you need all the help you can get. You may also find, when you work with others, that their opinionated tooling clashes with your opinionated hand crafting.

[–] [email protected] 2 points 1 year ago

I've been doing development in many languages over the years, including C++, Java, Python, and Go. i do everything from the command line: vim for editing, the specific compiler and other language tools, makefiles, grep, etc. I am plenty productive, and I find the speed and generality of the tools I use make up for the features an IDE might have out-of-the-box and that I have to either take a couple more steps to accomplish or write some kind of script to help with. Basically "the command line is my IDE".

[–] [email protected] 2 points 1 year ago

I don't feel like I have to make that decision anymore.

I use Vim and VSCodium, because I can enable IDE functionality gradually, and only enable what I need.

[–] [email protected] 2 points 1 year ago

It's up to you and to your needs. Do you like configuring your software to your preference? If so, you'll enjoy fiddling with configurable text editors. Do you have time for that? Or can you do that well enough so that you benefit from it? You have to answer those questions, as it depends on your constraints.

[–] [email protected] 2 points 1 year ago (3 children)

Personally, my path was from basic programming editors (Notepad++, PSPad) to IDEs (Eclipse, IntelliJ IDEA) to NeoVim which I use currently.

I started out as a self-taught web developer pretty early. I worked with basic editors back then, and it was quite enough for my high-school tinkering efforts.

I then transitioned to Java when I went to university and started my first programming job. During those days I used full-fledged IDEs, mostly IntelliJ IDEA, but played around with Eclipse as well. The biggest advantage of that was that it indexed the whole project semantically, allowing me to use project-wide auto-completion and to navigate between source files quickly. Also, Java's build processes can get quite convoluted, which the IDE pretty successfully hid from me, which in hindsight is not a good thing.

As I am quite curious about the internals of everything, I started doing C - mainly for assignments at the university. Initially, I used CLion for everything, as it's basically just IntelliJ for C, but as I grew more and more frustrated with my Java job (both in terms of using Java itself, and in terms of company culture and stuff), I started looking for C jobs. Around that time, I incidentally started messing around with Vim and NeoVim, building out my config, finding Language Servers for languages etc. I fell in love. I love the versatility of using discrete tools for things, without them being bound to a big IDE. I love how everything is fast. I love how I can swap things out easily. The only thing I'm missing at the moment is a good GUI debugger for C - currently making due with terminal-based GDB. BUT I have recently started playing around with making a custom GDB GUI, which might potentially be accepted as a project at my current job, so I'm hopeful about that part as well.

Anyway, if I were to work with Java or C#, I would still probably use an IDE - the languages are not really suited for writing with just an editor. But C, C++ and many other (saner, hehe) languages - I can imagine I will be using NeoVim or something similar for a very long time into the future.

load more comments (3 replies)
[–] hperrin 2 points 1 year ago

An IDE can certainly help a lot. Things like code completion and type definition lookups are great, and automatic refactoring (when it works) is nice. I code in an IDE, but I don't use the built in terminal or debugging tools. If you can use those, they can really help too.

[–] [email protected] 2 points 1 year ago

A good IDE takes the basics and supercharges them.

Navigation along with block expand/collapse, make reading code much easier, they allow you to focus on what really matters.

Syntax highlighting, inspections, and formatting allow you to focus on what you write and not if you missed a semicolon.

Visual debugging is so much better that you just have to try it once, no debate.

Run configurations, especially for tests, are a nice treat if you running multiple apps/different configurations.

While there are many benefits to using an IDE, you have to keep in mind that they are not an one for all solution. Sometimes it's better to open a terminal.

Also, they are great as long as they assist your flow and not disturb it, you will need to spend time to figure out the configuration that works for you. I have been changing IDE configurationd since 2012 when I first used eclipse.

[–] zmhanham 1 points 1 year ago

I think you should give (mostly) everything a fair try. At least anything that's "different" than what you're used to. As a programmer, you should always be striving to improve your workflow. The ideal workflow is different for everyone. The standard text editing experience with a mouse / using control arrow keys etc to navigate is fine and familiar. But you should really at least experiment with modal editing like vim or kakoune. Beyond just the way you type text, the way you interact with the editor (and by extension the project you're working on as a whole) is important to consider too. Make files are a great way to simplify those complex commands you run, but there may be a way to achieve those actions in the editor you're using. Compilation, testing, and running code is just one thing. But what about something like git? Magit on emacs is an example of an extremely well thought out integration of git into an editor. Autocompletion is a whole other story, but you can get that in mostly any kind of editor with LSP integration.

Anyways the point I'm trying to make is that you should never be stagnant in how you program (editor) and what you program (language, paradigm, domain, etc).

Only time you should be stagnant is once you've at least considered the other options and you know what works for you. :)

load more comments
view more: next ›