Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
cpp
 
 
 
 
db
 
 
 
 
git
 
 
 
 
 
 
 
 
log
 
 
 
 
 
 
 
 
 
 
 
 
web
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Great Tips, Mindsets and Practices for Coders

Empowering tips, mindsets and practices for happy coders about Training, Coding, Git, Unit tests, Agile, GNU/Linux installation, Markdown/Pandoc... Not the best ones because continuously evolving and any one can propose improvements. 😉

Maintained with faireness in mind and shared in Public Domain.

Also available as a slide show (using Reveal.js).

Internal links

External links

Design / CSS

Web site architecture

  SSR CSR Universal Static JAMStack
Requires hosting yes no yes no yes (API)
CDN 👎 � 👎 � �
SEO � 👎 � � depends on content from API
Initial load ⚡�⚡� ⚡� ⚡�⚡� ⚡�⚡�⚡� ⚡�⚡�
Reload yes no no no depends on the tool
Fluid UX 👎 � � � �
Frequent updates � � � 👎 👎/�*

* To be frequently updated, JAMStack website can use APIs to retrieve content but looses SEO benefits. Approche can be hybrid: only very recent content is delivered by API, while static content is continuously re-built & delivered acroos CDN.

Security

Programming

Features Programming languages
Fast compilation V, D, Go, Delphi
Simplicity & maintainability V, Go, Nim, Python, Julia, Jupyter, Elm, Kotlin, Dart, Elixir
Great perf. and zero cost C interop V, C, C++, D, Delphi, Erlang, Rust
Safety (immutability, no null, option types, free from data races) V, Rust
Easy concurrency V, Go
Easy cross compilation V, Go
Compile time code generation V, D
Small compiler with no dependency V
No global state V
Hot code reloading V

Les résultats du sondage JavaScript https://2019.stateofjs.com/overview/

  • Représentation intéressante des technos sur les deux axes "connaissance" et "opinion positive/négative"
  • TypeScript a le vent en poupe
  • Angular est de moins en moins apprécié : énormément de réponses I've USED it before, and would NOT use it again
  • React (et Vue) sont de plus en plus utilisés
  • Svelte arrive en force aux côtés de React et Vue
  • GraphQL est de plus en plus utilisé et apprécié (notamment, avec Apollo comme client)
  • Par contre, plus Redux est utilisé, moins il est apprécié

Training

Artificial Intelligeance & Machine Learning

Dev tools

Dotfiles Managers

Backup your customized configuration files (~/.bashrc, ~/.gitconfig...) and share them across the computers you use (home, work...).

yadm - Easy too use

  • https://yadm.io in Python
  • YADM = Yet Another Dotfiles Manager
  • Easy install/updgrade on Ubuntu/Debian apt install yadm and macOS brew install yadm
  • Add OpenSuse RPM repository for Fedora and other RPM-based distros: https://yadm.io/docs/install
  • But missing installation with pip install --user yadm
  • Enter subshell for Git commands: yadm enter (exit to return)
  • Support three template engines depending on file extension: awk, j2cli and envtpl
  • Simple to use:
    • Keep leading dot . (in filename)
    • What is changed in Git repo is applyied (even removal)

chezmoi - Filename prefixes as deployment operations

  • https://chezmoi.io in Go
  • Ubuntu/Debian/Fedora installations can rely on Snappy:
    sudo dnf install snapd                # provide "snap" command line
    sudo ln -s /var/lib/snapd/snap /snap  # prevent error: classic confinement requires snaps under /snap 
    sudo snap install chezmoi --classic   # storage: 20 MB
    snap run chezmoi
    
  • Enter subshell for Git commands: chezmoi cd (exit to return)
  • Encode operations to apply during deployment as filename prefixes
  • Replace leading dot . by dot_
  • Require -r option to (recursively) add a configuration folder (silent failure even with -v) https://github.com/twpayne/chezmoi/issues/668
  • Support template based on Go text/template (append *.tmpl)

dotdrop - Easy to hack (manual Git management)

  • https://deadc0de.re/dotdrop/ in Python
  • Disclamer: I do not have installed Dotdrop in the recommanded way, I do not use dotdrop.sh because I do not want to git submodule (I do not want to upgrade all installed software using git submodule update individually, I prefer a script doing pip install --upgrade for all installed user Python packages)
  • Easy install/upgrade anywhere with python3 -m pip install --user --upgrade dotdrop (I think I do not need dotdrop.sh)
  • Use default Dotdrop config.yaml location or provide it in another way: ( cd ~/dd; dotdrop import ~/.bashrc ) or alias dotdrop='dotdrop --cfg=~/dd/config.yaml or export DOTDROP_CONFIG=~/dd/config.yaml
  • Simple tool = Do not handle Git commands (manual repo management)
  • Dotdrop and Git use different command names: import/add, compare/diff...
  • Dotdrop drops dot: Archived filename without leading dot . if keepdot:false (default) in ~/.dd/config.yaml
  • Do not recover simple config.yaml errors: missing profiles: or empty hostname profile https://github.com/deadc0de6/dotdrop/issues/221
  • Easy to hack beacause Git is not managed by dotdrop and because all other operations are clearly described in the config.yaml

Installation of dotdrop to be almost yadm-compatible

YADM repo looking is often a convention: respect of original path/filenames.

