Saturday, November 16, 2013

What is the best text editor?


Ah, why a post on this, when there are probably already something like 17,000 posts being written on the topic at any given time? Well, it’s a topic we often debate in lab, usually as a cool down from some protracted Python vs. MATLAB vs. Perl vs. R argument. Gautham likes vi, as do many programming junkies. I used to use Emacs for a while, then migrated to a little known text editor called Smultron, and now I use some combination of the IDEs incorporated in MATLAB and R and TextWrangler for everything else. And you know what? It works! I can actually edit text this way! I can save the changes, and the run the program! Amazing. What’s even more amazing is that virtually every text editor does this. The conclusion I came to is that it just doesn’t much matter how many fancy key codes your editor can handle (looking at you, Emacs!), nor how complex or simple the interface is (to a point, and once you get used to it), because unless you’re working with punchcards, your programming is much more likely to be limited by your mind than your choice of text editing program. I used to think more about text editors back when I was in graduate school, and I remember one day stopping by the office of Boyce Griffith, who is one of my academic “brothers” (i.e., we had the same advisor). Now, Boyce is one of the most incredible scientific programmers I’ve ever met, having written literally millions of lines of hard core C and C++ to implement very complex simulations of fluids, including these amazing simulations of the human heart. I saw Boyce was programming away using some fairly primitive text editor, and I was like “Man, you don’t use Emacs or something?” Boyce said “No”, and I said “Why not?” and he said “Whatever, it doesn’t matter.” Amen. In the end, I think the best text editor is, you know, one that edits text.

No comments:

Post a Comment