I am using for an alternative to OpenGrok. I can't configure it properly. What I want is to browse to the code, like I would be in Visual Studio. I'd like to have a menu with a minimum option of Go To Definition, find references etc. How can that be achieved ?
I suggest to have a look at the Woboq Code Browser.
It works like a compile step and dynamically analyzes the code and how symbols are linked to each other.
Did you have problems configuring it on Windows?
OpenGrok works best through a web-server. You might find it easier to rent some cheap VPS box, and configure OpenGrok remotely on such server (instead of trying to configure it locally on a Windows box), and then use your web-browser to access the remotely-running OpenGrok instance through the web-interface.
I've once tried using OpenGrok locally on a Windows machine, and even though it worked, I was not happy that the non-web version didn't have any syntax highlighting, and was overall just way too awkward to be of any real use.
There's Text-Sherlock. And the github project. It can use either Whoosh or Xapian as its backend.
I would recommend Codatlas. It has features such as jump-to-definition and cross-reference and poly-glot support such as C/C++, Java, Python, Scala etc.
I need to define a runtime environment for my development. The first idea is of course not to reinvent the wheel. I downloaded macports, used easy_install, tried fink. I always had problems. Right now, for example, I am not able to compile scipy because the MacPorts installer wants to download and install gcc43, but this does not compile on Snow Leopard. A bug is open for this issue, but I am basically tied to them for my runtime to be usable.
A technique I learned some time ago, was to write a makefile to download and build the runtime/libs with clearly specified versions of libraries and utilities. This predates the MacPorts/fink/apt approach, but you have much more control on it, although you have to do everything by hand. Of course, this can become a nightmare on its own if the runtime grows, but if you find a problem, you can use patch and fix the issue on the downloaded package, then build it.
I have multiple questions:
What is your technique to prepare a well-defined runtime/library collection for your development?
Does MacPorts/fink/whatever allows me the same flexibility of rehacking if something goes wrong ?
Considering my makefile solution, when my software is finally out for download, what are your suggestions about solving the potential troubles between my development environment and the actual platform on my user's machines ?
Edit: What I don't understand in particular is that other projects don't give me hints. For example, I just downloaded scipy, a complex library with lots of dependencies. Developers must have all the deps setup before working on it. Despite this, there's nothing in the svn that creates this environment.
Edit: Added a bounty to the question. I think this is an important issue and it deserves to get more answers. I will consider best those answers with real world examples with particular attention towards any arisen issues and their solution.
Additional questions to inspire for the Bounty:
Do you perform testing on your environment (to check proper installation, e.g. on an integration machine) ?
How do you include your environment at shipping time ? If it's C, do you statically link it, or ship the dynamic library, tinkering the LD_LIBRARY_PATH before running the executable? What about the same issue for python, perl, and other ?
Do you stick to the runtime, or update it as time passes? Do you download "trunk" packages of your dependency libraries or a fixed version?
How do you deal with situations like: library foo needs python 2.5, but you need to develop in python 2.4 because library bar does not work with python 2.5 ?
We use a CMake script that generates Makefiles that download (mainly through SVN)/configure/build all our dependencies. Why CMake? Multiplatform. This works quite well, and we support invocation of scons/autopain/cmake. As we build on several platforms (Windows, MacOSX, a bunch of Linux variants) we also support different compile flags etc based on the operating system. Typically a library has a default configuration, and if we encounter a system that needs special configuration the configuration is replaced with a specialized configuration. This works quite well. We did not really find any ready solution that would fit our purpose.
That being said, it is a PITA to get it up and running - there's a lot of knobs to turn when you need to support several operating systems. I don't think it will become a maintainance-nightmare as the dependencies are quite fixed (libraries are upgraded regularly, but we rarely introduce new one).
virtualenv is good, but it can't do magic - e.g. if you want use a library that just MUST have Python 2.4 and another one that absolutely NEEDS 2.5 instead, you're out of luck. Nor can virtualenv (or any other tool) help when there's a brand new release of an OS and half the tools &c just don't support it yet, as you mentioned for Snow Leopard: some problems are just impossible to solve (two libraries with absolutely conflicting needs within the same build), others just require patience (until all tools you need are ported to the new OS's release, you just need to stick with the previous OS release).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know that some people swear against using a language-specific IDE ever (vim/emacs or die! type stuff) and that some people are really uncomfortable with coding/compiling in the terminal at all, so my question has the following parts.
When do you switch from one to the other
Is it even necessary to know both? If not, which should you know?
Lightweight or Heavyweight IDEs? (just code highlighting or every feature you could imagine)
What IDE do you recommend in general, and why?
Feel free to answer all, some, or none.
Short summary so far:
IDEs
Big Projects
GUIs
Easy Version Control Integration?
Text Editors
Quick/Small projects
Adapts to other languages more easily
Less overhead
IDE usage is very subjective to personal opinion. With that disclaimer, here's mine.
Know your tools and know your platforms. Developing software is your domain, so be good at it.
When do you switch? When your knowledge tells your intuition that it would be easier with the other tool.
Should you know both? I would argue that you should know everything about working with your platform. Low level knowledge makes higher level applications easier to understand.
Lightweight or heavyweight depends on the task at hand. Both are appropriate at times.
I can't recommend any one IDE, it depends on your application's platform(s) and what you, the developer, are comfortable with. If you're doing .NET, Visual Studio on Windows is probably the best, but that doesn't mean you can throw out Notepad. For Java on Linux, Eclipse is great, but don't discard vim.
Hey, Front Page is probably the right tool for the job to some people (ouch, yes, I said it. /me ducks).
As several other people have said, which IDE you use or if you use one at all is heavily dependent on the language your developing in, the scale of the project, and the platform your working on. Although I've never encamped with either the Vi or Emacs guys I do use a number of other editing tools in roughly this language breakdown:
C#, or anything else .Net: Visual Studio. There is no serious competition, the CLR languages beg for syntax highlighting, refactoring, and advanced file management. Thankfully Microsoft got this one right and the Express editions are an incredible value.
C++: I haven't touched it in a while, but I would typically view the code in Visual Studio, but compile through batch files, which had a lot to do with the eccentricities of the particular embedded platform I was working on.
Python: I recommend Stani's Python Editor if you need something with bells and whistles, but Python is so direct in its structure that I usually end up just using Scite. It does everything you really need in a Python editor.
SQL: Notepad++ or, if your doing heavy lifting, any supported editor + SQL Prompt.
Java: I hear good things about Eclipse, but Java is evil so I don't touch it.
PHP, Perl, Javascript, BASH, or most other languages: Notepad++ on Windows, Scite on Linux.
Although switching between all these IDEs can be troublesome, especially when a feature you love in one is missing from another, the benefits are to be found in using the best balanced tool for the job your doing. I switch IDEs all the time as my needs vary and I would encourage others to as well. Having worked on a limited number of projects, of limited scale, on particular platforms I hardly know all the use cases and I'm sure there are plenty of other situations and code editors out there that pair up in unique and wonderfully functional ways.
Personally, I almost never use an IDE. I use vim/make almost exclusively. There's lots of benefits to this:
Totally language agnostic. Once some commands and shortcuts are memorized, they work with all of my projects
Parts are easy to swap in and out. If I want to switch compilers, I change the variable in my makefile.
"configuration agnostic". No matter how the settings are, I can develop. No GUI? No problem. Different desktop environments? No problem. There are even ports of vim to Windows. I develop on my local machine and when I'm ssh-ed into a server in the same manner.
There are also some downsides:
Vim is hard to learn. I'm not even going to lie about this. It takes time to acquire some power.
Mostly limited to *NIX. Yeah, there are things like cygwin. Yeah, there are ports of Vim to Windows. It's somehow not exactly the same.
It's possible that if I learned an IDE that focused on a specific language, it'd have some features that would be pretty powerful for that language.
I usually use the IDE only for debugging (which IDE depends on the language/platform), and use my personal editor for the actual editing of code.
I feel that using one editor for everything is a much better approach than relearning key-bindings for every language/platform change I make.
In my experience, if the project involves building a GUI, an IDE is an invaluable tool.
If it's small, "gut-level", or a web service, I'd go exclusively text editor.
My rule of thumb is that if the language and IDE are tied together, then use the IDE (see anything using MS project files). Otherwise any editor will do. Personally I like visual Slickedit, or notepad++ if the company isn't going to shell out for slickedit. On the linux side I use Emacs, which you can consider a heavyweight editor, or a lightweight OS.
While I use VIM and non-IDE type tools, I have to admit that Visual Studio (especially 2005/2008) is possibly one of the best programs ever written. The intelli-sense and debugging tools are well worth there weight in gold. I find myself being able to write code very fast. It is especially helpful in cases where you are utilizing frameworks (e.g. .NET) and need that little extra guide to tell you what functions are available off an object without having to refer to the help documentation. It is hard to beat auto-code formatting, bookmarking, immersive debugging, refactoring, source control integration, and plug-in support.
For everything else, I use VIM. I have to admit I'm still learning how to use VIM well, but I already know it is powerful. It truly is a matter of choosing the right tool for the job.
EDIT: One thing I will mention is that you pick a tool or two and learn it very well. Become an expert at it. Learn the ins/outs and explore the nitty gritty secret stuff your editor/IDE can do. The more you do this, it will matter less what the tool is.
For me the break-down is by technology.
I use Notepad++ or vim for anything in the LAMP stack - I've never found anything particularly useful in the IDEs for those technologies (unless you could the MySQL Client Tools as an IDE, which I use when I am able to).
When working in the WISC (Windows, IIS, SQL Server, C#) stack, on the other hand, I use an IDE - one of the Visual Studio products depending on which project I'm working on.
A lot of this probably has to do with the sorts of projects I work on. I work in PHP in the LAMP stack, so I don't have to handle bunches of external libraries the way I probably would if I was using perl, and the projects I develop on LAMP are usually simpler than my Windows development. In .Net, on the other hand, navigating the libraries can be quite difficult without the IDE, and the debugging can (I find) be more complicated. Plus when developing web services using SOAP, I wouldn't even want to think about doing it without the tools Microsoft supplies.
I find that IDEs for C and Python don't buy you much, at least the ones that are available for Linux. So, when I write C and Python code, I will usually use GVIM + Ctags + standalone debugger + make.
However, in the case of Java, Eclipse offers a Java programmer so much that it's hard not use it and after a while become spoiled to the extent that it's just too painful to go back to writing Java code in VIM.
Strangely enough, I haven't had the same experience when using Visual Studio for C projects (even though I do find its debugger indispensable). One reason for this is that I prefer to manage the build scripts myself. Even with Eclipse, I would still use ant so that I know exactly what is happening during each build. Admittedly, you can of course look at the build configurations in both Visual Studio and Eclipse, but this just isn't as direct as seeing the exact command used. That being said, I'm still forced to use Visual Studio for builds mainly because of convention, as there other people working on these projects, but I will still edit the code in GVIM (with the help of ctags).
The ONLY time when you have to do compile/link using the commandline is when you work on a pure Linux server with no GUI installed - in this case your ONLY REAL OPTION is emacs. (Using anything else is pure masochism).
At all other times it would be sheer stupidity not to use a mature IDE.
Your Questions:
When do you switch from one to the other
(answered above)
Is it even necessary to know both? If not, which should you know?
That will depend on how keen you are on being a programmer AS WELL AS a systems administrator. The latter is called upon to support the former and to implement whatever is necessary to keep all systems running smoothly. To know both can NEVER be harmful, but if you insist on being a programmer only, then the necessity of knowing a specific IDE for the platform you choose is obvious.
Lightweight or Heavyweight IDEs? (just code highlighting or every feature you could imagine)
I assume the choice here refer to programmer only: there is no doubt that the more assistence your programming tool/environment can give you, and the more support you can get that allows you to focus on implementing your program spec. the better. So YES: HEAVYWEIGHT is the only sensible choice.
What IDE do you recommend in general, and why?
On a Windows platform this question is moot: whatever Mictrosoft recommends (and if you have the $$$). On Linux you have several choices: GTK-based (Gnome & company), QT-based (KDE & company), (if you're a sucker for punishment you can go for pure X and then you are more-or-less in for an interesting time) both Gnome and KDE have IDE's you can use. Third party IDE's, like eclipse, are available; they all enable you to develop GUI-applications that will run in whatever the user chooses as his GUI-environment. Some of these IDE's even allows a multiplicity of programming languages (that is the glory of Linux and FOSS: you have choices; you are not pinned to the "geography", not led to the slaughter, ...).
My personal choice of IDE (C++ only) is Ultimate++. It is source compatible with both Windows and Linux. The IDE is approaching a rich maturity AND it offers 'everything-plus' that other C++-IDE's are aspiring to. (I know this is a plug, but I've got good reason: give it a try.)
HTH
I've done both, but the debugger is really a great tool to have.
You can get pretty far just adding debug output and rebuilding, and that even forces you to use your noodle and the scientific method a bit more, but in the end (imo) the debugger just cannot be denied... it lets you really get in there and explore the system during runtime.
There are opportunities for both specialization and generality. In my own work, I've found that flexibility and being able to ride a steep learning curve has paid off well.
I use an IDE whenever I'm using a language that's more suited to being written by a computer than by a human being, for example Java. It's far too verbose to write by hand without loads of auto-completion. Vim's auto-complete is never quite as good as a language-specific IDE.
For less wordy languages though, you can't beat a good Vim- or Emacs-like editor for churning out plaintext quickly.
If the project exceeds two or three source files, I tend to use an IDE.
Once you've used an IDE with good (vs6 was not good, and most generic text editor's support for this is crude at best) intellisense-style prompting and auto-complete for a few weeks, you won't go back.
I use vim for everything except Objective-C stuff, which I use xCode for. The Interface builder, error checking, debugging are quite valuable.
However, I use a InputManager to let me use vim commands/key bindings in xCode, so I never really leave vim for anything ;)
I do all my coding in SciTE, my favorite editor, lightweight, with good syntax highlighting, and with shortcuts I am familiar with (or which I coded!).
Now, doing lot of Java at work, I also use Eclipse, which greatly improve with each version. I appreciate it is quite customizable, and very flexible about coding help, but I still do most of my editing in SciTE... Fortunately, the auto-detection/update of files edited elsewhere works quite well in Eclipse (although sometime with a sensible delay to analyze the reloaded class: we have big projects and not that much memory (1GB)).
I appreciate Eclipse mainly for two things (we compile with a special ant process and we don't really do refactoring): quick navigation in the project, particularly find a class and call hierarchy, and of course debugging.
I don't think these are so much distinct worlds, these are just tools, quite complementary: I won't fire Eclipse to do a quick edit of a small HTML file, I can't debug in SciTE. So I use both.
I haven't used an IDE since the last time I created a native GUI app, lo those many years ago. And, even then, I pretty much just used the IDE to create the GUI forms and my own editor for the actual code once I figured out how to plug an alternate editor into the IDE.
I'm not a "give me vim, or give me death!" fanatic, but my experience with having used IDEs and having used a bunch of xterms running vim has left me with the impression that the only thing IDEs really contribute, for me, is drag-n-drop form editing, which is something I don't need, given how long it's been since I last did anything with a non-web-based GUI.
re: when? I use Eclipse for Java and debugging. I keep jEdit open with a variety of Groovy scripts available. I also use Cygwin's bash in 3 shell windows for executing Ant tasks, searching etc. I can use Bash aliases for some truly powerful stuff with respect to running our server and client.
re: both? Yes, it is vital to know both IDE and non-IDE development. It doesn't matter which IDE but a debugger is essential.
re: which? For Java, Eclipse if you are paying (free) and Idea if someone else is ;-) Actually, I prefer Eclipse but I think that Idea has better support for Groovy so that it is attractive to me.
A decent code highlighting editor is all I use.
I use IDE for debugging, or for every big project that require to go on many different file. Lot of IDE have quick click to move from one class to an other. IDE for that is more productive. I use IDE too when I use big FrameWork that has a lot of folder and file, more easy to manage.
Update because question has been updated
When do you switch from one to the other?
I switch for small change in CSS or other small task,
Is it even necessary to know both? If not, which should you know?
Some time when building form (example in C#) it's very much profitable to use the IDE. Samething for debugging with breakpoint. I think both are required.
Lightweight or Heavyweight IDEs? (just code highlighting or every feature you could imagine)
Code hightlight is fine for small job, but when you have big stuff to do, bigger IDE with autocomplete, real-time error check and other refactoring tool is necessary to be more productive.
What IDE do you recommend in general, and why?
Visual Studio is great for .net, Eclipse for Java.