Needing an IDE should be considered a language smell

I’m a long time Visual Studio .Net (VS.Net) user – I have worked on the Microsoft .Net platform for a long time and have used the VS.Net tool during that time as my primary integrated development environment (IDE). It’s an awesome tool that has got better as the .Net platform progressed and matured with awesome features like code-completion (one of the first IDEs that had this), interactive debugging, refactoring and one of the most comprehensive documentation tools (MSDN) in the business.

What was frustrating, however, was that to write a simple program, I needed to fire up VS.Net (which is this huge beast of a program that used a lot of resources). On the other hand writing your code in Notepad and then compiling and linking from the command line while interesting was, in my opinion, not practical. I found myself looking for the code completion features and searching Google for C# keywords and .Net API syntax. Using Notepad seemed too difficult so I tried to compromise and I started looking at other “lighter” IDEs like Sharp Develop, Komodo Edit and Mono Develop to deal with this problem. But that meant having to learn my way around the new IDE with different keyboard shortcuts and user interfaces. The mental switching needed to work on another IDE was too high a barrier and despite several half-hearted tries I always found myself going back to VS.Net. The massive footprint of VS.Net was something I decided to ignore to avail myself of the many tools that made coding in C# easy.

Recently, I changed jobs and suddenly I was on Linux and programming in Ruby. I was apprehensive and I searched hard to find a replacement for VS.Net. I found Eclipse to be a bit too bulky and heavy, it was too much like VS.Net – resource hungry :-) Net Beans looked promising but then its community decided that Ruby and Rails support was not a priority which disqualified it for me. After some more looking I concluded that the Linux way seemed to be to use general purpose text editors like Vim and Emacs and customize them to ones specific needs.

Faced with coding without –  “gasp” – a proper enterprise IDE and having to learn Vim or Emacs – I decided to start of with a simpler text editor first. After looking around a bit more I settled on Red Car which is a JRuby open source editor that was copying TextMate (which I had heard was the editor that all the hip Ruby people used) and resigned myself to a drop in my productivity…

Surprisingly though this did not turn out to be the case. I was certainly writing less code but amazingly I was still more productive in Ruby and Rails than I was in C# and ASP.NET in terms of the amount of work done. Despite the lack of an IDE, I found the Ruby syntax to be concise and extremely expressive (I have a separate post on what I love about Ruby) which made it easy to code without having to resort to code completion or similar niceties. More importantly I found reading and understanding code in Ruby to be vastly easier than C# and I found myself not needing the features provided by VS.Net to get a mental model of the code base.

The more I worked with Ruby, the more I liked this way of working and I had a personal epiphany about programming language design. Some languages like C# or VB.Net, forced you to have a IDE just to be able to code in them, while others like Ruby let you simply code. This is because coding in a language like C# involves a lot of ceremony – you needed to write a lot of stuff to help the compiler understand the code – while Ruby tries to get out of your way and just let you code. The terseness and expressiveness of languages like Ruby allow programmers to easily keep larger amounts of functionality in their head.

This particular characteristic of languages should be recognized as a smell – just like a code smell… If you find yourself firing up an IDE as the first step, when you want to write or read a program in a particular language, that is a language smell. It indicates that the language is probably not at the right level of expressiveness for the problem it is trying to solve. To be clear, this particular postulate should be considered in terms of the language design and of course should not be the only way to choose a language. But, it certainly should be an important consideration, IMO,  especially since the language you choose will be something that you will be something you are going to spend most of your waking hours using and more importantly trying to understand.

I think if you come in at the start of your day and it takes you less time to load your code, read and understand what you have written and get into your coding zone, you are definitely going to be more productive, than if you have to fire up a program, wait for a while for it to load and then jump around several files to get your mental model back in your head to start coding. And if you have chosen the language you are using wisely, you will be more productive and in my case a lot happier as well.

Advertisements

4 comments on “Needing an IDE should be considered a language smell

  1. Pingback: 400 days of Go

  2. Powerbuilder/Delphi were used to build desktop apps. They failed miserably at web applications. While building desktop apps, the designers can be a boon, but ultimately, they tend to be detrimental to productivity. My point was exactly the one you mentioned. VS.net hides everything from the developer and sort of hand holds him through development, which somehow stinks. If your code needs IDE, then its fishy. On the other hand, you have an IDE you wish to use to edit and browse through source code, fine.

    I think a quick way to determine smelliness would be to look at build and deploy scripts. If they are needlessly convoluted, it is an indication of bad code organization. Well organized code is a pleasure to read.

  3. If you have a significant code size, I’d much rather have it organized into projects and have some help from an IDE. If the code is well organized, my filesystem will serve as an organization tool, but the ability to quickly jump to declarations etc are quite nice.

    I don’t like the code to be IDE dependant though. eg: Eclipse. native eclipse java projects _require_ eclipse to open and compile them, as opposed to say Netbeans ( which always generates an ant build script )

    I find visual studio to be a useful tool, but I don’t like how it shields developers from basic build tools. Again, my reference is Netbeans here. You get an ant build script with netbeans. You need to understand that you are using Ant underneath and Netbeans is just sugar coating. Visual Studio doesn’t require you to do those things. So when a quick edit and compile suffices, VS is inefficient.

    As long as the code is not IDE dependant ( having a favorite IDE is different ), its nice.

    • Hey Ashik,
      Even in VS.Net, like NetBeans, you actually use a build tool to build your code, but the difference I think is that NetBeans uses an industry standard build tool which can easily by run by itself but VS.NET’s build tool is not easy to download and use separately.
      I can think of some languages where using the IDE is almost a pre-requisite – Powerbuilder and Delphi are a couple that come to mind… It’s interesting that most of them seem to built by companies that are also selling development tools :-)

Comments are closed.