On editors

The tool of programmer's trade

I’m stuck and cannot escape. It says:

type :quit<Enter> to quit VIM

But when I type that it simply appears in the object body.

tl;dr Install Visual Studio Code and Ruby extension

The basic tool of a programmer is a text editor. Some people might say that you need an IDE like JetBrains RubyMine to be a programmer but that’s not true. Essentially, there are only two things that you need to be a programmer:

  1. Editor of your choice
  2. A way to run your program - in our case Ruby interpreter

Many words have been spilled in the eternal debate over which editor is the superior choice for the master programmer. There’s a Wikipedia article dedicated to one of the longest running holy wars in the history of programming if you are interested in people arguing over such a thing. This book wouldn’t be complete if I didn’t mention this.

I have written this book assuming that the reader has basic proficiency in using the computer. By this I mean you are comfortable in installing additional software on your computer, you can perform Google search and know how to use a text editor. However I will not assume you are comfortable using the terminal (there will be a separate chapter for this) or have the slightest idea of what modal editing is (there won’t be a chapter for this). If any of the editor crusaders approach you and try to convince you that you should use their favourite editor, please kindly tell them to go back where they came from and that you’re comfortable enough with your current editor.

If you do not have your favourite editor yet then I recommend using Visual Studio Code. It’s a fully-featured text editor with code highlighting built-in. If there’s something it can’t handle out of the box then it’s quite likely that there’s a plugin out there which does exactly what you want.

At the very least I don’t want you using regular Notepad on Windows which doesn’t even have syntax highlighting. I can’t say I know anyone using regular Notepad to write computer programs and I wouldn’t recommend this to anyone.

Once you install your chosen editor, we can set up the Ruby interpreter which will allow us to run our programs.