IDEs are better than Text Editors. Here’s why!

My examples will be using PHPStorm, and IDE built by the great people of JetBrains. This is not a sponsored piece, however if you’re reading this JetBrains – hit me up 😉

IDE vs Text Editor. VSCode vs JetBrains. Visual Studio. NetBeans. Eclipse. We’ve used them, we’ve hated some (cough NetBeans cough), and loved others. But why should you use an IDE over a plugin rich Text Editor?

When you get started in code, you often edit HTML using the “Inspect Element” tool found in Chrome, FireFox, or your preferred browser. From there, you normally progress into some kind of text editor, Notepad for instance.

You learn your trade, improving as you go, and find that there are more powerful tools out there. Tools that can autocomplete code for you, highlight your code into a “nicer interpretation” to allow for easier reading. You move into the realms of “Good Text Editors”. The likes of VS Code, Sublime Text, Coda, etc.

What’s beyond that? Is there really a good reason to leave the likes of VS Code or Sublime?

Feature Rich

With your “run of the mill” text editor, you get a few nice features. Syntax highlighting for the most common languages, Git integration / detection, and maybe even a built in terminal. Then anything you’re missing, you just stick on an extension and crack on.

However with an IDE you get so much more, all without the need of any extensions, nor plugins. It’s all natively supported.

  • Full VCS integration (Git, and including SVN – if you’re a dinosaur and still use that…)
  • Intelli-sense and auto-completion for your code
  • Code Inspections
    • Allowing you to identify issues, before they even happen
  • File structure breakdown
    • Works on all structured fil formats, and Object Orientated Code such as PHP Classes.
  • Database integration
    • No need for a dedicated Database IDE; all of this is available in your IDE
  • Remote Host connections
    • If you still need file level access to a server, localhost, etc. You can setup the connection directly in the IDE, and auto-sync your files as you save. Or Drag and Drop files over as required
  • npm and yarn integrations
    • Run your tasks and scripts directly from the IDE with no need to open up new terminal windows
  • Embedded Terminal
    • Customise the Terminal that is run (cmd, cmder, git bash, Mac Terminal)
  • Debugging as standard
    • XDebug, custom debuggers, all ready to be detected and wor with breakpoints, do overs, and environment inspections at runtime.
  • Code Style Guide(s)
    • PHPStorm comes with a few predefined style guides to ensure continuity throughout your projects. You can also tweak all the settings if you wish you have your own style guide
  • Testing
    • Full test suite ready to run locally from your IDE. For instance to run PHPUnit tests, I simple press Ctrl+Shift+F10 in the directory, or on the file I’m specifically looking to test. There is also support for other language testing (such as Jest, Mocha, for Javascript)

I could go on, really I could. But for the sake of this being readable in the slightest I’ll end the list there.

Team Working

Most IDEs nowadays allow for “company licensing” and “cloud sync” on settings. This allows you to enforce rules upon your developers IDEs, and ensure that all their environments are setup to work the same.

Find a plugin that is really helpful? Set it up, and push to cloud sync. All your team now has access to that plugin. Really like a new code style? Great, enforce it at the cloud level and now everyone’s code will look the same on commit.

There’s always times where a laptop becomes out of service, or needs updating. It’s a nightmare having to setup the environment all over again for the developer. This is where Cloud Sync comes in. Install the IDE, login with your account et voila, settings downloaded automatically. You’re ready to go in minutes.

Why isn’t everyone using IDEs?!

IDEs are great and in my opinion should be the default for all developers. However, they do come with a few drawbacks;

Price

They’re often not free, and the free ones really aren’t great. JetBrains does offer competitive pricing for their IDEs, and even allow you to pay via a company account if you’re managing a team.

For me, I look at the price I pay (£60 a year), and then the efficiencies I’ve made using the software. It easily saves me about 90 minutes a day – purely from intelisense, database interaction and testing alone. Over a year, it more than pays for the license.

Resources

They’re heavy. Due to all the localised cacheing in in-memory transactions that IDEs use, they can – and will – use a lot of CPU and RAM to run properly.

If you’ve got anything above 8GB RAM, and a “decent” modern CPU (i5 or above) you’ll be fine.

If not, you might get some throttling and long load times. If that’s the case, have a chat with your employer, you’re trying to develop on a machine not really fit for the job you’re doing! If you’re a freelancer / casual programmer, I’d heaivily recommend gettting a decent specification machine, or upgrading your current one (if you’re comfortable doing so)

Large Files

IDEs can’t manage large files such as SQL Dumps, or large CSVs very well. This is due to the way that they index and map files. You can see the file in the directory, you can import it into your database and all that good stuff – you just can’t see all of it’s contents at the same time.

For things like this, I’ll fall back to VS Code or another Text Editor, as they’ll happily do this without the resource hit. Sublime Text is an incredible tool for this kind of thing.

Slow to Start

You’ll find that using an IDE for the first few hours will be cumbersome and even slower than you’re used to compared to a text editor. Stick with it. Once you get the shortcuts, and intellisense down – you’ll never look back.

To get into PHPStorm, I refused to use anything else for 3 days. No matter what my output was during that timespan. It was horrible. But then after day 2, something clicked and I was running at my original pace again. Thereafter things only got faster as I became more comfortable with the software. Using an IDE has easily increased my efficiency and total output two-fold, potentially 3x.