Programming Editors Reloaded
Many years ago when I was still a junior disciple, I had a fetish for trying out different programming text editors. I was always on the hunt for that ultimate code editing program. Various times I would fall in love with a particular editor and stick with it for a significant time period, until I would eventually get curious and try a different editor just for fun.
I've tried and used Sidekick Notepad, Brief, Multi-Edit, Codewright, the Turbo C IDE Editor, vi, emacs, Visual C++ 2.0 IDE, notepad, metapad, notepad2, TextPad, UltraEdit - you name it, I probably tried it.
In the early to mid 90's, right before Windows 95 came out, I had to use Unix at work, and my primary editor was vi. Ugh, I didn't like it at all. It was tiresome shifting from cursor mode to edit mode. But after a year or so, I got so used to vi it became second nature and I learned to love moving the cursor with the hjkl keys. What makes vi unique is that your fingers never have to leave the home position (other than when you're pressing Esc to switch modes), which is kinda nice. But I always wondered why Unix didn't have those pretty, easy to use editors that Windows and DOS had.
During my free time at work, I taught myself Windows programming. Man, the Visual C++ 2.0 IDE was so pretty. And it was revolutionary at the time, imagine an IDE running in graphics mode! And you could design dialog boxes visually and such. I was used to running Turbo C under DOS, and while it probably ran faster and enabled speedier edits, the Visual C++ IDE was so pretty that I knew I had to develop for Windows 95.
Prior to that, for all DOS work I used Multi-Edit and enjoyed every second of it. That was a fantastic DOS app. It had this thing called 'syntax highlighting' which at the time was extremely cool. The language keywords would be displayed in different colors, to make reading source code easier. You can also integrate your own makefiles and scripts in Multi-Edit. So to build your project, you just hit a hotkey (I think it was F5 or something) and it would run make, compile and link your program. You never had to leave the editor. I still have fond recollections of Multi-Edit.
That said, Codewright was probably the more popular of the two, and Codewright might have been first. I tried Codewright once but I guess I was so used to Multi-Edit that I never had the desire to switch to another editor.
Going back in time further, back when I was in college, for some reason I enjoyed assembly language programming. It was challenging and I had the feeling of power, as if I controlled the whole machine, no compiler came between me and the CPU. You could get real intimate with your computer when coding in assembler. One mistake and you crash the whole system (it was DOS ok), and you define your memory and register usage to the very last byte. It also gave me a sense of pride when I completed an assembler program. In this case, my favorite app to code were TSRs, also called Terminate and Stay Resident programs. So you run your program and it would stay alive in main memory.
My favorite editor for editing assembler code was curiously enough, a TSR program called Sidekick. Oldies will remember this. Back then, DOS could only run one program at a time. But by using Sidekick, you just hit a hotkey and a popup notepad editor would appear. You type in your code in the popup editor, save it, then escape back to DOS leaving the editor present in memory. Then you could run MASM to assemble the code, test, run, repeat. Using Sidekick Notepad saved me a lot of time and I still have fond memories of using it.
In my Unix job, I would occasionally have tasks writing DOS utilities in Microsoft C. Before I became a diehard Multi-Edit user, I used this lightning quick editor called Brief. Brief was great, it had unlimited undo which was state of the art at the time (Multi-Edit I believe went further by providing unlimited undo and redo). Brief also ran very fast. I created a shortcut called 'b' so to edit a file quickly I just typed "b foo.c" and the editor would appear instantly.
Later on, after I moved on to Windows development jobs, I sort of lost track of my obsession for programming editors. I stuck to the Visual Studio IDE, it was good enough for me. If I remember right, I think I liked Visual Studio 4 the most. It was no-frills, ran fast, you could access the library reference within the IDE. Some stuff in Visual Studio 5 and particularly VS 6 annoyed the hell out of me. I don't even remember the exact reasons why but I think it had to do with the Find in Files interface. Actually I take that back, VS 5 was ok but I still miss the simplicity of Visual Studio 4.
I went through my Linux and open source phase in the late 90's. I wanted to try something new. It felt weird going back to vi. I even used vim in Windows instead of notepad for quick edits. Vi worked good in laptop keyboards, especially those where the arrow keys were out of reach. You see, in vi you can get by with the hjkl keys for navigation and never use the arrow keys. I also used emacs extensively for several months. I always read about these Unix diehards that promoted emacs as the greatest IDE/editor ever made and wanted to see what the fuss what all about. You know, up to now I still don't know what the fuss is all about. I guess the one good thing about emacs is that you can program LISP in it. But the key bindings were just too weird and hard to remember for me (Ex. Ctrl-X, Ctrl-C). I forced myself to use it for several months, but I found myself more productive in the Windows text editors.
Windows editors have one huge advantage over Unix editors such as vi and emacs. In Windows, you can selectively highlight a section of text and type over it to replace it with some new code. So for instance, when I want to replace a certain word with another word, all I have to do is highlight that word and immediately overwrite it by typing over. In the default vi and emacs modes, you need to two keystrokes to do this: 1. select text, 2. delete text, 3. write new text. I later learned that emacs had a 'select-overwrite' mode that emulated Windows editors, so indeed it was possible in Unix text editors, but it wasn't obvious.
Another huge advantage that Windows editors had was that you can use the numeric keypad arrow keys PgUp, PgDn, Home, End, Ctrl-Home (go to top of doc), Ctrl-End, Shift-Home (select up to start of line), etc. This just felt so natural for me to use. I use the numeric keypad arrow keys, PgUp, PgDn for all my navigation. You could do this in vi and emacs, I guess but this would entail remapping the keys. The actual keystrokes to do Home, End in vi and emacs were a bit more obscure.
I learned later on that most people don't use the numeric keypad arrow keys at all, to my surprise. Most people use the inverted T-Bar arrow keys. These were usually young people who grew up on the larger 101-key keyboards w. I grew up using those old IBM 83/84 key keyboards which didn't have the inverted T-bar. You just had the numeric keypad arrow keys and that was it. And I'm glad I use the numeric keypad as I can outrace anyone using the inverted T-bar in navigating a document.
I eventually gave up Linux after getting frustrated installing simple stuff such as Apache, Perl, and MySQL, and getting the those programs to work with each other. I figure this is much easier now because Linux distributions have come a long way since then. But Windows (as well as Mac OS X which runs on BSD) is also so much better now that for me it doesn't make sense to work in Linux unless you want to do it as a hobby. I said goodbye to Linux and went back to my old ways in trying out different text editors. And I experimented with a lot of freeware stuff which I still use today.
My current favorite quickie editor is notepad2. It is a notepad replacement that has syntax highlighting for all the popular development languages. It also has a regular expression search which is handy since notepad doesn't have it. I used notepad2 extensively for coding in python. The limitation is that it can open only one text file at a time. Notepad2's goal was never to become an ultimate programmer's editor, it just wanted to be a quick and simple text editor for the masses, which suits me just fine.
I also have metapad, another notepad replacement handy for typing in notes and editing non code files. I don't know why I still use metapad when notepad2 will probably work fine. I guess it's just force of habit that I use notepad2 for quick code edits, and metapad for quick non-code edits. Probably another reason is that I leave word-wrap enabled in metapad, while leaving word-wrap off in notepad2. That said, I know it doesn't make much sense using two different notepad replacements.
I tried TextPad and UltraEdit-32. I'll probably buy a copy of UltraEdit and make this my mainstream heavy-duty code editor. The big downer for me in using TextPad is that the keyboard shortcuts and non-standard, for instance, typing Ctrl-F to find a word doesn't work. And I don't think it has syntax highlighting built in.
Most of my coding stuff is still done in the Visual Studio .NET IDE. Sometimes I use VS Projects and Solutions, but for most of my work code, I just open the files in VS.NET without a Project, then do the compilation in a command-prompt window. The reason for this is that usually in production environments, the build scripts are separate from the IDE, so you have to compile the code on the command-line (usually typing in an alias or batch script to compile the whole thing). Believe it or not, there are many days when I don't use VS.NET entirely, and just use
notepad2 to edit and modify code. Usually when a program is in maintenance mode, I prefer to do quickie edits and forego the heavy duty IDE. That said, I plan to shift to using UltraEdit for both quickie and extensive edits.
That's a lot of text editors we've covered. But I haven't mentioned my current fave. This is what I currently use now at work and it's great. In fact it's not just an editor, it's a source code analyzer and editor in one package. I've gotten so attached to this program that I don't think I can code without it. It's called Source Insight and I highly recommend it. If you've never used an Editor/Source Code Analyzer like Source Insight, you're in for a huge treat.
Say you're tasked with maintaining a large codebase that you know little about. Or if you're modifying some of your old code that you've already forgotten and haven't touched in years. Source Insight will help you out. It's like having dozens of helpers assisting you in your code as you type. Move the cursor over a function and it will display the function definition in the lower pane. No more grepping around to look for where the function was defined. Or say, you want to know more about a particular struct variable, where it was defined, what are its members, etc. Source Insight does this for you, just move the cursor over the variable and it tells you more information about it. I estimate that I am four times more productive in maintaining code using this software. Source Insight is jampacked with all sorts of practical features.
Some other good stuff, it actually makes the code easier to read by enlarging and highlighting different sections of the code. For instance, function names are displayed in a huge font and in a different color, emphasizing the function name over its body. I remember editing in Source Insight for a week or two, then going back to Visual Studio. It was scary because the VS editor looked so dull in comparison. I knew then that I couldn't go back to using a 'normal' programming editor after that.
More cool stuff, you can traverse through code much more easily. For example, hit Ctrl-= over a function call and the editor will automatically open the function definition. I understand this can now be done in Visual Studio but only if you have the whole Solution open. If you're maintaining a huge codebase that doesn't have Projects and sln files set up, then you're out of luck. Opening files are easier too. No more hunting around in the various folders looking for source files. Just add all the source files to your Source Insight project, then hit Ctrl-O, type in the filename and it will highlight the file to open as you type. Such as a simple feature, but it makes a big difference when editing lots of source files.
I heard the SlickEdit editor/analyzer is also popular and has a similar featureset so you might want to check that out too. I haven't used it myself as we don't have a license for it at work. But the SlickEdit demos are pretty cool, and it will give you an insight on the power of what next gen code editor/analyzers are all about.
For me, Programming Editors are when I spend the majority of my coding time in, so it should feel like home. When you finally find your a text editor that feels second nature and compliments your abilities, you know you've found nirvana.
I've tried and used Sidekick Notepad, Brief, Multi-Edit, Codewright, the Turbo C IDE Editor, vi, emacs, Visual C++ 2.0 IDE, notepad, metapad, notepad2, TextPad, UltraEdit - you name it, I probably tried it.
In the early to mid 90's, right before Windows 95 came out, I had to use Unix at work, and my primary editor was vi. Ugh, I didn't like it at all. It was tiresome shifting from cursor mode to edit mode. But after a year or so, I got so used to vi it became second nature and I learned to love moving the cursor with the hjkl keys. What makes vi unique is that your fingers never have to leave the home position (other than when you're pressing Esc to switch modes), which is kinda nice. But I always wondered why Unix didn't have those pretty, easy to use editors that Windows and DOS had.
During my free time at work, I taught myself Windows programming. Man, the Visual C++ 2.0 IDE was so pretty. And it was revolutionary at the time, imagine an IDE running in graphics mode! And you could design dialog boxes visually and such. I was used to running Turbo C under DOS, and while it probably ran faster and enabled speedier edits, the Visual C++ IDE was so pretty that I knew I had to develop for Windows 95.
Prior to that, for all DOS work I used Multi-Edit and enjoyed every second of it. That was a fantastic DOS app. It had this thing called 'syntax highlighting' which at the time was extremely cool. The language keywords would be displayed in different colors, to make reading source code easier. You can also integrate your own makefiles and scripts in Multi-Edit. So to build your project, you just hit a hotkey (I think it was F5 or something) and it would run make, compile and link your program. You never had to leave the editor. I still have fond recollections of Multi-Edit.
That said, Codewright was probably the more popular of the two, and Codewright might have been first. I tried Codewright once but I guess I was so used to Multi-Edit that I never had the desire to switch to another editor.
Going back in time further, back when I was in college, for some reason I enjoyed assembly language programming. It was challenging and I had the feeling of power, as if I controlled the whole machine, no compiler came between me and the CPU. You could get real intimate with your computer when coding in assembler. One mistake and you crash the whole system (it was DOS ok), and you define your memory and register usage to the very last byte. It also gave me a sense of pride when I completed an assembler program. In this case, my favorite app to code were TSRs, also called Terminate and Stay Resident programs. So you run your program and it would stay alive in main memory.
My favorite editor for editing assembler code was curiously enough, a TSR program called Sidekick. Oldies will remember this. Back then, DOS could only run one program at a time. But by using Sidekick, you just hit a hotkey and a popup notepad editor would appear. You type in your code in the popup editor, save it, then escape back to DOS leaving the editor present in memory. Then you could run MASM to assemble the code, test, run, repeat. Using Sidekick Notepad saved me a lot of time and I still have fond memories of using it.
In my Unix job, I would occasionally have tasks writing DOS utilities in Microsoft C. Before I became a diehard Multi-Edit user, I used this lightning quick editor called Brief. Brief was great, it had unlimited undo which was state of the art at the time (Multi-Edit I believe went further by providing unlimited undo and redo). Brief also ran very fast. I created a shortcut called 'b' so to edit a file quickly I just typed "b foo.c" and the editor would appear instantly.
Later on, after I moved on to Windows development jobs, I sort of lost track of my obsession for programming editors. I stuck to the Visual Studio IDE, it was good enough for me. If I remember right, I think I liked Visual Studio 4 the most. It was no-frills, ran fast, you could access the library reference within the IDE. Some stuff in Visual Studio 5 and particularly VS 6 annoyed the hell out of me. I don't even remember the exact reasons why but I think it had to do with the Find in Files interface. Actually I take that back, VS 5 was ok but I still miss the simplicity of Visual Studio 4.
I went through my Linux and open source phase in the late 90's. I wanted to try something new. It felt weird going back to vi. I even used vim in Windows instead of notepad for quick edits. Vi worked good in laptop keyboards, especially those where the arrow keys were out of reach. You see, in vi you can get by with the hjkl keys for navigation and never use the arrow keys. I also used emacs extensively for several months. I always read about these Unix diehards that promoted emacs as the greatest IDE/editor ever made and wanted to see what the fuss what all about. You know, up to now I still don't know what the fuss is all about. I guess the one good thing about emacs is that you can program LISP in it. But the key bindings were just too weird and hard to remember for me (Ex. Ctrl-X, Ctrl-C). I forced myself to use it for several months, but I found myself more productive in the Windows text editors.
Windows editors have one huge advantage over Unix editors such as vi and emacs. In Windows, you can selectively highlight a section of text and type over it to replace it with some new code. So for instance, when I want to replace a certain word with another word, all I have to do is highlight that word and immediately overwrite it by typing over. In the default vi and emacs modes, you need to two keystrokes to do this: 1. select text, 2. delete text, 3. write new text. I later learned that emacs had a 'select-overwrite' mode that emulated Windows editors, so indeed it was possible in Unix text editors, but it wasn't obvious.
Another huge advantage that Windows editors had was that you can use the numeric keypad arrow keys PgUp, PgDn, Home, End, Ctrl-Home (go to top of doc), Ctrl-End, Shift-Home (select up to start of line), etc. This just felt so natural for me to use. I use the numeric keypad arrow keys, PgUp, PgDn for all my navigation. You could do this in vi and emacs, I guess but this would entail remapping the keys. The actual keystrokes to do Home, End in vi and emacs were a bit more obscure.
I learned later on that most people don't use the numeric keypad arrow keys at all, to my surprise. Most people use the inverted T-Bar arrow keys. These were usually young people who grew up on the larger 101-key keyboards w. I grew up using those old IBM 83/84 key keyboards which didn't have the inverted T-bar. You just had the numeric keypad arrow keys and that was it. And I'm glad I use the numeric keypad as I can outrace anyone using the inverted T-bar in navigating a document.
I eventually gave up Linux after getting frustrated installing simple stuff such as Apache, Perl, and MySQL, and getting the those programs to work with each other. I figure this is much easier now because Linux distributions have come a long way since then. But Windows (as well as Mac OS X which runs on BSD) is also so much better now that for me it doesn't make sense to work in Linux unless you want to do it as a hobby. I said goodbye to Linux and went back to my old ways in trying out different text editors. And I experimented with a lot of freeware stuff which I still use today.
My current favorite quickie editor is notepad2. It is a notepad replacement that has syntax highlighting for all the popular development languages. It also has a regular expression search which is handy since notepad doesn't have it. I used notepad2 extensively for coding in python. The limitation is that it can open only one text file at a time. Notepad2's goal was never to become an ultimate programmer's editor, it just wanted to be a quick and simple text editor for the masses, which suits me just fine.
I also have metapad, another notepad replacement handy for typing in notes and editing non code files. I don't know why I still use metapad when notepad2 will probably work fine. I guess it's just force of habit that I use notepad2 for quick code edits, and metapad for quick non-code edits. Probably another reason is that I leave word-wrap enabled in metapad, while leaving word-wrap off in notepad2. That said, I know it doesn't make much sense using two different notepad replacements.
I tried TextPad and UltraEdit-32. I'll probably buy a copy of UltraEdit and make this my mainstream heavy-duty code editor. The big downer for me in using TextPad is that the keyboard shortcuts and non-standard, for instance, typing Ctrl-F to find a word doesn't work. And I don't think it has syntax highlighting built in.
Most of my coding stuff is still done in the Visual Studio .NET IDE. Sometimes I use VS Projects and Solutions, but for most of my work code, I just open the files in VS.NET without a Project, then do the compilation in a command-prompt window. The reason for this is that usually in production environments, the build scripts are separate from the IDE, so you have to compile the code on the command-line (usually typing in an alias or batch script to compile the whole thing). Believe it or not, there are many days when I don't use VS.NET entirely, and just use
notepad2 to edit and modify code. Usually when a program is in maintenance mode, I prefer to do quickie edits and forego the heavy duty IDE. That said, I plan to shift to using UltraEdit for both quickie and extensive edits.
That's a lot of text editors we've covered. But I haven't mentioned my current fave. This is what I currently use now at work and it's great. In fact it's not just an editor, it's a source code analyzer and editor in one package. I've gotten so attached to this program that I don't think I can code without it. It's called Source Insight and I highly recommend it. If you've never used an Editor/Source Code Analyzer like Source Insight, you're in for a huge treat.
Say you're tasked with maintaining a large codebase that you know little about. Or if you're modifying some of your old code that you've already forgotten and haven't touched in years. Source Insight will help you out. It's like having dozens of helpers assisting you in your code as you type. Move the cursor over a function and it will display the function definition in the lower pane. No more grepping around to look for where the function was defined. Or say, you want to know more about a particular struct variable, where it was defined, what are its members, etc. Source Insight does this for you, just move the cursor over the variable and it tells you more information about it. I estimate that I am four times more productive in maintaining code using this software. Source Insight is jampacked with all sorts of practical features.
Some other good stuff, it actually makes the code easier to read by enlarging and highlighting different sections of the code. For instance, function names are displayed in a huge font and in a different color, emphasizing the function name over its body. I remember editing in Source Insight for a week or two, then going back to Visual Studio. It was scary because the VS editor looked so dull in comparison. I knew then that I couldn't go back to using a 'normal' programming editor after that.
More cool stuff, you can traverse through code much more easily. For example, hit Ctrl-= over a function call and the editor will automatically open the function definition. I understand this can now be done in Visual Studio but only if you have the whole Solution open. If you're maintaining a huge codebase that doesn't have Projects and sln files set up, then you're out of luck. Opening files are easier too. No more hunting around in the various folders looking for source files. Just add all the source files to your Source Insight project, then hit Ctrl-O, type in the filename and it will highlight the file to open as you type. Such as a simple feature, but it makes a big difference when editing lots of source files.
I heard the SlickEdit editor/analyzer is also popular and has a similar featureset so you might want to check that out too. I haven't used it myself as we don't have a license for it at work. But the SlickEdit demos are pretty cool, and it will give you an insight on the power of what next gen code editor/analyzers are all about.
For me, Programming Editors are when I spend the majority of my coding time in, so it should feel like home. When you finally find your a text editor that feels second nature and compliments your abilities, you know you've found nirvana.
