Will Emacs make me a better programmer? [closed]

2019-03-07 09:34发布

Steve Yegge wrote a comment on his blog:

All of the greatest engineers in the world use Emacs. The world-changer types. Not the great gal in the cube next to you. Not Fred, the amazing guy down the hall. I'm talking about the greatest software developers of our profession, the ones who changed the face of the industry. The James Goslings, the Donald Knuths, the Paul Grahams, the Jamie Zawinskis, the Eric Bensons. Real engineers use Emacs. You have to be way smart to use it well, and it makes you incredibly powerful if you can master it. Go look over Paul Nordstrom's shoulder while he works sometime, if you don't believe me. It's a real eye-opener for someone who's used Visual Blub .NET-like IDEs their whole career.

Emacs is the 100-year editor.

The last time I used a text editor for writing code was back when I was still writing HTML in Notepad about 1000 years ago. Since then, I've been more or less IDE dependent, having used Visual Studio, NetBeans, IntelliJ, Borland/Codegear Studio, and Eclipse for my entire career.

For what it's worth, I have tried Emacs, and my experience was a frustrating one because of its complete lack of out-of-the-box discoverable features. (Apparently there's an Emacs command for discovering other Emacs commands, which I couldn't find by the way -- it's like living your own cruel Zen-like joke.) I tried to make myself like the program for a good month, but eventually decided that I'd rather have drag-and-drop GUI designers, IntelliSense, and interactive debugging instead.

It's hard to separate fact from fanboyism, so I'm not willing to take Yegge's comments at face value just yet.

Is there a measurable difference in skill, productivity, or programming enjoyment between people who depend on IDEs and those who don't, or is it all just fanboyism?

30条回答
相关推荐>>
2楼-- · 2019-03-07 10:15

Mastering the Emacs key bindings and its built in functions will allow you to manipulated text faster than IDE's such as Eclipse or Visual Studio.

Don't take my word for it, check out these videos of pros using Emacs.

Once you get to a decent level in Emacs you can effectively edit any language: Java Script, Java, Ruby, Python, HTML, C, C++, etc.

Getting started with Emacs is a pain in the butt, the out of the box experience is worse than bad. Emacs default configuration does not expose the Emacs newbie to the more powerful features (hippie-expand, etags, yasnippets, etc) of Emacs. I suggest started with the Emacs Starter Kit dot files.

Another reason that Steve Yegge claims that the world best programmers use Emacs, is elisp. Elisp allows the experienced programmer the power to easily expand Emacs. Writing an extension in Eclipse or Visual Studio is significantly harder than writing a quick function or even a new minor mode in elisp.

查看更多
戒情不戒烟
3楼-- · 2019-03-07 10:16

