3 ms·
I teach high school math and science and once a year I teach a programming class, which currently focuses on Python. I then mentor a few students who are inter
by japhyr 14y ago
I teach high school math and science and once a year I teach a programming class, which currently focuses on Python. I then mentor a few students who are interested in following up on the class on their own.
My preferred editor is emacs, but there is no way I'd try to have people use emacs in their first programming class. We are using Ubuntu computers, and I am currently having students work in Geany.
Are there any other suggestions for editors on ubuntu machines, that are friendly to new programmers?
- telemachos 14y agoIf you want to teach someone a command line editor (that's an if, but at some point it will be useful - at the very least as a backup), then nano or pico (pico is often - maybe always - a symlink to nano) is a good idea. It would be unpleasant to edit in nano/pico full time (no syntax highlighting or indentation help, etc.), but if you have to do something through ssh and emacs or vim are still too much, they get the job done. What makes them new-user-friendly is that they keep a "menu" of basic commands visible at the bottom of the screen. So you can always see how to save, quit, etc. For GUI editors, Gedit and Kate were pretty popular for (K)ubuntu and other Debian derivatives.
- sergiotapia 14y agoI agree with learning or at least being a bit familiar with nano. It's probably the best way to edit a small one-off file via SSH. Imagine you want to quickly change a directory path in httpd.conf, instead of downloading the file, editing and then uploading it via FTP - just nano that sumbitch and you're done. I learn how to use it in about 30 minutes. That's really all it takes to get the basics down.
- bazzargh 14y agoI would disagree that that's the easiest way. C-x C-f /ssh:user@host:/path/to/httpd.conf ... and I have it open in my local emacs, with my own settings, with colour and indenting, and no lag when I'm editing. (this is called tramp mode) And if I then typed M-x eshell, I'd have a shell at the directory where I opened that file, and the nano users would start shouting 'burn the witch!'. Other editors also support remote editing over ssh - no need to download/upload, the editor takes care of that for you. Working this way, I don't even have to trust that the remote server has nano or emacs or whatever - which it often doesn't.
- BruceIV 14y agoI'll second that recommendation for nano as a CLI text editor - it does have syntax highlighting, and it's available by default on most relatively modern Linux distros. (But, yeah, for new programming students, Geany is a great choice, as is plain ol' gedit.)
- sergiotapia 14y agoSomething like Sublime Text 2 is a good compromise - the best of both worlds. Some power behind it, not unsimilar to Vim/Emacs. Some beauty behind it, not unsimilar to other commercial text editors / IDEs. The truth is the editor you use doesn't matter. People who know Vim swear up and down on it, but that's because they are good with it, they have been using it for over 5 years - of course they're proficient with the editor. Other people are fast with editors like Sublime Text 2. Others with an IDE like Visual Studio or RADRails. Tools don't matter, your workflow does. Personally, I'd teach those kids how to use Sublime Text 2.
- aerique 14y agoYou can use an Emacs config that'll set CUA bindings that people are more familiar with. (C-o to open files, C-s for saving, C-n for a new window, etc.) I've got a config you can start from. Who the hell uses default Emacs key bindings anyway? ;-)
- mercuryrising 14y agoSublime text or Spyder. Others have talked about ST, I'll talk about Spyder. Spyder is a little bit bigger of a hog, but it has autocompletion for functions which is incredibly handy for discovering what can be done, and it helps you pick out the differences between objects (oh, a list and a string have these similar operations to them, cool!). It has a built in console, which is great to keep focused on single screen. Instead of resizing and shuffling windows, just keep it all in one display. Press F5 to run your code. Fire up a console and try something out (with autocompletion in the console too). It also has built in documentation, an object explorer, and some other cool features that are escaping me. It hasn't always treated me nicely (sometimes it forgets to reload my code, or it goes out of style (literally, it loses styles sometimes)), but overall it's a good spearhead for getting up to speed quickly with Python. Spyder - http://code.google.com/p/spyderlib/ http://code.google.com/p/spyderlib/