So long and fare well to the IDE
Posted by postfuturist on 2010-06-26 00:58:11

Netbeans crashed. Again. For the last time.

I'm normally a patient man, but an IDE has only one thing it has to do. It has to allow me to edit text files. An IDE that crashes is worse at facilitating coding than a piece of paper. I've used them and I'm done with them: Visual Studio, Code Warrior, Eclipse, Delphi, NetBeans and a few others.

Somewhere in the last 13 or so years of fooling about with Linux, I found myself editing text files with a strange, and at first confusing tool known as Vim. Now, I'm not a gun nut, but when I reached a certain age, my father decided it was time for me to learn how to fire a real gun. The first time I held it in my hand, I was immediately frightened by the terrible weight of the device. It was a revolver with a long barrel like something out of a Western. I nearly dropped it. It took quite a bit of effort to hold steady at arm's length.

Vim is a grown-up text editing tool. It's no cap-gun, or BB rifle. It's dense and dangerous and powerful. Vim is keyboard driven and minimalistic, allowing the maximal editing power with the fewest keystrokes. As a programmer, it's all I need. Vim has never crashed on me. Not once. It has some of the sugar that the big IDE's have, like syntax highlighting, but it's lightning fast and stable and powerful. Some IDE's have code folding where you can hide parts of the code and expand them with clicks of the mouse. Why?

Click click click is for surfing the web. The keyboard is a much more powerful input tool than the mouse. The mouse is for lazy consumers. Now, I can be a lazy consumer at times. I watch the television. I click and read, click and read, click and watch. But when I'm working, the only click and clack you here is from the keys on the keyboard.

I don't like being a code generator. I don't like typing up boilerplate. I hate copying and pasting. I like small code files, with long names, and a handful of short, declarative functions. I don't like wasting time. Here's the typical way to complete a piece of web functionality in PHP. Create a script, write some SQL code to extract some data from a database, blast some HTML out to the browser. Lather, rinse, repeat. It's boring. It's inane. It begs for a higher level of abstraction.

IDE's are made for human code generators. Oh, you need to write a class that implements some Java interface? Well clickity click here, type a class name, clickity clack there and the IDE has generated a bunch boilerplate: a class definition with a bunch of stubbed methods, curly braces, semicolons. Don't want to look at all that ugly boilerplate? Just hide it by clicking on the code folding mechanism. Now you don't have to look at it anymore. What the hell? Java sucks. IDE's suck.

The job of a software developer is to solve problems where a computer be used to provide the solution. The solution almost always involves the internet and a little thing called HTTP. The goal is the solution, not the journey. The journey should be short, and never should the same path taken more than once.

Everything changes when you take one step back from the human as code-generator and apply your programming skill to solve the problem of having to generate a lot of boilerplate code. I did this at my current job. I saw that I basically did the same thing every time I wrote code to pull some rows out of a database, or update values in a database, or delete rows. So, I wrote a bunch of code that would generate the SQL on the fly and encapsulate all the database calling mechanisms. All it needed was a succinct definition of a database table to generate all that repetitive SQL and perform all the repetitive data munging.

That was a good step for me to take. It instantly made me a more efficient programmer than all my coworkers. There were some limitations to this meta-level programming. I had created a tool to create functionality quicker, but it had some warts. So, I wrote a better version of that code. It became a better tool for rapid development.

After some time, I realized that I was still doing double duty. I would write a database table definition for the database engine in SQL and then another definition in PHP that my other code would use to automate retrieving and storing data in the database. So, I wrote a piece of code that queries the database and generates the PHP table definition.

So when I write code, I can treat arbitrary rows in the database like native PHP objects. Of course, anyone using a framework like Rails or Django already does this, so it's nothing new, but it was for me.

So, back to NetBeans crashing. It crashed. I did a quick analysis in brain of what I got from the IDE in exchange for random instability, and the price was too high. IDE's help you generate code the slow way, by hand. IDE's constantly remind you about the names of classes and functions and help generate scaffolding that you can later populate with meaningful code. What a terrible waste.

I've decided to write as little code as possible from here on out. If I have to do anything more than once, I will generalize it. If some API is difficult and complex, and requires IDE hints to use properly, I don't want to program against it directly. I will wrap it up in a simple, memorable class that has the absolute simplest interface possible to solve the problem.

