---
# System prepended metadata

title: How we work pairing remotely

---

# How we work pairing remotely

## Team / context
- Bifer is the development team of Alea Soluciones (bifer@aleasoluciones.com)
- 8 people working remotely but not 100%
- We usually work in pairs
- We code mainly in Python
- GNU/Linux
- Console tools 

## Starting the session...
- A pair of developers has a task to develop
- For async communication we use Slack
- We share a Hangouts room and a tmate session

## ...and following our workflow
- Enter vim
- Write code...
- Exit to console (ctrl+z) keeping vim at background
- Run tests
- Back again with `fg`
- `git commit` lints and runs unit test (if needed)
- `git push` lints and runs all tests


## [tmate](https://tmate.io/) instant terminal sharing
- A **fork of [tmux](https://github.com/tmux/tmux/wiki)** multiplexer (many panels/windows in the same session) with sharing capabilities
- **Share terminal** through a remote proxy, so we that avoid networking problems
- Configure with a single`.tmate.conf`, but default config is usually enough 
- Some useful default shortcuts (configurable)
    - **ctrl+b + c** : create window
    - **ctrl+b + n** : next window
    - **ctrl+b + ,** : label window
    - **ctrl+b + "** : split horizontally
    - **ctrl+b + x** : kill window

## [Vim](https://www.vim.org/) code editor
- **Light and fast** in terms of CPU and bandwidth usage
- **Ubiquitous** (all distributions, package managers and archs)
- Hundreds of powerful **plugins** (vimawesome.com)
- Fully **customizable** (keep and share configuration and the plugin list in a single `.vimrc` file)
- We don't need to share all the desktop


## Cool Vim plugins
- **nerdtree**
- **vim-airline**
- control+p (fuzzy search)
- control+p funky (search methods)
- **ALE** (Asynchronous Lint Engine) https://github.com/dense-analysis/ale
- **python language server** https://github.com/palantir/python-language-server
- **python-mode**
    - identation highlithing
    - leader d: goto definition (mysql factory client)
    - better folding
- **jedi-vim**
    - autocomplete
    - leader r: replace refactor
- **auto-pairs**, move symbols
- **gruvbox theme** (solarized)
- **vim-commenter**. Comment selected code

## Custom hacks
- Search in all subdirs leader+1 
- Replace text
- Autoindent a block
- Space for folding
- etc...