Wille Faler is an experienced software developer, architect and agile coach with experience across a number of different industries as an independent consultant. Wille specializes in backend, integration, and Java technologies, but has more recently found a passion for Scala and text mining/analysis. Wille is a DZone MVB and is not an employee of DZone and has posted 42 posts at DZone. You can read more from them at their website. View Full User Profile

The IDE as a Bad Programming Language Enabler

10.30.2012
| 13059 views |
  • submit to reddit

For many years, I've found myself frustrated with the tools of various programming languages, primarily IDEs, previously with Java, currently with Scala.

"In the beginning" I used to use a simple text-editor, like Emacs and later JEdit. Finally in 2004 I converted to Eclipse for Java development, an uneasy relationship that fell apart in 2008 when I moved to IntelliJ after trying out NetBeans for a while. In the last year, my relationship with IntelliJ has fallen apart when it comes to Scala development, as it seems IntelliJ is unable to keep up with syntax that is more functional in nature in general, and use of Scalaz in particular.

Being curious, I've also done quite a bit of Clojure development in the last year, and also started to dabble more seriously with Haskell. These two wonderful languages have taught me one thing: if the language is good enough, an IDE is strictly not needed as long as you have good support for syntax highlighting and parens matching in the case of clojure, or indentation in the case of Haskell.
In the case of Scala, I don't think an IDE is required either, provided you can reign in your bad habits in terms of source organization from Java.

IDE's as Code Navigators

In Java-land, IDEs are absolutely required for a number of reasons, not least because Java is verbose, has a high "tap the keyboard-to-though"-ratio and is generally clunky. But furthermore, because a combination of shortcomings in the Java compiler and Javas OO nature, we end up with lots and lots of small files for every interface and class in our system. On any less than trivial Java system, development quickly turns into a game of code- and file-system nagivation rather than programming and code editing. This nature of Java development requires IDE's to become navigation tools above all.

In functional programming, without Java's code organizational patterns however, there is nothing forcing us to scatter our functionality across hundreds and thousands of tiny files. We can think in terms of namespaces instead, and there is absolutely nothing wrong with having quite a few funtions and data types in a single namespace as long as they seem to be relatively related. If we think about our FP code in this manner instead, the requirement for a 200mb download of a code navigator like Eclipse or IDEA becomes a lot less important. All of a sudden, it becomes very easy "to get by" with something like Emacs, which is still a superior text- and code editor to anything out there.

What About the Other Things IDEs Do?

Of course there are many other things that IDE's do, like allow for running individual tests, refactor, code complete etc. However, with a good REPL and a good build tool, these things are not only not needed, they quickly become the inferior tools. What's quicker, running an individual Scala test in IDEA or running continuous compilation/testing in SBT? SBT will win every time. What's better, experimenting in your IDE or on a REPL? A REPL will win hands down every time.

Conclusion: A Need For IDEs Is a Language Smell

I've been programming since I was 7 years old. My short foray with IDE's (in perspective: 2004-2011/2012) also coincide with my most frustrated period with tooling and languages. I don't think this is a coincidence. Comparing using poor languages (..ehm, Java)requiring tank-like IDE's, with using a more lightweight toolchain with sane languages like Haskell, Clojure and Scala (used correctly) only confirms this.
I can only conclude that the need for an IDE or a heavy "code navigation tool" is a symptom of a deeper problem, if you suffer from tool frustration, it's not necessary your tools that are poor, it may be that your language sucks, or you're not using it correctly.

Edit: Defining IDE vs Editor

It might be worth definining "IDE vs editor": what I primarily turn against in this post is languages and the complexity in them that necessitate the use massive monolothic IDE's like IntelliJ IDEA, Eclipse and Visual Studio.
I don't include editors such as Emacs, Vi/Vim, Sublime Text 2 etc in the "IDE" - I think the approach taken by these editors in their "language awareness" is good in that they piggyback on existing infrastructure such as REPL's, build systems etc, instead of trying to re-implement large parts of it, or supplement the lack thereof as is the case with IDEs in Javaland.

Published at DZone with permission of Wille Faler, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Phuong Nguyen replied on Thu, 2012/11/08 - 4:53am

There technically a lot of way to do that in VIM. But here is the way that a VIM newbie like me get it done:

Use Gsearch and Greplace (available from greplace.vim plugin). 

First you search for getName using Gsearch. It will then open a buffer listing all the file and line where getName occur. You can then choose to drop a line from the buffer if it's obviously unrelated (based on the file name it's in)

Then you do an in-buffer-replacement to replace all the getName with your getSomethingElse. Then use Greplace to execute replacement.

When each replacement is about to be executed, VIM will open the file, go to the line that getName occur. You can then review the context if the method belong to the Class you want to refactor and choose to make the replacement or not.

Mark Unknown replied on Thu, 2012/11/08 - 1:29pm in response to: Phuong Nguyen

That is not refactoring. That is find/replace.

Jonathan Chiocchio replied on Thu, 2012/11/08 - 2:02pm in response to: Karl Peterbauer

probably the VIM guy will spend x minutes writing a regexp for such a silly and straightforward change that can be done in 2 seconds with an IDE....Don't trust IDEs 'cause they could be buggy???? Eclipse works is extremely mature and even though not perfect, 99% of the time doesn't mess up with your code...

VIM advocates look to me as only-command-line defenders...in my opinion any kind of fanaticism is plain wrong...

Christian Kulen... replied on Thu, 2012/11/08 - 3:51pm

In a small to medium-sized company all developers should use the same software for development. There is no place for homebrew solutions, that only a few persons (can) use. It's about knowledge management, streamlining the development process and focus.

