Forget Flags and Scripts: Just Rename the File
6 hours ago
- #programming
- #configuration
- #portability
- Programs can use their own filename as input, making configuration self-contained and portable.
- Flags and scripts have limitations: flags are ephemeral, scripts depend on environment.
- Example 1: Reusable installers (e.g., install_PY3_MODULE_NAME.exe) read filenames to customize actions.
- Example 2: AI experiment runners (e.g., train---resnet50---lr0.001---batch32---cifar10.exe) parse filenames for hyperparameters and datasets.
- Example 3: Ephemeral utilities (e.g., compress---photos---high.exe) encode tasks in filenames for instant execution.
- Example 4: P2P VPN tunnels (e.g., lounge-room---friends-machine---t25565---minecraft.exe) simplify setup using filenames for endpoints and ports.
- This approach combines configuration, portability, and reproducibility into a single file.