Skip navigation

Monthly Archives: March 2008

You would think a framework like ASP.NET, as big and popular as it is, would get the little things right.  It’s so simple, all I want to do is put an anchor around a button with an onclick.  Unfortunately, the anchor tag needs to be a server control because the onclick is generated dynamically on the server.  For whatever reason, .NET adds the path to the user control to the anchor tag’s href (if you don’t enter an absolute path yourself).  So for instance, all I wanted was #search for an anchor link.  .NET outputs it like so: http://serverpath/usercontrolpath/#search.  So ridiculous, I googled around and didn’t find much.  I ended up having to put the absolute path to the page and then the anchor.  Again, it’s so simple yet they (again) didn’t get it right.

It is very important that the Development Environment a programmer uses in his daily duties is as pain free as possible. The more irritating an IDE is, the more you’ll hate all the work you do with it. I have found that Visual Studio is a big pain to work with. Since I have started using Eclipse on Linux I have seen that not all IDEs are as painful as visual studio. I am going to discuss in detail my comparison of Eclipse and Visual Studio.  Below is a detailed list of the categories I think are important in the overall experience of an IDE.

Install / Setup / Plugins

Installation may not seem like an important thing to discuss about an IDE. You are probably thinking: “Meh, I only have to do it once.” It is still a part of the overall experience, and you’ll see why I decided to discuss this momentarily.

First, I will discuss the Visual Studio install. As far as Microsoft installers go, this one is very straightforward and simple. As a matter of fact, random people talking about how awesome Visual Studio makes their lives, it’s actually a very good installer. My only gripe with it is the fact that it takes so long. Even on a high end machine it will take at least an half hour, maybe an hour. That’s only the initial install. After you’re done installing that, you then need to pull down the 400MB SP1. SP1 takes more than an hour to install, even longer if you have Team Suite. Not to mention the fact that the service pack doesn’t seem to do much. I didn’t notice any improvement over the vanilla version.

Next we’ll talk about the eclipse installer. Oh, wait, there isn’t one! If you are an Ubuntu / Debian user, (or you have a package manager like yum), you can install through your package manager. The problem with that is the repositories contain an older version and most plugins require the newest version. So, I’d recommend “installing” manually. I say “installing” because all you have to do is download a tar file and extract it. Oh yeah, the whole thing is like a 60MB download. I think Visual Studio starts at around 2GB. Once that is done, you can find all the plugins you want using the update manager (help -> software updates -> find and install). Even most third party plugins have their own update site. All you have to do is grab the URL, paste it in and bam! You can install the plugin. It is even very good at managing dependencies.

So, to summarize, the install process for Eclipse is obviously a lot quicker. Also, because everything you need for the IDE exists in one folder, you can easily back up your IDE by archiving it and throwing it on a pen drive or something. That way, if you ever manage to screw it up, all you need to do is delete your messed up folder, and paste the old one back in. Just remember to never store your source files in the Eclipse folder.

II. Performance

Performance is vastly important when it comes to an IDE. Because we developers spend so much time in the IDE, performance issues can really get under our skin. Visual Studio is absolutely dog slow. Most of the projects I work on are pretty big (the one I’m on now has about 17 projects in the solution). However, they’re not so big that you would expect anything to slow down. I worked on one solution that had 75 solutions in it, and it was absolutely unusable. Now, that solution had no business having 75 projects, I will admit that.

We use Team Foundation at work, which is okay. Just like any other Microsoft product, it leaves something to be desired, but it works. It’s actually really quick. Getting the latest version is very fast (although sometimes doesn’t actually get the latest version of the files you select, go figure). However, when everything is done downloading from the server, projects (and sometimes the solution) have to be reloaded. When many projects are updated, this can take well over a minute.

Here’s my biggest issue with Visual Studio, right here. Opening a markup file such as an .aspx or .ascx file, is retardedly slow. It can hang anywhere from 20 seconds to a minute. Absolutely unacceptable, it really is. When I’m dealing with a bunch of markup all day long, the last thing I want to do is sit around and wait while Visual Studio does god knows what “behind” the scenes. Oh yeah, again, Microsoft, what ever happened to multi-threading? Not only that, it doesn’t even show some sort of messaging to let me know it’s doing something, it just hangs. Classic Microsoft.

