Saturday, 15 February 2014

Why learn Vim?

It's not the first time a student has been exasperated that they have to write their code in Vim...

Here's the situation:
  • student ssh's into an AWS virtual machine (I call it an "eBox");
  • they write or edit some code to solve a problem I've presented; and
  • once they're happy that it works, they click 'check' on the course website. A daemon sitting on their eBox parses and runs their code, generating feedback on any errors or omissions in their code.
But why do they have to use such an arcane and painful editor? Can't they just mount it on their own box and use their favourite $EDITOR? I guess I could set that up, but I wouldn't be doing them a favour. I claim: 
It's essential that you learn Vim if you want to be a Perl developer.
This is because it comes with virtually every Linux/Unix installation - the most common hosting platform for Perl applications. And why is that important? Because you can ssh in and edit your code on the box where it runs*. That's what makes software development and debugging with Perl and other dynamic languages like Python and Ruby much faster than compiled languages like Java, C, C++ etc.

That said, I completely agree that getting started is painful and frustrating. So - where do we go from here?



Any other resources you can suggest would be appreciated.

* For legal reasons I restrict this claim to early stage test deployments rather than production environments!

4 comments:

  1. you've hit the nail squarely on the head with the remark that you can guarantee they'll be a copy of Vim (even if it is a symlink called Vi) on every *nix box in creation.

    Besides, once the bug bites you with Vim, it's a lifelong, very happy relationship ;-)

    ReplyDelete
  2. On re-reading my assertions above it I realize it sounds rather dictatorial. I want it to be known that I also have Emacs and pico on the eBox - acknowledging that a student shouldn't have to learn everything at once:)

    I've also had some helpful feedback from the Ruby and Python communities reminding me of this: https://www.ruby-forum.com/topic/4422937

    ReplyDelete
  3. vim resource suggestion:
    http://linuxconfig.org/vim-tutorial

    ReplyDelete
  4. Thanks Yoda - my suggestions here (and in the Perl Essentials course) have been duly updated!

    ReplyDelete