Skip to main content
Ctrl+K
Effective Programming Practices for Economists: Topics - Home Effective Programming Practices for Economists: Topics - Home
  • Some Background
    • A Brief History of Operating Systems
    • Graphs
    • File Systems
  • Miscellaneous Tools
    • History of computer interfaces
    • Why use shells today?
    • Navigation in the unix shell
    • Navigation in the windows shell
  • Git and Github
    • Introduction and Overview
    • Why git?
    • Installing git and some useful shell commands
    • How git works
    • Creating repositiories
    • Cloning GitHub repos + Personal Access Tokens
    • Staging files
    • Making commits
    • Undoing things
    • Branches
    • Merging and resolving merge conflicts
    • Introduction to GitHub
    • Collaboration
    • Pre-commit hooks
  • Python: Installation and Execution
    • Installation and introduction to Pixi
    • Executing .py files in VS Code
    • Executing Jupyter notebooks in VS Code
    • Running Python code via pytask
    • Running Python code via pytest
    • Modifying Pixi environments
  • Python: Installation and Execution (via conda)
    • Installing Python on Linux (conda/mamba)
    • Installing Python on Mac
    • Installing Python on Windows (conda/mamba)
    • Installing Python with Windows Subsystem for Linux (WSL2) (conda/mamba)
    • Executing notebooks in a browser (conda/mamba)
    • Executing jupyter notebooks in VS Code (conda/mamba)
    • Executing .py files from the shell (conda/mamba)
    • Executing .py files in VS Code (conda/mamba)
    • Running Python code via pytask (conda/mamba)
    • Running Python code via pytest (conda/mamba)
    • Environment files and environments (conda/mamba)
  • Python Basics
    • Assignment and Built-in Scalar Types
    • Strings
    • Lists, Tuples and Sets
    • Dictionaries
    • For loops
    • If conditions
    • Comprehensions
    • Defining Functions
    • Principles for Good Functions
    • Tracebacks and Asking for Help
    • Importing, Namespaces, Modules
    • File paths with pathlib
  • Debugging
    • Introduction to debugging
    • Strategies for debugging
    • Avoiding debugging
    • (Armchair) Psychology of debugging
    • Gathering data efficiently
    • Using the Pdb+ debugger
  • Software Engineering
    • Style guides
    • Naming things
    • Pure functions
    • The idea of unit testing
    • What does pytest do?
    • Writing simple (py)tests
    • Testing code that should raise errors
    • What to test? How to test it?
    • Reusing test code
    • Introduction to error handling
    • Which errors to handle?
    • How to raise errors?
    • Worked error handling example
    • Defining custom containers
    • When to use custom containers?
    • Partialling arguments to functions
    • Why Type Hints?
    • Basic Type Hint Syntax
    • Collections and Generics
    • Dataclasses and Typed Structures
    • Advanced Type Patterns
  • Data management with pandas
    • What is (modern) pandas?
    • DataFrames and Series
    • Data types
    • Loading and saving data
    • Setting and renaming columns and indices
    • Selecting rows and columns
    • Inspecting and summarizing data
    • Creating variables
    • Merging datasets
    • Data management: Definitions and example
    • Imperative data cleaning
    • Functional data cleaning: The How
    • Functional data cleaning: The Why
    • Managing data with a complex structure
    • Data management: Tips, tricks, and advanced topics
  • Scientific Computing
    • What is numpy?
    • Creating arrays
    • Array indexing
    • Calculations on arrays
    • Calculations between arrays
    • Randomness
    • Broadcasting
    • Introduction to making code fast
    • Measuring runtime
    • Profiling code with snakeviz
    • Line profiling
    • Writing fast code with numpy
    • Writing fast code with numba
  • Numerical Optimization
    • Introduction to numerical optimization
    • Optimagic overview
    • Using optimagic’s minimize and maximize
    • Choosing optimization algorithms
    • Visualizing optimizer histories
    • Set up of the example
    • Grid Search
    • Derivative-Based Line Search
    • Derivative-Based Trust Region
    • Derivative-Free Direct Search
    • Derivative-Free Trust Region
  • Reproducible Research
    • What does reproducibility mean?
    • What does pytask do?
    • Writing simple (py)tasks
    • Writing (py)tasks with multiple outputs
    • Re-using pytask functions
    • The pytask documentation
    • What are the project templates?
    • Setting up a project
    • Directory structure in the templates
    • Handling paths in projects
  • Texts, Typesetting, and Text Data
    • Markup languages
    • Markdown syntax
    • Markdown applications
    • Writing Readme Files
  • Plotting
    • Goals and Workflow
    • Practical Approach
    • Why plotly? And a prerequisite
    • Quick plots with plotly express
    • Quick plots with plotly express: Example Notebook
    • Customise plots created with plotly express
    • Customise plots created with plotly express: Example Notebook
    • Customised plots with plotly graph objects
    • Customised plots with plotly graph objects: Example Notebook
  • Data Analysis in Python
    • Python’s Data Analysis Ecosystem
    • Running regressions using statsmodels
    • Working with statsmodels’ results objects
    • Introduction to Machine Learning
    • Introduction to scikit-learn
    • Cross-validation and hyperparamters in scikit-learn
  • .md

Software Engineering

Software Engineering#

  • Style guides
  • Naming things
  • Pure functions
  • The idea of unit testing
  • What does pytest do?
  • Writing simple (py)tests
  • Testing code that should raise errors
  • What to test? How to test it?
  • Reusing test code
  • Introduction to error handling
  • Which errors to handle?
  • How to raise errors?
  • Worked error handling example
  • Defining custom containers
  • When to use custom containers?
  • Partialling arguments to functions
  • Why Type Hints?
  • Basic Type Hint Syntax
  • Collections and Generics
  • Dataclasses and Typed Structures
  • Advanced Type Patterns

previous

Using the Pdb+ debugger

next

Style guides

By Janoś Gabler and Hans-Martin von Gaudecker