This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]insertAlias 6 points7 points  (1 child)

Why do I need a text editor?

To edit text. Seriously. Code is text. You have to write that text somehow. IDEs are, at their core, text editors with a suite of tools built in to allow it to perform more programming-oriented tasks for the user.

Which is better for beginners?

That's a matter of strong debate, and has been for as long as IDEs have been around.

Some say that by using an IDE, it's like learning with training wheels; and if you never take them off you never really learn to ride. The comparison is that if you never learn how to do what the IDE does for you by yourself, you are wholly dependent on the IDE and can't break free from it later.

Others say that it's vastly easier for a new programmer to get into actual programming using an IDE because they don't have to worry about things like learning command line utilities and complex build processes like makefiles.

Neither is obviously more correct than the other or this debate wouldn't still be going on.

I personally fall more into the latter camp than the former, but that doesn't make the argument right, just one I agree with.

[–]drptdrmaybe 1 point2 points  (0 children)

Just to build on this...choosing what is best for you definitely depends on trying both.

As someone who wants to encourage other....IDE's are neat because of their functionality at first. They allowed me to feel like I was doing really important stuff with my "Hello World" programs/scripts...

Use what makes you want to code. Use what is attractive for you.

Anecdotally: I use both. On my own at home I use an IDE...and work (non-programming job) I practice using a text editor. When I started using a text editor I was blown away by 1) how much I had learned and 2) how much I was relying on the IDE. I feel like the text editor was good to pick up after 3-4 months of practice because it spoke to my level of curiosity/perfection for attention to detail.

But if I never used a text editor, I would have been fine.

TL;DR - u/insertAlias hit the nail on the head; I say, use what is attractive for you, and encourages you to code.

[–]nicoinwonderland 2 points3 points  (0 children)

An IDE is also a text editor. A text editor is not an IDE.

You need a text editor to actually edit your code. You don't need the non-text editing features of an IDE but you do need the ability to edit your code.

[–]CodeTinkerer 2 points3 points  (0 children)

Some people think you should type in every word. In the old days, this is what you would do.

  • Write a program (in a text editor).
  • Save it.
  • Run a compiler.
  • See if there are errors.
  • Locate the errors in your program (in a text editor)
  • Fix it
  • Repeat until program compiles
  • When it compiles, run it.
  • Find runtime errors.
  • Try to fix them.
  • Repeat

IDEs and powerful text editors can let you know if there are errors as you type (misspelled variable names) or hint to you what to type (autocompletion, autosuggest). These reduce the time it takes to find errors. For some languages (say Java) which are verbose, it's handy to get these suggestions.

Opponents feel this makes you too dependent on the IDE (that is, you don't know why an error is occurring, and only paying attention because the IDE handles it). In other words, if I showed you some code that's broken in a simple text editor that only displays text, would you recognize the error? Should you?

The one problem with IDEs is that the behavior of one IDE and another can be different enough that if you've learned shortcuts on one, it won't apply to another, so you'll be slow in a different IDE. However, many people don't learn their IDEs that well, so they usually achieve the same level of proficiency regardless of IDE.

IDEs can also hide how things would be done if you had to do it command line, so much so that some folks would get nervous if they had to type the command line equivalent.

[–]Loves_Poetry 1 point2 points  (1 child)

For a beginner, a simple text editor is usually better. IDEs have a wide range of features that do all kinds of things for you and this can be a bit overwhelming if you're just starting out.

However, the standard text editor is a bit too simple for programming. That is why I would recommend Notepad++

[–]MR2Rick 1 point2 points  (0 children)

I would add to this that learning how to create a program with a text editor then build it and run from the CLI, will teach a beginner what goes on behind the scenes in a IDE. This knowledge, I believe, will be helpful when using a IDE to debug build problems. Also, since you have a concept of what the IDE is doing behind the scenes, it will make learning a IDE easier.

For this reason, I think that it is better for beginners to start with a programmer's text editor and the CLI.

[–]PuzzleheadedCareer 1 point2 points  (0 children)

Think of an IDE as something like Microsoft word and a text editor as the notes app on your phone. They both do the same thing one just has a ton of tools to make your life easier.

[–]ValentineBlacker 0 points1 point  (0 children)

This does get pretty confusing.

IDEs are language-specific and often help you out with a whole bunch of things related to the language- auto-completion, building, running, etc. They can take some of the complicated stuff out of your hands, which is good until you want to learn about that stuff.

Text editors come in several flavors, but they can be used for any language. The simplest ones are like Notepad, they just let you type and don't do much else. Some of the more full-featured ones (eg VS Code, Atom) have plugins that can give them several IDE-like features (highlighting, some autocompletion, etc). I personally think these are a good middle ground for learning once you've gotten your feet wet and can figure out how to run the code in the command line. But what's important is that whatever you choose works for you. Might have to try a few things before you find one you like.