Tag Info

Hot answers tagged

63

I work with Intellij (9.0.4 Ultimate) and Eclipse (Helios) every day and Intellij beats Eclipse every time. How? Because Intellij indexes the world and everything just works intuitively. I can navigate around my code base much, much faster in Intellij. F3 (type definition) works on everything - Java, JavaScript, XML, XSD, Android, Spring contexts. ...


27

You can do two things. Point out that warnings are there for a reason. Compiler writers don't put them in because they are mean-spirited. People in our industry our generally helpful. Many warnings are helpful. Gather up a history of spectacular failures arising from ignored warnings. A web search on "Pay attention to compiler warnings" returns some ...


25

Strict code formatting rules are useful when several developers work on the same code using a version control system. Merging can be a pain if different developers have different formatting rules as the same code would look different for the merging tool. Eclipse (or any good IDE for that matter) has code formatting rules that can be customized in the ...


23

The practices of adding meaningful prefixes to symbols, such as the well-publicized Hungarian Notation, date back to the times when IDEs did not exist or were too primitive. Today, when finding a point of declaration is a mouse click away, there is no point in spoiling the most precious part of the name, its first few letters, by assigning a common prefix.


21

This is kind of a "have you stopped beating your wife?" question. While there are Microsoft products that cost thousands of dollars, there are plenty more (from Microsoft) that are free, always, to everyone (eg Express) and ways (legitimate, real, ways) to get the expensive products for free. See Are there deals (free or low cost) to license Visual Studio ...


17

I've found the autoformatter very useful. Instead of constantly taking microdecisions on how the code should be formatted -- something which is error-prone and causes "cognitive friction" -- you can set up formatting rules and let Eclipse format the code for you (ideally automatically using "Save actions"). Of course, this requires that you have a code base ...


16