Now on to Eclipse. In general Eclipse is very very quick. Start up of the IDE is similar to Visual Studio I think. However, once in the IDE there’s no comparison. Eclipse is a lot faster. Loading an html file takes zero time. The WTP plugin for Eclipse even runs through all of your files and validates the HTML / JavaScript / CSS. Oh yeah, and it uses something called a background thread, fancy that. Not only that, it shows a message at the bottom with a progress bar letting you know it’s validating. This is something Eclipse does every time it’s doing anything that may interrupt you. It will tell you what it’s doing and usually give you a pretty accurate progress bar.

I admit I have seen eclipse freeze up at times, but usually it’s because I did something stupid. There are very rarely any hangs of any kind, unlike Visual Studio which hangs very predictably. So, Eclipse wins this round as well.

III. Customization

Customization is very important because, I don’t know about you guys, but I’m very picky about the way my IDE is organized. This is one category that I can’t complain about on the Visual Studio side. Visual Studio is pretty customizable. Microsoft made it easy to put your tool windows and whatnot wherever you want and dock them how you want. I like my left monitor to have only my editor window, and the right to have all of the tool windows such as Solution Explorer / Source Control browser etc. I like to have different layouts (or perspectives as they’re called in Eclipse) and Visual Studio kind of supports this, but it’s a hidden feature. There are a couple of macros that allow you to save your layouts, so you have to set up keyboard shortcuts to macros to make this work.

The one annoying thing is the “springy” tool windows. Especially if you hide a window like the errors window. Whenever there’s a parser error or warning the stupid thing springs out. This even happens when you’re TYPING in an html / aspx /ascx file. How can you validate if I’m still typing Microsoft?? Also, Visual Studio makes it easy to color your code the way you want to. It even throws in a nice import / export feature for all of your settings. And as a bonus a bunch of people have created color schemes for Visual Studio that are very good.

Eclipse is very similar in the way it handles customizing the UI. You can easily dock and move the tool windows anywhere you like. It also has built in and readily apparent support for perspectives. This means you can create a layout you like for one language, and save it, and then switch to another project and use another layout very easily. It comes with some basic built in perspectives that are good. Also, when you install new plugins a lot of them come with their own perspectives.

Eclipse also has support for importing / exporting color schemes. Which is nice, but nobody has created any color schemes (that I can find).

IV. Source Control / Team

Source control, very very important. Every developer knows this. And just as important as keeping your source uh, safe, heh, is the manner in which the source control plugin for your IDE works.

Like I said before, Team Foundation is pretty good. It’s definitely a lot better than Visual Source Safe. I guess I shouldn’t say pretty good, I should say better than Source Safe. But, I think a file share is almost better than Source Safe, so… The biggest problem with TFS is the way it handles workspaces / getting latest. I don’t know why this happens, but sometimes you get latest version, and it skips files or something. Because someone will fix something, I’ll get the latest source on the entire solution, and it doesn’t really get the new file. I have to do “Get specific version” and force a get on all files. I don’t understand why this happens, it’s so simple, download the mfing file. Also, in TFS there is no easy way to find a changeset. You have to go to “Get specific version” pick by change set then click find. Once you do that there’s a great search tool, but it’s just so annoying to get to.

I almost forgot about the worst part of TFS, conflict management. If you can call it that. A coworker literally showed me a conflict TFS complained about today where he had added a newline before an ending curly brace and TFS didn’t know what to do. Simply stunning. Conflicts are seemingly random, some things it knows how to merge perfectly, others it just runs away screaming. “WHAT DO I DO??? YOU ADDED A SPACE ON A LINE SOMEONE ELSE CHANGED!!!!!!” Seriously, I don’t know how they managed to make such a terrible conflict management system.

The rest of Team Foundation is okay. It’s pretty straightforward to add and manage tasks / bugs. There are a few quirks (the worst being this one). For the most part it works really well. It deals with links very oddly. When you click a link it launches IE inside of Visual Studio, regardless of your default browser setting. When you try and select a link to copy it, it opens in IE inside of Visual Studio, awesome.

Again, Eclipse wins. I use the Subclipse plugin, which is a plugin for Subversion. Subversion is very good, it’s fast, it’s simple it’s free. It can do everything Team Foundation source control can do it does it better. It’s really easy to get a project and to add a project to the repository. You can deal with multiple repositories at a time (unlike TFS). When you to an update (get latest in M$ speak) it actually gets the latest version. There’s an on the fly conflict view that you can have a look at that shows you where differences are between your file versions and the servers (TFS has nothing like this, and it’s very handy). I have never seen a conflict in Subversion while using Subclipse, I’m sure they happen, but the project I’m working on only has two active developers at the moment. So, I can’t really tell you how good or bad Subversion / Subclipse is at dealing with conflicts, but the diff tool is very good!

