Getting Started

Configuring your working environment is important because it enables you to work in a group. Please keep in mind that there is nothing more boring for your collaborators to open a file and see that there is a windows carriage return into it.

Configuring your editor

You are not forced to use one editor or another. No matter the editor you use, just configure it correctly. Unless you are not absolutely certain about your editor’s configuration, use editorconfig and download here a sample editorconfig file

editorconfig sample file
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

# 4 space indentation only for python
[*.py]
indent_style = space
indent_size = 4

# JavaScript
[*.js]
indent_style = space
indent_size = 2

# JSON
[*.json]
indent_style = space
indent_size = 2

# SHELL
[*.sh]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

Note

if you are using the atom editor you can install the editorconfig package. have a look at the atom cheatsheet.

Basic editor configuration

It may happen that you use in a server some external editors that are not editorconfig compatible, so please configure theses editors.

  • The nano editor

Here is a .nanorc sample:

set tabsize 4
set tabstospaces
set autoindent
set smarthome
set nowrap
unset softwrap
set multibuffer
## Python
#include "/usr/share/nano/python.nanorc"
  • The vim editor

Here is a .vimrc sample file:

set pt=<F5>
set vb t_vb="
set shiftwidth=4
set expandtab
set ts=4
set sw=4
syntax on
filetype indent on
filetype plugin on
set autoindent
set hlsearch
set wrap
set showmatch
set softtabstop=4
"set fdm=indent

Configuring python

Have a look at the python howto to configure your python prompt. Use two python executables like this:

  • python: an alias for python 2.x
  • python3: an alias for python 3.x

Use a python linter like pylint

Installing extreme programming tools

apt install python3-pytest

Configuring javascript

Use a javascript linter like jshint

Configuring git

Please set a .gitignore file in the very beginning of a new project is important.

Download here a .gitignore sample file.

gitignore sample file
bower_components
node_modules
*~
*.log
*.pyc
__pycache__