4 ms·
I strongly disagree, regarding the text editor. You'll make mistakes and want to fix them, want to copy things, etc, and this is much easier in a decent text e
by dllthomas 14y ago
I strongly disagree, regarding the text editor. You'll make mistakes and want to fix them, want to copy things, etc, and this is much easier in a decent text editor. Learn to use vim or emacs or something of similar power before you get started programming - it's worthwhile. Running through vimtutor is not hard (I don't know of a similar thing for emacs, but it probably exists), and it can speed you up wherever else you're working with text, as well.
- anthonyb 14y agoYou're missing the point - if a new programmer has to learn vim or emacs first, chances are they just won't learn to program. What's next? Grow a neckbeard? It's all about reducing the number of hoops that they have to jump through to get results. Once you get up to speed, sure, learn a decent editor. But in the meantime, use gedit - it's reasonably good (eg. has auto indent and syntax highlighting), free and available for pretty much everything. Or sign up for something like pythonanywhere.com.
- saraid216 14y ago> Running through vimtutor is not hard But it is time you're doing something other than producing tangible output. That can cost you a student. Vimtutor can be done after you've learned to code a little.
- jiggy2011 14y agoVim is very keyboard centric though which will be extremely frustrating at first to people who are used to using the mouse to interact with the interface and the keyboard for just typing text. With a normal text editor , copying and pasting is not especially difficult, especially with the small codebases that beginners will be working on.
- dllthomas 14y agogvim handles mouse input just fine (though I had to actually open gvim to double check that - my mouse doesn't get touched very often...) With a featureless text editor, you can copy and paste for sure, but making edits to the pasted text is much more tedious.
- Tyr42 14y agoBut it's not when all you are doing is clicking, using arrow keys and backspace, which is what people starting out do. I like vim and all, but you want to learn python now, vim later. Don't mix the two, all it does is add complexity before you need too.
- jiggy2011 14y agoWith gvim for example though you still have to worry about being in insert mode, and normal shortcuts like Ctrl+S don't work. I'm sure you can configure around this, but it's not something a newbie should be worrying about.
- dllthomas 14y agoMy point is that knowing a decently powerful editor is a matter of basic computer literacy - it makes a host of things, especially but not only programming, faster and easier. Knowing vim or emacs or pick your editor that actually gives you some reasonable power is not something a newbie should be worrying about when they are learning programming, it's something they should be taught before they get programming. It's a matter of a few hours to train yourself on some tools that will make your life much easier.
- jiggy2011 14y agoI'm not sure that using an editor like vim is really "basic computer literacy". It may be simple enough to learn vi but you have to get your muscle memory used to doing a bunch of things that are different to the average MS software or whatever they were used to using. I actually know a number of competent programmers who've never touched vi at all.
- slurgfest 14y agoKnowing a real editor is a massive improvement in efficiency and ease-of-USE. But for most people it is just way too discouraging and hard to start there; their issue is ease of learning. Once you get interested and get some basic abilities, then you can worry about optimizing your efficiency with power tools.
- Fizzadar 14y agoI can't understand why learning vim/emacs is in any way useful for a programmer. Surly the best text editor is the easiest to use (ie one which makes use of a keyboard + mouse)? Vim is certainly powerful (and unnecessarily complicated), but when it comes to writing out code anything will do (Sublime in my case).
- anthonyb 14y agoVim is good once you get the hang of it, for the same reason that Ctrl-P is so good in Sublime.
- dllthomas 14y agoWhy is Ctrl-P so good in Sublime? (Asking this honestly, as someone who's not used Sublime...)
- anthonyb 14y agoIt's basically a "find any file really quickly" command, with fuzzy matching. Hit ctrl+P, type the filename (or part of the name) and it'll flash up the files that it's matching in real time, as well as display the most likely in the background. The good part is that it'll ignore capitalisation, underscores, etc. and you can start typing something in the middle - "foo" will pick up Foo, foo, test_foo, widgetFoo, foobar and FooBar.
- saraid216 14y agoI learned Vim because I didn't always have a mouse. At some point, I started to dislike using a mouse at all; a roommate in college joked that if he glued my mouse to a mousepad, I wouldn't even notice. (And this is true; a year later, my mouse died and I was able to do virtually everything I felt like without it.)
- dllthomas 14y agoYears back, my lab changed buildings, and I had to break down my computer and reassemble it on the other side. I went over a week of productive work before noticing I hadn't plugged the mouse in. There are some things the mouse is very good at - picking from a visual display, describing relative motion. The mouse is only useful in programming to the degree that these things can be made relevant. I have every expectation that this fits some people better than others, but I do think that people frequently overestimate ease of use with the mouse and underestimate ease of use without.
- pnathan 14y agoIn emacs, its M-x help-with-tutorial. But, realistically, there are low-barrier editors for learning programming; no sense in complicating the initial problem.
- dllthomas 14y agoI contend that they are two separate problems. It's worth knowing the a reasonable editor anyway, and then that makes the programming easier (particularly with syntax highlighting and such).
- Silhouette 14y agoIn emacs, its M-x help-with-tutorial. I realise that you weren't actually advocating showing this to a beginner programmer, but I can't help noticing the irony that the above would be meaningless to a newbie learning emacs for the first time. Indeed, exactly that kind of WTF moment can stop a fledgling programmer in their tracks, even though it has nothing to do with programming. As you say, there is no sense in complicating the problem. If someone wants to learn Python, and they're working through beginner exercises, a REPL or at most a simple plain text editor will do just fine.
- tikhonj 14y agoThis is why the first thing you see when opening Emacs (after the GNU/Emacs logo) is a list of links headed with the Tutorial. Coincidentally, I thought the tutorial was very well done. It certainly helped me get up to speed fairly quickly without being overbearing.
- DeepDuh 14y agoWhat I'd like to see are some hard scientific studies on whether vim, emacs or something like eclipse with pydev are more productive for python. I have a strong feeling that people who emphasize on the editor so much are missing the point: programming is not about the editor. It's about your inner design process.