Two almost yadm-compatible installations are described here:

  1. Two Git repo (dotdrop repo + dotfiles sub repo)
  2. The dotfiles repo archives itself the ~/.config/dotdrop/config.yaml

Use same filename as YADM setting keepdot:true in ~/.config/dotdrop/config.yaml:

``yaml config: keepdot: true # same filename as YADM dotpath: dotfiles # set your dotfiles repo path/name backup: true banner: false create: true link_dotfile_default: nolink link_on_import: nolink longkey: false dotfiles: [...]


In order to have a dotfiles repo without `dotdrop` configuration and subfolder, use two repos:
* The `dotdrop` repo
* The `dotfiles` repo

Use `tree -a -I .git ~/.config/dotdrop/` to have a look on your dotfiles backup:

```php
$ tree -a -I .git ~/.config/dotdrop/
~/.config/dotdrop/
├── config.yaml     # above configuration file
├── .gitmodules     # main repo: ~/.config/dotdrop/ 
└── dotfiles        # Git submodule similar to YADM repo 
    ├── .gitconfig
    ├── .bashrc
    ├── .config
    │   └── htop
    │       └── htoprc
    └── .ssh
        └── config

In the second installation, no need of the main dotdrop repo because the ~/.config/dotdrop/config.yaml is archived within the dotfiles repo. After each dotdrop import, also perform:

dotdrop import ~/.config/dotdrop/config.yaml
cd ~/.config/dotdrop/dotfiles
git add .config/dotdrop/
git commit -m 'Update dotdrop config'

Encrypt sensitive data

Other dotfiles managers

See also: https://dotfiles.github.io/utilities/

Dotfiles manager alternative

vcsh Multiple Git repositories in $HOME https://github.com/RichiH/vcsh

Sandboxing

  • EBox uses Zero Install (0install) to securely install software (from web sites) and runs them in a restricted environment.

Z shell - zsh

Most extra shell extensions are developed for zsh, this is the reason why to use zsh for you daily-used workstation. But, I do not recommend it for production servers where dash (or bash) seems to be more suitable.

To extend Zsh capabilities, you can use either use a zsh plugin manager or manually maintains your plusgins directly within your ~/.zshrc. The plugin manager will help keeping your Zsh plugins uptodate, but can slow down your Zsh startup time.

Plugin managers Activity Motivation
Oh-My-Zsh Active (2009) Historical community-driven project collecting & maintaining hundreds plusgins & thems within one big Git repo for simplicity and having eyes rewieving/checking malware in source code.
Prezto Active (2013) Created in contrast to Oh-My-Zsh, to keep only the plugin manager source code within its Git repo.
Antigen Active (2013) Written in Go to speed up the zsh stratup.
zgen Inactive Fast plugin manager inspired by Antigen (generates a static init script) but written in Zsh to avoid installing Go dependencies when updating the plugin manager. See Nukesor's fork for most recent commits.
zplug Active Support all kind of plugin sources: Git repo, Oh-My-Zsh/Prezto plugins, binary artifacts...
zinit Active Inspired by Zplug (zinit was formely zplugin) but written in C and compiling plugins to bytecode in background (Turbo mode) to be both rich-featured (like Zplug) and having a fast startup.
Antibody Active Like Antigen (in Go), but aiming to be even faster: for example, Antibody loads earlier the zsh and does not require the apply statement.
zr Active Simple plugin manager project written in Rust that generates static init script to speed up zsh startup.

DevOps

Hardware

Health & Work efficiency

Linux

Privacy

Popular self-hostable tools to share passwords:

Quikly converge to valuable API

  1. Design - Rédiger une documentation pédagogique (Markdown) à destination de l’utilisateur final, cela permet de se mettre dans la peau du client, d’itérer sur ce qu’il lui ferait plaisir, de se baser dessus dans nos échanges, et ainsi de suite jusqu’à obtenir une documentation API mature à publier sur https://docs.example.com
  2. Code - Une fois, que nous sommes synchronisés et matures dans nos idées, on code avec des annotations afin de générer la documentation à partir du code source (OpenAPI, reDoc…). Coder c’est rencontrer des problématiques techniques auxquelles nous n’avions pas pensées, et cela nous permet d’accumuler du retour d’expérience, de gagner encore plus en maturité, et on implémente une API différente. La génération de la documentation est mise à disposition sur https://openapi.exemple.com et https://redoc.exemple.com
  3. Test - On commence à avoir une première ébauche de l’API, on commence à mettre à jour la documentation pédagogique (Markdown), on commence à tester l’API, des premiers utilisateurs nous font des remarques… encore de nouvelles idées pour simplifier, pour clarifier… on re-code… on re-documente… on itère…
  4. Deliver - Au final, on en a marre de toujours tout chambouler, on finalise dans l’état actuel, on stabilise, on livre ! On garde nos bonnes idées pour la version suivante :-D

Other

Public Domain Dedication

CC0 1.0 Universal

Creative Commons Zero   No Rights Reserved   (CC) ZERO   (0) PUBLIC DOMAIN

To the extent possible under law, olibre has waived all copyright and related or neighboring rights to GreatPractices. This work is published from France since 2015. Refer to CC0 Legal Code or a copy in file COPYING.

You can’t perform that action at this time.