Elements of Effective Tooling, Winter Term 2022/2023

  • Instructor: Lorenz Schmidt
  • Format: Workshop, in English
  • Schedule:
    • Feb 14, Time: 17:00 - 19:00: Modal editing
    • Feb 07, Time: 17:00 - 19:00: Version Control
    • Mar 14, Time: 17:00 - 19:00: Rust School of Music
    • Mar 21, Time: 17:00 - 19:00: Automation
  • Objective: Learn essential tools for your HiWi/thesis/etc. and common patterns in the computing ecosystem
  • Location: Seminar Room AudioLabs (Am Wolfsmantel 33, 91058 Erlangen, Room 3R4.04)
  • Signup: Contact Lorenz Schmidt

The tooling workshop goes into the second round! Based on the feedback from last year and the recent lift of Covid restrictions, I would like to make a few adjustments. First the workshop will be in-person to work on specific problems with direct feedback. The modules are not isolated anymore and I tried to select a few which are elementary but can present a challenge to a broad audience. Finally I lifted requirements to basic terminal skills, you should have used it in some way before.

That said, I've selected four topics which can bring the most benefits to students. Further I added Rust as project language as it helped me reasoning about data structures with ownership and functional elements a lot. In my experience it also has the best tooling experience and fits nicely into the theme of the workshop.

The workshop is now structured with one major (~40min) and two side (~20min) demonstrations for each topic and interleaved to give time for practice.

Modules

Modal editing (edit text at the speed of thought)

Editing text is at the center of efficient development. I present to you the first four chapters of the book Practical Vim. Modal editing was invented in the 70s and nowadays most editors have adopted the Vim style, such as Neovim, Visual Studio Code etc. For students working on a remote machine, basic knowledge of modes, motions and operations is essential and takes most of the mystics out of terminal editing.

Version Control (Git)

Git is the default version control system for software development and used solely at Audiolabs as well. This module focuses on understanding the basic concepts of Git (e.g. history, working tree, fie state etc.) and makes you comfortable with 95% of the daily workflow for Git. We will discuss the centralized repository approach, common in platforms such as Github and Gitlab, and good etiquette for being a helpful contributor. Hopefully some merge conflicts arise during development where we can discuss conflict solving and avoidance.

git-history

The Rust School of Music (Rust)

The Rust programming language is now the 7th time in a row most loved programming language, according to Stack Overflow. Syntactically it resembles C but is heavily influenced by functional languages, such as Standard ML or Haskell. This module will introduce to you borrow checking and some functional styled programming. It will not replace a full FP class but will approach and motivate from a Python practitioner POV. We will use it as our project language for writing simple complex number structures. That should give enough complexity to explain the concepts, connects with signal processing and provides open ended material for project work.

Automation (Hooks and Runner)

Hidden cost in research is a thing. The short duration of internships and thesis make code reproducibility important. We will discuss and get experience in code formatting, linting and testing. If time permits we will also take a look at coverage and verification. This module combines concepts of version tracking with Rust tooling to save work as a maintainer and provide long-term manageable repositories.

Schedule

Modal editing
Git
Rust Automation
I
Introduction
Changes & Repetitons
Modes
Compounds
II Text Objects
Visual Mode
Introduction
Commits & History
Life of Files
Viewing Logs & Diffs
III Buffer & Args
Yanking & Registers
Remotes
Branching
Common Programming Concepts
Compounds Types

Control Flow
Pattern Matching
IV Github and Gitlab
Resolving Conflicts
Borrow Checker
Introduction
Hooks vs. Runners
Formatting
Testing
V Polymorphism
Iterators
Documentation
One-Shot vs. Wall Clock Benchmarks

In Detail

Topics: Practice:
Modal I
- a short history of modal editing going from ed to Visual Studio Code
- what is editing about, structures in text & code
- separating changes, making them repeatable

- moving precisely where you want
- the modes in modal editing
- compounds to create actions with repetition


Preparation
- prepare a Linux system with Vim installed
- Sharpening the Axe (Vimconf 2019)
- Vim Adventures

Extensions
- read the motions help page
- practice with :Tutor
- Efficient Editing
Modal II
- structural editing with text objects
- where vi got its name and visual mode in ViM

Git I
- the origin of Git and what it brought to devs
- introduction to most important structures
- managing files in your working directory
- viewing changes holistic or point based
Preparation
- The Git Parable

Extensions
- Read chapter 2 of Git Book
- Additional objects: targets.vim
- Chapter 1 in Git from the Bottom Up

Modal III
- the buffer list in Unix environment
- switching swiftly and augment with arguments

Git II
- sharing code with remotes
- parallel coding with branches

Rust I
- a short characterization to other languages
- variables, mutability and scopes
- primitive types and compound types
- what is special about pattern matching
Preparation
- Buffer is King (Vimconf 2020)
- Rust in Perspective

Extensions
- Read chapter 3, chapter 5, chapter 6 of the Rust Book
- Do first eight of Rust by Examples
- The Macro Machine (Vimconf 2021)
- A tidy, linear Git history
Git III
- an introduction to Github and Gitlab
- how to resolve merge conflicts

Rust II
- manual managed memory vs. garbage collectors vs. borrow checker
- owning and referring

Automation I
- introduction to continuous integration
- hooks vs. runners
- code formatting and testing
Preparation
- create a Github account
- Read Chapter 5 of Git Book

Extensions
- The Rust Borrow Checker - a Deep Dive
- Commit and push code into repository
- Read Chapter 8 of Git book
Rust III
- Polymorphism, Generics and Bounds
- Iterators

Automation II
- the case for documentation
- benchmarking in CI, one-shot vs. statistics
Preparation
- Readme of Iai
- Read abstract of Chapter 10 of Rust Book



Extensions
- Read Chapter 10.1 and Chapter 10.2
- Evaluate performance in release vs debug mode