I hear the difference with IntelliJ is that they are much more likely to fix and close bugs that you submit. That could make a big difference if there is some Eclipse bug that is blocking you. On the other hand, you cannot look at IDEs in isolation; you need to look at the ecosystem. Here, I think Eclipse has an advantage (similar to Firefox's advantage ...


15

You could start by working on coding katas. Pick an algorithm (e.g. decimal-to-Roman numeral conversion, scoring a bowling game, Conway's game of life, etc.) and try to use TDD to work on the solution. Your solution structure will likely to be very simple (much simpler than your real-world production code): one class for the test fixture and one class ...


15

Back in 1995 when I started programming in Java, there was a lot of manual work that is now done automatically. Updating classpaths, remembering what order to compile large projects in (remember, ant and maven hadn't been invented either, and make isn't easy to use). The class libraries were a smaller set of things to know. Instead of auto-complete, I had a ...


15

Eclipse creates just empty methods that return null (hence "stub"). The comments are inserted to remind the developer that he'll probably want to do something in those methods, otherwise why should they exist? You're supposed to delete the comments when you've done that. If you see those comments all over the place, then either (if the actually contain ...


14

There is a VERY long, yet very informative, post by Joel Spolsky on his blog that explains some of this... Basically it amounts to the notion that large corporations with tons of money will pay that hefty fee. The mid sized and smaller companies will go for something cheaper, and the tiny shops will use the free version (or the expensive version acquired ...


14

I feel that you're doing it wrong. You're heading towards unmaintainable spaghetti environment. Java projects tend to grow to tens or hunderds of dependencies. You start from Guava, JodaTime, SLF4J some commons and it grows... and it's OK. Just don't try to maintain it manually. Maven/Gradle is a must! Never ever commit eclipse workspace files. It just not ...


13

Mylyn is a very widely appreciated plugin for Eclipse, and is available on the main Eclipse site now. It can watch the pieces of code that you work on together (for example, when changing "tax calculation" code, you tend to use the same five files) and then emphasize them the next time you work on the same task. It's a great way to undo the "information ...


13

Disclaimer This is limited to Android development only (In Java obviously). I am coming to this with some limited knowledge of Eclipse and IntelliJ both; however, I have recently had to decide on a development environment for Android. It would seem that the first clear choice would be to use Eclipse since Google supports it with their ADT plugin. ...


11

Don't -- create a cool UI encompassing whatever cool thing said spreadsheet does. Do not attempt to build a UI on top of a spreadsheet as a datastore -- especially a complex spreadsheet that is already an app in it's own right -- if you can help it. Sometime in your professional life you will probably have to do this, but it is a challenge best left until ...


9

One doesn't take up 4 GB of RAM and take a minute to start up. One does. In addition, Eclipse likes to lock you in. If theres an eclipse project, you need eclipse to build it. Text editors don't care. You can use whatever you want - some people will use emacs, others vim, others textmate. Granted, you can set up a Maven or Ant based project so its not all ...


9

Relevant reading here. C++, but still relevant. I especially like this example (code comment is mine): int searchArray(int to_search[], int len, int to_find) { int i; for( i = 0; i < len; ++i ) { if ( to_search[i] == to_find ) { return i; } } // should be returning designated 'not found' ...


8

Get familiar with AAA, read about it, read about the issues that come with test driven development ( design for testability vs high cost tools so that the design doesn't matter). Learn Dependency Injection so that removing external dependencies for testing becomes simpler. Here's a good overview of notes I took while reading The Art of Unit Testing ...


8

You can easily use the eclipse "file->export->java->jar" function to create a compiled package of your code. You can select various options depending on your whishes, e.g. exporting the source with it. If you select "runnable jar file" you can easily select a run configuration which Eclipse will "embed" into the .jar file. Using an IDE should not add ...


8

The problem with println debugging is that the printlns themselves are a problem. When you're debugging using println, you have to modify your code to do it. This means you need to already know, or at least have a pretty good idea, where the bug is before you start debugging. And if you already know that, you probably don't need to debug anyway, as (IME ...


8

Many IDEs, including Eclipse, use "TODO" in a comment to generate task lists. These task lists include the text of the comment and the file and method that the comment is in. This lets everyone using a tool with this functionality generate lists of things that are still open. There are also some other common identifiers, like FIXME or XXX that have similar ...


7

My solution has always been to not check those files in. I really have never liked it when I do a check out and have to filter through all the IDE-specific stuff. Why not use a common ground? If the IDE files are the common ground, great. But, more often than not, something like Ant and Maven are the common ground. It depends on the audience, but I ...


7

Eclipse Quick Access is an amazing usability feature, in my opinion. Short version: Imagine a QuickSilver or Launchy inside the IDE!. With Quick Access you can navigate to almost any part of the IDE using the keyboard. Yes, that can be done in Visual Studio also but you need to learn the shortcut to each view: Ctrl+Alt+J to go to the Object Browser; ...


7

Ah yes, because, way back in 1995, we hewed our Java into stone tablets. And then we used the tablets to grind holes in our punch cards. And we liked it! Damn kids. Java had IDEs from day one; Sun had a proprietary one (Sun Studio, though it was called something different originally...I can't remember what it was called. (I have the disks somewhere, and by ...


7

As you suspect, it is to avoid name collisions between the parameter name and either member or local variable names. Member variables are sometimes given a prefix for the same reason (e.g., m_result). Personally, I prefer to just use the this prefix for member variables if there's a name collision. It's built in to the language and everyone already knows ...


7

Every case... Granted, I'm not 100% sure about Java IDEs (and would welcome any corrections that aren't consistent with Java IDEs) because I use Visual Studio over C#/F# but adding variables to the watch list and using conditional breaks completely practically replaces println... you don't need to rebuild to get additional information (you don't even ...


7

I find the management of dependencies a big win even for solo projects. Adding some XML to the pom.xml and letting Maven worry about downloading the JAR, and putting it in the right place is really convenient. Using the command line for building and deploying is usually much quicker. Once you have some commands in the history, six keystrokes can build, run ...


7

If you work for a company that pays for a commercial IDE, then yes, they may well insist that you use it and possibly with good reason. You say all your colleagues have moved to PHPStorm as well - it can be useful sometimes to use the same tools as your colleges, since you can then share experiences, tips and techniques, as well as e.g. standard templates ...


6

Clover - A test coverage tool, but outputs the most lovely reports in the world (costs a pretty penny thou.) Crap4J - Same general data as Clover (that is to say it is a code coverage tool) but simplified and less pretty (free). Findbugs - Reports on common coding errors (free). All can be used as either an Eclipse plugin or a stand alone application.



Only top voted, non community-wiki answers of a minimum length are eligible