# Developer’s guide

This section is intended as a guide to how Brian functions internally for people developing Brian itself, or extensions to Brian. It may also be of some interest to others wishing to better understand how Brian works internally.

If you use VS code as your development environment, it will offer to automatically build a Brian development Docker container when you open the repository, with all the required dependencies installed and configured. Further documentation for this approach can be found in the `.devcontainer` directory.

- Coding guidelines
  - Development workflow
  - Coding conventions
  - Representing Brian objects
  - Defensive programming
  - Documentation
  - Logging
  - Testing
- Units
  - Casting rules
  - Functions and units
- Equations and namespaces
  - Equation parsing
  - Variables
  - Namespaces
- Variables and indices
  - Introduction
  - Creating variables
  - References
  - Indices
  - Getting and setting state variables
  - Additional variables and indices
- Preferences system
  - Accessing and setting preferences
  - Preference files
  - Registration
  - Validation functions
  - Validation
  - File format
  - Built-in preferences
- Adding support for new functions
- Code generation
  - Code path
  - Code generation
  - Syntax translation
  - Templates
  - Code objects
  - Default functions
  - Code guide
  - Additional information
- Standalone implementation
  - Array cache
  - Command line arguments
- Multi-threading with OpenMP
  - Key concepts
  - Use of `#pragma` flags
  - How to make your template use OpenMP parallelism
  - Synaptic propagation in parallel
  - Compilation of the code
- Devices
  - Memory management
  - Code objects
  - Building
  - Device override methods
  - Other methods
- Solving differential equations with the GNU Scientific Library
  - StateUpdateMethod
  - GSLCodeObject
  - GSLCodeGenerator
  - Stateupdate templates