I know you didn't ask this, but one thing learning emacs (unexpectedly) improved for me was manipulating a command line. Before I learned emacs keybindings I used to move the cursor and navigate history using the cursor keys because I didn't know any better. It was something of a lightbulb moment when I realised I could use backward-word, move-beginning-of-line and backward-kill-word (which I have always bound to C-w, as Stevey suggests) in bash (M-t is often useful too, and most impressive to those who've never seen it before).

I do quite a lot of work on Solaris, where the root shell is "the posix shell", and does not have emacs bindings by default. I find that my fingers now type exec bash of their own accord, every time I log in, so much faster do I feel with the now-familiar editing commands under my fingers.

Must admit though, I still find Knuth's books hard going (though worth it) - so I don't think it's magically improved my programming.

查看更多
何必那么认真
4楼-- · 2019-03-07 10:18

Is there a measurable difference in skill, productivity, or programming enjoyment between people who depend on IDEs and those who don't, or is it all just fanboyism?

Let's just narrow this down to Visual Studio vs. Emacs---the question is too broad otherwise, and I suspect most people (at least here on StackOverflow) are familiar with those two. [I am, and I use and prefer emacs]

Next, let's break the three components of the question down.

Programming enjoyment boils down to primarily liking programming in itself, and secondarily to not have annoyance factors pop up when you do it. Using tools that you struggle with is going to subtract from the enjoyment. So, I would guesstimate, the enjoyment is likely maximized by using tools you like and are familiar with.

Of course, once you do get familiar with a new tool, you may find that you like that tool better, and thus will like programming more if you do it with your new favorite tool. It isn't clear to me that people in general will like VS over emacs (or vice versa) when they know them both well.

Next, programming skill. If there's any connection between skill and choice of VS/emacs, I think it's skill causing choice, not choice causing skill. None of {VS, emacs}, in my experience, seem to make me learn anything about writing better code.

A good tool may make me able to write the same code (and thus same quality of code) in smaller amounts of time; if we assume that productivity = quality of code `times` code per time, then it stands to reason that any editor that'll let you write good code in less time is a productivity boost.

I may be too unfamiliar with VS, but here I think emacs has some strengths that I haven't found in VS. It may sound ridiculous, but something as simple as cursor movement with Ctrl-[fbnp] is a real boon---it means you don't have to move your hands to the arrow keys. Another thing: you can do a search or replace which includes newlines, which I use often enough that I'd hate to miss it.

Another thing I like is the ability to embed a shell in my editor. In my experience, it's much more valuable on non-windows platforms (and my first "programming" experience, IIRC, was writing DOS .bat files, so I'm not just a flaming fanboy), but on those platforms it's a big win. It makes emacs "integrate" with "everything" (file search with find/locate, text search with grep, version control with svn/git/hg/..., you name it).

Final verdict--should you learn emacs or not? And is it all fanboyism? If you got the time, I'd say it's always worth learning new ways of doing the same thing, because the new way just might turn out to work better for you. And I encourage you to not reject it for what it appears to be when you're all new to it. In that sense, it's like switching to the Dvorak keyboard layout: you're slower at first, but once you get up to speed you're likely to be at least as fast as on qwerty, and more comfortable. I recommend the same approach to learning new (programming) languages as well: because you don't know the vocabulary (standard library), saying things is hard, but the reward is still there in the horizon waiting for you.

查看更多
冷血范
5楼-- · 2019-03-07 10:19

No. If you believe using emacs makes you a better programmer, you are confusing cause and effect.

I do use it daily, though. I find that I'm more productive with emacs+maven than with Eclipse for java development (although I do still fire up Eclipse every now and then to do the occasional refactoring or debug session).

These are my reasons:

  • The actual text editing experience in emacs beats everything else. It's amazing how fast you can accomplish so much using only your keyboard. Eclipse is more mouse-oriented, and when you type you encounter lots of irritating snags.
  • Being able to customize emacs using elisp is incredibly powerful. I'll go so far as to say that if you're not taking the time to learn rudimentary elisp and customizing your environment you're simply wasting your time.
  • There are extensions for practically anything you could ever want to do in a text editor.
查看更多
何必那么认真
6楼-- · 2019-03-07 10:21

With the quoted text beginning "All of the greatest engineers in the world use Emacs," I wouldn't take it at face value either. Does he know all of the world's greatest engineers? Is it the same list of world's greatest engineers that you or I have?

Once learned, a powerful editor like EMACS or vi will make you more efficient, or at least more efficient if you happen to be caught without your favorite IDE.

It's the "once learned" part that's the killer. It's a lot of work and practice to use these tools productively, and it's very tough at the beginning.

查看更多
乱世女痞
7楼-- · 2019-03-07 10:21

No.

Discipline, critical thinking and a desire for self-improvement will make you a better programmer. Your tool set, while a major factor in your productivity, won't create genius.

If you don't like emacs or vi, don't use them. By making the conscious choice not to, you're shaping your development environment to fit your own needs and work practices. In any case, you're entitled to use what you like - and ignore anyone who's foolish enough to berate you for the tool you use to write bits to disk - it's the bits that matter.

Note: "Tool set" here means, literally, the "brand" of tools - specific editors, compilers, etc. Conceptual tool sets, e.g. the use of version control, unit testing - all in general - are a part of the self-improvement process.

查看更多
登录 后发表回答