Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

The IDE As a Bad Programming Language Enabler

Soulskill posted about 2 years ago | from the real-coders-use-notepad-and-mt-dew dept.

Programming 586

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!"

cancel ×

586 comments

But eclipse is terrible at navigation (0)

MichaelSmith (789609) | about 2 years ago | (#41815441)

I wrote a simple file system indexer at my last job. Enter part of a class name and it loads the source file in an editor. Eclipse failed because projects have to be small. This application had > 200 projects and any non-trivial tasks would have required working with 100 projects at a time.

Re:But eclipse is terrible at navigation (5, Funny)

santax (1541065) | about 2 years ago | (#41815477)

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!

Re:But eclipse is terrible at navigation (5, Funny)

hcs_$reboot (1536101) | about 2 years ago | (#41815777)

being head developer of Apple Maps must earn really good!

Well, he's just been fired [wsj.com] . So now he has enough time to spend on slashdot, lucky him. And welcome!

Re:But eclipse is terrible at navigation (5, Interesting)

Anonymous Coward | about 2 years ago | (#41815673)

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.

Re:But eclipse is terrible at navigation (0)

Anonymous Coward | about 2 years ago | (#41815697)

I must say this is my favorite feature of Slickedit - quick open even with projects with 1000s of files.

Re:But eclipse is terrible at navigation (0)

Anonymous Coward | about 2 years ago | (#41815721)

Emacs could do that already in the last century.

Re:But eclipse is terrible at navigation (0)

Anonymous Coward | about 2 years ago | (#41815763)

But in Eclipse you would just ctrl-T, then enter the initials (or name, or wildcarded name) of the class you want, and it'll show up for opening. Or ctrl-R for resources search.

Eclipse works excellently with large projects comprised of multiple sub-projects. But you do need to learn how to use it effectively.

Word (5, Insightful)

genocism (2577895) | about 2 years ago | (#41815459)

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.

Re:Word (5, Funny)

equex (747231) | about 2 years ago | (#41815473)

i code with a battery, a resistor and hit the cpu pins with it

Re:Word (5, Funny)

gmhowell (26755) | about 2 years ago | (#41815549)

i code with a battery, a resistor and hit the cpu pins with it

Still haven't mastered butterflies, n00bz?

Re:Word (5, Funny)

Anonymous Coward | about 2 years ago | (#41815839)

i code with a battery, a resistor and hit the cpu pins with it

Still haven't mastered butterflies, n00bz?

What did you think where Sandy came from?

Re:Word (1)

WillKemp (1338605) | about 2 years ago | (#41815829)

The toggle switches on the front panel are broken from overuse, i guess?

Re:Word (0)

santax (1541065) | about 2 years ago | (#41815489)

I think it depends on what you are doing. Are you writing or debugging code? If you're writing it (and the language is supported) do it in Vim. You'll save lots of time. If you are debugging? Use a debugger! Then again, if you write in C#, use VS, because it is the best tool for the job. But in any case, think about what you are doing. Writing software, or debugging your code. Think about the language your code is written in. Then pick the right tool for that job.

Re:Word (1)

Anonymous Coward | about 2 years ago | (#41815523)

Emacs is the right tool for every job!

Re:Word (3, Funny)

santax (1541065) | about 2 years ago | (#41815537)

(obligatory) I run emacs on my mainframe, great OS and desktop-environment but I can't understand why Stallman didn't put a decent editor in it.

Re:Word (0)

Anonymous Coward | about 2 years ago | (#41815725)

How will I save the time using vim? I know my way around that UI, I just do not see any time saving features I can not get in Eclipse.

Re:Word (1, Informative)

WillKemp (1338605) | about 2 years ago | (#41815857)

If you're writing it (and the language is supported) do it in Vim.

If you've got a clue about programming, it doesn't matter if the language is supported or not. All you need is a text editor. But not vim, not unless you're doing a quick fix of something. I use vim heaps, but not for programming. I use geany for that. Gui text editors are so much more convenient than vim for anything other than editing config files.

Re:Word (4, Insightful)

lattyware (934246) | about 2 years ago | (#41815531)

The article isn't saying IDEs are a bad thing, just that when an IDE is doing things that should be negated by the language (generate getters/setters anyone?) then it's a sign there is an issue.

Re:Word (3, Insightful)

mwvdlee (775178) | about 2 years ago | (#41815705)

So basically his entire argument boils down to "My programming language is better than yours"?

Re:Word (4, Insightful)

lattyware (934246) | about 2 years ago | (#41815823)

No, "Java has language flaws that force you to use an IDE to work around them." is the argument. Yes, some other languages do it right and make for an easy way to show the flaws, but that's not the point. The point is that Java could be a better language.

Re:Word (4, Funny)

WillKemp (1338605) | about 2 years ago | (#41815871)

So basically his entire argument boils down to "My programming language is better than yours"?

Of course. My programming language is always better than yours. This is slashdot after all!

Re:Word (1)

MartinSchou (1360093) | about 2 years ago | (#41815833)

Serious question:
If the language itself is generating setters and getters, how do you differentiate between truly private variables and variables that should be accessible from outside (but through verified inputs/outputs)?

Re:Word (2)

lattyware (934246) | about 2 years ago | (#41815895)

Properties - you create your getter and setter as you would, but Java layers them onto the attribute so you don't have to actually use getblah/setblah everywhere. C# does it (as do many other languages, but as we are talking Java, C# is the obvious comparison to make).

Re:Word (5, Insightful)

daem0n1x (748565) | about 2 years ago | (#41815689)

Quite often I get the task of being the mentor of interns or newbies, many of them completely clueless. I also have given basic programming training for college students, usually C/C++ and Java.

I always tell them to code using a text editor with syntax highlighting and then compile using the command line (in Windows, but preferably Linux).

That way they can start building up knowledge about how the whole thing works from the ground up. If people start with a nice and cozy IDE they tend to think it's all magic going on. And then, when they need to solve any problem, they have no idea where the files are, their formats, their contents, etc.

After getting acquainted with the bloody guts of the whole thing, they can start using tools to make it easier and faster. Using a good IDE has nothing wrong about it, if you really know what's going on under the hood. Magical thinking is an enemy of good engineering.

Re:Word (5, Insightful)

RobinH (124750) | about 2 years ago | (#41815813)

There was an interview in the latest issue of Make Magazine with one of the creators of the Arduino. He said he's been trying to teach fundamentals of electronics to students (ohm's law, etc.) and they just weren't getting it, and he realized that wasn't how he learned it. He'd just started building stuff with the tools available, and when something didn't work, he was motivated to dig deeper and figure out why. He helped create the Arduino to be an easy way to get a light blinking without really having to know everything about how it worked, and then as you wanted to do more, you had to figure it out. The Arduino seems to be very successful with this strategy. That seems to fly completely in the face of your theory.

Re:Word (3, Interesting)

daem0n1x (748565) | about 2 years ago | (#41815949)

According to the Wikipedia page: "It is designed to introduce programming to artists and other newcomers unfamiliar with software development".

I train engineers, not artists.

Re:Word (1, Troll)

chrismcb (983081) | about 2 years ago | (#41815931)

That is pretty hard core. Throw them in the deep end, AND take away their useful tools?

Re:Word (1)

daem0n1x (748565) | about 2 years ago | (#41815961)

Please explain to me: In what way I'm throwing them in the deep end and taking away their useful tools?

Who the fuck is Willie? (4, Insightful)

thammoud (193905) | about 2 years ago | (#41815465)

/. 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.

Re:Who the fuck is Willie? (0)

Anonymous Coward | about 2 years ago | (#41815743)

Ah. So emacs is an IDE now?

Re:Who the fuck is Willie? (5, Funny)

91degrees (207121) | about 2 years ago | (#41815825)

Almost.

Just needs a good editor.

Re:Who the fuck is Willie? (1)

bhaak1 (219906) | about 2 years ago | (#41815879)

Ah. So emacs is an IDE now?

No, it's always been one. Certainly for Emacs Lisp, with additional code (that is included nowadays) also for other programming languages. Surprisingly even Wikipedia agrees with that.

Re:Who the fuck is Willie? (1)

Hognoxious (631665) | about 2 years ago | (#41815751)

Groundskeeper Willie out of The Simpsons, who is a true Scotsman?

Which brings us nicely, and why not, to this from TFA:

'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.'

Not sure I agree with the conclusion... (4, Interesting)

MadKeithV (102058) | about 2 years ago | (#41815467)

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.

Re:Not sure I agree with the conclusion... (2)

lattyware (934246) | about 2 years ago | (#41815517)

I believe you are thinking of light table [kickstarter.com] .

Re:Not sure I agree with the conclusion... (3, Informative)

bickerdyke (670000) | about 2 years ago | (#41815545)

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.

Smalltalk?

Did he already heard about integrated debugger ? (5, Insightful)

Anonymous Coward | about 2 years ago | (#41815469)

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

Re:Did he already heard about integrated debugger (1)

lattyware (934246) | about 2 years ago | (#41815511)

I would argue needing a debugger is also a sign of language flaws. Debuggers help you find issues with your code while it runs. I've found that so much of the time those kind of issues are from stuff like Null objects - where you get an exception from a null object and then have to crawl up your code finding out where it came from. If the language was sane and threw exceptions on problems rather than returning null, there would be far less issues.

Not saying that debuggers are useless or that every problem a debugger is useful for could be solved, just that if you find yourself needing it often, maybe it's a sign something is going wrong with the language.

Re:Did he already heard about integrated debugger (0, Flamebait)

Anonymous Coward | about 2 years ago | (#41815551)

I would argue needing a debugger is also a sign of language flaws.

You would lose that argument.

Re:Did he already heard about integrated debugger (1)

lattyware (934246) | about 2 years ago | (#41815573)

That's it, cherry pick a comment without reading the rest of my post, and don't bother to respond to any actual argument in it.

Re:Did he already heard about integrated debugger (1)

Anonymous Coward | about 2 years ago | (#41815627)

I'll take a shot then.

A debugger can give you lots of of information when the exception occurs. You can visually watch the flow of program execution, inspect the values of all variables in scope, modify them on the fly, or even execute arbitrary code statements while you are in the middle of debugging the issue, say at a breakpoint just above where the error occurs.

A thrown exception doesn't give you any of these things. It provides better logs, maybe, but a debugger gives you so much more. An exception gives you a stack trace; a debugger opens up the guts and lets you poke around as much as you want.

Your assertion that needing a debugger is a sign of language flaws is absurd. Period.

Re:Did he already heard about integrated debugger (1)

lattyware (934246) | about 2 years ago | (#41815793)

I clarified later that I was talking about needing a debugger often, not at all. Clearly a debugger is a very useful tool, for all the reasons you stated, but in Java you often have to use a debugger to find trivial bugs because of flaws in the way the standard library operates - that is where I was saying there is an issue.

Re:Did he already heard about integrated debugger (2)

Alkonaut (604183) | about 2 years ago | (#41815643)

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.

Re:Did he already heard about integrated debugger (1)

Molt (116343) | about 2 years ago | (#41815679)

Exceptions are intended to be used when a program hits unexpected or fatal issues which cannot be handled locally, and often the low-level library code isn't in a position to be able to judge whether something qualifies as worthy of an exception or whether it's an expected part of the processing cycle and can be safely be ignored.

Take for example asking to open a file for reading and the file not being available for some reason. If I'm just copying a large directory structure then I can reasonably expect to not be able to open a few files due to permissions and, while I'll likely want to log these and display them, treating it as an exception wouldn't be suitable. If my code is part of an online application and it was failing to open a configuration file which it needed to connect to the database then the error would be worthy of promoting to an exception if it could not rectified in the code which detected it. Ultimately though for this type of 'It could be serious, it could be nothing' then the decision should be left to the client code rather than the library.

In my mind a better approach to fixing these type of errors is better support of types which cannot be set to null. For example if I have a FileHandle variable which cannot be set to null and the File.Open() method returns a nullable type then there's going to be a compile-time error, which is the best type of error. This will point out where I'm 'assuming' that the value is not null and as I'm fixing the compile error I'll naturally add the correct checks as the 'This could be null..' issue has been highlighted for me.

Re:Did he already heard about integrated debugger (3, Insightful)

lattyware (934246) | about 2 years ago | (#41815809)

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.

Re:Did he already heard about integrated debugger (4, Insightful)

mwvdlee (775178) | about 2 years ago | (#41815737)

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.

Re:Did he already heard about integrated debugger (1)

lattyware (934246) | about 2 years ago | (#41815847)

The problem with the null pointer exception is that you get told about the effect of what happened, not what caused it. Say I try and do x, which fails, and then gives me null - when I try and use that x later on, I get the exception, and have to trace back up my code to find the issue. If x threw the exception when the problem happened, I would know why that object isn't there, which is far, far more valuable and easy to work with.

Re:Did he already heard about integrated debugger (1)

chrismcb (983081) | about 2 years ago | (#41815963)

Not too long ago. And it is WAY easier to debug it than in Python. I wish I had your exceptions that get thrown and tell you exactly what you did wrong, and not just tell you that the pointer you just access was NULL.

Re:Did he already heard about integrated debugger (1)

Hognoxious (631665) | about 2 years ago | (#41815779)

If the language was sane and threw exceptions on problems rather than returning null, there would be far less issues.

TypeMismatchException: expected integer, found float at or near line 237. Bailing...

Re:Did he already heard about integrated debugger (2)

dkf (304284) | about 2 years ago | (#41815845)

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 [wikipedia.org] 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).

Re:Did he already heard about integrated debugger (0)

Anonymous Coward | about 2 years ago | (#41815947)

I would argue needing a debugger is also a sign of language flaws.

I'd argue against it.

Debuggers help you find issues with your code while it runs.

More importantly, they allow you to examine the state of your program when an issue arises. In other words, you can test, quite on the spot, any assumptions you have about the state of the program, and thus can more easily determine what went wrong.

Yes, about everything you could do with a debugger you could do with well-placed print statements, and lots of recompiling and rerunning. But why waste your time with that if you can just look up the value in the debugger without changing the code?

Re:Did he already heard about integrated debugger (1)

santax (1541065) | about 2 years ago | (#41815565)

And that's why these days we use Vim... not vi... Oh yeah, and we get shit done. Fast.

Re:Did he already heard about integrated debugger (3, Informative)

darkat (697582) | about 2 years ago | (#41815921)

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..

Exaggeration quite much? (0)

Anonymous Coward | about 2 years ago | (#41815481)

I would still use an IDE when given the chances (if it's easy enough to set up), even if a simple one. I use Code::Blocks for C programs for editing, the projects (it keeps tracks of source files and build options) and for the build button (so, text editor and make all-in-one). Granted, I don't use many of the features, such as autocompletion (which always gets in the way) or smart tabs (sometimes gets in the way, I'm happy enough with just copying the indentation of the previous line).

Re:Exaggeration quite much? (4, Insightful)

mrbluze (1034940) | about 2 years ago | (#41815555)

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.

Good luck with that (4, Insightful)

Kergan (780543) | about 2 years ago | (#41815491)

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...

Re:Good luck with that (0)

Anonymous Coward | about 2 years ago | (#41815561)

Methinks the issue is more that in Java we need to proxy a lot of stuff, and it isn't exatcly a oneliner to do anything related to proxies, there are actually no language features to help here.

Re:Good luck with that (2)

91degrees (207121) | about 2 years ago | (#41815811)

Why does the class name need to tell you it's abstract, a singleton and a Bean?

Re:Good luck with that (4, Funny)

Robert Zenz (1680268) | about 2 years ago | (#41815935)

Uh huh? Naturally, class names such as ASPFB and GDMF and RSAP are evidently more lovable. So much simpler to write...

MyClass, MyConn and MyFunc come to mind...*shudders*

100% (4, Insightful)

lattyware (934246) | about 2 years ago | (#41815495)

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.

Re:100% (2)

digitalchinky (650880) | about 2 years ago | (#41815731)

I've been churning out Java, c++, c, and unfortunately PHP for more years than I can remember using only vi. With Java specifically, even on huge projects, I've yet to find an IDE that increases my productivity, just the opposite actually. What could be better than a dozen virtual desktops and an unlimited supply of teminals? :-) I like Java myself, never found it hell at all.

Re:100% (2, Insightful)

lattyware (934246) | about 2 years ago | (#41815835)

You enjoy pumping out those getters/setters, writing that boilerplate main class rubbish, etc... then? These things simply are not needed, and can be avoided by giving the programmer the right language features.

Re:100% (0)

Anonymous Coward | about 2 years ago | (#41815977)

Exactly the same here. Not problem coding Java like that, using a simple Makefile and ant to compile. Moreover I stay right away from syntax highlighting, with simple brace and bracket matching being sufficient.

Re:100% (0)

Anonymous Coward | about 2 years ago | (#41815815)

But at least three major IDEs exist for Java, so there is plenty to select from. It is a little like criticizing a language for the amount of work it would take to manually translate the code to native code if no compiler existed.

Re:100% (1)

lattyware (934246) | about 2 years ago | (#41815905)

That's not the point - I'm not saying that needing an IDE is a problem exactly, but it's a sign of a problem - I use an IDE for Python, where I definitely don't need one. The issue is, wherever you are generating boilerplate, that's more code to maintain and making your codebase harder to read, that is a real, big problem.

I code in C#, (3, Informative)

gigaherz (2653757) | about 2 years ago | (#41815497)

... 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.

Re:I code in C#, (1)

santax (1541065) | about 2 years ago | (#41815683)

I code in C, Python but also in C#. For Python and C I prefer Vim, but for C# you are right. VS is the best tool out there for C#. Monodevelop is nice, but VS wins. Big time.

Eclipse is better if you are a beginner (5, Insightful)

bhaak1 (219906) | about 2 years ago | (#41815507)

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).

Re:Eclipse is better if you are a beginner (0)

Anonymous Coward | about 2 years ago | (#41815749)

You know that first sentence is, well, malarkey, right?

Re:Eclipse is better if you are a beginner (1)

bhaak1 (219906) | about 2 years ago | (#41815929)

Maybe I it's a bit of a rambling. But apparently the rest of my post is good enough to straighten out the weak intro. ;-)

IDE pros & cons (5, Insightful)

Anonymous Coward | about 2 years ago | (#41815563)

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.

More like Willie Failer (0)

Anonymous Coward | about 2 years ago | (#41815569)

amiright?

Attention seeker (5, Insightful)

Anonymous Coward | about 2 years ago | (#41815571)

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.

Re:Attention seeker (1)

lattyware (934246) | about 2 years ago | (#41815611)

IDEs are great, but you have to admit that Java forces you to use one. Stuff like generating getters and setters and other boilerplate code which Java forces you to write is hell without an IDE. That is a problem with the language. With Java, eclipse is a sign that the IDE has to make up for language flaws, which is an issue - that's what the article is trying to say.

Re:Attention seeker (1)

Anonymous Coward | about 2 years ago | (#41815693)

(Same AC)

I see what you are saying. Certainly there are rough edges around any language; getters and setters in Java are annoying. In .NET the syntax is much more succinct.

However, there needs to be a distinction here between language and practice. You aren't forced to use getters and setters. You use them because it is considered good practice. You use them because they give you something you need.

If there were no getters and setters, what would take their place whilst maintaining encapsulation and compile time type safety? If type safety isn't a concern then you wouldn't be using Java. If encapsulation wasn't a concern you wouldn't use getters and setters. There has to be something there, and it isn't going to write itself. So what's the alternative? How could we avoid this boiler plate code but still keep encapsulation and type safety? How can the language infer this for you? (Again, this is where the .NET properties syntax is far superior - but I wouldn't use .NET without an IDE either.)

The argument seems to be more about static vs dynamic languages at this point. Boiler plate code is the cost of type safety and writing maintainable and testable software. That doesn't make the language bad, especially not for large code bases used by large teams.

Nor does it mean that the need for an IDE is a 'smell'. The IDE gives you the boiler plate code which gives you the type safety and encapsulation. If you don't need the latter then don't use a language that is written with the assumption that you do. And if you do need the latter, then something has to be written, you're going to be much better off with the IDE. The IDE is controlled by you, tailored to do what you want. The language, being far more general purpose than what you want to use it for, can't be. That's why the IDE is needed.

Re:Attention seeker (1)

lattyware (934246) | about 2 years ago | (#41815861)

You don't need boilerplate code to keep encapsulation and type-safety, you said it yourself - properties. Getters and setters can be replaced with properties. C# does it, which proves Java could. It's a perfect example of why the IDE is doing stuff the language could do, which is fine, but the language could be improved which would benefit everyone more.

Re:Attention seeker (1)

Anonymous Coward | about 2 years ago | (#41815741)

Java does not force you to write getters and setters. In fact, mindlessly writing / generating trivial getters and setters is not a very good practice, and Java does it right by forcing you to write / generate them in the cases where they are needed. The problem is that people don't apply encapsulation because encapsulation means you have to write reasonably structured code and not a fucking mess.

Java has many real, documented problems, but IDEs are not one of them.

Re:Attention seeker (1)

lattyware (934246) | about 2 years ago | (#41815867)

If you want your interface to remain the same, and may decide in the future to change your class to require functions behind attributes, then you have to use getters and setters in Java, there is nothing like a property in C# or Python that allows you to do this on-the-fly in a more natural way without the boilerplate.

Re:Attention seeker (3, Insightful)

dkf (304284) | about 2 years ago | (#41815819)

IDEs are great, but you have to admit that Java forces you to use one.

The problem is the language's social convention (for want of a better term) that long package names, class names and method names are used. Auto-completion and support for managing the imports are the features that make a Java IDE win out over an editor like Emacs (which I used to use for Java programming). Other languages use much terser conventions and make it easier to code with a normal editor with no ill-effects (though some go a bit far) so I'm sure that the problem is the very long names; frankly, typing that much stuff out by hand every time gets old very fast indeed.

The other things that IDEs tend to offer are less useful to me because of the type of code I usually write. (Security-sensitive server code that integrates a bunch of other people's code is a PITA to test and debug anyway, and I try to avoid confusing naming in the first place so refactorings aren't a problem anyway.)

Refactoring? (0)

Anonymous Coward | about 2 years ago | (#41815575)

I call bullshit on this. One of the major reasons to use a modern IDE is the support for refactorings. Renaming variables, fields, and functions/methods is a major pain in the butt in any language if you have to do it manually. Having tools to do this instantly is a major reason for using IDEs and the like.
Also, whether classes are located in a single file or across multiple files is completely irrelevant. Having a tool that allows you to navigate efficiently in the code improves performance of the programmer in any case.

The reason that people aren't using IDEs for niche is probably that the tool support is nowhere near what it is for Java.

Refactoring can be done by any decent editor (1)

Viol8 (599362) | about 2 years ago | (#41815757)

"Renaming variables, fields, and functions/methods is a major pain in the butt in any language if you have to do it manually. Having tools to do this instantly is a major reason for using IDEs and the like."

You mean like "%s/old name/new name/g" that the vi editor has had since the 80s? Perhaps you should try using a programmers editor. You might be surprised at just how little extra an IDE gives you.

"Having a tool that allows you to navigate efficiently in the code improves performance of the programmer in any case."

2 or more xterms and "grep". I find that combination far more efficient than some bloatware IDE. Admittedly I'm a C++ coder, not java, but I've used some IDEs and found them wanting. They want to be an entire coding "enviroment". Thanks , but I already have one - its called the operating system. However YMMV.

Re:Refactoring can be done by any decent editor (0)

Anonymous Coward | about 2 years ago | (#41815849)

"%s/old name/new name/g" will replace all occurrences of the text 'old name', regardless of it semantic meaning in the program and only in this single file. For example if you have a local field 'foo' and you want to change the name to 'bar', replacing the text will also break the point in your code where you call som external method also called 'foo'. Also it won't update places in other files where they refer to 'foo' in your file. This won't happen with refactoring support in an IDE.

You already knew that...

Re:Refactoring can be done by any decent editor (4, Interesting)

91degrees (207121) | about 2 years ago | (#41815865)

You mean like "%s/old name/new name/g" that the vi editor has had since the 80s? Perhaps you should try using a programmers editor. You might be surprised at just how little extra an IDE gives you.

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?

"2 or more xterms and "grep". I find that combination far more efficient than some bloatware IDE

The source I'm working on has a lot of members of different classes with the same names.

Re:Refactoring can be done by any decent editor (1)

anarcobra (1551067) | about 2 years ago | (#41815915)

Right, because renaming a variable is a simple matter of find and replace all.
That only works if I have globally unique names for every variable I might want to rename.
It also means I have to do the same thing for each separate file if the editor doesn't do replace in several files at once.
Even for emacs they made cedet, which gives you a bunch of these features.

Java IDEs (0)

Anonymous Coward | about 2 years ago | (#41815587)

The problem is that Eclipse is one of the worst IDEs ever, and Java, as a whole has crappy IDEs. IntelliJ is by far the best, in my opinion, since it is less buggy, crash prone, and confusing than Eclipse, which is more a collection of components than it is an IDE - but even IntelliJ is still subject to Java GC pauses. Really, you can't write a good IDE in Java, and therefor Java developers have bad IDEs. Visual Studio isn't a really great IDE, but at least it doesn't pause while you are typing, and it has a unified sense to it that you don't get with Eclipse. MonoDevelop is pretty good too, or FlashDevelop, or really any IDE where at least the UI thread isn't subject to GC.

IDEs are very useful,and it's not language's fault (5, Informative)

coder111 (912060) | about 2 years ago | (#41815597)

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

I like Eclipse except for one flaw (2)

GoodNewsJimDotCom (2244874) | about 2 years ago | (#41815605)

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.

Re:I like Eclipse except for one flaw (5, Insightful)

slim (1652) | about 2 years ago | (#41815709)

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.

Please don't put 100k lines of code in one file, even if you're writing non-OO C.

Re:I like Eclipse except for one flaw (1)

91degrees (207121) | about 2 years ago | (#41815911)

To be fair, it is still a flaw with the editor. And you might have a file that long for other reasons. The editor should be able to handle a log file.

Re:I like Eclipse except for one flaw (1)

dkf (304284) | about 2 years ago | (#41815771)

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.

I've emphasized your problem and it's not Java-specific at all; it'd be horrible in any language at all. Even in C, I consider 10kloc to be an excessively long file. I have one project with an 11kloc file, and I hate how long it is; it's in a module that someone else is in charge of though, so I'm hesitant to interfere; the project also has a separate file with a 6kloc function, but that can't be shortened as it is a bytecode execution core (before anyone asks, the project style is not very dense by comparison with how a lot of other people write C; different styles would be a lot shorter).

Split that code up a bit into sensible-sized pieces. Do it today. Define pieces that have sensible responsibilities and which expose sane APIs, and then don't violate those APIs. Sure, it takes a little time to do but it makes it so much easier to understand. As a side benefit, your tools will also become better able to help you, but that's not why you should do this: the greater comprehensibility to you (and your coworkers, assuming that's relevant) is far more important!

Re:I like Eclipse except for one flaw (0)

Anonymous Coward | about 2 years ago | (#41815887)

Nonetheless, there are times when you need to load 100KLOC files - maybe log files, or trace output, or some auto-generated XML (or even auto-generated C code). A serious IDE needs to handle large text files.

But yeah, *vomit* at a coder who puts entire 100KLOC projects into a single file. But, also, *vomit* at the teams that put that amount of code in, say, 5,000 files.

And IDE is just like any other tool . . . (4, Insightful)

PolygamousRanchKid (1290638) | about 2 years ago | (#41815609)

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.

A text editor that does the job IS an IDE (5, Insightful)

Alkonaut (604183) | about 2 years ago | (#41815621)

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.

Light Table (1)

undulato (2146486) | about 2 years ago | (#41815649)

Sounds like somebody is a shoe-in for a Light Table [chris-granger.com] licence.

A conundrum (1)

Coisiche (2000870) | about 2 years ago | (#41815651)

So why do Java coders turn to Eclipse?

I don't know. I just don't know.

Re:A conundrum (0)

Anonymous Coward | about 2 years ago | (#41815773)

I don't know about IntelliJ, but I have the impression that since about 6.7, Netbeans is so far ahead of Eclipse for Java development that it is not even a contest. If you happen to use Maven, the comparison is specially ridiculous.

Granted, Eclipse has plugins for everything, and I guess it's better for Android development and all those "not really Java" things.

Why I like Eclipse (1)

Misagon (1135) | about 2 years ago | (#41815681)

While I agree with the author about Java, there are other things why I prefer to use Eclipse (over other editors/IDEs)

* The compare editor. Especially in conjunction with the SVN plugin. Very very useful.

* I can have more than one project open, and edit and compare files in both. I may seem like something trivial, but too many other IDEs are deficient in this regard.

What is he on.. (5, Insightful)

Rexdude (747457) | about 2 years ago | (#41815753)

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.

I disagree. (0)

Anonymous Coward | about 2 years ago | (#41815789)

I have done projects in both jEdit and Eclipse. I have also done C++ projects, a language that allows you to stuff the interfaces in a few or even a single file. I have also dabbled in multiple other languages.

Basically, regardless of language, if you want to be productive, you want auto-completion. Yes, you can do without. Yes, having APIs in a few files makes it a bit more convenient to look them up. However, looking them up alone is too slow, especially if you are working on a bigger project with multiple people. Even if the interfaces are ALL in a single file (bad idea, generally), you still have to spend time to sift through it and you'll need to sacrifice precious screen real estate to display it. However, it's simply to slow to look up every time whether your coworker has called a function wiggle-the-frob or jiggle-the-frob every time (and yes, you keep forgetting it if the project is large enough).

And no, "you should be thinking a lot about each line of code" generally does not apply in real projects: The really smart parts of the code can take 0.5-2 days to deep thinking to write them, but then you spend the next 2 weeks on code that just churns and moves data around which is mind-numbingly dumb but necessary work. In the latter part of the coding, which takes up a lot more time, you already have the code roughly mapped out in your head before you even start writing it and you just want to write it down as fast as possible to get back to the interesting parts.

Also, refactoring: Regardless of language, if you want to rename a method, function, whatever, you want something that does it for you and understands the language. No, sed is not good enough, you don't want to fire some sed command, which has no awareness of the code semantics at 500+k lines of code and hope it does the right thing.

As far as the "thousands of small files, each class has its own file" thing goes: It has advantages and disadvantages, the plus side being that classes are self-contained. You can easily take them out, move them around, put them somewhere else without having to shred apart some big interface file and hope that you caught all the method declarations. Also, when you organize interfaces in larger units like namespaces etc., you do have to think about how to organize those. Yes, it may be worth it, or it may not be, but it's an overhead if you decide to do it and you'll have to stick with it, too.

As far as the "Java is so verbose" meme: Sometimes it is the language, sometimes it is the people. People in large Java projects tend to over-engineer things (I'm not entirely sure why people do this, maybe abstraction is over-emphasized) with abstractions layered upon abstractions and then you end up with something like the "AbstractSingletonProxyFactoryBean", but you don't have to do that, if you put some effort into, you can keep it simple.

There are some parts that I really find needlessly verbose in Java like catching "checked" exceptions: Even when you provide PROOF that the exception CANNOT occur, you have to add 6 lines (in Allman style, it's a bit less in canonical Java/K&R style) of completely useless code. And yes, functional languages are very nice and elegant and I love them to death, but if one is honest, they haven't caught on, maybe that's a smell on its own.

The biggest enabler of bad software is (0)

Anonymous Coward | about 2 years ago | (#41815983)

the absolute refusal of C-typists to learn to program properly. And the blind refusal of good programmers to understand the difference between typing lots of code and actual software engineering. In my 22 years in industry, the number of actual software engineers I've encountered can be counted on one hand (literally). There were a fair number of good programmers. But for the most part, it is pretty dire.

And don't get me started on software architects.....

No amount of IDE religious belief will make you a good typist/programmer/engineer.

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...