V. Integration

Well, Visual Studio’s section on this is pretty simple. If it isn’t Microsoft, it’s not in Visual Studio. Obviously, everything you do in Visual Studio involves .NET, or SQL Server, or MS C++.

This is where Eclipse really shines. I have used plugins for C++, the Web (html, css, JavaScript, DOJO and more), Python and PHP. They are all very good, easy to install, and easy to use. Check it out, you can even get a C# plugin for eclipse. Add another win for Eclipse.

VI. Conclusion

Well, there you have it. Eclipse is the winner. In pretty much every area I can think of, Eclipse beats out Visual Studio. If you’re doing .NET you’re pretty much stuck with Visual Studio. If you can settle for Mono, Monodevelop has come a long way. I am actually trying to get away from .NET and do some open source work since I have started to use Linux so much. It’s nice to build applications that run on more than one OS. Also, I do a lot of web work and I have discovered that ASP.NET definitely isn’t the best tool for the job. Yes, C# is probably just about the easiest language there is (Visual Basic doesn’t count, it’s not a REAL language), and the .NET Framework is very well organized, but even still there are a million ways to accomplish your programming goals. As far as development environments go, Visual Studio is definitely not the best.

I had recently been experiencing an issue at work that was driving me nuts. I first discovered this issue when I tried to open an attachment in a TFS work item. One of our QA people had kindly attached an image so that I can see the problem in action. I double clicked the attachment and was presented with an error message. I can’t remember the exact wording, it was something along the lines of “No type handler specified for the operation.” The other way this issue manifested itself was when I tried to open IE, and type in an address. It would open the URL I typed in FireFox…from IE…WTF? I also noticed clicking links in Outlook and Google Talk did not launch FireFox.

I immediately remembered that I had installed a standalone version of IE7 so I can test in both IE6 and IE7. I’m pretty sure that is what messed me all up. So, I uninstalled the standalone IE7. That didn’t help at all. I tried resetting FireFox as the default browser. Again, the problem still persisted. I tried setting IE as the default browser, didn’t work.

I then did some googling and I found that there’s a file type in Windows called “(NONE) URL:HyperText Transfer Protocol” and also another for HTTPS. These two file types were the cause of the problem. If you go into folder options then the file types tab (why are file types under folder options??), pick the above type and go to advanced, there needs to be an open action. The standalone IE7 (or MultipleIE’s, not sure which did it) removed this action for whatever reason. Once I associated the open action with FireFox, everything went back to normal.

Now, the thing that really bothers me is I googled the original error message and found a bunch of crap that was totally unrelated to my problem.  It must have been a very generic Microsoft error message.  Why can’t they help us out and in that instance, when you can’t launch a file from a work item, tell me why, I wouldn’t have wasted literally hours of my time at work.  I even had to bother other people to open the attachment and send it to me.  Thanks Microsoft.

I recently booted into Windows for the first time in I don’t know how long (I wanted to play some Oblivion). As usual, it took me a couple of minutes to start up and get to my desktop. However, once I got there, my machine was almost unusable. Everything was dragging, even just browsing around in Windows Explorer was slow(er than usual). I opened up task manager to see what was going on. Something was eating up 100% of my CPU about every 4 seconds or so. The culprit ended up being the Windows Media Player 11 background service.

This is the process that deals with keeping your music library up to date and apparently searching your network for other instances of itself. I then remembered I had recently moved all of my music from my Windows partition over to my Ubuntu partition, because I rarely use Windows. So, basically after having removed all of my music, Windows Media Player had no idea what to do with itself. It just went berserk trying to find where all its music had gone, leaving my computer completely unusable. Needless to say I killed the process and disabled the service.

Interestingly enough this isn’t the first time this process has caused trouble.  After I left a job recently, there were complaints about my old machine continuing to generate network traffic. This process turned out to be the guilty party.

Today’s lesson, don’t use Windows Media Player 11.  It’s an okay media player, although like anything else Microsoft it is annoying, but the stupid background process isn’t worth the trouble.  I have recently re-downloaded Winamp which works nicely.  For me, it isn’t such a big deal because 90% of the time I use Ubuntu which has Rhythmbox (and a slew of other choices).