Update Working with code
parent
790e55bb63
commit
4272941e02
|
@ -7,7 +7,7 @@ There are code editors on Linux that can run in the CLI: it is worth spending so
|
|||
|
||||
- [nano](https://www.nano-editor.org/) super simple editor (with powerful features nonetheless), easy to learn, almost always available by default on Linux machines
|
||||
- [vim](https://www.vim.org/) a rather difficult editor to use at first because it differs from the standard experience of editing text, but extremely efficient when mastered. Highly customizable, and almost always installed by default on Linux machines. Type `vimtutor` in a terminal for a quick introduction
|
||||
- [emacs](https://www.gnu.org/software/emacs/) perhaps easier to learn than vim, endlessly customizable with thousands of plugins (you can read your emails in emacs, or manage a git repository). Can be made to emulate vim's editing style with the `evil` package. Not installed by default on most Linux distributions, but can be founds on clusters.
|
||||
- [emacs](https://www.gnu.org/software/emacs/) perhaps easier to learn than vim, endlessly customizable with thousands of plugins (you can read your emails in emacs, or manage a git repository). Can be made to emulate vim's editing style with the `evil` package. Not installed by default on most Linux distributions, but can be found on clusters.
|
||||
|
||||
Some code editors can allow remote editing of code, this is the case of emacs and [Visual Studio Code](https://code.visualstudio.com/). While the latter is now widely popular, I would advise spending some time learning one of the three editors above, as they can be used entirely without a mouse (which can be very useful) or a GUI (which can happen easily if a graphical driver issue arises). All of the "nice" features of VS Code (completion, syntax check, code formatting, etc.) can be configured in emacs or vim (although they likely require more time to set up than VS Code).
|
||||
|
||||
|
@ -15,4 +15,9 @@ Some code editors can allow remote editing of code, this is the case of emacs an
|
|||
`sudo apt install build-essential` should set you up nicely with the basic tools to write C/C++ code. `cmake` is also a staple of C/C++ development. I use `scons` to compile Tamaas.
|
||||
|
||||
# Python
|
||||
Python is ubiquitous in scientific computing thanks to its very large offer of third-party libraries dedicated to computation (most famously Numpy and Scipy). Python is however notoriously bad with dependency management. I would advise manually installing a specific Python version separate from the system's Python (which can sometimes be very outdated) using a tool like `pyenv`, and using [virtual environments](https://docs.python.org/3/library/venv.html) for each "project". This limits the risks of custom or manually installed packages interacting with the system packages and causing trouble. This includes Jupyter Notebooks.
|
||||
Python is ubiquitous in scientific computing thanks to its very large offer of third-party libraries dedicated to computation (most famously Numpy and Scipy). Python is however notoriously bad with dependency management. I would advise manually installing a specific Python version separate from the system's Python (which can sometimes be very outdated) using a tool like `pyenv`, and using [virtual environments](https://docs.python.org/3/library/venv.html) for each "project". This limits the risks of custom or manually installed packages interacting with the system packages and causing trouble. This includes Jupyter Notebooks.
|
||||
|
||||
# Git
|
||||
Git is a version-control software, meant to record versions of code and allow collaborative work on a shared code. Since version-control is among the [tenets](Research-simulation) of working with code, it is highly recommended to read the [Pro Git](https://git-scm.com/book/en/v2) book by Scott Chacon and Ben Straub, especially chapters 2, 3 and 4. The operations described in the [Git Basics](https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository) chapter should become second nature.
|
||||
|
||||
Learning Git with the command-line interface instead of a GUI (from VSCode or other) is highly recommended: the CLI is available everywhere and GUIs may have missing features or confusing language.
|
Loading…
Reference in New Issue