When you enforce the use of CLI tools every single developer will come up with their own solutions for doing everyday development tasks. This is a pure waste of time. You could write conventions for doing these tasks. This would just lead to rebuilding an IDE and is also a pure waste of time, especially in times where you can download high quality Open Source IDEs for free.

From a business perspective I don't see even the smallest reason to use CLI tools instead of an IDE. When you develop with these tools for fun in your free time I am totally OK with it, but you cannot believe, that you reduce development costs by not using an IDE.

Dino VV replied on Thu, 2012/11/08 - 5:48pm in response to: Phuong Nguyen

Wow. How can you argue that this is refactoring? You have to spend many minutes figuring out the context whereas within an IDE it takes seconds (and it can't be as buggy as your approach even though there are many supposed bugs using an IDE).  

Phuong Nguyen replied on Thu, 2012/11/08 - 10:23pm in response to: Dino VV

Are you guys defining refactoring is to have IDE do it for you? Then my argument is invalid, lol.

Refactoring is about restructuring your code so that it's easier to read and maintain. It's not about how you do it.

And how many times a day that you need to go for such renaming like that?

And are you saying that without Eclipse or what ever IDE it is, no complex software can ever be made? Like git, or linux kernel, ruby, rails?

Christian Kulen... replied on Fri, 2012/11/09 - 3:49am in response to: Phuong Nguyen

When I develop new features I think I use the refactoring features of Eclipse every 5 minutes or more: Extracting methods, moving classes, renaming, extracting constants, extracting member variables... http://help.eclipse.org/juno/topic/org.eclipse.jdt.doc.user/reference/ref-menu-refactor.htm

It is not about what you can do, but about efficiently using your time. Especially Java has very good IDE support. When something is developed without an IDE it is usually because there is/was no good IDE support for the language.

Robert Weissmann replied on Fri, 2012/11/09 - 5:20am

@Phuong Nguyen: Just keep doing what you are doing.

An IDE is a tool and VIM and Others are a tool too. My tool (IDE) is just much more powerful and helpful -> makes life easier and things get done faster.

You can use a hammer and a chisel to tear down a wall or you simply use a boring cutter. Guess which tool is more efficent.

Have fun using VIM & Co. Lol.

Karl Peterbauer replied on Fri, 2012/11/09 - 5:22am in response to: Phuong Nguyen

Uhhh, this is a fine example of the classical "straw man fallacy": None of the IDE proponents in this thread claimed that refactoring cannot be done without IDEs, nor that complex and great software cannot be written without them, nor that grep, find and vi/emacs are the right tools for many jobs (just think of log-file analysis, any IDE will detonate point-blank when it comes to processing gigabytes of data).

IDEs are time-savers and help focusing on the code instead of files and directories. They lower the "emotional barrier" for doing necessary refactoring, since refactoring can be done quickly, precise and without the hassles of silly search/replace-mistakes.

Phuong Nguyen replied on Fri, 2012/11/09 - 10:43am in response to: Karl Peterbauer

Lol. It's Mark who disagree that find/replace as a refactoring then you just jump on and call me to make "straw man fallacy" in questioning that?

Beside that "emotional barrier reducer", I'm in doubt if an IDE bring any advantages compare to Editor + CLI tools. IDE is trying to do too much and many of the time, it's just get in the way. It is often much less responsive compare to an editor like VIM/Emacs, especially when it comes to code completion. Arguably, It  develops bad habits of people hesitate to try out new language (like Scala few years ago) because it makes people who used to IDE feel nervous when the support of in inside the IDE is not yet mature. As opposed to a generic editor like VIM. I'm feel relax trying out any language without worry much about VIM support it or not. I'm habited to only rely on VIM for editing (+ syntax highlighting) and use CLI tools (which most of the time will be available and mature much sooner compare to the IDE support).

Beside, confidence about your code changes should not only rely on [that stuff was done by the IDE] but all the test suites that you have build up to ensure that your app still functions properly after any change. And together with all the changes review tool available these days (like GitX, gitg), silly mistakes can easily be caught.

After all this is just for discussing. I'm not ushering any one to stop using their IDE. So something like [Keep using it on your own] is just unnecessary. I have used Eclipse extensively several years ago just later to find that it develops so many bad habits inside me until VIM. And it did slow me down because of all of the *smart* things just keep getting into my way. And all of the hangs and crashes.

Mark Unknown replied on Mon, 2012/11/12 - 1:19pm in response to: Phuong Nguyen

I was sort of kidding.  Of course refactoring does not rely on tools.  But i would rather rely on an automated repeatable process than human intervention.  


The question is: Do you want to use an IDE that someone else wrote (and has been tested by many people) or do you want to write your own? Effectively you have an IDE with VIM/Emacs with all that you must do on your own or obtained from a third party.


" I'm in doubt if an IDE bring any advantages compare to Editor + CLI tools. IDE is trying to do too much and many of the time". Then compare the refactoring example. In an IDE it is a click or two. The manual process is multiple steps.


"It is often much less responsive compare to an editor like VIM/Emacs, especially when it comes to code completion."  It is very fast for me. And compared to trying to not use code completion, it is much much faster. And it helps keep your code cleaner. Without an IDE people tend to use poorly named variables. Sure they do the same thing without IDEs.


" Arguably, It  develops bad habits". So does not using an IDE. (see my comment about variables)


"Beside, confidence about your code changes should not only rely on [that stuff was done by the IDE]". The confidence an IDE brings to refactoring has to do with confidence that it was done right the first time and that I don't have to undo, redo or do more changes.


The problem is not that you are not using an IDE (well not for me since I don't know or work with you) but this article about how IDEs are bad and then ignoring the bad of not using an IDE.







Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.