Visual Studio vs. Eclipse: a Programmer's Comparison 543
Nerval's Lobster writes "Developer and editor Jeff Cogswell is back with a comparison of Eclipse and Visual Studio, picking through some common complaints about both platforms and comparing their respective features. 'First, let's talk about usability,' he writes, 'and let's be frank: Neither Eclipse nor Visual Studio is a model for sound usability.' That being said, as an open-source project, Eclipse wins some points for its customizability and compatibility with languages; it's more difficult to modify Visual Studio to meet some programmer needs, which has led to any number of abandoned projects over the years. Microsoft choosing to eliminate macros in recent versions of Visual Studio has also led to some programmer frustrations (and a need for external tools)."
Out of the box (Score:4, Insightful)
Out of the box, VS wins hands-down.
Re: (Score:3)
Out of the box, VS wins hands-down.
Until you need to target a non-MS operating system...
Re:Out of the box (Score:4, Interesting)
Of course everything you described is the bare minimum for a modern IDE. Eclipse does have an advantage because it has more extensions written for it, but both IDEs have a ton (VS is also extremely extensible and has countless extensions written for it too).
But you're not helping your case if you only mention core IDE features. Issue tracking integration? ::GASPS:: stop the press!
Re: (Score:3)
Effective project management is pretty hard to implement properly (ask most developers).
Eclipse's Mylyn integration goes a long way towards making that aspect easier.
Re: (Score:3, Informative)
And VS has TFS, which integrates with Sharepoint, Project, Dynamics CRM, and any of the Dynamics accounting systems (or any other software that integrates with CRM or Dynamics, like QuickBooks or ConnectWise).
How is Eclipse's Mylyn integration anything special? It's free? I don't see that being much of a big deal to a business. Maybe to a small dev shop or a lone developer it matters because it's within reach. But to a business that wants to automate almost everything in the PM toolchain, Eclipse isn't even
Re:Out of the box (Score:5, Informative)
And VS has TFS, which integrates with Sharepoint
You mean the collaborative web system that barely manages to do basic things like integrate its calendar with Outlook, let alone Exchange or the other plethora of calendaring systems out there?
My friend, you're exhibiting a lot of Stockholm syndrome there; do you work for Microsoft perchance? (If you do, when will Sharepoint support CalDAV? Even read-only would be genuinely useful, because that will let me pull the calendar events into my dev team's main shared calendaring system from some of our external partners rather than leaving their meeting requests orphaned.)
But to a business that wants to automate almost everything in the PM toolchain, Eclipse isn't even on the radar.
The biggest issue with that approach is that VS is tied to a single platform. If you're not working somewhere that buys into the whole of that stack, you're utterly uninterested in any of it. That's a lot of pro development shops, whatever you think.
Re: (Score:2)
Um excuse me ... (Score:5, Insightful)
A developer with sufficient skills can be productive in ....
A developer with sufficient skills can be productive in anything.
vi.
gedit.
emacs/xemacs
Pencil and paper.
And on very VERY rare occasions, I've seen developers who did everything their head and just typed in any old text editor.
Re:Um excuse me ... (Score:5, Funny)
Forget text editors. Real developers adjust bits directly in memory using the switches on the operator panel.
Re:Um excuse me ... (Score:5, Funny)
Fuck that shit bitch, butterflies for life.
Re: (Score:2, Funny)
Yeah, never forget the good old C-x M-c M-butterfly.
captcha: bearded, just on the day I decided to shave. FML
Re: (Score:3)
Punch Cards!
I'm so glad those were gone by the time I started into computers.
Re:Um excuse me ... (Score:4, Funny)
I don't think the skilled developer is going to be very productive on Visual Studio for Linux.
Re: (Score:3)
But if you've got Linux already, why use Windows as the development environment?
Re: (Score:2)
an IDE with a suboptimal text editor
Only until you turn on Paredit.
Re:Um excuse me ... (Score:4, Insightful)
I don't know, great editor but lacking a bit to make a good IDE. I don't like IDEs though so I don't mind that. The whole concept of having a single window to view code in that is surrounded by auxillary rarely used windows just seems backwards, and yet that seems to be the dominant design. Also the idea that all tools must be a part of the same overarching tool seems wrong, since it prevents you from mixing and matching the best tools. Ie, if you have an IDE with a great editor but its debugger is mediocre, then the entire IDE becomes mediocre; in some cases I have seen some developers use several IDEs in parallel to get the best of each, which also defeats the idea of "integrated".
Emacs does what is important with an IDE, lets you edit, lets you run a debugger and present the data within it, lets you start a build and present the results within it, and lets you manage the source code control. Basically it has a way to integrate other text based tools. It doesn't need to be a Windows style MDI application to do that.
First IDE I used was in 1981, UCSD Pascal. Edit/compile/debug in a straight forward tool. Things do not seem to have improved that much since then. Maybe they're prettier though.
Re:Um excuse me ... (Score:4, Insightful)
Fired? That's ridiculous. Let the developers use the tools they are comfortable with.
If you're doing a 3 second refactor with a tool then that means you are not cross checking to be sure that the tool did it right or the way you wanted it done, so add at least an hour to do that to do it right. Never trust a tool to do the right thing, unless you're in the sort of dysfunctional environment where fast code is more important than correct code.
Re: (Score:3)
Agreed, when I do a search and replace in notepad I then check everything was replaced. Then when I do a multiplication of two big numbers in a calculator I check the result by calcuting it by hand.
Re:Um excuse me ... (Score:4, Informative)
My friend fired a developer for refusing to use an IDE.
I'm sorry, but no developer can ever be as productive using text editors over IDEs, once they man up and learn how to use them. For instance, renaming a class method that is called by numerous other classes is a 3 second operation in Eclipse, and possibly hours long in bash, with a much higher chance of breaking something. In fact, most refactoring operations cannot be done efficiently outside of an IDE.
I would have fired your friend. Was the developer coding below expectations? Was the developer's code inferior in a way that an IDE would improve? Was the developer productivity a problem? If the answer to any of those questions is "No," then what difference does it make what tool he/she uses. IDEs are good for some things and lousy for others. Refactoring is something they are good for, but at the same time, if it is taking 3 seconds to do in Eclipse and hours in bash, then something else is wrong, regardless, that example assumes one is going to be refactoring on a regular basis. If that is the case, then the IDE is making up for other programmer inefficiencies.
If you have a productive developer, who cares what editor/IDE they are using? The job of a manager is to remove the obstacles that keep employees from being productive, not making them jump through hoops.
Re:Um excuse me ... (Score:5, Insightful)
Well, I'd never hire you in the first place, because modern IDEs are the automation of the software development world and demonstrably improve productivity while lowering error rates.
You're basically saying that we should let the guys in the warehouse manhandle 500kg loads by hand because they "prefer" not to use the forklifts. We should just let them do whatever they please, because that's what makes for good management, right?
I've been in mixed work environments before where everyone just used whatever tools they wanted: Linux, Windows, Mac, Vi, Emacs, etc... I personally used IntelliJ IDEA on Windows because it had code analysis and safe refactoring. My productivity was at least 50x higher than other developers. I was told not to submit changes too fast because the code reviewers couldn't keep up. Note that I didn't say I was 50x better than anyone else -- there were smarter and more experienced developers there -- but I was running circles around them because of the tools that I was using. A woodcarver, no matter how skilled in his art, simply cannot keep up with a CNC milling machine. A blacksmith cannot possibly outproduce a ten ton press that can stamp out a part every five seconds.
Inefficiencies were everywhere: they took 30 seconds to check out a file from source control using a command-line tool, whereas I could just start typing with a barely noticeable pause on the first character as the IDE does it for me. They used "diff", I used a GUI 3-way merge tool that syntax highlighted and could ignore whitespaces in a semantically aware way. There was one particularly funny moment when some guy walked up to me to ask me to look into a bug in a specific method. He starts off with the usual "now go to the xyz folder, abc subfolder, now somewhere in here there's a..." meanwhile I'm staring at him patiently because I had opened the file before he'd even finished giving me the full method name at the start of his spiel. Global, indexed, semantic-aware, prefix search with jump to file is a feature of IntelliJ IDEA, not Emacs or Vi. He's never even heard of such a thing! Thought it was magic. Grep couldn't have found the method anywhere near as fast, not through 30 million lines of code anyway, and then it would have returned every reference to the method name as well, not just the method definition itself. Then I'd have to find the damned file in a haystack of thousands and open it manually anyway.
Minutes of work in a seconds, hours in minutes.
It's not about typing, or shortcuts, or block select, or the specific dialect of regular expressions in your favorite text editor. It's about indexing, refactoring, code analysis, live error highlights, popup-help, tab-complete, source control integration, boilerplate generation, integrated debuggers, and a thousand other things that most programming oriented text editors simply do not have. It's about letting the CPU in your computer do what it is there for, instead of just waiting patiently for the next keyboard interrupt so that it can use all 3 gigahertz of power to put a byte into a buffer and then go back to sleep.
It's not even a good idea to let developers pick their favorite IDE either, because there are productivity gains to be had from consistency. Training is cheaper, licenses can be purchased in bulk, plugins will work for everyone, custom extensions may be cost-effective to develop for one IDE but not many, etc...
Re: (Score:3)
A competent vim/emacs developer probably uses etags for indexing identifiers. I agree that grep is a poor, disk-intensive, high-latency tool for this particular job; but it is a straw man.
Re: (Score:3)
It's not about typing, or shortcuts, or block select, or the specific dialect of regular expressions in your favorite text editor. It's about indexing, refactoring, code analysis, live error highlights, popup-help, tab-complete, source control integration, boilerplate generation, integrated debuggers, and a thousand other things that most programming oriented text editors simply do not have. It's about letting the CPU in your computer do what it is there for, instead of just waiting patiently for the next keyboard interrupt so that it can use all 3 gigahertz of power to put a byte into a buffer and then go back to sleep.
THIS. This is hardest part for many old school, text-editor-only programmers to understand, and this is no different from writers who insisted on using mechanical typewriters instead of more modern text editors.
In fact, I once viewed a video of a fiction writer doing his writing, and I was surprised that his tool don't automatically highlight and index all reference of every characters in the story. Guess I am too used to modern IDEs.
Re: (Score:3)
> Although, right now I am doing assembly on a a custom chip. Do you have an IDE for me,
One of the following might be appropriate: Keil, Codewarrior, AVR Studio, MPLab, CubeSuite+, HEW, Xilinx ISE, Quartus, or ISPLever. Look at Keil first... if it's even a halfway-modern chip or popular chip, they probably have an IDE for it, and it's probably a damn good one. For m68k, Codewarrior is pretty much the gold standard (though if you're starting from scratch now, Keil is probably a better time-investment).
Re: (Score:3)
Actually, here's an even better example: the Atari 2600. Check out demos and homebrew games created for the 2600 since ~2008 using Stella's debugger, and imagine what somebody like David Crane could have done if he'd had the ability to do the equivalent of stop the CRT's electron beam and see what's going on with the video kernel. RAM was obviously a factor 30 years ago, but development tools have a lot to do with it, too.
Imagine if Amiga game designers had been able to sneak into a secret "future room", bo
Re: (Score:3)
It depends, is the person a valuable member of the team or somebody I'm looking for an excuse to let go? Chances are, if the developer is be let go because they refuse to use an IDE, there is more going on. Why didn't that preference turn up during the interview process?
A person who wastes time out of arrogance is not a valuable member of the team. There was nothing else going on, period. There is an expectation of professionalism in software development, so questions like this don't typically come up in an interview. People are expected to know how to efficiently do their job and not waste time.
Boss: I need X done.
Dev: That will take me X hours.
Boss: Why? It would only take X/10 hours if you use this tool.
Dev: I don't use that tool.
Boss: I'd like for you to use this to
Ec*freeze*lip*freeze*se works (Score:5, Funny)
And I *freeze*refu*freeze*se to h*freeze*ave anyo*freeze*ne tell me di*freeze*fferently. *freeze*.
Re:Ec*freeze*lip*freeze*se works (Score:5, Informative)
Check out the new Kepler release. Kepler was an iteration with a focus on improving the performance issues Juno had.
http://eclipse.org/kepler/ [eclipse.org]
Kepler is pretty nice UX wise.
Re:Ec*freeze*lip*freeze*se works (Score:5, Informative)
Re: (Score:2)
IntelliJ is definitely a great IDE as well.
Re: (Score:2)
FWIW I use Eclipse on Linux doesn't have that issue.
Re: (Score:2)
was it somehow borken? except that it copies(guesses) imports wrongly for snippets sometimes..
Re: (Score:2)
was it somehow borken?
Yes. I often have to hit CTRL+C three or four times before it actually copies the text I've selected. Other times it copies far more than I selected, because it didn't detect the mouse up event until a fraction of a second after I released it.
There's at least one bug report against Eclipse for this.
Title not a good start (Score:3, Insightful)
This is not a good sign. A developer with sufficient skills can be productive using vi as her IDE...
Re: (Score:3, Insightful)
This is not a good sign. A developer with sufficient skills can be productive using vi as her IDE...
Yes, but not as productive. Yes, it's true. It's been measured. A skilled coder, working in an IDE, can run rings around the coder working in a text editor when the "product" is something more sophisticated than "hello world".
Re: (Score:3)
I'm not sure anyone can be productive using vi . . .
Maybe not with old-school vi, but an experienced coder can be highly productive with vim (especially the GUI version).
It's like a fine chef's knife: A skilled chef can quickly prepare almost any kind of ingredient with it in countless ways.
An IDE is more like a food processor: Anybody can crank out a narrow range of operations on suitable ingredients fairly quickly, but at the cost of less flexibility and a bunch of cleanup work.
WTF? (Score:4, Informative)
Re: (Score:2)
Eclipse IS slow, period. I work with him for over six years and has ALWAYS been slow compared with a similar IDE that is not based on Java. And not only slow, but terribly buggy. TFA sounds more like an article made by an eclipse fanboy than a developer trying to make a truly honest comparison.
I've got Eclipse Juno and a later version of VS installed on the same relatively fast PC (solid state disks). Neither are speed demons, but I think VS is slower, particularly when building. It's somewhat amazing how fast Eclipse builds my project with over 1000 classes, whereas VS takes about the same amount of time to build a C project with 10 files small files.
Re: (Score:2)
Re: (Score:2)
Re: WTF? (Score:5, Funny)
Actually, Microsoft have been working on this aspect to try to slow down VS to compete with Eclipse. VS2012 for instance now has a pause built in where you can't do anything for about 10 seconds when you open up an aspx page, presumably while it parses the file for you...even when you don't want intellisense and just want to copy some code out. It gets really annoying after a while.
Vanilla VS2012 won't let you build an installer for a Windows service either, which you could do with VS2010, so I have to maintain both of them on my dev box, unfortunately.
Re: (Score:3)
And I just got moderated down by fanboys. Damn humans, they prefer theirs private fantasy worlds than reality.
I didn't mod you down, but for what its worth, in all the years of using Eclipse, I've only seen/been affected by two bugs, one years ago, one recently. Juno was very buggy, but Kepler is doing great so far.
I can't agree with your slow/buggy comments. If I did, I wouldn't be using it as my IDE (Intelli J and Netbeans being alternatives).
Re: (Score:3)
Well, I'm not saying what I'm saying just because of me. I sit in the middle of the floor with twenty-five other coders, all who use Eclipse, and we talk to each other.
And none of us see the problems you've talked about.
Also, as a consultant for twenty years, I've worked at over thirty companies, almost all using Eclipse (different versions as the wayback machine is set higher and higher), and have not had/seen the kind of experiences you document in your post.
All anecdotal, agree, but maybe, just to turn
Netbeans! (Score:5, Informative)
It isn't nearly as popular (and I don't know why), but Netbeans kicks Eclipses ass. True, they are both memory hogs. But Netbeans doesn't drag and freeze as much. Its commands and interface are a lot more intuitive. Netbeans is also a much better IDE for the web. It handles JavaScript way better than Eclipse and even allows you to debug your JavaScript through a Chrome extension.
Re:Netbeans! (Score:4, Interesting)
I concur with this. NetBeans is not attempting to be a generic GUI application platform; it is a mere IDE so it weighs a lot less than Eclipse. I moved to NetBeans because Maven integration with Eclipse is still half baked after all these years; with NetBeans you just open the Maven project and things work correctly. I stayed with Netbeans because it performs better and just has fewer hairs. Eclipse not spamming .project and .classpath all over the place is just fabulous as well.
It is Oracle, however. One day it might cost $6000 per "seat."
Not grandpa - Overlord (Score:3)
Gee whiz grandpa, I don't think any of the IDEs support punch cards.
What you fail to understand is that all Emacs users are in fact travelers from the 25th century, trying as best they could with primitive technology to create an editing environment as elegant and direct as what they were used to back in their own time-stream.
So while you cackle about punch-cards we Emacs users are rolling our eyes and figuring out which gene of your grandmothers to re-sequence to give you embarrassing flatulence in your th
Reviewer doesn't know the first thing! (Score:3, Insightful)
"Studio also requires a working set of about 250 megabytes of memory, while Eclipse requires about 3 megabytes of memory..."
Erm, working set on a newly launched eclipse (no project) takes 13x,xxxK.
Plus working set is actually a GOOD thing - in theory. Imagine two programs which each take 700 megabytes running on a machine with only 1000 (and 24). Imagine them sharing some ... libraries, we could call them, of 500 megs each. So the working set would only be 900! Yay! Disk thrash averted :)
Oh, DLL hell? Ah.
Yes.
From C++ perspective (Score:2, Interesting)
Eclipse's gcc code parser integration is better than IntelliSense. It actually understand OO code. VS struggles badly with understanding OO code. for example, if every class re-implements one virtual function, VS cannot figure out usage of one particular implementation; even if there are object declared with that class.
Thus VS is good for debugging, for everything else in C++... not much so.
Re: (Score:3)
Ironically, everyone else who makes IDE's doesn't use GCC for code parsing because it sucks ass ... Maybe when you get around to using LLVM, you'll really that Eclipse is actually the shitty one.
Re: (Score:2)
Which version of VS was your experience with?
In my experience, VS has the single best C++ IDE parser out there. It's the only one of two IDEs that seems to be able arbitrarily complicated template metaprogramming code thrown at it (e.g. Boost.Lambda). The other is KDevelop.
Qt Creator!! (Score:5, Informative)
Even letting the Qt integration out, It has excellent code completion, shows warnings and errors as you type, provides great refactoring tools, It's extremely lightweight, works with any compiler and any build system, in any platform, integrates with a wide array of debuggers and profilers, has a high degree of customization, and some unique features like the best search/replace I've ever used and the locator (ctrl-k).
The only reason it's not more popular is that most people believes it's only useful for writing Qt applications, which couldn't be further away from the truth. It's simply awesome. If I worked for Digia, I'd try to change the name and promote it to something unrelated to Qt, that way it would be really easy to bring new developers to their platform.
Re: (Score:3)
you going to code java with qt creator? only an idiot - masochistic glorious idiot - would try to code qt with eclipse.
which pretty much gets us to the point of why the fuck make this comparison? really, the c/c++ in eclipse is horrible and you most definitely are NOT going to be coding .net in eclipse.
I've used both eclipse and visual studio for the past year.. and just as well. the other for android stuff and the other for windows phone development.
trying out the new android studio now though.. now there'
Re: (Score:2)
I agree that Qt Creator is an awesome IDE, especially so if you want something cross-platform. However...
It has excellent code completion
How well does it handle templates? Can it figure out, say, std::bind? Or even std::vector<std::string>? Last time I tried it (a few months ago), it still had problems with the latter (v.begin()-> would not give you members of string).
Re: (Score:3)
No, it finds the headers just fine, since it gives completion for the corresponding types. But it seems to be unable to handle typedefs inside a template. Here's a sample:
Here the completion at the dot should be for std::string, but none is actually provided. And if you look at deduced signature that QtC shows when typing "at(", it shows the return type as const_referen
Re: (Score:3)
KDevelop? Gorunka is talking about "Qt Creator" and you can find the Windows binary on their download page. [qt-project.org]
A real study is needed (Score:4, Insightful)
As far as I am concerned, IDEs are largely similar in their view of software development. They are like bloated bureaucracies that one has to deal with to do anything constructive. If you dare have a project format that VS, Eclipse, or what have you, doesn't understand, and you have to set up the environment to do everything manually. I know I sound like I am saying "Get off my lawn," but I am really saying we need to understand the development process better. IDEs obscure it too much. Tools like VIM and Emacs expose 100% of it. (In full disclosure I use VIM, ctags, make, etc.)
We need to come up with the programmer's equivalent of the SAE and define basic tools of the trade. It will never happen, of course, but that's *really* what we are fighting about.
Re: (Score:3)
There is no benefit to knowing how to make a Make file if you're only going to compile a Windows app. Pretending that we all need to know the inner details of make is retarded.
Protip: You can edit visual studio project files in VIM!!!! So its pretty hard to say it hides stuff from you when you have access to everything in a .proj file that you do in a Makefile and can use the same editors.
I guess you think visual studio hides stuff because it doesn't require you to use a shitty editor for the project fil
Re: (Score:2)
yeah, so you craft your own makefiles for wp8 compilation? look there's practical reasons for why people use visual studio and it's pretty simply getting paid...
I use multiple IDE's depending on what product the code is for, you still end up knowing the build process because things can conflict and fail at different points in the building and they will fail.
also I don't agree that much with understanding the development process being out of tools that show you basic options.. if you're really hardcore and
Re: (Score:2)
VS actually isn't bad in this regard. At least with C++, every project can be a "makefile project:, which is pretty trivial to set up and get full VS integration. All the cross-platform C++ development I've done has worked that way.
Very differant experience (Score:4, Interesting)
Eclipse however just feels generally clunky. I pause for 20+ seconds just to get code completion prompting to come up in python or java, and half the time its in the wrong context. the perspectives is also really annoying. everytime I go to debug, it halts everything to tell me it wants to switch, and then gives me a 2inch high window for viewing the code, anchoring is weak, and it always seems like I never get back the space I should when I dock a sub-window. Personally I really don't care how extensible my IDE is. any given ide is not going to be able to support all langagues and technologies, so why try to shoehorn it in?
Re: (Score:3)
Agreed. I use Eclipse regularly (FDT and PDT) but whenever I get to work in Visual Studio, it's a much smoother experience.
Re: (Score:3)
I've NEVER had Eclipse pause for 20 seconds!
Be sure to increase the heap memory & enable parallel garbage collection in the 'eclipse.ini' file - see an earlier post by me.
You can resize and reposition all the panels in Eclipse, so I don't have your problems with "2 inch" windows.
Hey wait you must be an American (everyone else uses metric), find a non-American developer to help you & ask them to speak slowly... :-)
Re: (Score:3)
It's a perfectly cromulent term.
Conclusion: meh (Score:5, Insightful)
So the conclusion is "both work; each has some flakiness".
That's a long-winded way of saying "meh".
vi or emacs debates anyone?
Re: (Score:2)
> vi or emacs debates anyone?
Yup. Meh. Only the immature junior programmers flame each arguing over which editor is better instead of channeling their energy into _writing_ code. /flame They ALL suck. Some just suck less then others.
Left out MyEclipse and IntelliJ (Score:5, Insightful)
You're comparing an expensive IDE to a free one. I'd be more interested how it compares to a curated Eclipse experience like MyEclipse or a closed source IDE like IntelliJ. All that being said, Eclipse is mostly used by folks using Java or languages that run in the JVM. Visual Studio is going to be used by those on a Microsoft stack.
Re: (Score:2, Informative)
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
There is the free version. Can't help with the source though. ;)
refactoring (Score:3)
Re: (Score:2)
You have to be more specific when you say stuff like that. VS does have all the basic refactorings, and has more in every version (not really worth talking about 2010 and earlier when we're in 2013).
Of course, whats build in is primitive compared to other IDEs, because of all the plugins and extensions that fill the gap. If you're one of the 2-3 VS users who don't use Resharper or other plugins, well, tough.
Needed a bit of editing. (Score:2)
"Eclipse requires about 3 megabytes of memory (depending on what you're using it for)."
If you are using it for anything, I think it probably does use more memory than that. The only other thing I'd note is that the Python Tools for Visual Studio work with CPython, not just IronPython.
The rest of the article isn't that bad, but it does seem like a lot of words to say that both have advantages and disadvantages and are targeted towards different use cases and environments.
Getters and setters (Score:4, Insightful)
"One full-time Java programmer told me that he hasn’t had to manually type in any setters and getters in years, and he has a template from which all his objects are typed in automatically, thanks to the code snippet tools in his favorite editor (which isn’t Eclipse—he uses IntelliJ). Clearly, methods of automated typing seem to be a favorite among a lot of programmers. So why did Visual Studio remove a feature that facilitated this? Who knows."
Let's not mention the fact that in C# you don't need to manually type in all the getter/setter junk, just public int MyField {get; set;}
Re:Getters and setters (Score:5, Interesting)
Tangential question: What's the advantage of having getters and setters vs. just accessing the variable directly? If automatically generating getters and setters is just an easy/common thing, what function do they really serve?
I've only done OO programming in college (I do embedded C now), so I'm assuming there's some real-world advantage that I'm not aware of.
Re: (Score:3)
There are many situations where you want to do something else just before or after a variable is modified. One example is that you want to verify the new value is in a certain range, or is non-empty, or whatever. Maybe you have to delete the old one before the new one is assigned. A very common example is that you want to notify something else that a value has change. This is used in UI programming, when you want multiple controls/displays to be synchronized. At a certain point, you find out that it's simpl
Re:Getters and setters (Score:5, Informative)
Re: (Score:3)
Not mentioned in the other responses is the opportunity to use the "resource acquisition is initialization" or "lazy loading" pattern. You may have a field that gets populated by a relatively expensive operation like a database query. So your options are to fill it in during the object initialization. Or to have a get method that will check whether the private variable it exposes has a value yet. If not it goes and fills it in and then returns it. If you access that field in ~50% of your uses of the ob
QtCreator (Score:2)
This article lacks the most important thing: debug (Score:2, Insightful)
Yes I use IDEs for coding, and I want to be confortable using syntax highlight, shortcuts and fancy tools. But the most important feature I want is to have a professional and versatile debug interface.
This article sounds like the propouse of an IDE is to be super fancy text editor.
From my point of view, the capabilities of Visual Studio for debugging are far better developed than the ones in Eclipse.
- My two cents.
Biggest Visual Studio defect: Runs on Windows (Score:4, Informative)
The biggest problem with Visual Studio, for me, at least, is that it only runs on Windows. I use a lot of different operating systems, but Windows isn't among them.
Re: (Score:3)
Nevermind where it runs, can it generate code for anything but Windows? Haven't used for over a decade, I honestly don't know.
With Eclipse, I can generate code for many platforms from mainframes to embedded devices with over a dozen different processors
Well (Score:3)
Different people prefer different tools.
I set up Eclipse, personally. It's free. It detects and plugs into Cygwin, MinGW, gcc and I can add a cross-compiler by entering a gcc build prefix into a box (just set up a new Eclipse in a VM with the intention of cross-compiling code to ARM, GP2X (a particular ARM device), Linux (32- and 64-), Windows (32- and 64-). It took about 20 minutes to install, and the rest was faffing about getting libraries to compile the same in all architectures (but now it's just a drop-down box and click - and it cross compiles).
It works. It does what I need. It compiles. I can do it on Linux or Windows and it works the same.
It's also fast. God knows what you people are doing but with C99 code, I haven't managed to crash Eclipse or make it churn and I don't sit around waiting for it to do anything (from Helios through to Kepler, on Windows and Ubuntu). Maybe if you're running it on some old sloth of a machine, but if you're programming why don't you have an 8-core, 8Gb machine at minimum nowadays? Hell, my laptop beats that and it cost next to nothing in terms of good laptop prices (sub-£500). The Linux VM I set up for Eclipse has 2Gb RAM and 2 cores running under VMWare on the machine and I'm never really waiting for it to compile unless I do a clean build (and I don't see that compile time should ever really be a huge factor - if you're that worried and have that large a project, stop faffing about with "consumer" programming tools and distcc it or something).
Eclipse has little quirks of setup, like anything, but it's just the same as any other program of a similar complexity. Don't apt-get it. Just install it into a sub-folder in your home (an ultra-powerful feature in itself - keep Helious, Indigo, Juno and Kepler in separate folders and copy/paste/upgrade your whole IDE and workspace when a new version comes out).
Debugging is marvellous. Probably it doesn't do some things that the MS software does but, you know what, it's infinitely better value for money and a darn sight better than struggling with gdb directly.
I don't get it - maybe it USED to be a load of crap, I can't know that. But from Helios onwards, which was my first real exposure to it, it's become my IDE of choice. And you know what? If I want, I can give someone a copy of my VM that has my complete development environment and OS installed on it. 50% of handing off a compile is in the associated libraries, tools, setup and build config rather than what's in the source, and with an open-source environment and an OS IDE, you can just hand them your complete setup.
If I was writing a programming book, I'd bundle an Eclipse VM setup. Most of my first exposure to any language is pissing about for weeks getting the toolchain set up. The most off-putting thing when I was learning programming was all the hoops you have to jump through to get a compiler that knows what it's compiling, from where, and what to do with it.
I don't understand the gripes. Sure, I don't have a billion lines of code in there, but I have large multi-arch ports of gaming frameworks that tie into all sorts of bits. I have 20-30+ libraries inside a single program. I have 100,000 lines of my own C code in just one project. I know people might be doing a LOT more than me. But, fact is, Eclipse is damn-near perfect for that, especially for the amateur / beginner programmer, and you REALLY have to go some to outgrow it. I remember struggling along with some of the early Sun Java IDE's - it was actually easier to just not bother and code on the command-line for my university courses (especially as I'd already started on Java a few years before that on my own).
You can say "it's not for me", sure, but all this "it crashes" and "it's dog slow" crap - I'm not sure I buy it. If it's that easy - reproduce the crash and submit it.
To be honest, I'd be prepared to suffer quite a lot of performance problems when compiling just for the IDE-and-workspace-as-folders concept, the multiple platform availability, and the debugger interface to GDB itself. But I don't - because they aren't there for me at all.
banish "it can" (Score:3)
This is typical of Microsoft products: obscure "yes it can" capabilities that you can't rely upon for continuity from version to version. Macros? Poof.
Come on reviewers, picking out chopsticks does not count as "playing the piano". Microsoft products in particular needs to auditioned savagely before giving credence to any self-assigned tick marks, or awarding gold stars for limbo dancing under the bar instead of over the bar on standards compliance. Simon says "That's four noes." Especially in the late nineties, the vast majority of Microsoft product reviews were channelling Paula Abdul. Eventually I burned "yes it can" in a Salem bonfire.
I've used Eclipse fairly heavily for C++ and R and I don't find it sluggish. Yes, it's far from perfect. Docking operations on the newest release went a bit insane on my 22" monitor in portrait mode. Hopefully that's just teething pains early in the release cycle.
visual studio... (Score:3)
I was under the impression that for a editor to be considered a "programmers editor" it had to have some kind of programming/macro language built in. Because, sometimes you find yourself repeating some action over and over and over. Dropping to $shellutiilty to perform the same task is basically just admitting your editor sucks.
Bonus points if your editor lets you assign arbitrary keys to the given macro.
Frankly, I sort of gave up on visual studio after version 6 when they decided to rebind all the keys, and started rewriting parts of it in .net. Before that, it was a pretty good C++ environment, after that the C++ functionality took a back seat to the C# functionality that appeared to be trying to replicate visual basic/delphi, and frankly doing a pretty crummy job of it.
Actually, having worked with a couple of ex-microsoft guys in the OS division, my understanding from them is that huge swaths of Microsoft actually use slickedit (IIRC) rather than visual studio. Basically anyone not programming in a .net environment. Maybe that has changed as Microsoft has tried to add support for driver development in VS, but it was definitely frowned on for a while.
Re: (Score:3)
I believe so, or do you suggest that they are equal?
Re:Studio v. Eclipse (Score:4, Insightful)
Re:Studio v. Eclipse (Score:5, Informative)
Eclipse struggled a bit with the Eclipse 4 release but the new version Kepler is fantastic.
Visual Studio is great if you're developing for Microsoft platforms.
Fortunately, Microsoft platforms are growing less relevant by the day.
Re:Studio v. Eclipse (Score:4, Informative)
There was a time that VS was just the best C++ IDE around. The best library docs, the best source debugger, and pretty decent at being an extensible editor with auto-complete for names. The peak was probably ~10 years ago, and Eclipse back then, well, it had a long way to go.
Apparently "developers, developers, developers" didn't end well for developers using VS. It became less customizable each release, the focus shifted away from C++ (that part I can understand), and it kept getting more heavyweight. WTF? VS2010 at last seemed to be a step in the right direction, finally, but then the ribbon happened.
Re:Studio v. Eclipse (Score:5, Insightful)
VS was the best debugger in the business, and if you're stuck with a legacy code base that's arguably the most important part of an IDE. And back when MSDN was installed with VS (instead of being a web site) it was amazing for its time, because you could select any library function name and with a keystroke get really well written docs for that library function fast. I used to have half my screen for code and half for the doc pane. Once it became wait-a-few-seconds-for-the web-page, that advantage was lost.
Re:Studio v. Eclipse (Score:4, Insightful)
Somewhere about 5-8 years ago there was a distinct and obvious transition between MSDN docs written by good tech writers, and MSDN docs clearly written by devs - unsurprisingly this was about the time auto-generating docs from docstring comments became the thing to do.
The docs for the old win32 stuff are still good though. Look at the docs for the famously-silly CreateFile() [microsoft.com] function. Everything is explained, including all the corner cases, but critically there's also the vital "but you probably just want to do X" hints that are so needed when the docs get this long.
Contrast that with File.Create() [microsoft.com] which only hints at what the various options do (but at least has proper grammar, unlike some of the seldom-used stuff).
Re: (Score:2, Insightful)
Re:Studio v. Eclipse (Score:4, Insightful)
Re: (Score:3)
Yes, totally less relevant. Apart from large businesses, medium sized businesses, small businesses, government and home users, absolutely nobody needs to develop software for Windows.
I'm not so sure about that. Most of the newer applications that I use at work seem to be web based these days.
In the old days, these would have been implemented as a bunch of mostly mediocre Win32 applications. Now, they run in a browser on any OS.
Re: (Score:2, Informative)
C++ developers are rare? In what world do you live in that most of your computing doesn't depend on C/C++ code?
Just because you play with a few scripts for your website doesn't mean the rest of your software is written in some crappy scripting language.
Re: (Score:3, Insightful)
The bulk of new development is Java/C# these days. It's for the best really - have you seen the sort of C++ a "Java programmer" will write?
Re:No point (Score:4, Informative)
Some pointers to get you started:
* Really understand pointers.
* Use short names. FortyCharacterJavaNamesAreTheMarkOfTheBeast.
* Efficiency matters (even non-algorithmic efficiency). Veteran C/C++ programmers will find your code confusing if you do something in a needlessly inefficient way, because that suggests something really tricky is going on that made you avoid the "obvious way".
* The right lifetime for an object is usually the scope of the block in which it is introduced. Use RAII (C++ style) or paired "init at the top, cleanup at the bottom" (C style).
* Understand shared_ptr, but don't overuse it. It's not a reason to avoid properly thinking through which block should own an object.
* Use structs too, not just classes. One common rule of thumb: either have a struct with no members private (and no promise of constant validity) or a class with all members private (and promise constant validity). The simplicity of struct is valuable - it's often better to have a struct (possibly with an IsValid() member) than a clutter of accessor functions, despite the possibility of inconsistency.
Re: (Score:3)
C++ is the stick-shift of programming languages, no doubt about it. (And C is the same without a clutch - no problem, you'll always shift perfectly, right?)
Not to go all Paul Graham, but LINQ really is "Lisp invented poorly". I love it for being even that, but c'mon just name the functions "map" and "reduce" instead of making shit up!
Re: (Score:2)
I often get that reaction from people that can't see the difference between C++ and let's say MFC.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Whats that thing they say about poor workmen?
Re: (Score:2)
Google threw out Eclipse to replace it with IntelliJ IDEA as a basis for its Android Studio
Threw out? It certainly seems like they are in the transition, but they also give a pretty strong disclaimer that the new Android Studio might not be ready for primetime, and advises that some might want to stick to Eclipse.
Re: (Score:2)