A Developer Toolchain
& General Tips that each developer should know
Samuel Berton
Only examples of tools are given!
Logo contains the link to the website
IDE
In general
An integrated development environment (IDE) is software for building applications that combines common developer tools into a single graphical user interface (GUI).
- Redhat
As a developer you spend most of your time in an IDE-> optimise your usage of it
Sublime text
Visual Studio Code
PyCharm
Some examples:
Spyder
NeoVim
Visual Studio Code
My personal choice
Visual Studio Code
Some of the extensions I use
(Neo)VIM
Text editor extraordinaire
Different modes allow for wide functionality
To exit: press ZZ or :wq (write and quit) or :q! (Quit without saving
NeoVim
Communication
Search engines
If you don’t know something, search it!
Features to make your search better
DuckDuckGo features
Google features
Excluding term: use - before e.g. bass -music
Search specific website: site: website link
Slack/ Other Communication
Project specific questions
to take a screenshot of
Flameshot
ShareX
Reference Management Tool
Save interesting articles
Instead of bookmarking, you can add them to a research tool
Export to bibliography, share with other people…
Two main ones are Zotero and Mendeley
Zotero
Planning
Planning
Meetings are meant to have input of the team
Scrum
Work in sprints of typically two weeks
Git & Github
Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
- GIT
Git allows for easy development of code:
It’s essential to each software development project:
-> If you are working alone or with millions of people
Git commands
GUI Options
Some important commands ( without branching )
Github desktop
Visual Studio Code
Gitkraken
Git flow
Possible states of a file:
Git branching
Develop code on branch and merge
Github
Platform to host repo’s
Pull request
More resources
Become a master main of git(hub)
Coding tools
Linters
Checks your code for problems, and ‘bad’ code
Examples of linters for Python:
How to setup linter in VSCode:
Install python extension
Press ctrl+ shift + p and search for linter -> Select Python: select linter
Select flake8, it will install automatically
Formatters
Make the code look nicer
In visual studio:
Press Ctrl + Shift + P and search format -> Format document
If asked, select autopep8 and install
Press Ctrl + Shift + P and search preferences
set editor.formatOnSave on true
Typing
Python is dynamically typed -> It doesn’t know about the type until the code is run.
Can cause problems
Use mypy to enforce the types -> visual studio code extension
Might not be supported enough in some cases
Debugger
Run the code and monitor all the variables, add breakpoints to stop running
To run the debugger in VSCode:
This replaces, putting print statements everywhere
Package Management
Package manager
Installing packages
Pip and Conda are the main ones
e.g. pip install numpy
Automatically manages the dependencies
Pip
Virtual environments
When doing multiple projects on the same computer it’s recommended to use virtual environments
Manage different versions of packages in this environment, sometimes new version will break your code
Export the installed packages to other people in a requirements file
Venv
Poetry
Pip + Venv
Create a virtual environment: python -m venv .venv
Activate the venv: source .venv/bin/activate or .venv/bin/activate.bat
Installing: pip install
Creating a requirements file: pip freeze > requirements.txt
Use an extension to make it easier to manage
Extension
Testing
A philosophical detour
Popper’s falsification theory
Every genuine test of a theory is an attempt to falsify it, or to refute it.
- Karl Popper
Short video explaining the idea
Test your software on all levels
Try to test outside the known limits of your software -> falsify it
Don’t assume it works, test it!
Unit tests
Test the individual units of the software
Use a testing framework like pytest
Basis of Test driven development:
Write tests before developing
Code coverage
Coverage on wikipedia
Coverage.py
Documentation
Docstrings
Document a specific part of the code
Python example
Sphinx
Docker image
Command line
The what & why
What
A text interface to use your computer
Why
Some commands
Linux/ Macos/ Powershell
Powershell
Linux (mostly MacOs)
Exercise
Feedback