In the past couple weeks I've written code to make the creation of administrative interfaces with a few lines of declarative code. I wrote an HTML form class to encapsulate, standardize, and simplify form generation, validation, and security. I realized that rock-star coders like the people behind Rails and Django were just coders who didn't allow themselves to become code generators. Instead, they kept building higher and higher level abstractions until they were no longer repeating themselves. With Ruby on Rails, you can create a complete, functional web application by typing in a few lines in the terminal.

In this context, code becomes rarefied and powerful. It is no longer soupy gibberish or half-man, half-machine generated blub. So I don't need the IDE any more. I build abstractions that are easily understandable. I could go sit in the park and design code in a notebook, then go sit down and type it out, carefully, with unit tests and finish in a fraction of the time. Big, ugly languages like PHP, Java, C++ and C# coupled with big, gaudy IDE's do not encourage this style of development. Most of this realization came from spending about a month trying earnestly to learn Common LISP and then a couple weeks messing about with Django.


Comment from Phil:
Cool, I suddenly feel justified in my reluctance to try using an IDE instead of Vim. Actually I haven’t used an IDE since high school, when I was forced to use CodeWarrior—it was a traumatic experience. If you don’t know about it yet, try the % command when the cursor is on a curly bracket. I wish I could travel back in time and tell myself that eight years ago. By the way, I just realized that your RSS feed URL changed. Some of your adoring public might still be watching http://blog.deliciousrobots.com/?feed=rss2 ...
Comment from Peter:
Good for you. VIM is actually a very nice programming environment, especially if you take a moment every now and then to add some things to your .vimrc or learn another feature. I came to the realization a little while back that modal editing is actually a fairly reasonable solution, overall. With a few key remappings, it actually ceases to be a stumbling lock at all, and is now part of my normal editing keystroke flow.
Comment from Gordon Watts:
I've not used vim, but I started with teco, and I've moved to the point where now I use emacs for most of my Linux work and Visual Studio for windows work. The actual editing experience is definately more frustrating in the IDE - but I also find that I get more high quality code written there. All the little tools, for me, end up as a net positive. It probably also depends on what kind of work you are coding. For me, having the .-completion is a huge plus. But I'm at a point in my career that I'm not coding every single day any longer - so I need all the help I can get to see what is there because I rarely can remember the method names, etc. There are lots of little tools like that that make the IDE a net gain for me. But if you know exactly what characters you want to get into the file - well, yes, then I agree, a powerful editor like vim is going to be more efficient - I find myself using a number of text editors rather than the IDE for small editing tasks like that.
Comment from Matt:
I'm not a fan of most IDE's, they all want to do everything for me......and badly. I primarily use gedit only for the convenience of a folder structure, tabs & code highlighting. Code hinting generally seems to slow things down, mainly because you don't learn what its doing just click up and down until you find something that vaguely matches what you think you were looking for, or dreamweaver database management etc. Code snippets are usually just as bad. You can't beat well documented & organized code.
Comment from Digital-samurai:
Try visual studio 2010. it just works! :-D
Comment from dances with code:
>>The mouse is for lazy consumers. You are an idiot.
Comment from Dominic Amann:
Yeah - I have been using vi for years, coding everything from c, perl, c++ and these days php, and Rails. Everytime I try a shiny new ide, it frustrates me by being laggy over the network, or buggy, or both. We use Studio at work, and it would be worth it if intellisense worked all the time, but it doesn't, so I find myself working with the class documents on one screen and the code on another. Just like I do in vi. So Studio is a giant, sluggish, buggy vi.
Comment from Anon:
what the **bliip**! are you serious? You clearly never actually learned to use an IDE properlly! Programmers like you keep the software world innaccessable to everyone! If your half as good as a programmer as you think you are, you will understand that all the functionnalities a proper IDE has and all the tools it offers surpass by A HOLE LOT your precious pearl Vim. Get a real job.
Comment from ncloud:
Hmm I don't see IDEs as being a roadblock to the good development practices you have described. Most let you turn off the boilerplate templating and give you full control. But I do think you are on to something -- when we remove the "crutches" that IDEs provide, whether by disabling or ignoring their features, or by switching to bare-metal editors like VIM, we are forced to think about our code more and come up with useful, meaningful abstractions. Code generation in general is symptomatic of bad- or no-design, whether it's an IDE or a code generation product. If code can be automatically spit, that means there are repetitive patterns that should be isolated and leveraged for reuse.
Comment from MeanEYE:
Have you tried using Geany. I absolutely love it. They say it's lightweight IDE but I really don't see why it's called IDE. It has all the niceties and is lightning fast.
Comment from Stef:
Nice read. I am a fan of Vim, though currently I use it for 'smaller' files / quick editing of files only. Though, I hear your thoughts on IDEs and feel a similar way. There is way to much inside (most) IDEs one does not actually use. This can be changed, but then again it would cost additional time. Have you tried emacs yet? I haven't, got stuck with Vim and love it.
Comment from brian:
Aggh - edit text files is not the clever way to manage and control large projects or even small ones. Yes IDE's are not always the most stable, always wait for the 1st or 2nd service pack before using. For example VS2010 is totaly unusable, as was 2008 and even VC6 before the service packs fixed them. Had to do some PERL the other week, using a text editor - traumatic is the best desciption. Having said that I often use Ultra edit for viewing code while using VS2008 - so guess whatever works for you.
Comment from msskiran:
Vim is beautiful... I love it. Though I am using VS now due to some platform purpose, I would prefer Vim over it anytime. Loved the post!
Comment from vimhater:
Writing code in vim makes me hate life. I've written a large perl/bash/php system in it and wanted to kill myself nightly. Your article, while very accurate for some people, makes other developers throw up in their mouth. IDE's features like code-folding and boilerplate generation are there to help developers develop more rapidly, which is something that is very valuable in todays market. Sure, Java sucks, but when you don't have a choice, what are you gonna do? Write C# in notepad? I dont think so. If I had to write all my code in vim, and meet deadlines, I would blow my brains out. I love my Visual Studio. And for the record, no crashes, no instability, no hate. You may call me names, and say I'm not a real developer, but for RAD theres nothing like a well balanced IDE. That being said, Netbeans sucks donkey dong. Im a VS user.
Comment from elmanu:
well... what about debugging? code browsing? code syntax check? automatic builds? file versioning? etc... oh? you need others tools for that? You can use an ide without touching the mouse too if you want. Sure vim is a great editor. But software development is just not about just editing text files. It's not just about php/sql/html either.
Comment from Oakman:
I hadn't realized that LINUX was so simplistic that it could be hand-coded. Fascinating.
Comment from elmanu:
I agree vim is a great text editor. Software development goes well beyond simply editing text though. You can use an ide without touching the mouse too if you want. But it's not mandatory to learn all the zillions of shortcuts if you don't want too. I started 20 years ago with vi, then xemacs. Had a little go with visualc++, and now I'm using eclipse. It's far from perfect but I won't go back to the stone age. I don't generate code either.
Comment from Dirk:
postfuturist, You need to check your facts. - Vim does have code folding. - Vim does have code completion. - Vim does almost everything any popular IDE does, including things like database access. You can even auto-generate code with it. What VIM does not do is: - Crash - Spoon feed the developer. - Force you to use development practices that don't suit your development environment. - Force you to use the mouse for managing text, although you can if you want to. - Force you to use <insert language/tool/ideology/methodology/idiocy here> Vim does not have the following features: - Carpal tunnel syndrome - Coffee - Sympathy for those not willing to RTFM. A lot of this goes equally for Emacs. The difference between vim/emacs and just about every other IDE out there is as follows: An IDE gets inexperienced developers a productivity boost. They are easy to learn and hide a lot of the development details but they come at a cost to the experienced developers. Experienced developers will find that their productivity is hampered by an IDE. Now, with things like VIM and Emacs, your training and competence becomes a factor of dedication and interest. Your productivity is a function of your experience and peripheral tools, as apposed to the methods imposed by an IDE. In simple terms, you get to a top level of productivity with an IDE, regardless of experience and knowledge. With Vim and Emacs... your productivity is limited only by your knowledge and experience, not the IDE.
Comment from elmanu:
I agree vim is a great text editor. Software development goes well beyond simply editing text though. You can use an ide without touching the mouse too if you want. But it's not mandatory to learn all the zillions of shortcuts if you don't want too. I started 20 years ago with vi, then xemacs. Had a little go with visualc++, and now I'm using eclipse. It's far from perfect but I won't go back to the stone age. I don't generate code either.
Comment from Gatuus:
NICEEEEEE!!!!!!!!!! I'm nothing but pleased with this article!! by the way, there's another framework worth to mention: Symphony. =)
Comment from drozzy:
Even though there was no new information in this post, for some reason I enjoyed reading it. By the way, welcome to the django community!
Comment from Diogenes Mota:
I understand your point. Yet, as you said, the market mediocracy somewhat pushes us to use heavyweight languages in which productivity can't be achieved without the proper IDE. Moreover, the proper developer must understand what he is doing, understand what is happening inside the machine process, at some degree, for making optimal codes. IDEs usually hide it from the developer. Good point in your post.
Comment from Jason P Sage:
Nice Article... Now I'm not a VIM buff - but the sentiment is well appreciated, spot on and I enjoyed seeing another person aside from myself who praises the keyboard over the mouse for "real work". Shortcuts? AWESOME! Changing them version to version of a given software? (Microsoft? Cut it out! It's not productive!) IDE's that Crash? Annoying. My stock and trade Win32 Editor? TeraEdit ( Color coding, free, lightweight, programmable syntax coloring - limitless languages and a working recording macro thing plus COLUMN editting - the CORRECT kind) Linux Fav? Console? Nano Linux Fav GUI: KWrite Though Eclipse is sexy ... for both windows and linux but it's become quite bloated in my opinion.
Comment from Rick:
I'd fire someone for only using vim or emacs when writing C# or Java. You're just not going to be as productive as you are with an intelligent IDE. You might want to check your system if you're getting all these crashes. I rarely have Netbeans, Eclipse, or Visual Studio crash on me
Comment from whiner:
If you can't differentiate between a text editor and a development environment, enjoy making small software by yourself. If you are having so much fun with (((LISP))) you should certainly move on to Emacs.
Comment from Mem:
Well, i think this will lender itself into its own IDE - good luck
Comment from Niam Krawt:
So, to sum up your rant is about: - Poor tools (NetBeans) - Good tools with limited use/language support (Visual Studio) - The poor state of text-based programming - How it is just as easy to use a good editor like Vim - Why everyone should take the road less travelled and learn some more advanced tools/techniques to make themselves better at something Did I miss anything? I happen to agree with you 100% BTW.
Comment from DTA:
Actually, an IDE is for integrating your development environment with some nice tools. Text editors are good for editing text files. Have you tried notepad.exe or nano? Guess what your minimalist class is to everyone but you? Did you guess 'opaque interface'? If not, you guessed wrong. I guess people working with your code will just have to fire up an IDE to help pick it apart and figure out what's going on when they have to mess with it - oh wait that won't help because you said so. Hum, I guess you can just write all new software in Python and LISP until the end of time so nobody else has to bother with messy learning and understanding. That's the best solution, surely, since the world revolves around your methods and 'tools'. It's also hilarious to me that you complain about something crashing and then hold up RoR as a shining example of how to do something right given the significant performance and stability problems they've had. It's OK, I'm sure you used vim to write a script that chron runs to restart the RoR server so you don't notice anymore.
Comment from John:
hmm. One wonders why you don't go back to DOS or a Unix/Linux without a graphics environment. Heck, why did they spend all that time in the first place to develop them...
Comment from A Real Coder:
If you proof-read your code as well as you do your postings, you're probably fixing a lot of bugs...
Comment from Roy Green:
I am a beginning programmer. And I have tried Netbeans, Visual Studio and other IDE's to learn. I found that I spend too much time learning the IDE and the auto generated code takes too long to figure out for a beginner. Now I use Notepad++ and now I can concentrate on learning programming. I will give Vim a try. Thanks for your Blog.
Comment from Dave:
I remember a dotNET project I was involved with a year ago. My old MSAccess skills was often joked about. However I looked at a lot of the code we were generating and I made a comment that 90% was the same code but for different forms/tables etc. It took me about a week to write a MSAccess application that read the DB and then produced the SQL, Stored Procedures, Business Logic, and Forms in C#. Ok.. Its not an IDE but taking a step back and looking at WHAT you are creating rather than HOW you are creating it means that you can take more time with the design. And it cut down the grunt works to a button push.
Comment from Bob:
I think I love you!!! When forced to interact with NetBeans or Eclipsef or CodeWarrior, I still do all my editing in gvim. Everyone thinks I'm nuts. When they ask me why, I say that vi is in my fingers!
Comment from Jure:
Amen, have my own little generic jar, that is traveling with me for the past 5 years and growing by the month. I used to be (still am I guess) a C programmer and vi(m) was the only way to code. I do work with IDEs, some by my own choice some mandated by the customer (sigh), but ultimately I find myself reverting to vim when fed up.
Comment from todd:
you'll be back, don't worry. Take time to learn your IDE, it actually does help you. Don't fight it.
Comment from David Weber:
Editplus. It doesn't crash and blows VIM off the map. I've tried just about everything over the years. Some, like vedit, i need for looking at EBCIDIC or other code. Some, like binary editors, I've used where I had to do that type of editing. Bitmap editors for bitmaps. VIM is fine, and it may be able to do this now....let's see you highlight rows and colums in the middle of the page and paste it to the middle of another. But it couldn't a few years back when I used it.
Comment from Misha:
Good IDEs are far more powerful than any text-editor can hope to be. I've used Delphi and Visual Studio for over 10 years, after coming from a Unix background, and would never go back. Visual Studio with Resharper just shows how extremely powerful an IDE can be. Using "boilerplate" code is not a function of the IDE but rather of software design - no IDE forces you to write repetitive code. And some of us develop software where neither the web nor a database is the main focus. In 20 years of software development I have managed to all but avoid anything reliant on HTTP, but then again, I develop software for the corporate sector, not consumers ;-) One last point - you can try to be a jack of all trades, learning lots of languages and swapping between them, or you can master a small number of related languages and frameworks in depth, but you cannot do both. In some respects, the second of the two is harder and can be more rewarding.
Comment from Koos Fourie:
I assume you also use a horse to commute to work as a car might breakdown now and again.
Comment from Wtf:
Man, thats just ridiculous. I've used couple versions of Delphi then couple of versions of Visual Studio. Those are awesome tools! Saying that features like IntelliSence or call hierarchy are pointless and made for lazy people is just LAME. And if you call reinventing a wheel a measure for increase coding speed then sure you don't know what a deadline means.
Comment from Wtf:
"well... what about debugging? code browsing? code syntax check? automatic builds? file versioning? etc... oh? you need others tools for that? " Well said!
Comment from Scott:
I hate IDE's as well. I hate mice. They slow me down. I use vim for all my development. If I'm learning a new language I may use the common IDE that tutorials walk me through, but once I feel I have the grasp of a language I revert to VIM. Even for .NET. Gvim works on windows. As far as the Visual Studio Dependants are concerned, there ARE equivalent utilities IN vim already. And I have yet to see one of them integrate with VCS's well at all. I like the linux utility mantra. Do one thing and do it well. VS the Windows mantra: Try to generalize everything for everyone, oh, and do it fairly well. Oh and I didn't read all the comments, but vim has code folding too. :help fold-syntax
Comment from David Green:
Not having yet perused your blog / article (yet), I have one thing to say, which is probably true: Welcome to the real world -- not being distracted by gadgets, colours and widgets, etc. :D
Comment from Eric Cox:
This is just silly. I don't know about Netbeans, but Visual Studio only crashes perhaps twice a month for me, and I use 2 or 3 instances of it at a time, all day long. I've never lost a single keystroke of work due to the crashes. The time I save with Visual Studio is well worth a couple of nuisance crashes a month.
Comment from anon:
@Rick - Where do you work, I certainly want to avoid working there. IDE's do have nice features, but I find them mainly beneficial during debugging. Code browsing is awesome while becoming oriented with code, but generally when I get to the programming I already know what I want to do so it isn't as much a factor then. I don't think the mouse is for lazy consumers but get the sentiment. I type 100+ words a minute at about 98% accuracy, anytime I interact with the mouse it slows me down.

    Leave a comment: