The IDE As a Bad Programming Language Enabler
theodp writes "When it comes to monolithic IDEs, Wille Faler has lost that loving feeling. In IDEs Are a Language Smell, Faler blogs about a Eureka! moment he had after years of using Eclipse for Java development. 'If the language is good enough,' Faler argues, '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.' So why do Java coders turn to Eclipse? 'Because [of] a combination of shortcomings in the Java compiler and Java's OO nature,' explains Faler, '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 navigation rather than programming and code editing. This nature of Java development requires IDEs to become navigation tools above all.' Yes, only an IDE could love AbstractSingletonProxyFactoryBean!"
I prefer writing in a word processor why should software development in an IDE be any different. Refactoring, code, memory, and performance analysis... All good things. Ohh and that little thing called debugging.
/. Must have been hacked with this worthless article from a programmer that is still deciding between emacs and Eclipse.
Yo Willie, you can write shit code in any language, any IDE when you are a crappy programmer. IDEs help you better debug, code complete and refactor you crappy code.
I understand the train of thought, but I feel the conclusion is wrong. The correct conclusion is that OO design following accepted "best" practices (the SOLID principles) makes for difficult-to-navigate code. That doesn't necessarily mean that I think OO design is bad, it just has some pretty major downsides when it comes to navigability if you don't have good support from your development environment.
I remember reading somewhere about a system that does away with the concept of "files" entirely, and the whole coding process is based around smart navigation - what's on your screen could be pulled from many different locations at once without you having to know where from - shame I can't recall where I read that exactly.
He says that IDE usage is " 'Because of a combination of shortcomings in the Java compiler and Java's OO nature..."
I use an IDE because it has an visual debugger as I tend to develop aloways in debugging mode (see Hotspot dynamic class update and other JRebel features)...
But the guy must be a great fan of gdb, coredump, vi and edlin ;-)
We are not in 1970 anymore IMHO ...
Rgs,
TM
I wanted to ask you about non-trivial tasks that need 100+ projects, but then I noticed your signature. Congrats btw, being head developer of Apple Maps must earn really good!
only an IDE could love AbstractSingletonProxyFactoryBean.
Uh huh? Naturally, class names such as ASPFB and GDMF and RSAP are evidently more lovable. So much simpler to write...
If you have ever written code in Python, you realise how much trivial stuff you have to do in Java which is hell without an IDE. I'm not saying IDEs are useless, they are great and can do awesome stuff for a developer, but Java has a serious problem where it's practically unusable without a massive IDE.
-- Lattyware (www.lattyware.co.uk)
... and Visual Studio 2010 with ReSharper, and it's the most amazing thing ever... at least until the company decides to upgrade to 2012, which is ugly but it has a lot of new and really useful features.
I'm not going to rant since I know a lot of you would rather forget proprietary software exists, but the rest of the IDEs I have tried to use can't compare, and sometimes even get in your way.
Syntax highlighting and parens matching doesn't really help the beginners. Instant feedback for programming errors is great, you immediately learn about the syntax on the go. Then the debugger is also a great tool (even though I think you should first think, then code, then think again and only as a last resort start the debugger).
These are not Eclipse-unique features, you can get such features with many setups but an easy to install IDE that satisfies your needs and is easily extendable with plugins that integrate seamlessly with your IDE (for example Findbugs).
It's almost like Emacs done right for Java. Well, as right as an IDE can be done.
I don't buy the argument that 1 class means 1 file is a problem (btw, this only applies to public classes anyway). If your project is large enough, you still get navigational problems even if you'd crammed 10000 lines into files (please, don't do this).
UnNetHack: NetHack Improved!
I find that an IDE is usually better than no IDE! The premise of the article is that Java is broken so it needs an IDE. This is like saying that flat screen displays are no good because they fail to represent three dimensional objects adequately. You could solve this by inventing a holographic display - good for you - but few people will shoot themselves in the foot and not use a flat screen display in the interim.
Do it yourself, because no one else will do it yourself. [beta blockade 10-17 Feb]
Pros:
* Syntax highlighting
* Brace matching
* Symbol autocomplete
* Error highlighting (XCode FTW)
* Go to Definition/Declaration
* Debug with all the above features in place
Cons:
* Some guy says they have a smell, but actually he doesn't like Java (so don't use Java)
I could write code without an IDE, but I wouldn't want to maintain someone else's code without one, and I regularly port (alone) MLOC codebases.
What we have here is another attention seeker trying to appear enlightened by saying something "counter-intuitive" or "against the grain". It's a bit like those people that go out of their way to let you know that they don't think Dark Side of the Moon was the best Pink Floyd album, because their opinions are so diverse and more informed than all the "sheeple".
IDEs are a smell? What? No mate, you smell. IDEs drastically improve productivity. Yes, part of that is code navigation - mature libraries and frameworks such as the STL, Java, and .NET are HUGE - not because they are poorly designed (though that may also be true; correlation != causation), but because the sheer number of features makes library and framework searching essential. No human could possibly use these libraries as efficiently without code completion or prompting, except for the parts they use most frequently. IDEs make the libraries and frameworks discoverable.
That's not even to mention all the OTHER benefits IDEs bring - integrated debugging, refactoring, static analysis, test coverage analysis, code style management, build chain management, source control integration....
Yeah, yeah, I bet this guy is 1337, uses ONLY notepad / ed, hand writes his make files, and is the most badass coder on the entire planet. The problem is - nobody cares. Everyone else is more concerned with getting the job done efficiently. IDEs are simply essential in the large code bases I work with every day, and that would be true whether I were dealing with a million lines of Java or a million lines of Haskell / Python / Whatever this guy thinks a "good language" is.
Well that's bullshit. The biggest problem with development these days is not the language itself, but the 100s of 3rd party mostly-open-source libraries that you have to use. Or else go reinventing the wheel which is worse.
And IDE helps you see the reference for these libraries much easier, using autocomplete and automated documentation lookup. On top of that, navigating your own code is much much easier. Add debuggers and profilers, granted, somewhat less useful in server-side environment but still useful. Semi-automated refactoring though is great, and eclipse does that quite well.
I've done my share of development using nothing more than a text editor. But I prefer to use IDE when I can- they make me much more productive. Of course I still make sure code can be built & deployed using plain command line tools- for Java Maven is great.
--Coder
Eclipse starts to get annoying type lag around 30k lines of code in a single file, as you get bigger and bigger upwards to 100k or more, it can take several seconds between characters you type. Now some people say you shouldn't have a single file with over 100k lines of code, but some of us like using old school procedural with just a sprinkling of OO.
God spoke to me
It's just as good as the artisan who uses it. You can use a hammer to drive in a nail . . . or to smash a vase. It depends on how you use it.
An IDE won't make a good programmer write bad code. And it won't make a bad programmer write good code. Unfortunately, a lot of manager types assume that if they buy some expensive tools, their programmers will automatically program gold from straw.
Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
Most bizarre conclusion I have ever seen. Of course you can have highlighting and other editing tricks (autocomplete, etc.) in a text editor. But once you add things like unit test integration, deployment, and most importantly an interactive debugger where you can step through your code, you have a proper development environment. Running tests can be done at a shell prompt, but debugging not so much. And if your text editor ticks all these boxes, including interactive debugging (I'm sure emacs can for example), then your text editor IS A FREAKING IDE ALREADY. I'd like to make the inverse conclusion of TFA: since we have proper IDE:s we can now allow the code in modern languages to be structured an way we want. A good IDE should never have you worrying about files, just code.
I would argue the opposite. If you execute code it will invariably do things you didn't expect, regardless of language. You either debug or guess. I saw no argument as to why guessing is preferable to interactive debugging? I agree that "null" is a language smell, but there are concepts like code contracts that lets you have non-null enforced etc. There are a million other things you can debug regardless of language.
Eclipse failed because projects have to be small.
Curious. My Eclipse project is the Linux Kernel. Works fine.
Tip for young players: Eclipse runs on the JVM, the important bit is the last two letters "VM" - "Virtual Machine". The out of the box configuration gives Eclipse ~128MB of memory.... how many VMs do you run with that much memory? Change the default values to something sane (ie 2GB) and suddenly Eclipse is fast, responsive and useful. Remember VM = Virtual Machine.
In most languages you don't need a debugger for stuff like null pointers; perfectly fine exceptions are thrown and reported telling you exactly what you did wrong. When is the last time you ever used a debugger to track down such a bug? You use debuggers to analyse why some algorithm isn't worked as it's supposed to; for finding flaws in human thinking.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
TL;DR - Let's all ditch IDEs and go back to Notepad/vi/emacs/edlin.
Code generation in Eclipse is a breeze, it easily creates framework classes where you can plug in your code. Directly jump to classes, view javadoc when you mouseover any element, jump between occurrences of text within a file, seamlessly integrate with the version control system of your choice - it has everything to properly work with a modern software project that can have hundreds or thousands of classes and files.
And the same goes for Netbeans or Visual Studio or any other IDE of choice.
Finally, tell me how many real world projects use Haskell, Clojure or Scala as compared to ones using Java/C/C++/Python/Ruby/PHP/Perl. I don't exactly see dozens of job openings for the former on various job boards. You work with what you've got, unless you're an ivory tower academic who's only concerned with the design of a language as opposed to its real world usage.
"..One hosts to look them up, one DNS to find them, and in the darkness BIND them."
being head developer of Apple Maps must earn really good!
Well, he's just been fired. So now he has enough time to spend on slashdot, lucky him. And welcome!
Slashdot, fix the reply notifications... You won't get away with it...
Then why can you catch an exception? Exceptions are the perfect tool for this kind of job - you might not be able to open that file, what will you do if you can't? Catch that exception and deal with it. It means you get the feedback at the right point.
-- Lattyware (www.lattyware.co.uk)
I would argue needing a debugger is also a sign of language flaws. Debuggers help you find issues with your code while it runs.
The biggest code smell is the lack of an ability to attach a REPL to a running program so you can poke around in it, define new things at runtime and experiment with them until they work, and then translate that back into "fixed" code in a source file. But that's not really the way you do things in Java (and a few other languages as well).
"Little does he know, but there is no 'I' in 'Idiot'!"
I don't know. Does vi automatically deduce the scope of the variable and change references to it globally without affecting identically named variables in other classes or variables that the changed name is a substring of?
The source I'm working on has a lot of members of different classes with the same names.
In general, if you need a debugger while developing your code then you may not know what you are doing. Maybe you are developing very special stuff, otherwise the intensive use of a debugger means either lack of experience and/or skill..
Really want to meet the moron that modded you insightful.
I use Eclipse for C99-development. It's wonderful and, most importantly, free.
I use everything from SVN-integration and version control, to the diff-generation / compare, to multiple projects (with common projects auto-included and updated when necessary), with multiple compile-paths (Debug, Release, other architectures, other compilers etc.), refactoring, debugging, hell it even integrates with the Android development kits if you set it up right.
Years ago I was introduced to Eclipse when I sought an alternative for my university Java course (which was pathetic even back then and used some horrendous IDE). Since then, my entire development environment for several projects has just sat in the same Eclipse folder and suffered everything from computer moves to Eclipse upgrades to compiler upgrades (e.g. through several Cygwin and MinGW upgrades and conversions) to even OS-changes (currently using the same basic setup for both Windows and Linux) without problems.
An IDE is there to make life easy. Sure, it would be wonderful if no programming language required multiple files but it would also be wonderful for every setup program in the world to consist of a single file, every application to be a single file, and none of them be obscured archives that contain multiple internal files. But, in real life, C has been around a lot longer and nobody's really found a solution for using and working with multiple files.
In fact, .h files are ENTIRELY a traditional fabrication - there's nothing in them that you can't append to a .c / .cpp file and still have things work. We *deliberately* duplicate unnecessary prototypes for functions we've written for a COMPLETELY administrative purpose. There's nothing in the standards about REQUIRING things to have multiple files. And yet every single non-trivial program that exists separates things out and the IDE has to cope with that to make it manageable.
And the other features of the IDE are there to help, not because the underlying code is unreadable (the IDE can't perform miracles and make gibberish into perfect prose) but because humans work better when they build tools to aid how they work (colour-coding, cross-references etc.).
The IDE is the computer-human interface. It has to deal more with the human than it does the language, and the human has to do a huge range of idiosyncratic things that have NOTHING to do with the language construct whatsoever. Playing with the IDE trying to solve that is really just trying to break the way people work, not solve an inherent language problem.
I'm not an ubergeek, so maybe my view isn't as good as the guy who wrote this article, but aren't all large projects, regardless of language, harder to manage?
I've worked maintenance on projects done in an old procedural style. I can't believe anyone in 2012 would think that OO is not an improvement and actually makes managing a project harder.
Ugh, as always happens I poorly phrase the first sentence of my post and everyone jumps on it. I wasn't saying debuggers are bad, or at least wasn't trying to - just that in Java, the standard library has a tendency to return null when something goes wrong rather than throw an exception, which means you don't get told about the cause of the issue, just when it shows up later as a null pointer exception. This can lead to using the debugger a lot or looking through the code to track it down. I hope that clarifies my point.
-- Lattyware (www.lattyware.co.uk)
I (professional Java coder since 1998) absolutely agree. Java is hardly human-writable, even if it were only for the import statements. Without the existence of some very good IDEs Java might very well not have been as popular as it is today. But it is.
Is this a problem? Apparently not in practice. Would I rather have a more dense, less IDE-dependent language? Yes. Are such alternatives available and do they come with an enormous ecosystem of supporting libraries? Nope...
0x or or snor perron?!
While I am not fond of Java's inability to define functions with a proper syntax, it's not as if the alternatives are noticeably better as far as not needing navigation. In the end, it all comes down to program complexity. A developer still has to know the code he needs to use, and for any program of reasonable complexity, you need to either remember it or use an IDE to easily access it. And given the ungodly number of libraries we use today, this happens even when you are coding in Javascript.
If anything, the fact that Java is statically typed makes it easier on IDEs to tell you all the details of available classes. IDE support for Scala will still have you remembering signatures that Java wouldn't have to. And we all know the fun of Javascript, where most IDEs will not be able to guess what properties a object has, because the only way to know is to run the app.
Don't get me wrong, I sure wish for at least Groovy-like function support, unlike, say, the horrible things people do to try to write functionally in Java (welcome Guava abuse!), but the only way some of those languages make you not 'need' and IDE is because IDEs can barely understand the languages. I'd not call that a good thing.
Why Eclipse and NetBeans and all that crap? Because refactoring and autocomplete.
i hope none of your decisions matter to anyone
This is a joke. I am joking. Joke joke joke.
I think the eureka moment should be when you realize that any language can fall into the trap that you describe. There's reasons for the complexity. Whether they are for compilation/parsing performance, or for some type of design pattern to elegantly solve a problem.
I've got a buddy down the hall who grew up ASP and VB. He uses notepad for development, and complains about not having pointers in Java. Syntax highlighting/completion aside, it takes him forever to write even some of the most basic classes. It's a constant game of finding something to copy and paste. What clicks off in my head is that when you're copying and pasting so much, someone probably already wrote a library for what you were trying to do. Hence additional files, includes, whatever it is... it's more of that whole lots and lots of small files that are mentioned as a downer in the op.
If you're complaining about OO patterns, that's not language specific. Heck, even SAP has an OO equivalent.OO is a byproduct of merging human conceptualization and computer language. It becomes more "natural", arguably, for a developer to understand. Is that a problem of the language? No. I can write just as much spaghetti code as OO in Java, well, pretty much any language for that matter.
Now for your humorous AbstractSingletonProxyFactoryBean. If you're writing a webpage with some fancy graphics on the front and not much user interaction, then you'll probably come across this class and think wtf would anyone ever use it?
If you come from the data processing world with many systems working on the same data, you pretty much don't live without it.
This is equivalent to growing up in Mexico, never even hearing of the word snow, and then see someone walk by with a pair of snowshoes in hand. Do you point and laugh first, or do you try to understand why they have snowshoes?
Snowshoes are obviously everything that is wrong with footwear.
Have you tried reading perl code? Or mediocre to bad C/C++? It's impossible to decypher most of the time.
I consider Java to be the easiest language to READ code in and to understand it. Most of the time it's possible to quickly decypher even crap code written by newbies. I'll live with having to write slightly more verbose code or slightly more boilerplate code just for this reason. Or with having to use an IDE to do that for me.
--Coder
You'd have to be a masochist to choose a basic syntax hilighting editor over an IDE without an extremely good reason. I realise there are a lot of good reasons but a language so perfect that an IDE is unnecessary is not one of them.
The place where something finally called a method on a null is not necessary place where the bug is. The question is why that variable has a null value at that moment. You will not find it in the stack trace.
If your logic is so complicated that you can't tell where a variable should have been assigned, your code is already an unmanageable mess. Add preconditions on the arguments to your methods and enforce them by throwing an informative exception if they are not satisfied; that helps hugely. If it doesn't, it's time to also do postconditions and invariants. If you don't understand what those preconditions and postconditions should be, that's a much more important problem than where your code is throwing a NullPointerException...
"Little does he know, but there is no 'I' in 'Idiot'!"
Change the default values to something sane (ie 2GB) and suddenly Eclipse is fast, responsive and useful.
Maybe they should rename Eclipse to be called "tgacs". This would bring consistency with how emacs was originally named for being "Eight megs and constantly swapping".
Curious. My Eclipse project is the Linux Kernel. Works fine.
I hope, none of your code is included and enabled on any of my systems.
Commas, will be misplaced.
I'm a good cook. I'm a fantastic eater. - Steven Brust
I can't imagine living without an IDE. Having the ability to actually debug my code in-place from the same place I'm editing it, increases coding productivity like crazy, and I can't even imagine anyone seriously trying to argue otherwise. I do agree that it's commonly thought that you should put each class in its own file, and that that's just silly, that it's a lot more readable when multiple classes that are tightly related are put in the same file so you can see them all at once and see the tightly-relatedness. I'm not sure that really has anything to do with having an IDE or not, though.
On the other hand, Eclipse certainly does have a massive smell of its own. He says "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", but no, if you're talking about Java, where the only real IDE is Eclipse... it's because your tool sucks.
Modern IDEs can be great, but using them does come at a cost, so I think people end up using them in situations where there is a net benefit (and the opposite is true - people don't use them where there is a net cost to using an IDE). Personally, using a full-fledge IDE often leaves me with a feeling of it getting in the way, but I tolerate it because with some languages or platforms the IDE is still a net win.
This is nothing but an anecdote, but we have several non-trivial projects (100kLOC+ each) in C/C++, C#, ObjC, Java, and Python worked on by about 10 people (so not huge by any means, but not so trivial as to be meaningless) and:
* Everybody uses an IDE for the ObjC, C#, and Java projects
* About half use an IDE for the C/C++ projects (rest use vim)
* Nobody uses an IDE for the Python projects (most use vim)
What's interesting to me is that as far as I know everyone has /tried/ not using an IDE for Java/ObjC/C#, and everyone has tried using an IDE for Python, and there has never been any sort of mandate to go one way or another, and so the present situation is the result of everyone sort of landing where it feels most natural and where they are the most productive, and that we have the same results regardless of proficiency in a particular language (i.e. the C# experts and C# noobs end up with the same development environment, as do the Python experts and the Python noobs). The same also appears to be true regardless of language affinity - lovers and haters of Java use the same environment, lovers and haters of Python do as well, etc.
I do wonder if there is some sort of correlation between environment and the language. I know this is pretty subjective, but for me languages like Python feel like they rarely get in your way, and so it's interesting that when people in our company use Python, they gravitate towards development environments that are similarly lightweight. And conversely, for me a language like Java tends to feel like it gets in the way a lot (as in, you have to do lots of things that are satisfying the demands of the language that aren't directly tied to the problem you're trying to solve), and an IDE is indispensable because the IDE helps shoulder some of that burden.
for (int j = 0; j < getCount(); j++) {
And what if in the loop something had been altered to extend the results of getCount()? Bad coding I would say, but you are discounting that possibility with your fix...
In reality though, a good compiler will optimize that away if it's really just generated an accessor method for that call. In reality there is no problem with coding against accessors for modern languages because the compiler will fix performance problems like that.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
That stern looking old fart is John McCarthy. He probably did more for computing that all of us put together.
Eclipse failed because projects have to be small.
Curious. My Eclipse project is the Linux Kernel. Works fine.
Tip for young players: Eclipse runs on the JVM, the important bit is the last two letters "VM" - "Virtual Machine". The out of the box configuration gives Eclipse ~128MB of memory.... how many VMs do you run with that much memory? Change the default values to something sane (ie 2GB) and suddenly Eclipse is fast, responsive and useful. Remember VM = Virtual Machine.
Word up. At IBM 100 projects is a small workspace.
XML is a known as a key material required to create SMD: Software of Mass Destruction
In most languages you don't need a debugger for stuff like null pointers; perfectly fine exceptions are thrown and reported telling you exactly what you did wrong. When is the last time you ever used a debugger to track down such a bug? You use debuggers to analyse why some algorithm isn't worked as it's supposed to; for finding flaws in human thinking.
I'm thinking you've never worked on a multi-threaded application with millions of lines of code. With a debugger, set an exception breakpoint and you can usually see exactly why something bad happened with almost no time wasted on "analysis". If I can reproduce a problem in a debugger I can usually fic it about 10x faster and more reliably than if all I have is a stack trace.
XML is a known as a key material required to create SMD: Software of Mass Destruction
Maybe they should rename Eclipse to be called "tgacs".
Have you never used Ctags? Works great with that other bit of software that has the letters VM in it: VIM.
It is dangerous to be right when the government is wrong.
Mine is "Beatify Code." That feature is the reason I bought slick. I don't use it as my main editor, though.. I paste code in, beatify, copy and paste back out in most cases.
I would far sooner write Java using Eclipse, and I would far sooner write C++, Perl or Haskell using gvim.
Admittedly this could just be my limited experience, but Java seems pretty hard to write effectively if you don't have a refactoring editor. You could spin it as a shortcoming of the language, or you could spin it as a symbiosis between the language and the IDE. Which way you choose to interpret it largely depends on what barrow you're pushing.
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
> Java seems pretty hard to write effectively if you don't have a refactoring editor.
That is exactly the problem! Any language that depends on having a good IDE is badly designed IMHO.
Part of the problem is that the "standard" libraries are "invisible" APIs. You don't know them until you either
a) memorize the function names along with the parameters, or
b) rely on a tool to do it for you: either book-form, or electronic form.
You can see this quite easily in C++ with all the bloat of the STL. While it is a beautifully designed API you still need a "reference" page in order to use it until you become familiar with it. In the pre-C++ days the problem wasn't as exasperated since all it was relatively easily to look up a function. With namespaces you can easily have many false positives due to lack of a _unique_ function name; you effectively only have a relative name.
That is exactly the problem! Any language that depends on having a good IDE is badly designed IMHO.
Alternatively, the IDE is properly thought of as part of the language.
sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});